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.
Conversion from WithTop α to α, mapping ⊤ to zero.
Equations
- a.untop₀ = WithTop.untopD 0 a
Instances For
Simplifying Lemmas in cases where α is an Instance of Zero #
Simplifying Lemmas involving addition and negation #
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
Elements of ordered additive commutative groups are nonnegative iff their untop₀ is nonnegative.
theorem WithTop.le_of_untop₀_le_untop₀ {α : Type u_1} [AddCommGroup α] [PartialOrder α] {a b : WithTop α} (ha : a ≠ ⊤) (h : a.untop₀ ≤ b.untop₀) :
@[simp]
theorem WithTop.untop₀_le_untop₀ {α : Type u_1} [AddCommGroup α] [PartialOrder α] {a b : WithTop α} (hb : b ≠ ⊤) (h : a ≤ b) :
theorem WithTop.untop₀_le_untop₀_iff {α : Type u_1} [AddCommGroup α] [PartialOrder α] {a b : WithTop α} (ha : a ≠ ⊤) (hb : b ≠ ⊤) :