Parity of natural numbers #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file contains theorems about the even
and odd
predicates on the natural numbers.
Tags #
even, odd
@[protected, instance]
Equations
- nat.even.decidable_pred = λ (n : ℕ), decidable_of_iff (n % 2 = 0) _
@[protected, instance]
Equations
- nat.odd.decidable_pred = λ (n : ℕ), decidable_of_iff (¬even n) _
theorem
function.involutive.iterate_bit0
{α : Type u_1}
{f : α → α}
(hf : function.involutive f)
(n : ℕ) :
theorem
function.involutive.iterate_bit1
{α : Type u_1}
{f : α → α}
(hf : function.involutive f)
(n : ℕ) :
theorem
function.involutive.iterate_even
{α : Type u_1}
{f : α → α}
{n : ℕ}
(hf : function.involutive f)
(hn : even n) :
theorem
function.involutive.iterate_odd
{α : Type u_1}
{f : α → α}
{n : ℕ}
(hf : function.involutive f)
(hn : odd n) :
theorem
neg_one_pow_eq_one_iff_even
{R : Type u_1}
[monoid R]
[has_distrib_neg R]
{n : ℕ}
(h : -1 ≠ 1) :