Documentation

Provenance.Semirings.Viterbi

Viterbi m-semiring #

This file defines the Viterbi semiring over non-negative reals in [0,1]. Addition is max, multiplication is the usual product, zero is 0, and one is 1.

The Viterbi semiring is absorptive and idempotent, and satisfies left-distributivity of multiplication over monus.

This semiring is discussed in Green & Tannen, The Semiring Framework for Database Provenance.

References #

Viterbi semiring (max-times) over probabilities in [0,1].

Equations
Instances For
    @[implicit_reducible]
    Equations
    theorem Viterbi.ext {a b : Viterbi} (h : a = b) :
    a = b
    theorem Viterbi.ext_iff {a b : Viterbi} :
    a = b a = b
    @[simp]
    theorem Viterbi.coe_mk (p : NNReal) (hp : p 1) :
    p, hp = p
    @[implicit_reducible]
    Equations
    @[implicit_reducible]
    Equations
    @[implicit_reducible]
    Equations
    @[implicit_reducible]
    Equations
    @[simp]
    theorem Viterbi.zero_def :
    0 = 0
    @[simp]
    theorem Viterbi.one_def :
    1 = 1
    @[simp]
    theorem Viterbi.add_def (a b : Viterbi) :
    ↑(a + b) = max a b
    @[simp]
    theorem Viterbi.mul_def (a b : Viterbi) :
    ↑(a * b) = a * b
    @[implicit_reducible]
    Equations
    • One or more equations did not get rendered due to their size.
    theorem Viterbi.viterbi_order_le (a b : Viterbi) :
    a b a + b = b
    @[implicit_reducible]
    Equations
    • One or more equations did not get rendered due to their size.
    @[simp]
    theorem Viterbi.le_def (a b : Viterbi) :
    a b a b
    @[implicit_reducible]
    noncomputable instance Viterbi.instSub :
    Equations

    Viterbi has characteristic 0 in the CharP sense: it is idempotent and nontrivial.

    @[implicit_reducible]

    Viterbi is a commutative m-semiring. The natural order is the usual order on [0,1], and the monus is a if a > b, 0 if a ≤ b.

    Equations
    • One or more equations did not get rendered due to their size.
    theorem Viterbi.not_mul_idempotent :
    ¬∀ (a : Viterbi), a * a = a

    Viterbi multiplication is not idempotent: (1/2) * (1/2) = 1/4 ≠ 1/2.

    theorem Viterbi.no_hom_from_BoolFunc {Y : Type} [Inhabited Y] :
    ∃ (ν : YViterbi), ¬∃ (φ : BoolFunc Y →+* Viterbi), ∀ (i : Y), φ (BoolFunc.var i) = ν i

    There is no semiring homomorphism from BoolFunc Y to Viterbi sending the variables to arbitrary values: Viterbi multiplication (ordinary product on [0,1]) is not idempotent, contradicting var i * var i = var i in BoolFunc Y.