Even and odd elements in rings #
This file defines odd elements and proves some general facts about even and odd elements of rings.
As opposed to Even, Odd does not have a multiplicative counterpart.
TODO #
Try to generalize Even lemmas further. For example, there are still a few lemmas whose Semiring
assumptions I (DT) am not convinced are necessary. If that turns out to be true, they could be moved
to Mathlib/Algebra/Group/Even.lean.
See also #
Mathlib/Algebra/Group/Even.lean for the definition of even elements.
@[simp]
theorem Even.mul_left {α : Type u_2} [Add α] [Mul α] {a : α} [LeftDistribClass α] (ha : Even a) (b : α) :
@[simp]
theorem Even.mul_right {α : Type u_2} [Add α] [Mul α] {a : α} [RightDistribClass α] (ha : Even a) (b : α) :
Alias of the forward direction of even_iff_two_dvd.
@[simp]
@[instance_reducible]
Equations
- x✝.instDecidablePredOdd = decidable_of_iff (x✝ % 2 = 1) ⋯
Alias of Nat.Odd.sub_odd.
theorem Function.Involutive.iterate_two_mul {α : Type u_4} {f : α → α} (hf : Involutive f) (n : ℕ) :
theorem Function.Involutive.iterate_two_mul_add_one {α : Type u_4} {f : α → α} (hf : Involutive f) (n : ℕ) :
theorem Function.Involutive.iterate_even {α : Type u_4} {f : α → α} {n : ℕ} (hf : Involutive f) (hn : Even n) :
theorem Function.Involutive.iterate_odd {α : Type u_4} {f : α → α} {n : ℕ} (hf : Involutive f) (hn : Odd n) :
theorem Even.neg_one_zpow {α : Type u_2} [DivisionMonoid α] [HasDistribNeg α] {n : ℤ} (h : Even n) :
theorem natCast_eq_zero_of_even_of_two_eq_zero {R : Type u_4} [AddMonoidWithOne R] {n : ℕ} (hn : Even n) (h : 2 = 0) :
theorem natCast_eq_one_of_odd_of_two_eq_zero {R : Type u_4} [AddMonoidWithOne R] {n : ℕ} (hn : Odd n) (h : 2 = 0) :
theorem natCast_eq_zero_or_one_of_two_eq_zero {R : Type u_4} [AddMonoidWithOne R] (n : ℕ) (h : 2 = 0) :