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.
Equations
- (_ : Nontrivial (WithBot α)) = (_ : Nontrivial (Option α))
Specialization of Option.getD
to values in WithBot α
that respects API boundaries.
Equations
- WithBot.unbot' d x = WithBot.recBotCoe d id x
Instances For
Lift a map f : α → β
to WithBot α → WithBot β
. Implemented using Option.map
.
Equations
- WithBot.map f = Option.map f
Instances For
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
Instances For
Equations
- WithBot.orderBot = let src := WithBot.bot; OrderBot.mk (_ : ∀ (x : WithBot α), none ≤ x)
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 α
.
Alias of the reverse direction of WithBot.monotone_map_iff
.
Alias of the reverse direction of WithBot.strictMono_map_iff
.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- WithBot.decidableEq = instDecidableEqOption
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- WithBot.linearOrder = Lattice.toLinearOrder (WithBot α)
Equations
- (_ : WellFoundedLT (WithBot α)) = (_ : IsWellFounded (WithBot α) fun (x x_1 : WithBot α) => x < x_1)
Equations
- (_ : WellFoundedGT (WithBot α)) = (_ : IsWellFounded (WithBot α) fun (x x_1 : WithBot α) => x > x_1)
Equations
- (_ : DenselyOrdered (WithBot α)) = (_ : DenselyOrdered (WithBot α))
Equations
- (_ : NoTopOrder (WithBot α)) = (_ : NoTopOrder (WithBot α))
Equations
- (_ : NoMaxOrder (WithBot α)) = (_ : NoMaxOrder (WithBot α))
Equations
- (_ : Nontrivial (WithTop α)) = (_ : Nontrivial (Option α))
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 α)
Instances For
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 αᵒᵈ)
Instances For
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 α)
Instances For
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 αᵒᵈ)
Instances For
Specialization of Option.getD
to values in WithTop α
that respects API boundaries.
Equations
- WithTop.untop' d x = WithTop.recTopCoe d id x
Instances For
Lift a map f : α → β
to WithTop α → WithTop β
. Implemented using Option.map
.
Equations
- WithTop.map f = Option.map f
Instances For
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
Instances For
Equations
- WithTop.orderTop = let src := WithTop.top; OrderTop.mk (_ : ∀ (x : WithTop α), x ≤ none)
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 α
.
Alias of the reverse direction of WithTop.monotone_map_iff
.
Alias of the reverse direction of WithTop.strictMono_map_iff
.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- WithTop.decidableEq = instDecidableEqOption
Equations
- WithTop.decidableLE x✝ x = decidable_of_decidable_of_iff (_ : WithTop.toDual x ≤ WithTop.toDual x✝ ↔ x✝ ≤ x)
Equations
- WithTop.decidableLT x✝ x = decidable_of_decidable_of_iff (_ : WithTop.toDual x < WithTop.toDual x✝ ↔ x✝ < x)
Equations
- WithTop.linearOrder = Lattice.toLinearOrder (WithTop α)
Equations
- (_ : WellFoundedLT (WithTop α)) = (_ : WellFoundedLT (WithBot αᵒᵈ)ᵒᵈ)
Equations
- (_ : WellFoundedGT (WithTop α)) = (_ : WellFoundedGT (WithBot αᵒᵈ)ᵒᵈ)
Equations
- (_ : IsTrichotomous (WithTop α) fun (x x_1 : WithTop α) => x < x_1) = (_ : IsTrichotomous (WithTop α) fun (x x_1 : WithTop α) => x < x_1)
Equations
- (_ : IsWellOrder (WithTop α) fun (x x_1 : WithTop α) => x < x_1) = (_ : IsWellOrder (WithTop α) fun (x x_1 : WithTop α) => x < x_1)
Equations
- (_ : IsTrichotomous (WithTop α) fun (x x_1 : WithTop α) => x > x_1) = (_ : IsTrichotomous (WithTop α) (Function.swap fun (x x_1 : WithTop α) => x < x_1))
Equations
- (_ : IsWellOrder (WithTop α) fun (x x_1 : WithTop α) => x > x_1) = (_ : IsWellOrder (WithTop α) fun (x x_1 : WithTop α) => x > x_1)
Equations
- (_ : IsWellOrder (WithBot α) fun (x x_1 : WithBot α) => x < x_1) = (_ : IsWellOrder (WithBot α) fun (x x_1 : WithBot α) => x < x_1)
Equations
- (_ : DenselyOrdered (WithTop α)) = (_ : DenselyOrdered (WithBot αᵒᵈ)ᵒᵈ)
Equations
- (_ : NoBotOrder (WithTop α)) = (_ : NoBotOrder (WithBot αᵒᵈ)ᵒᵈ)
Equations
- (_ : NoMinOrder (WithTop α)) = (_ : NoMinOrder (WithBot αᵒᵈ)ᵒᵈ)