Truth values of Kleene's strong three-valued logic #
The truth values of Kleene's strong three-valued logic (K3) [Kle52], as an algebra: a bounded
linear order false < unknown < true, the truth order, with a complement. Meet ⊓, join ⊔ and
complement ᶜ are Kleene's conjunction, disjunction and negation.
These are also the truth values of SQL [Cod79], where a comparison involving NULL evaluates
to unknown, and AND, OR and NOT are the meet, join and complement defined here.
In the information order ⊑, unknown lies below both definite values, which are incomparable.
Every operation is monotone in it, and ⊓, ⊔ and ᶜ are the greatest monotone extensions of
&&, || and !. Under ⊑, Kleene.Value is the flat domain on Bool, so these results could
be subsumed under a general development of domain theory.
Main definitions #
Kleene.Value: the three truth values.Compl Kleene.Value: the complement, which swapstrueandfalseand fixesunknown.Kleene.Value.ofBool: the embedding ofBool.Kleene.Value.InfoLE, written⊑: the information order.Kleene.Value.toOption: the equivalence withOption Bool,unknownasnone.
Main results #
LinearOrder Kleene.Value,BoundedOrder Kleene.Value: the truth order.Kleene.Value.compl_inf,Kleene.Value.compl_sup: the De Morgan laws.Kleene.Value.ofBool_andand friends:ofBoolcommutes with the operations.IsPartialOrder Kleene.Value Kleene.Value.InfoLE,Kleene.Value.InfoLE.infand friends: the information order is a partial order in which every operation is monotone.Kleene.Value.infoLE_inf_of_extendsand friends:⊓,⊔andᶜare the greatest monotone extensions of&&,||and!.Kleene.Value.eq_compl_of_extends:ᶜis the only monotone extension of!.
References #
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
The truth order #
The truth order false < unknown < true.
Equations
- Cslib.Logic.Kleene.Value.instLE = { le := fun (a b : Cslib.Logic.Kleene.Value) => a = b ∨ a = Cslib.Logic.Kleene.Value.false ∨ b = Cslib.Logic.Kleene.Value.true }
Equations
- x✝¹.instDecidableLE x✝ = { decide := decide (x✝¹ = x✝) || decide (x✝¹ = Cslib.Logic.Kleene.Value.false ∨ x✝ = Cslib.Logic.Kleene.Value.true), reflects_decide := ⋯ }
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.
Meet and join #
Complement #
The complement reverses the truth order.
The information order #
The information order: unknown lies below every value, and the definite values are
incomparable. It is distinct from the truth order ≤.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- x✝¹.instDecidableRelInfoLE x✝ = { decide := decide (x✝¹ = Cslib.Logic.Kleene.Value.unknown) || decide (x✝¹ = x✝), reflects_decide := ⋯ }
Monotonicity in the information order #
Greatest monotone extensions #
The complement is the greatest extension of Boolean negation that is monotone in the information order.
The meet is the greatest extension of Boolean conjunction that is monotone in the information order.
The join is the greatest extension of Boolean disjunction that is monotone in the information order.
Kleene.Value is Option Bool: the definite values as some, unknown as none.
Equations
- One or more equations did not get rendered due to their size.