Mathlib.Data.Nat.Basic
19 declarations. Mathlib docs · Source
Basic operations on the natural numbers
This file builds on Mathlib/Data/Nat/Init.lean by adding basic lemmas on natural numbers
depending on Mathlib definitions.
See note [foundational algebra order theory].
succ, pred
div
pow
Recursion and induction principles
This section is here due to dependencies -- the lemmas here require some of the lemmas proved above, and some of the results in later sections depend on the definitions in this section.
mod, dvd
Miscellaneous
instance Nat.instLinearOrder E0 #
LinearOrder ℕ
instance Nat.instPreorder E0 #
Preorder ℕ
instance Nat.instPartialOrder E0 #
PartialOrder ℕ
instance Nat.instNontrivial E0 #
Nontrivial ℕ
theorem Nat.succ_injective E2 #
Function.Injective Nat.succ
theorem Nat.div_right_comm E1 #
∀ (a b c : ℕ), a / b / c = a / c / b
theorem Nat.pow_left_injective E1 #
∀ {n : ℕ}, n ≠ 0 → Function.Injective fun a ↦ a ^ n
theorem Nat.pow_right_injective E1 #
∀ {a : ℕ}, 2 ≤ a → Function.Injective fun x ↦ a ^ x
theorem Nat.pow_sub_one E1 #
∀ {x a : ℕ}, x ≠ 0 → a ≠ 0 → x ^ (a - 1) = x ^ a / x
theorem Nat.leRecOn_injective E1 #
∀ {C : ℕ → Sort u_1} {n m : ℕ} (hnm : n ≤ m) (next : {k : ℕ} → C k → C (k + 1)),
(∀ (n : ℕ), Function.Injective next) → Function.Injective (Nat.leRecOn hnm fun {k} ↦ next)
theorem Nat.leRecOn_surjective E1 #
∀ {C : ℕ → Sort u_1} {n m : ℕ} (hnm : n ≤ m) (next : {k : ℕ} → C k → C (k + 1)),
(∀ (n : ℕ), Function.Surjective next) → Function.Surjective (Nat.leRecOn hnm fun {k} ↦ next)
theorem Nat.set_induction_bounded E1 #
∀ {n k : ℕ} {S : Set ℕ}, k ∈ S → (∀ k ∈ S, k + 1 ∈ S) → k ≤ n → n ∈ S
A subset of ℕ containing k : ℕ and closed under Nat.succ contains every n ≥ k.
theorem Nat.set_induction E1 #
∀ {S : Set ℕ}, 0 ∈ S → (∀ k ∈ S, k + 1 ∈ S) → ∀ (n : ℕ), n ∈ S
A subset of ℕ containing zero and closed under Nat.succ contains all of ℕ.
theorem Nat.dvd_antisymm_iff E0 #
∀ {m n : ℕ}, m = n ↔ m ∣ n ∧ n ∣ m
Two natural numbers dividing each other are equal.
theorem Nat.dvd_left_injective E1 #
Function.Injective fun x1 x2 ↦ x1 ∣ x2
dvd is injective in the left argument
theorem Nat.dvd_sub_self_left E0 #
∀ {n m : ℕ}, n ∣ n - m ↔ m = 0 ∨ n ≤ m
theorem Nat.dvd_sub_self_right E0 #
∀ {n m : ℕ}, n ∣ m - n ↔ n ∣ m ∨ m ≤ n
theorem Nat.mul_le_pow E1 #
∀ {a : ℕ}, a ≠ 1 → ∀ (b : ℕ), a * b ≤ a ^ b
theorem Nat.two_mul_sq_add_one_le_two_pow_two_mul E1 #
∀ (k : ℕ), 2 * k ^ 2 + 1 ≤ 2 ^ (2 * k)