Documentation

Extra.Nat

theorem Nat.succ_le_exists_succ {m n : ℕ} :
m.succ ≤ n → ∃ (n' : ℕ), n = n'.succ
theorem Nat.succ_lt_exists_succ {m n : ℕ} :
m < n → ∃ (n' : ℕ), n = n' + 1
theorem Nat.min_le {m n o p : ℕ} :
m ≤ n → o ≤ p → min m o ≤ min n p
theorem Nat.add_max {m n o : ℕ} :
m + max n o = max (m + n) (m + o)
theorem Nat.le_max_of_le_left {m n o : ℕ} (h : m ≤ n) :
m ≤ max n o
theorem Nat.le_of_lt_non_null {m n : ℕ} :
m ≠ 0 → m - 1 < n → m ≤ n
theorem Nat.le_pred_of_succ_le {m n : ℕ} (h : m + 1 ≤ n) :
m ≤ n - 1
theorem Nat.le_max_iff {m n o : ℕ} :
m ≤ max n o ↔ m ≤ n ∨ m ≤ o
def Nat.induction_from_one {P : ℕ → Prop} (one : P 1) (more : ∀ n > 0, P n → P (n + 1)) {n : ℕ} (n_not_zero : n > 0) :
P n
Equations
  • ⋯ = ⋯
Instances For
    @[irreducible]
    def Nat.div.induct' (k : ℕ) (k_pos : k > 1) {motive : ℕ → Prop} (ind : ∀ n > k, motive (n / k) → motive n) (base₁ : ∀ n < k, motive n) (base₂ : motive k) (n : ℕ) :
    motive n
    Equations
    • ⋯ = ⋯
    Instances For
      theorem Nat.add_ge_add_iff_right {k m n : ℕ} :
      k + n ≥ m + n ↔ k ≥ m
      theorem Nat.repr_toInt! {n : ℕ} :
      n.repr.toInt! = ↑n