Three-Valued Truth #
@cite{kleene-1952}
Three-valued truth type for trivalent semantics across linglib. Used for:
- Plural predication: homogeneity gaps (all satisfy → true, none → false, some but not all → gap). @cite{kriz-2016}, @cite{kriz-spector-2021}
- Conditionals: indeterminacy under supervaluation when selection functions disagree. @cite{ramotowska-marty-romoli-santorio-2025}
- Presupposition: undefined when presupposition fails.
- Duality: existential vs universal aggregation over three-valued lists.
Main definitions #
Equations
- Core.Duality.instReprTruth3 = { reprPrec := Core.Duality.instReprTruth3.repr }
Equations
- Core.Duality.instReprTruth3.repr Core.Duality.Truth3.true prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Core.Duality.Truth3.true")).group prec✝
- Core.Duality.instReprTruth3.repr Core.Duality.Truth3.false prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Core.Duality.Truth3.false")).group prec✝
- Core.Duality.instReprTruth3.repr Core.Duality.Truth3.indet prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Core.Duality.Truth3.indet")).group prec✝
Instances For
Equations
- Core.Duality.instDecidableEqTruth3 x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Instances For
Equations
- Core.Duality.instInhabitedTruth3 = { default := Core.Duality.instInhabitedTruth3.default }
Chain order: false < indet < true. Prop-valued (not Bool-wrapped) so
the Decidable instance reduces under rfl and decide.
Equations
- Core.Duality.Truth3.false.le x✝ = True
- Core.Duality.Truth3.indet.le Core.Duality.Truth3.false = False
- Core.Duality.Truth3.indet.le x✝ = True
- Core.Duality.Truth3.true.le Core.Duality.Truth3.true = True
- x✝¹.le x✝ = False
Instances For
Equations
- Core.Duality.Truth3.instLE = { le := Core.Duality.Truth3.le }
Term-mode Decidable instance — reduces eagerly under rfl/decide,
enabling clean kernel-level computation through the chain order.
Equations
- Core.Duality.Truth3.false.instDecLE b = isTrue trivial
- Core.Duality.Truth3.indet.instDecLE Core.Duality.Truth3.false = isFalse not_false
- Core.Duality.Truth3.indet.instDecLE Core.Duality.Truth3.indet = isTrue trivial
- Core.Duality.Truth3.indet.instDecLE Core.Duality.Truth3.true = isTrue trivial
- Core.Duality.Truth3.true.instDecLE Core.Duality.Truth3.false = isFalse not_false
- Core.Duality.Truth3.true.instDecLE Core.Duality.Truth3.indet = isFalse not_false
- Core.Duality.Truth3.true.instDecLE Core.Duality.Truth3.true = isTrue trivial
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.
Strong Kleene operations #
Strong Kleene meet/join on a chain ARE min/max. The bespoke meet/join
names are kept as @[reducible] defs so 91 downstream call sites continue
to work, but the canonical mathlib operations (⊓/⊔/min/max) are
preferred.
Strong Kleene meet (= min on the chain false < indet < true).
Equations
- Core.Duality.Truth3.meet = min
Instances For
Strong Kleene join (= max on the chain false < indet < true).
Equations
- Core.Duality.Truth3.join = max
Instances For
Mathlib-derived simp lemmas #
These are inherited from BoundedOrder + Lattice + LinearOrder and
re-exposed under the bespoke meet/join names for downstream search.
Convert Bool to Truth3.
Equations
Instances For
Check if defined (not indet).
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Convert to Bool if defined, else default to false.
Equations
Instances For
Conjunction is commutative. (= min_comm)
Disjunction is commutative. (= max_comm)
true is identity for conjunction.
false is identity for disjunction.
Truth3.ofBool preserves ⊓/&& (canonical typeclass form).
Truth3.ofBool preserves ⊔/|| (canonical typeclass form).
Negation agrees with Bool.
Truth3.ofBool is a bounded lattice homomorphism from Bool into the
{⊥, ⊤} sublattice of Truth3. The four homomorphism conditions
follow from ofBool_sup, ofBool_inf, and the fact that
ofBool false = ⊥ and ofBool true = ⊤ definitionally.
Registering this instance lets downstream consumers (e.g.,
Core.Duality.aggregate_*_map_ofBool) appeal to the general
LatticeHom API rather than to bespoke case-split lemmas.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Strong Kleene exclusive disjunction.
True when exactly one operand is true; false when both or neither; undefined when either operand is undefined.
Unlike inclusive disjunction (join), XOR cannot "see past" an
undefined operand: join .true .indet = .true (the true operand
settles the result), but xor .true .indet = .indet (we need to
know the other's value to determine XOR).
@cite{wang-davidson-2026} Figure 2.
Equations
- Core.Duality.Truth3.true.xor Core.Duality.Truth3.false = Core.Duality.Truth3.true
- Core.Duality.Truth3.false.xor Core.Duality.Truth3.true = Core.Duality.Truth3.true
- Core.Duality.Truth3.true.xor Core.Duality.Truth3.true = Core.Duality.Truth3.false
- Core.Duality.Truth3.false.xor Core.Duality.Truth3.false = Core.Duality.Truth3.false
- x✝¹.xor x✝ = Core.Duality.Truth3.indet
Instances For
Uniform projection under XOR: XOR returns undefined iff at least one operand is undefined. This is the semantic core of @cite{wang-davidson-2026}'s prediction: exclusive disjunction does not filter presuppositions.
Contrast with inclusive disjunction (join), where
join .true .indet = .true — a true first disjunct "filters"
the second's presupposition failure.
Weak Kleene disjunction: indet is absorbing (both operands must be defined).
Equations
- Core.Duality.Truth3.true.joinWeak Core.Duality.Truth3.true = Core.Duality.Truth3.true
- Core.Duality.Truth3.true.joinWeak Core.Duality.Truth3.false = Core.Duality.Truth3.true
- Core.Duality.Truth3.false.joinWeak Core.Duality.Truth3.true = Core.Duality.Truth3.true
- Core.Duality.Truth3.false.joinWeak Core.Duality.Truth3.false = Core.Duality.Truth3.false
- x✝¹.joinWeak x✝ = Core.Duality.Truth3.indet
Instances For
Weak Kleene conjunction: indet is absorbing.
Equations
- Core.Duality.Truth3.true.meetWeak Core.Duality.Truth3.true = Core.Duality.Truth3.true
- Core.Duality.Truth3.true.meetWeak Core.Duality.Truth3.false = Core.Duality.Truth3.false
- Core.Duality.Truth3.false.meetWeak Core.Duality.Truth3.true = Core.Duality.Truth3.false
- Core.Duality.Truth3.false.meetWeak Core.Duality.Truth3.false = Core.Duality.Truth3.false
- x✝¹.meetWeak x✝ = Core.Duality.Truth3.indet
Instances For
Meta-assertion always produces a defined value.
Meta-assertion is idempotent.
Meta-assertion preserves defined values.
Middle Kleene conjunction: left-undefined absorbs; left-defined
follows Strong Kleene. Asymmetric: false ∧ # = false but
# ∧ false = #.
This captures left-to-right evaluation for conjunction (@cite{peters-1979}, @cite{beaver-krahmer-2001}, @cite{spector-2025}): if the first conjunct is undefined, the result is undefined regardless of the second. If the first conjunct is defined, Strong Kleene applies.
| meetMiddle | true | false | indet |
|---|---|---|---|
| true | true | false | indet |
| false | false | false | false |
| indet | indet | indet | indet |
Equations
- Core.Duality.Truth3.indet.meetMiddle x✝ = Core.Duality.Truth3.indet
- x✝¹.meetMiddle x✝ = x✝¹.meet x✝
Instances For
Middle Kleene disjunction: left-undefined absorbs; left-defined
follows Strong Kleene. Asymmetric: true ∨ # = true but
# ∨ true = #.
This captures left-to-right presupposition filtering (@cite{peters-1979}): if the first disjunct is defined, its truth value can settle the result even when the second is undefined. But if the first is undefined, the whole disjunction is undefined regardless of the second.
| joinMiddle | true | false | indet |
|---|---|---|---|
| true | true | true | true |
| false | true | false | indet |
| indet | indet | indet | indet |
Equations
- Core.Duality.Truth3.indet.joinMiddle x✝ = Core.Duality.Truth3.indet
- x✝¹.joinMiddle x✝ = x✝¹.join x✝
Instances For
Middle Kleene conjunction is NOT commutative.
meetMiddle false indet = false but meetMiddle indet false = indet.
When the left operand is defined, Middle Kleene conjunction equals Strong Kleene conjunction.
Middle Kleene disjunction is NOT commutative.
joinMiddle true indet = true but joinMiddle indet true = indet.
Left-undefined absorbs Middle Kleene conjunction.
Left-undefined absorbs Middle Kleene disjunction.
Middle Kleene conjunction agrees with Bool on defined inputs.
Middle Kleene disjunction agrees with Bool on defined inputs.
When the left operand is defined, Middle Kleene disjunction equals Strong Kleene disjunction.
Belnap conjunction: undefined operands are skipped.
If one operand is undefined, the result equals the other.
If both are undefined, the result is undefined.
This models @cite{belnap-1970}'s (8): conjunction is assertive iff
at least one conjunct is assertive; what it asserts = conjunction
of assertive conjuncts only. indet is the identity element.
| meetBelnap | true | false | indet |
|---|---|---|---|
| true | true | false | true |
| false | false | false | false |
| indet | true | false | indet |
Contrast: Strong Kleene meet (indet propagates unless dominated),
Weak Kleene meetWeak (indet always propagates).
Equations
- Core.Duality.Truth3.indet.meetBelnap x✝ = x✝
- x✝.meetBelnap Core.Duality.Truth3.indet = x✝
- x✝¹.meetBelnap x✝ = x✝¹.meet x✝
Instances For
Belnap disjunction: undefined operands are skipped.
Models @cite{belnap-1970}'s (9): disjunction is assertive iff at
least one disjunct is assertive; what it asserts = disjunction of
assertive disjuncts only. indet is the identity element.
Equations
- Core.Duality.Truth3.indet.joinBelnap x✝ = x✝
- x✝.joinBelnap Core.Duality.Truth3.indet = x✝
- x✝¹.joinBelnap x✝ = x✝¹.join x✝
Instances For
indet is left identity for Belnap conjunction.
indet is right identity for Belnap conjunction.
Belnap conjunction is commutative.
indet is left identity for Belnap disjunction.
indet is right identity for Belnap disjunction.
Belnap disjunction is commutative.
Belnap conjunction agrees with Bool on defined inputs.
Belnap disjunction agrees with Bool on defined inputs.
How truth values aggregate through an operator. Conjunctive (universal-like): all must succeed. Disjunctive (existential-like): one must succeed.
- conjunctive : ProjectionType
- disjunctive : ProjectionType
Instances For
Equations
- Core.Duality.instReprProjectionType = { reprPrec := Core.Duality.instReprProjectionType.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Core.Duality.instDecidableEqProjectionType x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Three-valued propositions: functions from worlds to Truth3.
Equations
- Core.Duality.Prop3 W = (W → Core.Duality.Truth3)
Instances For
Prop3 W := W → Truth3 is a Pi type. The Lattice (W → Truth3)
instance auto-derives from Pi.instLattice once Truth3 has
Lattice (via LinearOrder), so (p ⊔ q) w = p w ⊔ q w and
(p ⊓ q) w = p w ⊓ q w come for free from mathlib's Pi.sup_apply
/ Pi.inf_apply. Use · ⊔ · / · ⊓ · directly instead of bespoke
Prop3.or/Prop3.and wrappers.
The only Truth3-specific operation that needs a pointwise lift here
is `metaAssert` (Beaver-Krahmer 𝒜) — there's no `Pi`-equivalent of
a unary type-collapsing operator.
Pointwise meta-assertion (Beaver-Krahmer 𝒜 operator).
Equations
- p.metaAssert w = (p w).metaAssert