Definition and basic properties of extended natural numbers #
In this file we define ENat (notation: ℕ∞) to be WithTop ℕ and prove some basic lemmas
about this type.
Implementation details #
There are two natural coercions from ℕ to WithTop ℕ = ENat: WithTop.some and Nat.cast. In
Lean 3, this difference was hidden in typeclass instances. Since these instances were definitionally
equal, we did not duplicate generic lemmas about WithTop α and WithTop.some coercion for ENat
and Nat.cast coercion. If you need to apply a lemma about WithTop, you may either rewrite back
and forth using ENat.some_eq_natCast, or restate the lemma for ENat.
TODO #
Unify ENat.add_iSup/ENat.iSup_add with ENNReal.add_iSup/ENNReal.iSup_add. The key property
of ENat and ENNReal we are using is that all a are either absorbing for addition (a + b = a
for all b), or that it's order-cancellable (a + b ≤ a + c → b ≤ c for all b, c), and
similarly for multiplication.
Equations
- instBotENat = { bot := instBotENat._aux_1 }
Equations
- instAddENat = { add := instAddENat._aux_1 }
Equations
- instOrderBotENat = { toBot := instBotENat, bot_le := instOrderBotENat._proof_1 }
Equations
- instLEENat = { le := instLEENat._aux_1 }
Equations
- instPreorderENat = { toLE := instLEENat, toLT := instLTENat, le_refl := instPreorderENat._proof_1, le_trans := instPreorderENat._proof_2, lt_iff_le_not_ge := instPreorderENat._proof_3 }
Equations
- instSubENat = { sub := instSubENat._aux_1 }
Equations
- One or more equations did not get rendered due to their size.
Equations
- instLTENat = { lt := instLTENat._aux_1 }
Equations
- instSuccOrderENat = { succ := instSuccOrderENat._aux_1, le_succ := instSuccOrderENat._proof_3, max_of_succ_le := @instSuccOrderENat._proof_4, succ_le_of_lt := @instSuccOrderENat._proof_5 }
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
- instOrderTopENat = { toTop := instTopENat, le_top := instOrderTopENat._proof_1 }
Equations
- One or more equations did not get rendered due to their size.
Lemmas about WithTop expect (and can output) WithTop.some but the normal form for coercion
ℕ → ℕ∞ is Nat.cast.
Alias of ENat.some_eq_natCast.
Lemmas about WithTop expect (and can output) WithTop.some but the normal form for coercion
ℕ → ℕ∞ is Nat.cast.
Alias of ENat.natCast_inj.
Alias of ENat.succ_natCast.
Equations
- ENat.instSuccAddOrder = { toSuccOrder := instSuccOrderENat, succ_eq_add_one := ⋯ }
Alias of ENat.natCast_zero.
Alias of ENat.natCast_one.
Alias of ENat.natCast_add.
Alias of ENat.natCast_sub.
Alias of ENat.natCast_mul.
Alias of ENat.natCast_lift.
Alias of ENat.lift_natCast.
Conversion of ℕ∞ to ℕ sending ∞ to 0.
Equations
Instances For
Homomorphism from ℕ∞ to ℕ sending ∞ to 0.
Equations
- ENat.toNatHom = { toFun := ENat.toNat, map_zero' := ENat.toNatHom._proof_1, map_one' := ENat.toNatHom._proof_2, map_mul' := ⋯ }
Instances For
Alias of ENat.toNat_natCast.
Alias of ENat.top_ne_natCast.
Alias of ENat.natCast_ne_top.
Alias of ENat.top_sub_natCast.
Alias of ENat.natCast_toNat_eq_self.
Alias of the reverse direction of ENat.natCast_toNat_eq_self.
Alias of ENat.natCast_toNat.
Alias of the reverse direction of ENat.natCast_toNat_eq_self.
Alias of ENat.toNat_eq_iff_eq_natCast.
Alias of ENat.natCast_toNat_le_self.
Alias of ENat.toNat_le_of_le_natCast.
Alias of ENat.natCast_add_one_le_iff.
Alias of ENat.add_one_le_natCast_iff.
Alias of ENat.lt_natCast_add_one_iff.
Alias of ENat.natCast_lt_add_one_iff.
Alias of ENat.natCast_lt_top.
Alias of ENat.natCast_lt_natCast.
Alias of ENat.natCast_le_natCast.
Version of WithTop.forall_natCast_le_iff_le using Nat.cast rather than WithTop.some.
Version of WithTop.eq_of_forall_natCast_le_iff using Nat.cast rather than WithTop.some.
Alias of ENat.addLECancellable_natCast.
Equations
- ENat.instUniqueUnits = { toInhabited := Units.instInhabited, uniq := ⋯ }
Alias of ENat.map_natCast.
A version of WithTop.map for AddMonoidHoms.
Instances For
A version of ENat.map for MonoidWithZeroHoms.
Instances For
A version of ENat.map for RingHoms.