Documentation

Linglib.Core.Order.DeMorganAlgebra.Defs

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 #

class LatticeWithInvolution (α : Type u_1) extends Lattice α, BoundedOrder α, Compl α :
Type u_1

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.

Instances

    The complement is antitone (bundled form of the compl_le_compl field).

    @[simp]
    @[simp]
    theorem LatticeWithInvolution.compl_inj_iff {α : Type u_1} [LatticeWithInvolution α] {a b : α} :
    a = b a = b
    theorem LatticeWithInvolution.compl_eq_iff_eq_compl {α : Type u_1} [LatticeWithInvolution α] {a b : α} :
    a = b a = b
    theorem LatticeWithInvolution.le_compl_comm {α : Type u_1} [LatticeWithInvolution α] {a b : α} :
    a b b a

    Orthogonality is symmetric: a ≤ bᶜ ↔ b ≤ aᶜ.

    @[simp]
    theorem LatticeWithInvolution.compl_sup {α : Type u_1} [LatticeWithInvolution α] (a b : α) :
    (ab) = ab

    De Morgan: complement of a join is the meet of complements — from involution and antitonicity alone; no distributivity or complementation is used.

    @[simp]
    theorem LatticeWithInvolution.compl_inf {α : Type u_1} [LatticeWithInvolution α] (a b : α) :
    (ab) = ab

    De Morgan: complement of a meet is the join of complements.

    class DeMorganAlgebra (α : Type u_1) extends DistribLattice α, LatticeWithInvolution α :
    Type u_1

    A De Morgan algebra: a distributive bounded lattice with an involutive antitone complement. Unlike BooleanAlgebra, complementation may fail (a ⊓ aᶜ ≠ ⊥).

    Instances
      class Order.KleeneAlgebra (α : Type u_1) extends DeMorganAlgebra α :
      Type u_1

      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.

      Instances
        @[implicit_reducible, instance 100]
        instance BooleanAlgebra.toOrderKleeneAlgebra {α : Type u_1} [BooleanAlgebra α] :

        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.