File: Mathlib/Data/ENat/Basic.lean

full_name: ENat
code: /-- Extended natural numbers `ℕ∞ = WithTop ℕ`. -/
def ENat : Type 
goal: Type

full_name: _aux_Mathlib_Data_ENat_Basic___unexpand_ENat_1
code: /-- Extended natural numbers `ℕ∞ = WithTop ℕ`. -/
notation "ℕ∞" => ENat
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_Mathlib_Data_ENat_Basic___macroRules_termℕ∞_1»
code: /-- Extended natural numbers `ℕ∞ = WithTop ℕ`. -/
notation "ℕ∞" => ENat
goal: Lean.Macro

full_name: ENat.instOrderBot
code: instance : OrderBot ℕ∞ 
goal: OrderBot ℕ∞

full_name: ENat.instOrderTop
code: instance : OrderTop ℕ∞ 
goal: OrderTop ℕ∞

full_name: ENat.instOrderedSub
code: instance : OrderedSub ℕ∞ 
goal: OrderedSub ℕ∞

full_name: ENat.instSuccOrder
code: instance : SuccOrder ℕ∞ 
goal: SuccOrder ℕ∞

full_name: ENat.instWellFoundedLT
code: instance : WellFoundedLT ℕ∞ 
goal: WellFoundedLT ℕ∞

full_name: ENat.instCharZero
code: instance : CharZero ℕ∞ 
goal: CharZero ℕ∞

full_name: ENat.instIsWellOrderLt
code: instance : IsWellOrder ℕ∞ (· < ·) 
goal: IsWellOrder ℕ∞ fun x x_1 => x < x_1

full_name: ENat.some_eq_coe
code: /-- Lemmas about `WithTop` expect (and can output) `WithTop.some` but the normal form for coercion
`ℕ → ℕ∞` is `Nat.cast`. -/
@[simp] theorem some_eq_coe : (WithTop.some : ℕ → ℕ∞) = Nat.cast 
goal: WithTop.some = Nat.cast

full_name: ENat.coe_zero
code: theorem coe_zero : ((0 : ℕ) : ℕ∞) = 0 
goal: ↑0 = 0

full_name: ENat.coe_one
code: theorem coe_one : ((1 : ℕ) : ℕ∞) = 1 
goal: ↑1 = 1

full_name: ENat.coe_add
code: theorem coe_add (m n : ℕ) : ↑(m + n) = (m + n : ℕ∞) 
goal: ↑(m + n) = ↑m + ↑n

full_name: ENat.coe_sub
code: @[simp, norm_cast]
theorem coe_sub (m n : ℕ) : ↑(m - n) = (m - n : ℕ∞) 
goal: ↑(m - n) = ↑m - ↑n

full_name: ENat.coe_mul
code: @[simp] lemma coe_mul (m n : ℕ) : ↑(m * n) = (m * n : ℕ∞) 
goal: ↑(m * n) = ↑m * ↑n

full_name: ENat.mul_top
code: @[simp] theorem mul_top (hm : m ≠ 0) : m * ⊤ = ⊤ 
goal: m * ⊤ = ⊤

full_name: ENat.top_mul
code: @[simp] theorem top_mul (hm : m ≠ 0) : ⊤ * m = ⊤ 
goal: ⊤ * m = ⊤

full_name: ENat.top_pow
code: theorem top_pow {n : ℕ} (n_pos : 0 < n) : (⊤ : ℕ∞) ^ n = ⊤ 
goal: ⊤ ^ n = ⊤

full_name: ENat.canLift
code: instance canLift : CanLift ℕ∞ ℕ (↑) (· ≠ ⊤) 
goal: CanLift ℕ∞ ℕ Nat.cast fun x => x ≠ ⊤

full_name: ENat.instWellFoundedRelation
code: instance : WellFoundedRelation ℕ∞ 
goal: WellFoundedRelation ℕ∞

full_name: ENat.toNat
code: /-- Conversion of `ℕ∞` to `ℕ` sending `∞` to `0`. -/
def toNat : ℕ∞ → ℕ 
goal: ℕ∞ → ℕ

full_name: ENat.toNatHom
code: /-- Homomorphism from `ℕ∞` to `ℕ` sending `∞` to `0`. -/
def toNatHom : MonoidWithZeroHom ℕ∞ ℕ 
goal: ℕ∞ →*₀ ℕ

full_name: ENat.coe_toNatHom
code: @[simp, norm_cast] lemma coe_toNatHom : toNatHom = toNat 
goal: ⇑ENat.toNatHom = ENat.toNat

full_name: ENat.toNatHom_apply
code: lemma toNatHom_apply (n : ℕ) : toNatHom n = toNat n 
goal: ENat.toNatHom ↑n = (↑n).toNat

full_name: ENat.toNat_coe
code: @[simp]
theorem toNat_coe (n : ℕ) : toNat n = n 
goal: (↑n).toNat = n

full_name: ENat.toNat_ofNat
code: @[simp]
theorem toNat_ofNat (n : ℕ) [n.AtLeastTwo] : toNat (no_index (OfNat.ofNat n)) = n 
goal: (OfNat.ofNat n).toNat = n

full_name: ENat.toNat_top
code: @[simp]
theorem toNat_top : toNat ⊤ = 0 
goal: ⊤.toNat = 0

full_name: ENat.toNat_eq_zero
code: @[simp] theorem toNat_eq_zero : toNat n = 0 ↔ n = 0 ∨ n = ⊤ 
goal: n.toNat = 0 ↔ n = 0 ∨ n = ⊤

full_name: ENat.recTopCoe
code: /-- Recursor for `ENat` using the preferred forms `⊤` and `↑a`. -/
@[elab_as_elim, induction_eliminator, cases_eliminator]
def recTopCoe {C : ℕ∞ → Sort*} (top : C ⊤) (coe : ∀ a : ℕ, C a) : ∀ n : ℕ∞, C n
  
goal: C n

full_name: ENat.recTopCoe_top
code: @[simp]
theorem recTopCoe_top {C : ℕ∞ → Sort*} (d : C ⊤) (f : ∀ a : ℕ, C a) :
    @recTopCoe C d f ⊤ = d 
goal: ENat.recTopCoe d f ⊤ = d

full_name: ENat.recTopCoe_coe
code: @[simp]
theorem recTopCoe_coe {C : ℕ∞ → Sort*} (d : C ⊤) (f : ∀ a : ℕ, C a) (x : ℕ) :
    @recTopCoe C d f ↑x = f x 
goal: ENat.recTopCoe d f ↑x = f x

full_name: ENat.recTopCoe_zero
code: @[simp]
theorem recTopCoe_zero {C : ℕ∞ → Sort*} (d : C ⊤) (f : ∀ a : ℕ, C a) : @recTopCoe C d f 0 = f 0 
goal: ENat.recTopCoe d f 0 = f 0

full_name: ENat.recTopCoe_one
code: @[simp]
theorem recTopCoe_one {C : ℕ∞ → Sort*} (d : C ⊤) (f : ∀ a : ℕ, C a) : @recTopCoe C d f 1 = f 1 
goal: ENat.recTopCoe d f 1 = f 1

full_name: ENat.recTopCoe_ofNat
code: @[simp]
theorem recTopCoe_ofNat {C : ℕ∞ → Sort*} (d : C ⊤) (f : ∀ a : ℕ, C a) (x : ℕ) [x.AtLeastTwo] :
    @recTopCoe C d f (no_index (OfNat.ofNat x)) = f (OfNat.ofNat x) 
goal: ENat.recTopCoe d f (OfNat.ofNat x) = f (OfNat.ofNat x)

full_name: ENat.top_ne_coe
code: @[simp]
theorem top_ne_coe (a : ℕ) : ⊤ ≠ (a : ℕ∞) 
goal: ⊤ ≠ ↑a

full_name: ENat.top_ne_ofNat
code: @[simp]
theorem top_ne_ofNat (a : ℕ) [a.AtLeastTwo] : ⊤ ≠ (no_index (OfNat.ofNat a : ℕ∞)) 
goal: ⊤ ≠ OfNat.ofNat a

full_name: ENat.top_ne_zero
code: @[simp] lemma top_ne_zero : (⊤ : ℕ∞) ≠ 0 
goal: ⊤ ≠ 0

full_name: ENat.top_ne_one
code: @[simp] lemma top_ne_one : (⊤ : ℕ∞) ≠ 1 
goal: ⊤ ≠ 1

full_name: ENat.coe_ne_top
code: @[simp]
theorem coe_ne_top (a : ℕ) : (a : ℕ∞) ≠ ⊤ 
goal: ↑a ≠ ⊤

full_name: ENat.ofNat_ne_top
code: @[simp]
theorem ofNat_ne_top (a : ℕ) [a.AtLeastTwo] : (no_index (OfNat.ofNat a : ℕ∞)) ≠ ⊤ 
goal: OfNat.ofNat a ≠ ⊤

full_name: ENat.zero_ne_top
code: @[simp] lemma zero_ne_top : 0 ≠ (⊤ : ℕ∞) 
goal: 0 ≠ ⊤

full_name: ENat.one_ne_top
code: @[simp] lemma one_ne_top : 1 ≠ (⊤ : ℕ∞) 
goal: 1 ≠ ⊤

full_name: ENat.top_sub_coe
code: @[simp]
theorem top_sub_coe (a : ℕ) : (⊤ : ℕ∞) - a = ⊤ 
goal: ⊤ - ↑a = ⊤

full_name: ENat.top_sub_one
code: @[simp]
theorem top_sub_one : (⊤ : ℕ∞) - 1 = ⊤ 
goal: ⊤ - 1 = ⊤

full_name: ENat.top_sub_ofNat
code: @[simp]
theorem top_sub_ofNat (a : ℕ) [a.AtLeastTwo] : (⊤ : ℕ∞) - (no_index (OfNat.ofNat a)) = ⊤ 
goal: ⊤ - OfNat.ofNat a = ⊤

full_name: ENat.zero_lt_top
code: @[simp]
theorem zero_lt_top : (0 : ℕ∞) < ⊤ 
goal: 0 < ⊤

full_name: ENat.sub_top
code: theorem sub_top (a : ℕ∞) : a - ⊤ = 0 
goal: a - ⊤ = 0

full_name: ENat.coe_toNat_eq_self
code: @[simp]
theorem coe_toNat_eq_self : ENat.toNat n = n ↔ n ≠ ⊤ 
goal: ↑n.toNat = n ↔ n ≠ ⊤

full_name: ENat.coe_toNat_le_self
code: theorem coe_toNat_le_self (n : ℕ∞) : ↑(toNat n) ≤ n 
goal: ↑n.toNat ≤ n

full_name: ENat.toNat_add
code: theorem toNat_add {m n : ℕ∞} (hm : m ≠ ⊤) (hn : n ≠ ⊤) : toNat (m + n) = toNat m + toNat n 
goal: (m + n).toNat = m.toNat + n.toNat

full_name: ENat.toNat_sub
code: theorem toNat_sub {n : ℕ∞} (hn : n ≠ ⊤) (m : ℕ∞) : toNat (m - n) = toNat m - toNat n 
goal: (m - n).toNat = m.toNat - n.toNat

full_name: ENat.toNat_eq_iff
code: theorem toNat_eq_iff {m : ℕ∞} {n : ℕ} (hn : n ≠ 0) : toNat m = n ↔ m = n 
goal: m.toNat = n ↔ m = ↑n

full_name: ENat.toNat_le_of_le_coe
code: lemma toNat_le_of_le_coe {m : ℕ∞} {n : ℕ} (h : m ≤ n) : toNat m ≤ n 
goal: m.toNat ≤ n

full_name: ENat.toNat_le_toNat
code: @[gcongr]
lemma toNat_le_toNat {m n : ℕ∞} (h : m ≤ n) (hn : n ≠ ⊤) : toNat m ≤ toNat n 
goal: m.toNat ≤ n.toNat

full_name: ENat.succ_def
code: @[simp]
theorem succ_def (m : ℕ∞) : Order.succ m = m + 1 
goal: Order.succ m = m + 1

full_name: ENat.add_one_le_of_lt
code: theorem add_one_le_of_lt (h : m < n) : m + 1 ≤ n 
goal: m + 1 ≤ n

full_name: ENat.add_one_le_iff
code: theorem add_one_le_iff (hm : m ≠ ⊤) : m + 1 ≤ n ↔ m < n 
goal: m + 1 ≤ n ↔ m < n

full_name: ENat.one_le_iff_pos
code: theorem one_le_iff_pos : 1 ≤ n ↔ 0 < n 
goal: 1 ≤ n ↔ 0 < n

full_name: ENat.one_le_iff_ne_zero
code: theorem one_le_iff_ne_zero : 1 ≤ n ↔ n ≠ 0 
goal: 1 ≤ n ↔ n ≠ 0

full_name: ENat.lt_one_iff_eq_zero
code: lemma lt_one_iff_eq_zero : n < 1 ↔ n = 0 
goal: n < 1 ↔ n = 0

full_name: ENat.le_of_lt_add_one
code: theorem le_of_lt_add_one (h : m < n + 1) : m ≤ n 
goal: m ≤ n

full_name: ENat.le_coe_iff
code: theorem le_coe_iff {n : ℕ∞} {k : ℕ} : n ≤ ↑k ↔ ∃ (n₀ : ℕ), n = n₀ ∧ n₀ ≤ k 
goal: n ≤ ↑k ↔ ∃ n₀, n = ↑n₀ ∧ n₀ ≤ k

full_name: ENat.nat_induction
code: @[elab_as_elim]
theorem nat_induction {P : ℕ∞ → Prop} (a : ℕ∞) (h0 : P 0) (hsuc : ∀ n : ℕ, P n → P n.succ)
    (htop : (∀ n : ℕ, P n) → P ⊤) : P a 
goal: P a