mathlib documentation

data.​nat.​enat

data.​nat.​enat

def enat  :
Type

Type of natural numbers with infinity

Equations
@[instance]

Equations
@[instance]

Equations
@[instance]

Equations
@[instance]

Equations
@[instance]

Equations
@[simp]
theorem enat.​coe_inj {x y : ℕ} :
↑x = ↑y ↔ x = y

@[instance]

Equations
@[instance]

Equations
@[instance]

Equations
@[instance]

Equations
@[instance]

Equations
theorem enat.​cases_on {P : enat → Prop} (a : enat) :
P ⊤ → (∀ (n : ℕ), P ↑n) → P a

@[simp]
theorem enat.​top_add (x : enat) :

@[simp]
theorem enat.​add_top (x : enat) :

@[simp]
theorem enat.​coe_zero  :
↑0 = 0

@[simp]
theorem enat.​coe_one  :
↑1 = 1

@[simp]
theorem enat.​coe_add (x y : ℕ) :
↑(x + y) = ↑x + ↑y

@[simp]
theorem enat.​get_coe {x : ℕ} :

theorem enat.​coe_add_get {x : ℕ} {y : enat} (h : (↑x + y).dom) :
(↑x + y).get h = x + y.get _

@[simp]
theorem enat.​get_add {x y : enat} (h : (x + y).dom) :
(x + y).get h = x.get _ + y.get _

@[simp]
theorem enat.​coe_get {x : enat} (h : x.dom) :
↑(x.get h) = x

@[simp]
theorem enat.​get_zero (h : 0.dom) :
0.get h = 0

@[simp]
theorem enat.​get_one (h : 1.dom) :
1.get h = 1

theorem enat.​dom_of_le_some {x : enat} {y : ℕ} :
x ≤ ↑y → x.dom

@[instance]

Equations
@[simp]
theorem enat.​coe_le_coe {x y : ℕ} :
↑x ≤ ↑y ↔ x ≤ y

@[simp]
theorem enat.​coe_lt_coe {x y : ℕ} :
↑x < ↑y ↔ x < y

theorem enat.​get_le_get {x y : enat} {hx : x.dom} {hy : y.dom} :
x.get hx ≤ y.get hy ↔ x ≤ y

@[instance]

Equations
theorem enat.​coe_lt_top (x : ℕ) :

@[simp]
theorem enat.​coe_ne_top (x : ℕ) :

theorem enat.​ne_top_iff {x : enat} :
x ≠ ⊤ ↔ ∃ (n : ℕ), x = ↑n

theorem enat.​ne_top_of_lt {x y : enat} :
x < y → x ≠ ⊤

theorem enat.​pos_iff_one_le {x : enat} :
0 < x ↔ 1 ≤ x

theorem enat.​sup_eq_max {a b : enat} :
a ⊔ b = max a b

theorem enat.​inf_eq_min {a b : enat} :
a ⊓ b = min a b

theorem enat.​add_lt_add_right {x y z : enat} :
x < y → z ≠ ⊤ → x + z < y + z

theorem enat.​add_lt_add_iff_right {x y z : enat} :
z ≠ ⊤ → (x + z < y + z ↔ x < y)

theorem enat.​add_lt_add_iff_left {x y z : enat} :
z ≠ ⊤ → (z + x < z + y ↔ x < y)

theorem enat.​lt_add_iff_pos_right {x y : enat} :
x ≠ ⊤ → (x < x + y ↔ 0 < y)

theorem enat.​lt_add_one {x : enat} :
x ≠ ⊤ → x < x + 1

theorem enat.​le_of_lt_add_one {x y : enat} :
x < y + 1 → x ≤ y

theorem enat.​add_one_le_of_lt {x y : enat} :
x < y → x + 1 ≤ y

theorem enat.​add_one_le_iff_lt {x y : enat} :
x ≠ ⊤ → (x + 1 ≤ y ↔ x < y)

theorem enat.​lt_add_one_iff_lt {x y : enat} :
x ≠ ⊤ → (x < y + 1 ↔ x ≤ y)

theorem enat.​add_eq_top_iff {a b : enat} :
a + b = ⊤ ↔ a = ⊤ ∨ b = ⊤

theorem enat.​add_right_cancel_iff {a b c : enat} :
c ≠ ⊤ → (a + c = b + c ↔ a = b)

theorem enat.​add_left_cancel_iff {a b c : enat} :
a ≠ ⊤ → (a + b = a + c ↔ b = c)

Computably converts an enat to a with_top ℕ.

Equations
@[simp]

@[simp]

@[simp]

Order isomorphism between enat and with_top ℕ.

Equations