Łukasiewicz m-semiring #
This file defines the Łukasiewicz (fuzzy logic) semiring over rationals [0,1].
Addition is max, multiplication is the Łukasiewicz t-norm max(a + b - 1, 0),
zero is 0, and one is 1.
The Łukasiewicz semiring is absorptive and idempotent, and satisfies left-distributivity of multiplication over monus.
This semiring is discussed as a provenance semiring in Grädel & Tannen, Provenance Analysis and Semiring Semantics for First-Order Logic.
References #
Equations
- instZeroLukasiewicz = { zero := ⟨0, instZeroLukasiewicz._proof_1⟩ }
Equations
- instOneLukasiewicz = { one := ⟨1, instOneLukasiewicz._proof_1⟩ }
Equations
- instAddLukasiewicz = { add := fun (a b : Lukasiewicz) => max a b }
Equations
- instMulLukasiewicz = { mul := fun (a b : Lukasiewicz) => let raw := max (↑a + ↑b - 1) 0; have h := ⋯; ⟨raw, h⟩ }
Equations
- instSubLukasiewicz = { sub := fun (a b : Lukasiewicz) => if a ≤ b then ⟨0, instZeroLukasiewicz._proof_1⟩ else a }
Equations
- instCommMagmaLukasiewicz = { toMul := instMulLukasiewicz, mul_comm := instCommMagmaLukasiewicz._proof_1 }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Lukasiewicz has characteristic 0 in the CharP sense: it is idempotent and
nontrivial, so every positive natural-number cast equals 1.
Lukasiewicz is a commutative m-semiring. The natural order is the usual rational
order, and the monus is a if a > b, 0 if a ≤ b. The δ operator matches ProvSQL's
Lukasiewicz::delta: the support indicator.
Equations
- One or more equations did not get rendered due to their size.
Equations
- instCommSemiringWithMonusLukasiewicz = { toSemiringWithMonus := instSemiringWithMonusLukasiewicz, mul_comm := ⋯ }
Łukasiewicz multiplication is not idempotent: (1/2) * (1/2) = max(0, 0) = 0 ≠ 1/2.
There is no semiring homomorphism from BoolFunc Y to the Łukasiewicz
semiring sending the variables to arbitrary values: Łukasiewicz multiplication
is not idempotent ((1/2) ⊗ (1/2) = 0 ≠ 1/2), contradicting
var i * var i = var i in BoolFunc Y.