Involutive complements #
This file defines involutive complements. An involutive complement on an ordered type is a
complement ᶜ that is involutive, aᶜᶜ = a, and reverses the order. It is Birkhoff's
"involution", and a lattice with one is Kalman's "lattice with involution". The De Morgan laws
follow from these two properties alone, without any complementation law such as a ⊓ aᶜ = ⊥.
The involution is the common base of two branches between mathlib's lattices and
BooleanAlgebra. Adding distributivity gives De Morgan and Kleene algebras
(Core/Order/DeMorganAlgebra/); adding non-contradiction gives ortholattices
(Core/Order/Ortholattice.lean). A Boolean algebra lies on both.
Main definitions #
InvolutiveCompl: the data class of an involutive, order-reversing complement, extending the notation classCompland parameterized by the order, as mathlib'sInvolutiveNegextendsNegandOrderToptakes[LE α].InvolutiveCompl.complOrderIso: the involution as an order isomorphismα ≃o αᵒᵈ.
Main results #
InvolutiveCompl.compl_sup,InvolutiveCompl.compl_inf: the De Morgan laws.InvolutiveCompl.le_compl_comm:a ≤ bᶜ ↔ b ≤ aᶜ.BooleanAlgebra.toInvolutiveCompl: a Boolean algebra's complement is involutive.
Implementation notes #
The lemmas are protected in the InvolutiveCompl namespace because the root names
(compl_compl, compl_sup, ...) belong to mathlib's Boolean and Heyting API. Upstream, the
Boolean ones would be generalized to InvolutiveCompl, and complOrderIso would generalize
mathlib's OrderIso.compl. There is no OrderDual instance: its complement would have to agree
with the one mathlib's OrderDual.instBiheytingAlgebra gives the dual of a Boolean algebra, the
one place a genuine Compl diamond can arise.
References #
An involutive complement on an ordered type is a complement with aᶜᶜ = a that reverses
the order ([Kal58]'s involution, Birkhoff's dual automorphism of period two). Compl is
notation, so no complementation law is implied: a ⊓ aᶜ = ⊥ may fail.
- compl : α → α
The complement is involutive,
aᶜᶜ = a.The complement reverses the order.
Instances
Orthogonality is symmetric, a ≤ bᶜ ↔ b ≤ aᶜ.
The involution bundled as an order isomorphism onto the order dual. Upstream this is mathlib's
OrderIso.compl, generalized from BooleanAlgebra to InvolutiveCompl.
Equations
- InvolutiveCompl.complOrderIso α = { toFun := fun (a : α) => OrderDual.toDual aᶜ, invFun := fun (a : αᵒᵈ) => (OrderDual.ofDual a)ᶜ, left_inv := ⋯, right_inv := ⋯, map_rel_iff' := ⋯ }
Instances For
The complement is antitone (bundled form of the compl_le_compl field).
The De Morgan laws and the exchange of the bounds are complOrderIso preserving the lattice
operations: they follow from involution and antitonicity alone.
A Boolean algebra's complement is involutive and antitone.
Equations
- BooleanAlgebra.toInvolutiveCompl = { toCompl := inst✝.toCompl, compl_compl := ⋯, compl_le_compl := ⋯ }
Products and functions #
Equations
- instInvolutiveComplProd = { toCompl := Prod.instCompl, compl_compl := ⋯, compl_le_compl := ⋯ }
Equations
- instInvolutiveComplForall = { toCompl := Pi.instCompl, compl_compl := ⋯, compl_le_compl := ⋯ }