WithBot
, WithTop
#
Adding a bot
or a top
to an order.
Main declarations #
With<Top/Bot> α
: EquipsOption α
with the order onα
plusnone
as the top/bottom element.
Attach ⊥
to a type.
Instances For
- Nat.WithBot.instWellFoundedRelationWithBotNat
- WithBot.AddSemigroup
- WithBot.WithTop.completeLattice
- WithBot.WithTop.completeLinearOrder
- WithBot.add
- WithBot.addCommMonoid
- WithBot.addCommMonoidWithOne
- WithBot.addCommSemigroup
- WithBot.addMonoid
- WithBot.addMonoidWithOne
- WithBot.addZeroClass
- WithBot.bot
- WithBot.canLift
- WithBot.charZero
- WithBot.coe
- WithBot.commMonoidWithZero
- WithBot.commSemiring
- WithBot.conditionallyCompleteLattice
- WithBot.contravariantClass_add_lt
- WithBot.contravariantClass_swap_add_lt
- WithBot.covariantClass_add_le
- WithBot.covariantClass_swap_add_le
- WithBot.denselyOrdered
- WithBot.distribLattice
- WithBot.inhabited
- WithBot.instBoundedOrder
- WithBot.instCharZeroWithBotAddMonoidWithOne
- WithBot.instInfSet
- WithBot.instLocallyFiniteOrder
- WithBot.instMonoidWithZero
- WithBot.instMulPosMonoWithBotToMulInstMulZeroClassWithBotZeroToZeroPreorder
- WithBot.instMulPosReflectLEWithBotToMulInstMulZeroClassWithBotZeroToZeroPreorder
- WithBot.instMulPosReflectLTWithBotToMulInstMulZeroClassWithBotZeroToZeroPreorder
- WithBot.instMulPosStrictMonoWithBotToMulInstMulZeroClassWithBotZeroToZeroPreorder
- WithBot.instMulZeroClassWithBot
- WithBot.instMulZeroOneClass
- WithBot.instNoZeroDivisors
- WithBot.instPosMulMonoWithBotToMulInstMulZeroClassWithBotZeroToZeroPreorder
- WithBot.instPosMulReflectLEWithBotToMulInstMulZeroClassWithBotZeroToZeroPreorder
- WithBot.instPosMulReflectLTWithBotToMulInstMulZeroClassWithBotZeroToZeroPreorder
- WithBot.instPosMulStrictMonoWithBotToMulInstMulZeroClassWithBotZeroToZeroPreorder
- WithBot.instPredOrderWithBotPreorderToPreorder
- WithBot.instReprWithBot
- WithBot.instSemigroupWithZero
- WithBot.instSuccOrderWithBotPreorder
- WithBot.instSupSet
- WithBot.instWellFoundedGT
- WithBot.instWellFoundedLT
- WithBot.isTotal_le
- WithBot.isWellOrder.gt
- WithBot.isWellOrder.lt
- WithBot.lattice
- WithBot.le
- WithBot.linearOrder
- WithBot.linearOrderedAddCommMonoid
- WithBot.lt
- WithBot.noMaxOrder
- WithBot.noTopOrder
- WithBot.nontrivial
- WithBot.one
- WithBot.orderBot
- WithBot.orderTop
- WithBot.orderedAddCommMonoid
- WithBot.orderedCommSemiring
- WithBot.partialOrder
- WithBot.predOrderOfNoMinOrder
- WithBot.preorder
- WithBot.semilatticeInf
- WithBot.semilatticeSup
- WithBot.trichotomous.gt
- WithBot.trichotomous.lt
- WithBot.zero
- WithBot.zeroLEOneClass
Specialization of Option.getD
to values in WithBot α
that respects API boundaries.
Equations
- WithBot.unbot' d x = WithBot.recBotCoe d id x
Lift a map f : α → β
to WithBot α → WithBot β
. Implemented using Option.map
.
Equations
- WithBot.map f = Option.map f
Deconstruct a x : WithBot α
to the underlying value in α
, given a proof that x ≠ ⊥
.
Equations
- WithBot.unbot x✝ x = match x✝, x with | some x, x_1 => x
Equations
- WithBot.orderBot = let __src := WithBot.bot; OrderBot.mk ⋯
Equations
- WithBot.orderTop = OrderTop.mk ⋯
Equations
- WithBot.instBoundedOrder = let __src := WithBot.orderBot; let __src_1 := WithBot.orderTop; BoundedOrder.mk
There is a general version le_bot_iff
, but this lemma does not require a PartialOrder
.
A version of bot_lt_iff_ne_bot
for WithBot
that only requires LT α
, not
PartialOrder α
.
Equations
- WithBot.preorder = Preorder.mk ⋯ ⋯ ⋯
Equations
- WithBot.partialOrder = let __src := WithBot.preorder; PartialOrder.mk ⋯
Alias of the reverse direction of WithBot.monotone_map_iff
.
Alias of the reverse direction of WithBot.strictMono_map_iff
.
Equations
- WithBot.semilatticeSup = let __src := WithBot.partialOrder; let __src_1 := WithBot.orderBot; SemilatticeSup.mk ⋯ ⋯ ⋯
Equations
- WithBot.semilatticeInf = let __src := WithBot.partialOrder; let __src_1 := WithBot.orderBot; SemilatticeInf.mk ⋯ ⋯ ⋯
Equations
- WithBot.lattice = let __src := WithBot.semilatticeSup; let __src_1 := WithBot.semilatticeInf; Lattice.mk ⋯ ⋯ ⋯
Equations
- WithBot.distribLattice = let __src := WithBot.lattice; DistribLattice.mk ⋯
Equations
- WithBot.decidableEq = inferInstanceAs (DecidableEq (Option α))
Equations
- WithBot.linearOrder = Lattice.toLinearOrder (WithBot α)
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Attach ⊤
to a type.
Instances For
- WithTop.IsWellOrder.gt
- WithTop.IsWellOrder.lt
- WithTop.WithBot.completeLattice
- WithTop.WithBot.completeLinearOrder
- WithTop.add
- WithTop.addCommMonoid
- WithTop.addCommMonoidWithOne
- WithTop.addCommSemigroup
- WithTop.addMonoid
- WithTop.addMonoidWithOne
- WithTop.addSemigroup
- WithTop.addZeroClass
- WithTop.boundedOrder
- WithTop.canLift
- WithTop.canonicallyOrderedAddCommMonoid
- WithTop.charZero
- WithTop.coeTC
- WithTop.commSemiring
- WithTop.conditionallyCompleteLattice
- WithTop.contravariantClass_add_lt
- WithTop.contravariantClass_swap_add_lt
- WithTop.covariantClass_add_le
- WithTop.covariantClass_swap_add_le
- WithTop.distribLattice
- WithTop.existsAddOfLE
- WithTop.inhabited
- WithTop.instCanonicallyLinearOrderedAddCommMonoidWithTop
- WithTop.instCanonicallyOrderedCommSemiringWithTop
- WithTop.instCharZeroWithTopAddMonoidWithOne
- WithTop.instCommMonoidWithZero
- WithTop.instCompleteLinearOrderWithTop
- WithTop.instDenselyOrderedWithTopLt
- WithTop.instInfSet
- WithTop.instMonoidWithZero
- WithTop.instMulZeroClass
- WithTop.instMulZeroOneClass
- WithTop.instNeg
- WithTop.instNoZeroDivisors
- WithTop.instOrderedSubWithTopToLEPreorderToPreorderToPartialOrderToOrderedAddCommMonoidAddToAddToAddCommMagmaToAddCommSemigroupToAddCommMonoidInstSubWithTopToZeroToAddMonoid
- WithTop.instPredOrderWithTopPreorder
- WithTop.instReprWithTop
- WithTop.instSemigroupWithZero
- WithTop.instSubWithTop
- WithTop.instSuccOrderWithTopPreorderToPreorder
- WithTop.instSupSet
- WithTop.instWellFoundedGT
- WithTop.instWellFoundedLT
- WithTop.isTotal_le
- WithTop.lattice
- WithTop.le
- WithTop.linearOrder
- WithTop.linearOrderedAddCommGroupWithTop
- WithTop.linearOrderedAddCommMonoidWithTop
- WithTop.locallyFiniteOrder
- WithTop.lt
- WithTop.noBotOrder
- WithTop.noMinOrder
- WithTop.nontrivial
- WithTop.one
- WithTop.orderBot
- WithTop.orderTop
- WithTop.orderedAddCommMonoid
- WithTop.partialOrder
- WithTop.preorder
- WithTop.semilatticeInf
- WithTop.semilatticeSup
- WithTop.succOrderOfNoMaxOrder
- WithTop.top
- WithTop.trichotomous.gt
- WithTop.trichotomous.lt
- WithTop.zero
- WithTop.zeroLEOneClass
- instWellFoundedRelationWithTopNat
WithTop.toDual
is the equivalence sending ⊤
to ⊥
and any a : α
to toDual a : αᵒᵈ
.
See WithTop.toDualBotEquiv
for the related order-iso.
Equations
- WithTop.toDual = Equiv.refl (WithTop α)
WithTop.ofDual
is the equivalence sending ⊤
to ⊥
and any a : αᵒᵈ
to ofDual a : α
.
See WithTop.toDualBotEquiv
for the related order-iso.
Equations
- WithTop.ofDual = Equiv.refl (WithTop αᵒᵈ)
WithBot.toDual
is the equivalence sending ⊥
to ⊤
and any a : α
to toDual a : αᵒᵈ
.
See WithBot.toDual_top_equiv
for the related order-iso.
Equations
- WithBot.toDual = Equiv.refl (WithBot α)
WithBot.ofDual
is the equivalence sending ⊥
to ⊤
and any a : αᵒᵈ
to ofDual a : α
.
See WithBot.ofDual_top_equiv
for the related order-iso.
Equations
- WithBot.ofDual = Equiv.refl (WithBot αᵒᵈ)
Specialization of Option.getD
to values in WithTop α
that respects API boundaries.
Equations
- WithTop.untop' d x = WithTop.recTopCoe d id x
Lift a map f : α → β
to WithTop α → WithTop β
. Implemented using Option.map
.
Equations
- WithTop.map f = Option.map f
Deconstruct a x : WithTop α
to the underlying value in α
, given a proof that x ≠ ⊤
.
Equations
- WithTop.untop x✝ x = match x✝, x with | some x, x_1 => x
Equations
- WithTop.orderTop = let __src := WithTop.top; OrderTop.mk ⋯
Equations
- WithTop.orderBot = OrderBot.mk ⋯
Equations
- WithTop.boundedOrder = let __src := WithTop.orderTop; let __src_1 := WithTop.orderBot; BoundedOrder.mk
There is a general version top_le_iff
, but this lemma does not require a PartialOrder
.
A version of lt_top_iff_ne_top
for WithTop
that only requires LT α
, not
PartialOrder α
.
Equations
- WithTop.preorder = Preorder.mk ⋯ ⋯ ⋯
Equations
- WithTop.partialOrder = PartialOrder.mk ⋯
Alias of the reverse direction of WithTop.monotone_map_iff
.
Alias of the reverse direction of WithTop.strictMono_map_iff
.
Equations
- WithTop.semilatticeInf = let __src := WithTop.partialOrder; SemilatticeInf.mk ⋯ ⋯ ⋯
Equations
- WithTop.semilatticeSup = let __src := WithTop.partialOrder; SemilatticeSup.mk ⋯ ⋯ ⋯
Equations
- WithTop.lattice = let __src := WithTop.semilatticeSup; let __src_1 := WithTop.semilatticeInf; Lattice.mk ⋯ ⋯ ⋯
Equations
- WithTop.distribLattice = let __src := WithTop.lattice; DistribLattice.mk ⋯
Equations
- WithTop.decidableEq = inferInstanceAs (DecidableEq (Option α))
Equations
Equations
Equations
- WithTop.linearOrder = Lattice.toLinearOrder (WithTop α)
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯