The areas / V04. Order and lattices
Mathlib.Algebra.Order.WithTop.Untop0
19 declarations. Mathlib docs · Source
Conversion from WithTop to Base Type
For types α that are instances of Zero, we provide a convenient conversion, WithTop.untop₀, that
maps elements a : WithTop α to α, by mapping ⊤ to zero.
For settings where α has additional structure, we provide a large number of simplifier lemmas,
akin to those that already exists for ENat.toNat.
Simplifying Lemmas in cases where α is an Instance of Zero
Simplifying Lemmas involving addition and negation
def WithTop.untop₀ E1 #
{α : Type u_1} → [Zero α] → WithTop α → α
Conversion from WithTop α to α, mapping ⊤ to zero.
theorem WithTop.untop₀_eq_zero E0 #
∀ {α : Type u_1} [inst : Zero α] {a : WithTop α}, a.untop₀ = 0 ↔ a = 0 ∨ a = ⊤
theorem WithTop.untop₀_top E0 #
∀ {α : Type u_1} [inst : Zero α], ⊤.untop₀ = 0
theorem WithTop.untop₀_zero E0 #
∀ {α : Type u_1} [inst : Zero α], WithTop.untop₀ 0 = 0
theorem WithTop.untop₀_coe E0 #
∀ {α : Type u_1} [inst : Zero α] (a : α), (↑a).untop₀ = a
theorem WithTop.coe_untop₀_of_ne_top E0 #
∀ {α : Type u_1} [inst : Zero α] {a : WithTop α}, a ≠ ⊤ → ↑a.untop₀ = a
theorem WithTop.untopD_add E0 #
∀ {α : Type u_1} [inst : Add α] {a b : WithTop α} {c : α},
a ≠ ⊤ → b ≠ ⊤ → WithTop.untopD c (a + b) = WithTop.untopD c a + WithTop.untopD c b
theorem WithTop.untop₀_add E0 #
∀ {α : Type u_1} [inst : AddZeroClass α] {a b : WithTop α}, a ≠ ⊤ → b ≠ ⊤ → (a + b).untop₀ = a.untop₀ + b.untop₀
theorem WithTop.untop₀_natCast E0 #
∀ {α : Type u_1} [inst : AddMonoidWithOne α] (n : ℕ), (↑n).untop₀ = ↑n
theorem WithTop.untop₀_one E0 #
∀ {α : Type u_2} [inst : AddMonoidWithOne α], WithTop.untop₀ 1 = 1
theorem WithTop.untop₀_ofNat E0 #
∀ {α : Type u_1} [inst : AddMonoidWithOne α] (n : ℕ) [inst_1 : n.AtLeastTwo], (OfNat.ofNat n).untop₀ = OfNat.ofNat n
theorem WithTop.untop₀_neg E0 #
∀ {α : Type u_1} [inst : AddCommGroup α] (a : WithTop α), (-a).untop₀ = -a.untop₀
theorem WithTop.untop₀_mul E0 #
∀ {α : Type u_1} [inst : DecidableEq α] [inst_1 : MulZeroClass α] (a b : WithTop α),
(a * b).untop₀ = a.untop₀ * b.untop₀
theorem WithTop.untop₀_nonneg E0 #
∀ {α : Type u_1} [inst : AddCommGroup α] [inst_1 : PartialOrder α] {a : WithTop α}, 0 ≤ a.untop₀ ↔ 0 ≤ a
Elements of ordered additive commutative groups are nonnegative iff their untop₀ is nonnegative.
theorem WithTop.le_of_untop₀_le_untop₀ E1 #
∀ {α : Type u_1} [inst : AddCommGroup α] [inst_1 : PartialOrder α] {a b : WithTop α},
a ≠ ⊤ → a.untop₀ ≤ b.untop₀ → a ≤ b
theorem WithTop.untop₀_le_untop₀ E0 #
∀ {α : Type u_1} [inst : AddCommGroup α] [inst_1 : PartialOrder α] {a b : WithTop α},
b ≠ ⊤ → a ≤ b → a.untop₀ ≤ b.untop₀
theorem WithTop.untop₀_le_untop₀_iff E0 #
∀ {α : Type u_1} [inst : AddCommGroup α] [inst_1 : PartialOrder α] {a b : WithTop α},
a ≠ ⊤ → b ≠ ⊤ → (a.untop₀ ≤ b.untop₀ ↔ a ≤ b)
theorem WithTop.untop₀_max E0 #
∀ {α : Type u_1} [inst : AddCommGroup α] [inst_1 : LinearOrder α] {a b : WithTop α},
a ≠ ⊤ → b ≠ ⊤ → (max a b).untop₀ = max a.untop₀ b.untop₀
theorem WithTop.untop₀_min E0 #
∀ {α : Type u_1} [inst : AddCommGroup α] [inst_1 : LinearOrder α] {a b : WithTop α},
a ≠ ⊤ → b ≠ ⊤ → (min a b).untop₀ = min a.untop₀ b.untop₀