Documentation

Linglib.Core.Logic.Truth3

Three-Valued Truth #

@cite{kleene-1952}

Three-valued truth type for trivalent semantics across linglib. Used for:

Main definitions #

Three-valued truth.

Instances For
    @[reducible, inline]

    Alias for indet, used in homogeneity contexts where the third value represents a truth-value gap (some but not all atoms satisfy the predicate).

    Equations
    Instances For
      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.
      Equations
      • One or more equations did not get rendered due to their size.
      Equations
      @[simp]
      @[simp]

      Negation is involutive.

      Negation preserves indet.

      Conjunction is commutative.

      Disjunction is commutative.

      false is absorbing for conjunction.

      true is absorbing for disjunction.

      true is identity for conjunction.

      false is identity for disjunction.

      indet propagates in conjunction (when not dominated by false).

      indet propagates in disjunction (when not dominated by true).

      Conjunction agrees with Bool when both defined.

      Disjunction agrees with Bool when both defined.

      Negation agrees with Bool.

      theorem Core.Duality.Truth3.meet_assoc (a b c : Truth3) :
      (a.meet b).meet c = a.meet (b.meet c)

      Conjunction is associative.

      theorem Core.Duality.Truth3.join_assoc (a b c : Truth3) :
      (a.join b).join c = a.join (b.join c)

      Disjunction is associative.

      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
      Instances For
        theorem Core.Duality.Truth3.xor_comm (a b : Truth3) :
        a.xor b = b.xor a

        XOR is commutative.

        XOR decomposes as (a ∨ b) ∧ ¬(a ∧ b) under Strong Kleene.

        XOR propagates indet unconditionally from the left.

        XOR propagates indet unconditionally from the right.

        XOR agrees with Bool XOR on defined inputs.

        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.

        Meta-assertion operator: maps indet to false. Makes any trivalent value bivalent by treating undefinedness as falsity.

        Equations
        Instances For

          Meta-assertion always produces a defined value.

          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.

          meetMiddletruefalseindet
          truetruefalseindet
          falsefalsefalsefalse
          indetindetindetindet
          Equations
          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.

            joinMiddletruefalseindet
            truetruetruetrue
            falsetruefalseindet
            indetindetindetindet
            Equations
            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.

              true is left identity for Middle Kleene conjunction: true ∧ ψ = ψ. When the first conjunct is true, the result is just the second conjunct.

              false is left zero for Middle Kleene conjunction: false ∧ ψ = false for all ψ. This is the key asymmetry vs Weak Kleene: meetMiddle false indet = false (defined operand absorbs via Strong Kleene) whereas meetWeak false indet = indet.

              false is left identity for Middle Kleene disjunction: false ∨ ψ = ψ. When the first disjunct is false, the result is just the second disjunct.

              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.

              Weak Kleene refines Middle Kleene disjunction: when Weak Kleene gives a defined answer, Middle Kleene agrees.

              Middle Kleene refines Strong Kleene disjunction: when Middle Kleene gives a defined answer, Strong Kleene agrees.

              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.

              meetBelnaptruefalseindet
              truetruefalsetrue
              falsefalsefalsefalse
              indettruefalseindet

              Contrast: Strong Kleene meet (indet propagates unless dominated), Weak Kleene meetWeak (indet always propagates).

              Equations
              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
                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 undefined/gap values behave under logical connectives.

                  Four truth-functional systems for three-valued logic:

                  • Strong Kleene: gap propagates unless the defined operand forces the result (false ∧ _ = false, true ∨ _ = true)
                  • Middle Kleene: left-gap absorbs; left-defined uses Strong Kleene. Both conjunction and disjunction are asymmetric. (@cite{peters-1979}, @cite{beaver-krahmer-2001})
                  • Weak Kleene: gap always propagates (both operands must be defined)
                  • Belnap: gap is skipped (only defined operands contribute; gap is the identity element for both ∧ and ∨)
                  Policygap ∧ Tgap ∧ FF ∧ gapT ∨ gapgap ∨ T
                  StronggapFFTT
                  MiddlegapgapFTgap
                  Weakgapgapgapgapgap
                  BelnapTFFTT
                  Instances For
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      All four gap policies agree on fully defined inputs.

                      All four gap policies agree on fully defined inputs (disjunction).

                      Strong Kleene refines Belnap: when Strong Kleene gives a defined answer, Belnap agrees.

                      Weak Kleene refines Strong Kleene: when Weak Kleene gives a defined answer, Strong Kleene agrees.

                      The definedness hierarchy #

                      The four gap policies form a hierarchy in terms of how often they produce defined (non-#) results:

                      Weak Kleene ≤ Middle Kleene ≤ Strong Kleene ≤ Belnap
                      

                      The refinement property: if a weaker system produces a defined result, every stronger system agrees on that result. The systems only disagree on cases where the weaker one yields # but the stronger one rescues a defined value.

                      Weak Kleene refines Middle Kleene conjunction.

                      Middle Kleene refines Strong Kleene conjunction.

                      Strong Kleene refines Belnap disjunction.

                      Weak → Strong conjunction (transitive: Weak ≤ Middle ≤ Strong).

                      Weak → Strong disjunction (transitive: Weak ≤ Middle ≤ Strong).

                      Weak → Belnap conjunction (full chain).

                      Weak → Belnap disjunction (full chain).

                      Middle → Belnap conjunction (two-step chain).

                      Middle → Belnap disjunction (two-step chain).

                      The full 4-system refinement chain for conjunction: if meetWeak a b is defined, all four systems agree.

                      The full 4-system refinement chain for disjunction: if joinWeak a b is defined, all four systems agree.

                      How truth values aggregate through an operator. Conjunctive (universal-like): all must succeed. Disjunctive (existential-like): one must succeed.

                      Instances For
                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          Distributivity operator with homogeneity presupposition. TRUE if all satisfy, FALSE if none satisfy, GAP if mixed.

                          Shared structure of DIST (for plural individuals) and DIST_π (for conditional alternatives, @cite{santorio-2018}).

                          Equations
                          Instances For
                            @[simp]

                            dist on a homogeneous true list.

                            dist agrees with Truth3.ofBool on singletons.

                            @[reducible, inline]
                            abbrev Core.Duality.Prop3 (W : Type u_1) :
                            Type u_1

                            Three-valued propositions: functions from worlds to Truth3.

                            Equations
                            Instances For
                              def Core.Duality.Prop3.neg {W : Type u_1} (p : Prop3 W) :

                              Pointwise negation.

                              Equations
                              Instances For
                                def Core.Duality.Prop3.and {W : Type u_1} (p q : Prop3 W) :

                                Pointwise Strong Kleene conjunction.

                                Equations
                                Instances For
                                  def Core.Duality.Prop3.or {W : Type u_1} (p q : Prop3 W) :

                                  Pointwise Strong Kleene disjunction.

                                  Equations
                                  Instances For

                                    Always true.

                                    Equations
                                    Instances For

                                      Always false.

                                      Equations
                                      Instances For

                                        Always undefined.

                                        Equations
                                        Instances For
                                          def Core.Duality.Prop3.ofBProp {W : Type u_1} (p : WBool) :

                                          Convert BProp to Prop3 (always defined).

                                          Equations
                                          Instances For
                                            def Core.Duality.Prop3.orWeak {W : Type u_1} (p q : Prop3 W) :

                                            Pointwise Weak Kleene disjunction.

                                            Equations
                                            Instances For
                                              def Core.Duality.Prop3.andWeak {W : Type u_1} (p q : Prop3 W) :

                                              Pointwise Weak Kleene conjunction.

                                              Equations
                                              Instances For

                                                Pointwise meta-assertion.

                                                Equations
                                                Instances For
                                                  def Core.Duality.Prop3.andBelnap {W : Type u_1} (p q : Prop3 W) :

                                                  Pointwise Belnap conjunction. @cite{belnap-1970}

                                                  Equations
                                                  Instances For
                                                    def Core.Duality.Prop3.orBelnap {W : Type u_1} (p q : Prop3 W) :

                                                    Pointwise Belnap disjunction. @cite{belnap-1970}

                                                    Equations
                                                    Instances For
                                                      def Core.Duality.Prop3.andMiddle {W : Type u_1} (p q : Prop3 W) :

                                                      Pointwise Middle Kleene conjunction. @cite{peters-1979} @cite{beaver-krahmer-2001} @cite{spector-2025}

                                                      Equations
                                                      Instances For
                                                        def Core.Duality.Prop3.orMiddle {W : Type u_1} (p q : Prop3 W) :

                                                        Pointwise Middle Kleene disjunction (asymmetric: left-to-right). @cite{peters-1979} @cite{beaver-krahmer-2001} @cite{spector-2025}

                                                        Equations
                                                        Instances For
                                                          def Core.Duality.Prop3.xor {W : Type u_1} (p q : Prop3 W) :

                                                          Pointwise Strong Kleene exclusive disjunction. @cite{wang-davidson-2026}

                                                          Equations
                                                          Instances For