⊤ and ⊥, bounded lattices and variants #
This file defines top and bottom elements (greatest and least elements) of a type, the bounded
variants of different kinds of lattices, sets up the typeclass hierarchy between them and provides
instances for Prop
and fun
.
Main declarations #
<Top/Bot> α
: Typeclasses to declare the⊤
/⊥
notation.Order<Top/Bot> α
: Order with a top/bottom element.BoundedOrder α
: Order with a top and bottom element.
Top, bottom element #
An order is an OrderTop
if it has a greatest element.
We state this using a data mixin, holding the value of ⊤
and the greatest element constraint.
- top : α
⊤
is the greatest element
Instances
- Additive.orderTop
- ENat.instOrderTop
- Flag.instOrderTopSubtypeMem
- InfHom.instOrderTop
- InfTopHom.instOrderTop
- Multiplicative.orderTop
- OrderDual.instOrderTop
- OrderHom.orderTop
- Pi.instOrderTop
- Prod.instOrderTop
- Set.Icc.instOrderTopElem
- Set.Ici.orderTop
- Set.Iic.orderTop
- Set.instOrderTop
- Sum.Lex.orderTop
- SupHom.instOrderTop
- TopHom.instOrderTop
- ULift.instOrderTop
- WithBot.orderTop
- WithTop.orderTop
An order is (noncomputably) either an OrderTop
or a NoTopOrder
. Use as
casesI topOrderOrNoTopOrder α
.
Alias of ne_top_of_lt
.
Alias of lt_top_of_lt
.
Alias of the forward direction of isMax_iff_eq_top
.
Alias of the forward direction of isTop_iff_eq_top
.
Alias of top_notMem_iff
.
An order is an OrderBot
if it has a least element.
We state this using a data mixin, holding the value of ⊥
and the least element constraint.
- bot : α
⊥
is the least element
Instances
- Additive.orderBot
- BotHom.instOrderBot
- Cardinal.orderBot
- ENat.instOrderBot
- Finset.Colex.instOrderBot
- Finset.instOrderBot
- Flag.instOrderBotSubtypeMem
- GeneralizedBooleanAlgebra.toOrderBot
- InfHom.instOrderBot
- Multiplicative.orderBot
- Multiset.instOrderBot
- NNRat.instOrderBot
- Nat.Subtype.orderBot
- Nat.instOrderBot
- OrderDual.instOrderBot
- OrderHom.orderBot
- PNat.instOrderBot
- Part.instOrderBot
- Pi.instOrderBot
- Prod.instOrderBot
- Set.Icc.instOrderBotElem
- Set.Ici.orderBot
- Set.Iic.orderBot
- Sum.Lex.orderBot
- SupBotHom.instOrderBot
- SupHom.instOrderBot
- ULift.instOrderBot
- WithBot.orderBot
- WithTop.orderBot
- WithZero.instOrderBot
An order is (noncomputably) either an OrderBot
or a NoBotOrder
. Use as
casesI botOrderOrNoBotOrder α
.
Equations
- OrderDual.instOrderTop α = { toTop := inferInstanceAs (Top αᵒᵈ), le_top := ⋯ }
Equations
- OrderDual.instOrderBot α = { toBot := inferInstanceAs (Bot αᵒᵈ), bot_le := ⋯ }
Alias of ne_bot_of_gt
.
Alias of bot_lt_of_lt
.
Alias of the forward direction of isMin_iff_eq_bot
.
Alias of the forward direction of isBot_iff_eq_bot
.
Alias of bot_notMem_iff
.
Bounded order #
A bounded order describes an order (≤)
with a top and bottom element,
denoted ⊤
and ⊥
respectively.
Instances
- Additive.boundedOrder
- Bool.instBoundedOrder
- BooleanAlgebra.toBoundedOrder
- CoheytingAlgebra.toBoundedOrder
- Complementeds.instBoundedOrder
- CompleteLattice.toBoundedOrder
- Fin.instBoundedOrder
- Finset.Colex.instBoundedOrder
- Finset.boundedOrder
- Flag.instBoundedOrderSubtypeMem
- HeytingAlgebra.toBoundedOrder
- InfHom.instBoundedOrder
- Multiplicative.boundedOrder
- OrderDual.instBoundedOrder
- Pi.instBoundedOrder
- Prod.instBoundedOrder
- Prop.instBoundedOrder
- Set.Icc.instBoundedOrderElem
- Set.Ici.boundedOrder
- Set.Iic.instBoundedOrderElemOfOrderBot
- Sum.Lex.boundedOrder
- SupHom.instBoundedOrder
- ULift.instBoundedOrder
- WithBot.instBoundedOrder
- WithTop.boundedOrder
Equations
- OrderDual.instBoundedOrder α = { toOrderTop := inferInstanceAs (OrderTop αᵒᵈ), toOrderBot := inferInstanceAs (OrderBot αᵒᵈ) }
Function lattices #
Equations
- Pi.instOrderTop = { toTop := Pi.instTopForall, le_top := ⋯ }
Equations
- Pi.instOrderBot = { toBot := Pi.instBotForall, bot_le := ⋯ }
Equations
- Pi.instBoundedOrder = { toOrderTop := inferInstanceAs (OrderTop ((i : ι) → α' i)), toOrderBot := inferInstanceAs (OrderBot ((i : ι) → α' i)) }
Pullback a BoundedOrder
.
Equations
- BoundedOrder.lift f map_le map_top map_bot = { toOrderTop := OrderTop.lift f map_le map_top, toOrderBot := OrderBot.lift f map_le map_bot }
Subtype, order dual, product lattices #
A subtype remains a bounded order if the property holds at ⊥
and ⊤
.
Equations
- Subtype.boundedOrder hbot htop = { toOrderTop := Subtype.orderTop htop, toOrderBot := Subtype.orderBot hbot }
Equations
- Prod.instBoundedOrder α β = { toOrderTop := inferInstanceAs (OrderTop (α × β)), toOrderBot := inferInstanceAs (OrderBot (α × β)) }
Equations
Equations
Equations
- ULift.instBoundedOrder = { toOrderTop := ULift.instOrderTop, toOrderBot := ULift.instOrderBot }
Equations
- Bool.instBoundedOrder = { top := true, le_top := Bool.le_true, bot := false, bot_le := Bool.false_le }