The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V02. Numbers

Mathlib.Data.Int.Basic

11 declarations. Mathlib docs · Source

Basic operations on the integers

This file builds on Data.Int.Init by adding basic lemmas on integers depending on Mathlib definitions.

nat abs

dvd

instance Int.instNontrivial E0 #

Nontrivial ℤ

theorem Int.ofNat_injective E0 #

Function.Injective Int.ofNat

theorem Int.strongRec_of_ge E1 #

∀ {m n : ℤ} {P : ℤ → Sort u_1} {lt : (n : ℤ) → n < m → P n} {ge : (n : ℤ) → n ≥ m → ((k : ℤ) → k < n → P k) → P n}
  (hn : m ≤ n), Int.strongRec lt ge n = ge n hn fun k x ↦ Int.strongRec lt ge k

theorem Int.natAbs_surjective E1 #

Function.Surjective Int.natAbs

theorem Int.pow_right_injective E1 #

∀ {a : ℤ}, 1 < a.natAbs → Function.Injective fun x ↦ a ^ x

theorem Int.ofNat_dvd_natCast E1 #

∀ {x y : ℕ}, OfNat.ofNat x ∣ ↑y ↔ OfNat.ofNat x ∣ y

theorem Int.natCast_dvd_ofNat E1 #

∀ {x y : ℕ}, ↑x ∣ OfNat.ofNat y ↔ x ∣ OfNat.ofNat y

theorem Int.natCast_dvd E1 #

∀ {n : ℤ} {m : ℕ}, ↑m ∣ n ↔ m ∣ n.natAbs

theorem Int.dvd_natCast E1 #

∀ {m : ℤ} {n : ℕ}, m ∣ ↑n ↔ m.natAbs ∣ n

theorem Int.natAbs_le_of_dvd_ne_zero E1 #

∀ {m n : ℤ}, m ∣ n → n ≠ 0 → m.natAbs ≤ n.natAbs

theorem Int.gcd_emod E1 #

∀ (m n : ℤ), (m % n).gcd n = m.gcd n