File: Mathlib/Algebra/Ring/Parity.lean

full_name: Even.neg_pow
code: @[simp] lemma Even.neg_pow : Even n → ∀ a : α, (-a) ^ n = a ^ n 
goal: Even n → ∀ (a : α), (-a) ^ n = a ^ n

full_name: Even.neg_one_pow
code: lemma Even.neg_one_pow (h : Even n) : (-1 : α) ^ n = 1 
goal: (-1) ^ n = 1

full_name: Even.neg_zpow
code: lemma Even.neg_zpow : Even n → ∀ a : α, (-a) ^ n = a ^ n 
goal: Even n → ∀ (a : α), (-a) ^ n = a ^ n

full_name: Even.neg_one_zpow
code: lemma Even.neg_one_zpow (h : Even n) : (-1 : α) ^ n = 1 
goal: (-1) ^ n = 1

full_name: isSquare_zero
code: @[simp] lemma isSquare_zero [MulZeroClass α] : IsSquare (0 : α) 
goal: IsSquare 0

full_name: even_iff_exists_two_mul
code: lemma even_iff_exists_two_mul : Even a ↔ ∃ b, a = 2 * b 
goal: Even a ↔ ∃ b, a = 2 * b

full_name: even_iff_two_dvd
code: lemma even_iff_two_dvd : Even a ↔ 2 ∣ a 
goal: Even a ↔ 2 ∣ a

full_name: Even.trans_dvd
code: lemma Even.trans_dvd (ha : Even a) (hab : a ∣ b) : Even b 
goal: Even b

full_name: Dvd.dvd.even
code: lemma Dvd.dvd.even (hab : a ∣ b) (ha : Even a) : Even b 
goal: Even b

full_name: range_two_mul
code: @[simp] lemma range_two_mul (α) [Semiring α] : Set.range (fun x : α ↦ 2 * x) = {a | Even a} 
goal: (Set.range fun x => 2 * x) = {a | Even a}

full_name: even_two
code: @[simp] lemma even_two : Even (2 : α) 
goal: Even 2

full_name: Even.mul_left
code: @[simp] lemma Even.mul_left (ha : Even a) (b) : Even (b * a) 
goal: Even (b * a)

full_name: Even.mul_right
code: @[simp] lemma Even.mul_right (ha : Even a) (b) : Even (a * b) 
goal: Even (a * b)

full_name: even_two_mul
code: lemma even_two_mul (a : α) : Even (2 * a) 
goal: Even (2 * a)

full_name: Even.pow_of_ne_zero
code: lemma Even.pow_of_ne_zero (ha : Even a) : ∀ {n : ℕ}, n ≠ 0 → Even (a ^ n)
  
goal: n ≠ 0 → Even (a ^ n)

full_name: Odd
code: /-- An element `a` of a semiring is odd if there exists `k` such `a = 2*k + 1`. -/
def Odd (a : α) : Prop 
goal: Prop

full_name: odd_iff_exists_bit1
code: lemma odd_iff_exists_bit1 : Odd a ↔ ∃ b, a = 2 * b + 1 
goal: Odd a ↔ ∃ b, a = 2 * b + 1

full_name: range_two_mul_add_one
code: @[simp] lemma range_two_mul_add_one (α : Type*) [Semiring α] :
    Set.range (fun x : α ↦ 2 * x + 1) = {a | Odd a} 
goal: (Set.range fun x => 2 * x + 1) = {a | Odd a}

full_name: Even.add_odd
code: lemma Even.add_odd : Even a → Odd b → Odd (a + b) 
goal: Even a → Odd b → Odd (a + b)

full_name: Even.odd_add
code: lemma Even.odd_add (ha : Even a) (hb : Odd b) : Odd (b + a) 
goal: Odd (b + a)

full_name: Odd.add_even
code: lemma Odd.add_even (ha : Odd a) (hb : Even b) : Odd (a + b) 
goal: Odd (a + b)

full_name: Odd.add_odd
code: lemma Odd.add_odd : Odd a → Odd b → Even (a + b) 
goal: Odd a → Odd b → Even (a + b)

full_name: odd_one
code: @[simp] lemma odd_one : Odd (1 : α) 
goal: Odd 1

full_name: Even.add_one
code: @[simp] lemma Even.add_one (h : Even a) : Odd (a + 1) 
goal: Odd (a + 1)

full_name: Even.one_add
code: @[simp] lemma Even.one_add (h : Even a) : Odd (1 + a) 
goal: Odd (1 + a)

full_name: odd_two_mul_add_one
code: lemma odd_two_mul_add_one (a : α) : Odd (2 * a + 1) 
goal: Odd (2 * a + 1)

full_name: odd_add_self_one'
code: @[simp] lemma odd_add_self_one' : Odd (a + (a + 1)) 
goal: Odd (a + (a + 1))

full_name: odd_add_one_self
code: @[simp] lemma odd_add_one_self : Odd (a + 1 + a) 
goal: Odd (a + 1 + a)

full_name: odd_add_one_self'
code: @[simp] lemma odd_add_one_self' : Odd (a + (1 + a)) 
goal: Odd (a + (1 + a))

full_name: Odd.map
code: lemma Odd.map [FunLike F α β] [RingHomClass F α β] (f : F) : Odd a → Odd (f a) 
goal: Odd a → Odd (f a)

full_name: Odd.natCast
code: lemma Odd.natCast {R : Type*} [Semiring R] {n : ℕ} (hn : Odd n) : Odd (n : R) 
goal: Odd ↑n

full_name: Odd.mul
code: @[simp] lemma Odd.mul : Odd a → Odd b → Odd (a * b) 
goal: Odd a → Odd b → Odd (a * b)

full_name: Odd.pow
code: lemma Odd.pow (ha : Odd a) : ∀ {n : ℕ}, Odd (a ^ n)
  
goal: Odd (a ^ n)

full_name: Odd.pow_add_pow_eq_zero
code: lemma Odd.pow_add_pow_eq_zero [IsCancelAdd α] (hn : Odd n) (hab : a + b = 0) :
    a ^ n + b ^ n = 0 
goal: a ^ n + b ^ n = 0

full_name: Odd.neg_pow
code: lemma Odd.neg_pow : Odd n → ∀ a : α, (-a) ^ n = -a ^ n 
goal: Odd n → ∀ (a : α), (-a) ^ n = -a ^ n

full_name: Odd.neg_one_pow
code: @[simp] lemma Odd.neg_one_pow (h : Odd n) : (-1 : α) ^ n = -1 
goal: (-1) ^ n = -1

full_name: even_neg_two
code: lemma even_neg_two : Even (-2 : α) 
goal: Even (-2)

full_name: Odd.neg
code: lemma Odd.neg (hp : Odd a) : Odd (-a) 
goal: Odd (-a)

full_name: odd_neg
code: @[simp] lemma odd_neg : Odd (-a) ↔ Odd a 
goal: Odd (-a) ↔ Odd a

full_name: odd_neg_one
code: lemma odd_neg_one : Odd (-1 : α) 
goal: Odd (-1)

full_name: Odd.sub_even
code: lemma Odd.sub_even (ha : Odd a) (hb : Even b) : Odd (a - b) 
goal: Odd (a - b)

full_name: Even.sub_odd
code: lemma Even.sub_odd (ha : Even a) (hb : Odd b) : Odd (a - b) 
goal: Odd (a - b)

full_name: Odd.sub_odd
code: lemma Odd.sub_odd (ha : Odd a) (hb : Odd b) : Even (a - b) 
goal: Even (a - b)

full_name: Nat.odd_iff
code: lemma odd_iff : Odd n ↔ n % 2 = 1 
goal: Odd n ↔ n % 2 = 1

full_name: Nat.instDecidablePredOdd
code: instance : DecidablePred (Odd : ℕ → Prop) 
goal: DecidablePred Odd

full_name: Nat.not_odd_iff
code: lemma not_odd_iff : ¬Odd n ↔ n % 2 = 0 
goal: ¬Odd n ↔ n % 2 = 0

full_name: Nat.even_iff_not_odd
code: lemma even_iff_not_odd : Even n ↔ ¬Odd n 
goal: Even n ↔ ¬Odd n

full_name: Nat.odd_iff_not_even
code: @[simp] lemma odd_iff_not_even : Odd n ↔ ¬Even n 
goal: Odd n ↔ ¬Even n

full_name: Odd.not_two_dvd_nat
code: lemma _root_.Odd.not_two_dvd_nat (h : Odd n) : ¬(2 ∣ n) 
goal: ¬2 ∣ n

full_name: Nat.even_xor_odd
code: lemma even_xor_odd (n : ℕ) : Xor' (Even n) (Odd n) 
goal: Xor' (Even n) (Odd n)

full_name: Nat.even_or_odd
code: lemma even_or_odd (n : ℕ) : Even n ∨ Odd n 
goal: Even n ∨ Odd n

full_name: Nat.even_or_odd'
code: lemma even_or_odd' (n : ℕ) : ∃ k, n = 2 * k ∨ n = 2 * k + 1 
goal: ∃ k, n = 2 * k ∨ n = 2 * k + 1

full_name: Nat.even_xor_odd'
code: lemma even_xor_odd' (n : ℕ) : ∃ k, Xor' (n = 2 * k) (n = 2 * k + 1) 
goal: ∃ k, Xor' (n = 2 * k) (n = 2 * k + 1)

full_name: Nat.mod_two_add_add_odd_mod_two
code: lemma mod_two_add_add_odd_mod_two (m : ℕ) {n : ℕ} (hn : Odd n) : m % 2 + (m + n) % 2 = 1 
goal: m % 2 + (m + n) % 2 = 1

full_name: Nat.mod_two_add_succ_mod_two
code: @[simp] lemma mod_two_add_succ_mod_two (m : ℕ) : m % 2 + (m + 1) % 2 = 1 
goal: m % 2 + (m + 1) % 2 = 1

full_name: Nat.succ_mod_two_add_mod_two
code: @[simp] lemma succ_mod_two_add_mod_two (m : ℕ) : (m + 1) % 2 + m % 2 = 1 
goal: (m + 1) % 2 + m % 2 = 1

full_name: Nat.even_add'
code: lemma even_add' : Even (m + n) ↔ (Odd m ↔ Odd n) 
goal: Even (m + n) ↔ (Odd m ↔ Odd n)

full_name: Nat.not_even_bit1
code: @[simp] lemma not_even_bit1 (n : ℕ) : ¬Even (2 * n + 1) 
goal: ¬Even (2 * n + 1)

full_name: Nat.not_even_two_mul_add_one
code: lemma not_even_two_mul_add_one (n : ℕ) : ¬ Even (2 * n + 1) 
goal: ¬Even (2 * n + 1)

full_name: Nat.even_sub'
code: lemma even_sub' (h : n ≤ m) : Even (m - n) ↔ (Odd m ↔ Odd n) 
goal: Even (m - n) ↔ (Odd m ↔ Odd n)

full_name: Nat.Odd.sub_odd
code: lemma Odd.sub_odd (hm : Odd m) (hn : Odd n) : Even (m - n) 
goal: Even (m - n)

full_name: Nat.odd_mul
code: lemma odd_mul : Odd (m * n) ↔ Odd m ∧ Odd n 
goal: Odd (m * n) ↔ Odd m ∧ Odd n

full_name: Nat.Odd.of_mul_left
code: lemma Odd.of_mul_left (h : Odd (m * n)) : Odd m 
goal: Odd m

full_name: Nat.Odd.of_mul_right
code: lemma Odd.of_mul_right (h : Odd (m * n)) : Odd n 
goal: Odd n

full_name: Nat.even_div
code: lemma even_div : Even (m / n) ↔ m % (2 * n) / n = 0 
goal: Even (m / n) ↔ m % (2 * n) / n = 0

full_name: Nat.odd_add
code: @[parity_simps] lemma odd_add : Odd (m + n) ↔ (Odd m ↔ Even n) 
goal: Odd (m + n) ↔ (Odd m ↔ Even n)

full_name: Nat.odd_add'
code: lemma odd_add' : Odd (m + n) ↔ (Odd n ↔ Even m) 
goal: Odd (m + n) ↔ (Odd n ↔ Even m)

full_name: Nat.ne_of_odd_add
code: lemma ne_of_odd_add (h : Odd (m + n)) : m ≠ n 
goal: m ≠ n

full_name: Nat.odd_sub
code: @[parity_simps] lemma odd_sub (h : n ≤ m) : Odd (m - n) ↔ (Odd m ↔ Even n) 
goal: Odd (m - n) ↔ (Odd m ↔ Even n)

full_name: Nat.Odd.sub_even
code: lemma Odd.sub_even (h : n ≤ m) (hm : Odd m) (hn : Even n) : Odd (m - n) 
goal: Odd (m - n)

full_name: Nat.odd_sub'
code: lemma odd_sub' (h : n ≤ m) : Odd (m - n) ↔ (Odd n ↔ Even m) 
goal: Odd (m - n) ↔ (Odd n ↔ Even m)

full_name: Nat.Even.sub_odd
code: lemma Even.sub_odd (h : n ≤ m) (hm : Even m) (hn : Odd n) : Odd (m - n) 
goal: Odd (m - n)

full_name: Nat.two_mul_div_two_add_one_of_odd
code: lemma two_mul_div_two_add_one_of_odd (h : Odd n) : 2 * (n / 2) + 1 = n 
goal: 2 * (n / 2) + 1 = n

full_name: Nat.div_two_mul_two_add_one_of_odd
code: lemma div_two_mul_two_add_one_of_odd (h : Odd n) : n / 2 * 2 + 1 = n 
goal: n / 2 * 2 + 1 = n

full_name: Nat.one_add_div_two_mul_two_of_odd
code: lemma one_add_div_two_mul_two_of_odd (h : Odd n) : 1 + n / 2 * 2 = n 
goal: 1 + n / 2 * 2 = n

full_name: Function.Involutive.iterate_bit0
code: lemma iterate_bit0 (hf : Involutive f) (n : ℕ) : f^[2 * n] = id 
goal: f^[2 * n] = id

full_name: Function.Involutive.iterate_bit1
code: lemma iterate_bit1 (hf : Involutive f) (n : ℕ) : f^[2 * n + 1] = f 
goal: f^[2 * n + 1] = f

full_name: Function.Involutive.iterate_two_mul
code: lemma iterate_two_mul (hf : Involutive f) (n : ℕ) : f^[2 * n] = id 
goal: f^[2 * n] = id

full_name: Function.Involutive.iterate_even
code: lemma iterate_even (hf : Involutive f) (hn : Even n) : f^[n] = id 
goal: f^[n] = id

full_name: Function.Involutive.iterate_odd
code: lemma iterate_odd (hf : Involutive f) (hn : Odd n) : f^[n] = f 
goal: f^[n] = f

full_name: Function.Involutive.iterate_eq_self
code: lemma iterate_eq_self (hf : Involutive f) (hne : f ≠ id) : f^[n] = f ↔ Odd n 
goal: f^[n] = f ↔ Odd n

full_name: Function.Involutive.iterate_eq_id
code: lemma iterate_eq_id (hf : Involutive f) (hne : f ≠ id) : f^[n] = id ↔ Even n 
goal: f^[n] = id ↔ Even n

full_name: neg_one_pow_eq_one_iff_even
code: lemma neg_one_pow_eq_one_iff_even {R : Type*} [Monoid R] [HasDistribNeg R] {n : ℕ}
    (h : (-1 : R) ≠ 1) : (-1 : R) ^ n = 1 ↔ Even n 
goal: (-1) ^ n = 1 ↔ Even n