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 Algebra.Group.Even
.
See also #
Algebra.Group.Even
for the definition of even elements.
theorem
Even.neg_one_zpow
{α : Type u_2}
[DivisionMonoid α]
[HasDistribNeg α]
{n : ℤ}
(h : Even n)
:
Alias of the forward direction of even_iff_two_dvd
.
Alias of the forward direction of odd_iff_exists_bit1
.
@[simp]
Equations
- x.instDecidablePredOdd = decidable_of_iff (x % 2 = 1) ⋯
Alias of Nat.Odd.sub_odd
.
theorem
Function.Involutive.iterate_bit0
{α : Type u_4}
{f : α → α}
(hf : Function.Involutive f)
(n : ℕ)
:
theorem
Function.Involutive.iterate_bit1
{α : Type u_4}
{f : α → α}
(hf : Function.Involutive f)
(n : ℕ)
:
theorem
Function.Involutive.iterate_two_mul
{α : Type u_4}
{f : α → α}
(hf : Function.Involutive f)
(n : ℕ)
:
theorem
Function.Involutive.iterate_even
{α : Type u_4}
{f : α → α}
{n : ℕ}
(hf : Function.Involutive f)
(hn : Even n)
:
theorem
Function.Involutive.iterate_odd
{α : Type u_4}
{f : α → α}
{n : ℕ}
(hf : Function.Involutive f)
(hn : Odd n)
:
theorem
natCast_eq_zero_of_even_of_two_eq_zero
{R : Type u_4}
[AddMonoidWithOne R]
{n : ℕ}
(hn : Even n)
(h : 2 = 0)
:
↑n = 0
theorem
natCast_eq_one_of_odd_of_two_eq_zero
{R : Type u_4}
[AddMonoidWithOne R]
{n : ℕ}
(hn : Odd n)
(h : 2 = 0)
:
↑n = 1
theorem
natCast_eq_zero_or_one_of_two_eq_zero
{R : Type u_4}
[AddMonoidWithOne R]
(n : ℕ)
(h : 2 = 0)
: