Order structures on finite types #
This file provides order instances on fintypes.
Computable instances #
On a Fintype
, we can construct
- an
OrderBot
fromSemilatticeInf
. - an
OrderTop
fromSemilatticeSup
. - a
BoundedOrder
fromLattice
.
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
Lattice
to aCompleteLattice
. - a
DistribLattice
to aCompleteDistribLattice
. - a
LinearOrder
to aCompleteLinearOrder
. - a
BooleanAlgebra
to 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 α = OrderBot.mk (_ : ∀ (a : α), Finset.inf' Finset.univ (_ : ∃ (x : α), x ∈ Finset.univ) id ≤ id a)
Instances For
Constructs the ⊤
of a finite nonempty SemilatticeSup
Equations
- Fintype.toOrderTop α = OrderTop.mk (_ : ∀ (a : α), id a ≤ Finset.sup' Finset.univ (_ : ∃ (x : α), x ∈ Finset.univ) id)
Instances For
Constructs the ⊤
and ⊥
of a finite nonempty Lattice
.
Equations
- Fintype.toBoundedOrder α = let src := Fintype.toOrderBot α; let src_1 := Fintype.toOrderTop α; BoundedOrder.mk
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.toCompleteDistribLattice α = let src := Fintype.toCompleteLattice α; CompleteDistribLattice.mk (_ : ∀ (a : α) (s : Set α), ⨅ b ∈ s, a ⊔ b ≤ a ⊔ sInf s)
Instances For
A finite bounded linear order is complete.
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
- Fintype.toCompleteAtomicBooleanAlgebra α = CompleteBooleanAlgebra.toCompleteAtomicBooleanAlgebra
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
⊤
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Concrete instances #
Equations
- Fin.completeLinearOrder = Fintype.toCompleteLinearOrder (Fin (n + 1))
Directed Orders #
Alias of Finite.exists_le
.
Alias of Finite.exists_ge
.
Alias of Finite.bddAbove_range
.
Alias of Finite.bddBelow_range
.