Order structures on finite types #
This file provides order instances on fintypes.
Computable instances #
On a Fintype, we can construct
- an
OrderBotfromSemilatticeInf. - an
OrderTopfromSemilatticeSup. - a
BoundedOrderfromLattice.
Those are marked as def to avoid defeqness issues.
Completion instances #
Those instances are noncomputable because the definitions of sSup and sInf use Set.toFinset
and set membership is undecidable in general.
On a Fintype, we can promote:
- a
Latticeto aCompleteLattice. - a
DistribLatticeto aCompleteDistribLattice. - a
LinearOrderto aCompleteLinearOrder. - a
BooleanAlgebrato aCompleteAtomicBooleanAlgebra.
Those are marked as def to avoid typeclass loops.
Concrete instances #
We provide a few instances for concrete types:
Constructs the ⊥ of a finite nonempty SemilatticeInf.
Equations
- Fintype.toOrderBot α = { bot := Finset.univ.inf' ⋯ id, bot_le := ⋯ }
Instances For
Constructs the ⊤ of a finite nonempty SemilatticeSup
Equations
- Fintype.toOrderTop α = { top := Finset.univ.sup' ⋯ id, le_top := ⋯ }
Instances For
Constructs the ⊤ and ⊥ of a finite nonempty Lattice.
Equations
- Fintype.toBoundedOrder α = { toOrderTop := Fintype.toOrderTop α, toOrderBot := Fintype.toOrderBot α }
Instances For
A finite bounded lattice is complete.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A finite bounded distributive lattice is completely distributive.
Equations
- Fintype.toCompleteDistribLatticeMinimalAxioms α = { toCompleteLattice := Fintype.toCompleteLattice α, inf_sSup_le_iSup_inf := ⋯, iInf_sup_le_sup_sInf := ⋯ }
Instances For
A finite bounded distributive lattice is completely distributive.
Equations
Instances For
A finite bounded linear order is complete.
If the α is already a BiheytingAlgebra, then prefer to construct this instance manually using
Fintype.toCompleteLattice instead, to avoid creating a diamond with
LinearOrder.toBiheytingAlgebra.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A finite Boolean algebra is complete.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A finite Boolean algebra is complete and atomic.
Equations
Instances For
A nonempty finite lattice is complete. If the lattice is already a BoundedOrder, then use
Fintype.toCompleteLattice instead, as this gives definitional equality for ⊥ and ⊤.
Instances For
A nonempty finite linear order is complete. If the linear order is already a BoundedOrder,
then use Fintype.toCompleteLinearOrder instead, as this gives definitional equality for ⊥ and
⊤.
Instances For
Concrete instances #
Equations
Equations
- One or more equations did not get rendered due to their size.