Mathlib.Algebra.Group.Int.Even
21 declarations and 1 deprecated aliases. Mathlib docs · Source
Parity of integers
Parity
theorem Int.emod_two_ne_one E0 #
∀ {n : ℤ}, ¬n % 2 = 1 ↔ n % 2 = 0
theorem Int.one_emod_two E0 #
1 % 2 = 1
theorem Int.emod_two_ne_zero E1 #
∀ {n : ℤ}, ¬n % 2 = 0 ↔ n % 2 = 1
theorem Int.even_iff E0 #
∀ {n : ℤ}, Even n ↔ n % 2 = 0
theorem Int.not_even_iff E0 #
∀ {n : ℤ}, ¬Even n ↔ n % 2 = 1
theorem Int.two_dvd_ne_zero E0 #
∀ {n : ℤ}, ¬2 ∣ n ↔ n % 2 = 1
instance Int.instDecidablePredEven E0 #
DecidablePred Even
instance Int.instDecidablePredIsSquare E0 #
DecidablePred IsSquare
IsSquare can be decided on ℤ by checking against the square root.
theorem Int.not_even_one E0 #
¬Even 1
theorem Int.even_add E1 #
∀ {m n : ℤ}, Even (m + n) ↔ (Even m ↔ Even n)
theorem Int.two_not_dvd_two_mul_add_one E1 #
∀ (n : ℤ), ¬2 ∣ 2 * n + 1
theorem Int.even_sub E1 #
∀ {m n : ℤ}, Even (m - n) ↔ (Even m ↔ Even n)
theorem Int.even_add_one E1 #
∀ {n : ℤ}, Even (n + 1) ↔ ¬Even n
theorem Int.even_sub_one E1 #
∀ {n : ℤ}, Even (n - 1) ↔ ¬Even n
theorem Int.even_mul E1 #
∀ {m n : ℤ}, Even (m * n) ↔ Even m ∨ Even n
theorem Int.even_pow E1 #
∀ {m : ℤ} {n : ℕ}, Even (m ^ n) ↔ Even m ∧ n ≠ 0
theorem Int.even_pow' E1 #
∀ {m : ℤ} {n : ℕ}, n ≠ 0 → (Even (m ^ n) ↔ Even m)
theorem Int.even_natCast E0 #
∀ (n : ℕ), Even ↑n ↔ Even n
theorem Int.two_mul_ediv_two_of_even E1 #
∀ {n : ℤ}, Even n → 2 * (n / 2) = n
theorem Int.ediv_two_mul_two_of_even E1 #
∀ {n : ℤ}, Even n → n / 2 * 2 = n
theorem Int.isSquare_sign_iff E0 #
∀ {z : ℤ}, IsSquare z.sign ↔ 0 ≤ z
Deprecated aliases
| Name | New name | Since |
|---|---|---|
Int.even_coe_nat | Int.even_natCast | 2026-10-13 |