Basic operations on the integers #
This file builds on Data.Int.Init by adding basic lemmas on integers.
depending on Mathlib definitions.
theorem
Int.inductionOn'_add_one
{C : ℤ → Sort u_1}
{z b : ℤ}
{H0 : C b}
{Hs : (k : ℤ) → b ≤ k → C k → C (k + 1)}
{Hp : (k : ℤ) → k ≤ b → C k → C (k - 1)}
(hz : b ≤ z)
:
Int.inductionOn' (z + 1) b H0 Hs Hp = Hs z hz (Int.inductionOn' z b H0 Hs Hp)
theorem
Int.strongRec_of_ge
{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 : k < n) => Int.strongRec lt ge k
nat abs #
dvd #
theorem
Int.eq_zero_of_dvd_of_nonneg_of_lt
{m n : ℤ}
(hm : 0 ≤ m)
(hmn : m < n)
(hnm : n ∣ m)
:
m = 0
theorem
Int.eq_of_mod_eq_of_natAbs_sub_lt_natAbs
{a b c : ℤ}
(h1 : a % b = c)
(h2 : (a - c).natAbs < b.natAbs)
:
a = c
If two integers are congruent to a sufficiently large modulus, they are equal.