De Morgan algebras and Kleene algebras #
LatticeWithInvolution is a bounded lattice with an involutive antitone complement ᶜ —
the common reduct of OrthocomplementedLattice (which adds the complementation laws) and
DeMorganAlgebra (which adds distributivity instead). The De Morgan laws are proved once
here, from involution and antitonicity alone. An Order.KleeneAlgebra is a De Morgan
algebra satisfying the Kleene law a ⊓ aᶜ ≤ b ⊔ bᶜ: every BooleanAlgebra qualifies
(the law degenerates through ⊥), and the three-element chain Trivalent is the
canonical non-Boolean example. These are the involution branch between mathlib's
DistribLattice and BooleanAlgebra, beside the existing pseudocomplement branch
(HeytingAlgebra).
Naming follows the literature exactly ("De Morgan algebra", "Kleene algebra" — the
lattice notion, not the regular-expression star-semiring that holds mathlib's root
KleeneAlgebra), disambiguated by namespace on the Order.Frame precedent. De Morgan
algebras are here bounded, as in Balbes-Dwinger (the nLab entry defines the unbounded
variant). [UPSTREAM] candidate for Mathlib/Order/DeMorganAlgebra/; the OrderDual/Prod/Pi
instances and the OrderIso α αᵒᵈ bundling live in DeMorganAlgebra/Basic.lean.
Main definitions #
LatticeWithInvolution— bounded lattice + involutive antitoneᶜ; De Morgan (compl_sup/compl_inf),compl_bot/compl_top, and the injectivity/order lemmas are derived here.DeMorganAlgebra— a distributiveLatticeWithInvolution.Order.KleeneAlgebra— aDeMorganAlgebrawith the Kleene law (inf_compl_le_sup_compl); everyBooleanAlgebrais an instance.
A bounded lattice with an involutive, order-reversing complement — the common reduct
of OrthocomplementedLattice and DeMorganAlgebra. Compl is pure notation, so ᶜ
carries no complementation laws here: a ⊓ aᶜ = ⊥ may fail.
- sup : α → α → α
- inf : α → α → α
- top : α
- bot : α
- compl : α → α
Complement is involutive:
aᶜᶜ = a.Complement is order-reversing.
Instances
The complement is antitone (bundled form of the compl_le_compl field).
Orthogonality is symmetric: a ≤ bᶜ ↔ b ≤ aᶜ.
De Morgan: complement of a join is the meet of complements — from involution and antitonicity alone; no distributivity or complementation is used.
De Morgan: complement of a meet is the join of complements.
A De Morgan algebra: a distributive bounded lattice with an involutive antitone
complement. Unlike BooleanAlgebra, complementation may fail (a ⊓ aᶜ ≠ ⊥).
Instances
A Kleene algebra (the lattice notion, Kalman's variety of strong Kleene logic — not
the regular-expression star-semiring at root KleeneAlgebra): a De Morgan algebra
satisfying the Kleene law.
- sup : α → α → α
- inf : α → α → α
- top : α
- bot : α
- compl : α → α
The Kleene law: contradictions lie below excluded middles.
Instances
Every Boolean algebra is a Kleene algebra: the Kleene law degenerates through ⊥.
Low priority so Boolean API is preferred where applicable.
Equations
- One or more equations did not get rendered due to their size.