Documentation

Projects.Util.Int

theorem Int.even_iff_exi {n : } :
Even n ∃ (k : ), n = k * 2
theorem Int.odd_iff_exi {n : } :
Odd n ∃ (k : ), n = k * 2 + 1
theorem Int.mod_2_ind {P : Prop} (h₁ : ∀ (n : ), P (n * 2)) (h₂ : ∀ (n : ), P (n * 2 + 1)) (n : ) :
P n
theorem Int.not_even_mul_2_succ {n : } :
¬Even (n * 2 + 1)
@[simp]
theorem Int.not_odd_mul_2 {n : } :
¬Odd (n * 2)
theorem Int.le_one_iff {n : } (h : 0 n) :
n 1 n = 0 n = 1
theorem Int.of_between_succ {a b : } (h₁ : a b) (h₂ : b a + 1) :
b = a b = a + 1
theorem Int.add_div_eq {a b : } (h : 0 < b) :
(a + b) / b = a / b + 1
@[simp]
theorem Int.negSucc_succ {n : } :
negSucc (n + 1) = negSucc n - 1
@[simp]
theorem Int.even_succ_iff {n : } :
Even (n + 1) Odd n
@[simp]
theorem Int.odd_succ_iff {n : } :
Odd (n + 1) Even n
theorem Int.succ_div_2_eq_div_iff {n : } (hp : 0 n) :
(n + 1) / 2 = n / 2 Even n
theorem Int.succ_div_2_eq_div_succ_iff {n : } (hp : 0 n) :
(n + 1) / 2 = n / 2 + 1 Odd n
theorem Int.succ_div_2_eq_or_eq {n : } (hp : 0 n) :
(n + 1) / 2 = n / 2 (n + 1) / 2 = n / 2 + 1
theorem Int.succ_div_2_eq_div_iff' {n : } (hp : 0 n) :
n / 2 = (n + 1) / 2 Even n
@[simp]
theorem Int.succ_div_2_eq_div_succ_iff' {n : } (hp : 0 n) :
n / 2 + 1 = (n + 1) / 2 Odd n
theorem Int.mul_2_succ_div_2_eq {n : } (hp : 0 n) :
(n * 2 + 1) / 2 = n
@[simp]
theorem Int.max_abs_eq_zero_iff {n m : } :
max |n| |m| = 0 n = 0 m = 0
@[simp]
theorem Int.eq_self_sub_iff {a b : } :
a = a - b b = 0
theorem Int.toNat_eq_self_of {z : } (h₁ : 0 z) :
z.toNat = z