Documentation

Mathlib.Algebra.Group.Int.Even

Parity of integers #

Parity #

@[simp]
theorem Int.emod_two_ne_one {n : } :
¬n % 2 = 1 n % 2 = 0
@[simp]
theorem Int.one_emod_two :
1 % 2 = 1
theorem Int.emod_two_ne_zero {n : } :
¬n % 2 = 0 n % 2 = 1
theorem Int.even_iff {n : } :
Even n n % 2 = 0
theorem Int.not_even_iff {n : } :
¬Even n n % 2 = 1
@[simp]
theorem Int.two_dvd_ne_zero {n : } :
¬2 n n % 2 = 1
Equations

IsSquare can be decided on by checking against the square root.

Equations
@[simp]
theorem Int.even_add {m n : } :
Even (m + n) (Even m Even n)
theorem Int.even_sub {m n : } :
Even (m - n) (Even m Even n)
theorem Int.even_add_one {n : } :
Even (n + 1) ¬Even n
theorem Int.even_sub_one {n : } :
Even (n - 1) ¬Even n
theorem Int.even_mul {m n : } :
Even (m * n) Even m Even n
theorem Int.even_pow {m : } {n : } :
Even (m ^ n) Even m n 0
theorem Int.even_pow' {m : } {n : } (h : n 0) :
Even (m ^ n) Even m
@[simp]
theorem Int.even_coe_nat (n : ) :
Even n Even n
theorem Int.two_mul_ediv_two_of_even {n : } :
Even n2 * (n / 2) = n
theorem Int.ediv_two_mul_two_of_even {n : } :
Even nn / 2 * 2 = n