WithBot, WithTop #
Adding a bot or a top to an order.
Main declarations #
With<Top/Bot> α: EquipsOption αwith the order onαplusnoneas the top/bottom element.
Equations
Equations
Specialization of Option.getD to values in WithBot α that respects API boundaries.
Equations
Instances For
Specialization of Option.getD to values in WithTop α that respects API boundaries.
Equations
Instances For
Deconstruct a x : WithBot α to the underlying value in α, given a proof that x ≠ ⊥.
Equations
Instances For
Deconstruct a x : WithTop α to the underlying value in α, given a proof that x ≠ ⊤.
Equations
Instances For
Function that sends an element of WithBot α to α,
with an arbitrary default value for ⊥.
Equations
Instances For
Function that sends an element of WithTop α to α,
with an arbitrary default value for ⊤.
Equations
Instances For
The order on WithBot α, defined by ⊥ ≤ y and a ≤ b → ↑a ≤ ↑b.
Equivalently, x ≤ y can be defined as ∀ a : α, x = ↑a → ∃ b : α, y = ↑b ∧ a ≤ b,
see le_iff_forall. The definition as an inductive predicate is preferred since it
cannot be accidentally unfolded too far.
Equations
The order on WithTop α, defined by x ≤ ⊤ and a ≤ b → ↑a ≤ ↑b.
Equivalently, x ≤ y can be defined as ∀ b : α, y = ↑b → ∃ a : α, x = ↑a ∧ a ≤ b,
see le_iff_forall. The definition as an inductive predicate is preferred since it
cannot be accidentally unfolded too far.
Equations
The order on WithBot α, defined by ⊥ < ↑a and a < b → ↑a < ↑b.
Equivalently, x < y can be defined as ∃ b : α, y = ↑b ∧ ∀ a : α, x = ↑a → a < b,
see lt_iff_exists. The definition as an inductive predicate is preferred since it
cannot be accidentally unfolded too far.
Equations
The order on WithTop α, defined by ↑a < ⊤ and a < b → ↑a < ↑b.
Equivalently, x < y can be defined as ∃ a : α, x = ↑a ∧ ∀ b : α, y = ↑b → a < b,
see le_if_forall. The definition as an inductive predicate is preferred since it
cannot be accidentally unfolded too far.
Equations
Equations
Equations
Equations
Equations
Equations
Equations
There is a general version le_bot_iff, but this lemma does not require a PartialOrder.
There is a general version top_le_iff, but this lemma does not require a PartialOrder.
Alias of the reverse direction of WithBot.unbot_le_unbot_iff.
A version of bot_lt_iff_ne_bot for WithBot that only requires LT α, not
PartialOrder α.
A version of lt_top_iff_ne_top for WithTop that only requires LT α, not
PartialOrder α.
Equations
Equations
Alias of the reverse direction of WithBot.monotone_map_iff.
Alias of the reverse direction of WithBot.strictMono_map_iff.
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
Equations
WithBot.toDual is the equivalence sending ⊥ to ⊤ and any a : α to toDual a : αᵒᵈ.
See WithBot.toDualTopEquiv for the related order-iso.
Equations
Instances For
WithTop.toDual is the equivalence sending ⊤ to ⊥ and any a : α to toDual a : αᵒᵈ.
See WithTop.toDualBotEquiv for the related order-iso.
Equations
Instances For
WithBot.ofDual is the equivalence sending ⊥ to ⊤ and any a : αᵒᵈ to ofDual a : α.
See WithBot.ofDualTopEquiv for the related order-iso.
Equations
Instances For
WithTop.ofDual is the equivalence sending ⊤ to ⊥ and any a : αᵒᵈ to ofDual a : α.
See WithTop.toDualBotEquiv for the related order-iso.
Equations
Instances For
Alias of WithBot.toDual_bot.
Alias of WithTop.toDual_top.
Alias of WithBot.ofDual_bot.
Alias of WithTop.ofDual_top.