statement
stringlengths
1
2.88k
proof
stringlengths
0
13.9k
type
stringclasses
10 values
symbolic_name
stringlengths
1
131
library
stringclasses
417 values
filename
stringlengths
17
80
imports
listlengths
0
16
deps
listlengths
0
64
docstring
stringlengths
0
10.2k
source_url
stringclasses
1 value
commit
stringclasses
1 value
units_with_zero_equiv {α : Type*} [group α] : (with_zero α)ˣ ≃* α
{ to_fun := λ a, unzero a.ne_zero, inv_fun := λ a, units.mk0 a coe_ne_zero, left_inv := λ _, units.ext $ by simpa only [coe_unzero], right_inv := λ _, rfl, map_mul' := λ _ _, coe_inj.mp $ by simpa only [coe_unzero, coe_mul] }
def
with_zero.units_with_zero_equiv
algebra.group.with_one
src/algebra/group/with_one/units.lean
[ "algebra.group.with_one.basic", "algebra.group_with_zero.units.basic" ]
[ "group", "inv_fun", "units.ext", "units.mk0" ]
Any group is isomorphic to the units of itself adjoined with `0`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_ite (P : Prop) [decidable P] (a : M) (b c : ℕ) : a ^ (if P then b else c) = if P then a ^ b else a ^ c
by split_ifs; refl
lemma
pow_ite
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ite_pow (P : Prop) [decidable P] (a b : M) (c : ℕ) : (if P then a else b) ^ c = if P then a ^ c else b ^ c
by split_ifs; refl
lemma
ite_pow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_one (a : M) : a^1 = a
by rw [pow_succ, pow_zero, mul_one]
theorem
pow_one
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "mul_one", "pow_succ", "pow_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_two (a : M) : a^2 = a * a
by rw [pow_succ, pow_one]
theorem
pow_two
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "pow_one", "pow_succ" ]
Note that most of the lemmas about powers of two refer to it as `sq`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_three' (a : M) : a^3 = a * a * a
by rw [pow_succ', pow_two]
theorem
pow_three'
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "pow_succ'", "pow_two" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_three (a : M) : a^3 = a * (a * a)
by rw [pow_succ, pow_two]
theorem
pow_three
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "pow_succ", "pow_two" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_mul_comm' (a : M) (n : ℕ) : a^n * a = a * a^n
commute.pow_self a n
theorem
pow_mul_comm'
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "commute.pow_self" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_add (a : M) (m n : ℕ) : a^(m + n) = a^m * a^n
by induction n with n ih; [rw [nat.add_zero, pow_zero, mul_one], rw [pow_succ', ← mul_assoc, ← ih, ← pow_succ', nat.add_assoc]]
theorem
pow_add
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "ih", "mul_assoc", "mul_one", "pow_succ'", "pow_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_boole (P : Prop) [decidable P] (a : M) : a ^ (if P then 1 else 0) = if P then a else 1
by simp
lemma
pow_boole
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
one_pow (n : ℕ) : (1 : M)^n = 1
by induction n with n ih; [exact pow_zero _, rw [pow_succ, ih, one_mul]]
theorem
one_pow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "ih", "one_mul", "pow_succ", "pow_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_mul (a : M) (m n : ℕ) : a^(m * n) = (a^m)^n
begin induction n with n ih, { rw [nat.mul_zero, pow_zero, pow_zero] }, { rw [nat.mul_succ, pow_add, pow_succ', ih] } end
theorem
pow_mul
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "ih", "pow_add", "pow_succ'", "pow_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_right_comm (a : M) (m n : ℕ) : (a^m)^n = (a^n)^m
by rw [←pow_mul, nat.mul_comm, pow_mul]
lemma
pow_right_comm
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "pow_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_mul' (a : M) (m n : ℕ) : a^(m * n) = (a^n)^m
by rw [nat.mul_comm, pow_mul]
theorem
pow_mul'
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "pow_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_mul_pow_sub (a : M) {m n : ℕ} (h : m ≤ n) : a ^ m * a ^ (n - m) = a ^ n
by rw [←pow_add, nat.add_comm, nat.sub_add_cancel h]
theorem
pow_mul_pow_sub
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_sub_mul_pow (a : M) {m n : ℕ} (h : m ≤ n) : a ^ (n - m) * a ^ m = a ^ n
by rw [←pow_add, nat.sub_add_cancel h]
theorem
pow_sub_mul_pow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_eq_pow_mod {M : Type*} [monoid M] {x : M} (m : ℕ) {n : ℕ} (h : x ^ n = 1) : x ^ m = x ^ (m % n)
begin have t := congr_arg (λ a, x ^ a) ((nat.add_comm _ _).trans (nat.mod_add_div _ _)).symm, dsimp at t, rw [t, pow_add, pow_mul, h, one_pow, one_mul], end
lemma
pow_eq_pow_mod
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "monoid", "one_mul", "one_pow", "pow_add", "pow_mul" ]
If `x ^ n = 1`, then `x ^ m` is the same as `x ^ (m % n)`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_bit0 (a : M) (n : ℕ) : a ^ bit0 n = a^n * a^n
pow_add _ _ _
theorem
pow_bit0
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "pow_add" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_bit1 (a : M) (n : ℕ) : a ^ bit1 n = a^n * a^n * a
by rw [bit1, pow_succ', pow_bit0]
theorem
pow_bit1
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "pow_bit0", "pow_succ'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_mul_comm (a : M) (m n : ℕ) : a^m * a^n = a^n * a^m
commute.pow_pow_self a m n
theorem
pow_mul_comm
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "commute.pow_pow_self" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
commute.mul_pow {a b : M} (h : commute a b) (n : ℕ) : (a * b) ^ n = a ^ n * b ^ n
nat.rec_on n (by simp only [pow_zero, one_mul]) $ λ n ihn, by simp only [pow_succ, ihn, ← mul_assoc, (h.pow_left n).right_comm]
lemma
commute.mul_pow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "commute", "mul_assoc", "one_mul", "pow_succ", "pow_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_bit0' (a : M) (n : ℕ) : a ^ bit0 n = (a * a) ^ n
by rw [pow_bit0, (commute.refl a).mul_pow]
theorem
pow_bit0'
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "commute.refl", "mul_pow", "pow_bit0" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_bit1' (a : M) (n : ℕ) : a ^ bit1 n = (a * a) ^ n * a
by rw [bit1, pow_succ', pow_bit0']
theorem
pow_bit1'
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "pow_bit0'", "pow_succ'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_mul_pow_eq_one {a b : M} (n : ℕ) (h : a * b = 1) : a ^ n * b ^ n = 1
begin induction n with n hn, { simp }, { calc a ^ n.succ * b ^ n.succ = a ^ n * a * (b * b ^ n) : by rw [pow_succ', pow_succ] ... = a ^ n * (a * b) * b ^ n : by simp only [mul_assoc] ... = 1 : by simp [h, hn] } end
lemma
pow_mul_pow_eq_one
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "mul_assoc", "pow_succ", "pow_succ'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dvd_pow {x y : M} (hxy : x ∣ y) : ∀ {n : ℕ} (hn : n ≠ 0), x ∣ y^n
| 0 hn := (hn rfl).elim | (n + 1) hn := by { rw pow_succ, exact hxy.mul_right _ }
lemma
dvd_pow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "pow_succ" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dvd_pow_self (a : M) {n : ℕ} (hn : n ≠ 0) : a ∣ a^n
dvd_rfl.pow hn
lemma
dvd_pow_self
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mul_pow (a b : M) (n : ℕ) : (a * b)^n = a^n * b^n
(commute.all a b).mul_pow n
theorem
mul_pow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "commute.all" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_monoid_hom (n : ℕ) : M →* M
{ to_fun := (^ n), map_one' := one_pow _, map_mul' := λ a b, mul_pow a b n }
def
pow_monoid_hom
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "mul_pow", "one_pow" ]
The `n`th power map on a commutative monoid for a natural `n`, considered as a morphism of monoids.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_one (a : G) : a ^ (1:ℤ) = a
by { convert pow_one a using 1, exact zpow_coe_nat a 1 }
theorem
zpow_one
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "pow_one", "zpow_coe_nat" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_two (a : G) : a ^ (2 : ℤ) = a * a
by { convert pow_two a using 1, exact zpow_coe_nat a 2 }
theorem
zpow_two
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "pow_two", "zpow_coe_nat" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_neg_one (x : G) : x ^ (-1:ℤ) = x⁻¹
(zpow_neg_succ_of_nat x 0).trans $ congr_arg has_inv.inv (pow_one x)
theorem
zpow_neg_one
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "pow_one", "zpow_neg_succ_of_nat" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_neg_coe_of_pos (a : G) : ∀ {n : ℕ}, 0 < n → a ^ -(n:ℤ) = (a ^ n)⁻¹
| (n+1) _ := zpow_neg_succ_of_nat _ _
theorem
zpow_neg_coe_of_pos
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "zpow_neg_succ_of_nat" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
inv_pow (a : α) : ∀ n : ℕ, (a⁻¹) ^ n = (a ^ n)⁻¹
| 0 := by rw [pow_zero, pow_zero, inv_one] | (n + 1) := by rw [pow_succ', pow_succ, inv_pow, mul_inv_rev]
lemma
inv_pow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "inv_one", "mul_inv_rev", "pow_succ", "pow_succ'", "pow_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
one_zpow : ∀ (n : ℤ), (1 : α) ^ n = 1
| (n : ℕ) := by rw [zpow_coe_nat, one_pow] | -[1+ n] := by rw [zpow_neg_succ_of_nat, one_pow, inv_one]
lemma
one_zpow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "inv_one", "one_pow", "zpow_coe_nat", "zpow_neg_succ_of_nat" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_neg (a : α) : ∀ (n : ℤ), a ^ -n = (a ^ n)⁻¹
| (n+1:ℕ) := div_inv_monoid.zpow_neg' _ _ | 0 := by { change a ^ (0 : ℤ) = (a ^ (0 : ℤ))⁻¹, simp } | -[1+ n] := by { rw [zpow_neg_succ_of_nat, inv_inv, ← zpow_coe_nat], refl }
lemma
zpow_neg
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "inv_inv", "zpow_coe_nat", "zpow_neg_succ_of_nat" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mul_zpow_neg_one (a b : α) : (a * b) ^ (-1 : ℤ) = b ^ (-1 : ℤ) * a ^ (-1 : ℤ)
by simp_rw [zpow_neg_one, mul_inv_rev]
lemma
mul_zpow_neg_one
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "mul_inv_rev", "zpow_neg_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
inv_zpow (a : α) : ∀ n : ℤ, a⁻¹ ^ n = (a ^ n)⁻¹
| (n : ℕ) := by rw [zpow_coe_nat, zpow_coe_nat, inv_pow] | -[1+ n] := by rw [zpow_neg_succ_of_nat, zpow_neg_succ_of_nat, inv_pow]
lemma
inv_zpow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "inv_pow", "zpow_coe_nat", "zpow_neg_succ_of_nat" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
inv_zpow' (a : α) (n : ℤ) : a⁻¹ ^ n = a ^ (-n)
by rw [inv_zpow, zpow_neg]
lemma
inv_zpow'
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "inv_zpow", "zpow_neg" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
one_div_pow (a : α) (n : ℕ) : (1 / a) ^ n = 1 / a ^ n
by simp_rw [one_div, inv_pow]
lemma
one_div_pow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "inv_pow", "one_div" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
one_div_zpow (a : α) (n : ℤ) : (1 / a) ^ n = 1 / a ^ n
by simp_rw [one_div, inv_zpow]
lemma
one_div_zpow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "inv_zpow", "one_div" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
commute.mul_zpow (h : commute a b) : ∀ (i : ℤ), (a * b) ^ i = a ^ i * b ^ i
| (n : ℕ) := by simp [h.mul_pow n] | -[1+n] := by simp [h.mul_pow, (h.pow_pow _ _).eq, mul_inv_rev]
lemma
commute.mul_zpow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "commute", "mul_inv_rev" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mul_zpow (a b : α) : ∀ n : ℤ, (a * b) ^ n = a ^ n * b ^ n
(commute.all a b).mul_zpow
lemma
mul_zpow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "commute.all" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
div_pow (a b : α) (n : ℕ) : (a / b) ^ n = a ^ n / b ^ n
by simp only [div_eq_mul_inv, mul_pow, inv_pow]
lemma
div_pow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "div_eq_mul_inv", "inv_pow", "mul_pow" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
div_zpow (a b : α) (n : ℤ) : (a / b) ^ n = a ^ n / b ^ n
by simp only [div_eq_mul_inv, mul_zpow, inv_zpow]
lemma
div_zpow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "div_eq_mul_inv", "inv_zpow", "mul_zpow" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_group_hom (n : ℤ) : α →* α
{ to_fun := (^ n), map_one' := one_zpow n, map_mul' := λ a b, mul_zpow a b n }
def
zpow_group_hom
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "mul_zpow", "one_zpow" ]
The `n`-th power map (for an integer `n`) on a commutative group, considered as a group homomorphism.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_sub (a : G) {m n : ℕ} (h : n ≤ m) : a^(m - n) = a^m * (a^n)⁻¹
eq_mul_inv_of_mul_eq $ by rw [←pow_add, nat.sub_add_cancel h]
lemma
pow_sub
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "eq_mul_inv_of_mul_eq" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_inv_comm (a : G) (m n : ℕ) : (a⁻¹)^m * a^n = a^n * (a⁻¹)^m
(commute.refl a).inv_left.pow_pow _ _
lemma
pow_inv_comm
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "commute.refl" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
inv_pow_sub (a : G) {m n : ℕ} (h : n ≤ m) : a⁻¹^(m - n) = (a^m)⁻¹ * a^n
by rw [pow_sub a⁻¹ h, inv_pow, inv_pow, inv_inv]
lemma
inv_pow_sub
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "inv_inv", "inv_pow", "pow_sub" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_dvd_pow [monoid R] (a : R) {m n : ℕ} (h : m ≤ n) : a ^ m ∣ a ^ n
⟨a ^ (n - m), by rw [← pow_add, nat.add_comm, nat.sub_add_cancel h]⟩
lemma
pow_dvd_pow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "monoid", "pow_add" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_add_nsmul [add_monoid A] (x : A) (n : ℕ) : multiplicative.of_add (n • x) = (multiplicative.of_add x)^n
rfl
lemma
of_add_nsmul
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "add_monoid", "multiplicative.of_add" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_add_zsmul [sub_neg_monoid A] (x : A) (n : ℤ) : multiplicative.of_add (n • x) = (multiplicative.of_add x)^n
rfl
lemma
of_add_zsmul
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "multiplicative.of_add", "sub_neg_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_mul_pow [monoid A] (x : A) (n : ℕ) : additive.of_mul (x ^ n) = n • (additive.of_mul x)
rfl
lemma
of_mul_pow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "additive.of_mul", "monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_mul_zpow [div_inv_monoid G] (x : G) (n : ℤ) : additive.of_mul (x ^ n) = n • additive.of_mul x
rfl
lemma
of_mul_zpow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "additive.of_mul", "div_inv_monoid" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
semiconj_by.zpow_right [group G] {a x y : G} (h : semiconj_by a x y) : ∀ m : ℤ, semiconj_by a (x^m) (y^m)
| (n : ℕ) := by simp [zpow_coe_nat, h.pow_right n] | -[1+n] := by simp [(h.pow_right n.succ).inv_right]
lemma
semiconj_by.zpow_right
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "group", "semiconj_by", "zpow_coe_nat" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_right (h : commute a b) (m : ℤ) : commute a (b^m)
h.zpow_right m
lemma
commute.zpow_right
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "commute" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_left (h : commute a b) (m : ℤ) : commute (a^m) b
(h.symm.zpow_right m).symm
lemma
commute.zpow_left
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "commute" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_zpow (h : commute a b) (m n : ℤ) : commute (a^m) (b^n)
(h.zpow_left m).zpow_right n
lemma
commute.zpow_zpow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "commute" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
self_zpow : commute a (a ^ n)
(commute.refl a).zpow_right n
lemma
commute.self_zpow
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "commute", "commute.refl", "self_zpow" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_self : commute (a ^ n) a
(commute.refl a).zpow_left n
lemma
commute.zpow_self
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "commute", "commute.refl" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_zpow_self : commute (a ^ m) (a ^ n)
(commute.refl a).zpow_zpow m n
lemma
commute.zpow_zpow_self
algebra.group_power
src/algebra/group_power/basic.lean
[ "algebra.divisibility.basic", "algebra.group.commute", "algebra.group.type_tags" ]
[ "commute", "commute.refl" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sq_add_sq_mul_sq_add_sq : (x₁^2 + x₂^2) * (y₁^2 + y₂^2) = (x₁*y₁ - x₂*y₂)^2 + (x₁*y₂ + x₂*y₁)^2
by ring
theorem
sq_add_sq_mul_sq_add_sq
algebra.group_power
src/algebra/group_power/identities.lean
[ "tactic.ring" ]
[ "ring" ]
Brahmagupta-Fibonacci identity or Diophantus identity, see <https://en.wikipedia.org/wiki/Brahmagupta%E2%80%93Fibonacci_identity>. This sign choice here corresponds to the signs obtained by multiplying two complex numbers.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sq_add_mul_sq_mul_sq_add_mul_sq : (x₁^2 + n*x₂^2) * (y₁^2 + n*y₂^2) = (x₁*y₁ - n*x₂*y₂)^2 + n*(x₁*y₂ + x₂*y₁)^2
by ring
theorem
sq_add_mul_sq_mul_sq_add_mul_sq
algebra.group_power
src/algebra/group_power/identities.lean
[ "tactic.ring" ]
[ "ring" ]
Brahmagupta's identity, see <https://en.wikipedia.org/wiki/Brahmagupta%27s_identity>
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_four_add_four_mul_pow_four : a^4 + 4*b^4 = ((a - b)^2 + b^2) * ((a + b)^2 + b^2)
by ring
theorem
pow_four_add_four_mul_pow_four
algebra.group_power
src/algebra/group_power/identities.lean
[ "tactic.ring" ]
[ "ring" ]
Sophie Germain's identity, see <https://www.cut-the-knot.org/blue/SophieGermainIdentity.shtml>.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_four_add_four_mul_pow_four' : a^4 + 4*b^4 = (a^2 - 2*a*b + 2*b^2) * (a^2 + 2*a*b + 2*b^2)
by ring
theorem
pow_four_add_four_mul_pow_four'
algebra.group_power
src/algebra/group_power/identities.lean
[ "tactic.ring" ]
[ "ring" ]
Sophie Germain's identity, see <https://www.cut-the-knot.org/blue/SophieGermainIdentity.shtml>.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sum_four_sq_mul_sum_four_sq : (x₁^2 + x₂^2 + x₃^2 + x₄^2) * (y₁^2 + y₂^2 + y₃^2 + y₄^2) = (x₁*y₁ - x₂*y₂ - x₃*y₃ - x₄*y₄)^2 + (x₁*y₂ + x₂*y₁ + x₃*y₄ - x₄*y₃)^2 + (x₁*y₃ - x₂*y₄ + x₃*y₁ + x₄*y₂)^2 + (x₁*y₄ + x₂*y₃ - x₃*y₂ + x₄*y₁)^2
by ring
theorem
sum_four_sq_mul_sum_four_sq
algebra.group_power
src/algebra/group_power/identities.lean
[ "tactic.ring" ]
[ "ring" ]
Euler's four-square identity, see <https://en.wikipedia.org/wiki/Euler%27s_four-square_identity>. This sign choice here corresponds to the signs obtained by multiplying two quaternions.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sum_eight_sq_mul_sum_eight_sq : (x₁^2 + x₂^2 + x₃^2 + x₄^2 + x₅^2 + x₆^2 + x₇^2 + x₈^2) * (y₁^2 + y₂^2 + y₃^2 + y₄^2 + y₅^2 + y₆^2 + y₇^2 + y₈^2) = (x₁*y₁ - x₂*y₂ - x₃*y₃ - x₄*y₄ - x₅*y₅ - x₆*y₆ - x₇*y₇ - x₈*y₈)^2 + (x₁*y₂ + x₂*y₁ + x₃*y₄ - x₄*y₃ + x₅*y₆ - x₆*y₅ - x₇*y₈ + x₈*y₇)^2 + (x₁*y₃ - x₂*y₄ + x₃*y₁ + x₄*...
by ring
theorem
sum_eight_sq_mul_sum_eight_sq
algebra.group_power
src/algebra/group_power/identities.lean
[ "tactic.ring" ]
[ "ring" ]
Degen's eight squares identity, see <https://en.wikipedia.org/wiki/Degen%27s_eight-square_identity>. This sign choice here corresponds to the signs obtained by multiplying two octonions.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nsmul_one [add_monoid_with_one A] : ∀ n : ℕ, n • (1 : A) = n
begin refine eq_nat_cast' (⟨_, _, _⟩ : ℕ →+ A) _, { show 0 • (1 : A) = 0, simp [zero_nsmul] }, { show ∀ x y : ℕ, (x + y) • (1 : A) = x • 1 + y • 1, simp [add_nsmul] }, { show 1 • (1 : A) = 1, simp } end
theorem
nsmul_one
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "add_monoid_with_one", "eq_nat_cast'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
invertible_pow (m : M) [invertible m] (n : ℕ) : invertible (m ^ n)
{ inv_of := ⅟ m ^ n, inv_of_mul_self := by rw [← (commute_inv_of m).symm.mul_pow, inv_of_mul_self, one_pow], mul_inv_of_self := by rw [← (commute_inv_of m).mul_pow, mul_inv_of_self, one_pow] }
instance
invertible_pow
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "commute_inv_of", "inv_of_mul_self", "invertible", "mul_inv_of_self", "mul_pow", "one_pow" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
inv_of_pow (m : M) [invertible m] (n : ℕ) [invertible (m ^ n)] : ⅟(m ^ n) = ⅟m ^ n
@invertible_unique M _ (m ^ n) (m ^ n) _ (invertible_pow m n) rfl
lemma
inv_of_pow
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "invertible", "invertible_pow", "invertible_unique" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_unit.pow {m : M} (n : ℕ) : is_unit m → is_unit (m ^ n)
λ ⟨u, hu⟩, ⟨u ^ n, hu ▸ u.coe_pow _⟩
lemma
is_unit.pow
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "is_unit" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
units.of_pow (u : Mˣ) (x : M) {n : ℕ} (hn : n ≠ 0) (hu : x ^ n = u) : Mˣ
u.left_of_mul x (x ^ (n - 1)) (by rwa [← pow_succ, nat.sub_add_cancel (nat.succ_le_of_lt $ nat.pos_of_ne_zero hn)]) (commute.self_pow _ _)
def
units.of_pow
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "commute.self_pow", "pow_succ" ]
If a natural power of `x` is a unit, then `x` is a unit.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_unit_pow_iff {a : M} {n : ℕ} (hn : n ≠ 0) : is_unit (a ^ n) ↔ is_unit a
⟨λ ⟨u, hu⟩, (u.of_pow a hn hu.symm).is_unit, λ h, h.pow n⟩
lemma
is_unit_pow_iff
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "is_unit" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_unit_pow_succ_iff {m : M} {n : ℕ} : is_unit (m ^ (n + 1)) ↔ is_unit m
is_unit_pow_iff n.succ_ne_zero
lemma
is_unit_pow_succ_iff
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "is_unit", "is_unit_pow_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
units.of_pow_eq_one (x : M) (n : ℕ) (hx : x ^ n = 1) (hn : n ≠ 0) : Mˣ
units.of_pow 1 x hn hx
def
units.of_pow_eq_one
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "units.of_pow" ]
If `x ^ n = 1`, `n ≠ 0`, then `x` is a unit.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
units.pow_of_pow_eq_one {x : M} {n : ℕ} (hx : x ^ n = 1) (hn : n ≠ 0) : units.of_pow_eq_one x n hx hn ^ n = 1
units.ext $ by rwa [units.coe_pow, units.coe_of_pow_eq_one, units.coe_one]
lemma
units.pow_of_pow_eq_one
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "units.coe_one", "units.coe_pow", "units.ext", "units.of_pow_eq_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_unit_of_pow_eq_one {x : M} {n : ℕ} (hx : x ^ n = 1) (hn : n ≠ 0) : is_unit x
(units.of_pow_eq_one x n hx hn).is_unit
lemma
is_unit_of_pow_eq_one
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "is_unit", "units.of_pow_eq_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
invertible_of_pow_eq_one (x : M) (n : ℕ) (hx : x ^ n = 1) (hn : n ≠ 0) : invertible x
(units.of_pow_eq_one x n hx hn).invertible
def
invertible_of_pow_eq_one
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "invertible", "units.of_pow_eq_one" ]
If `x ^ n = 1` then `x` has an inverse, `x^(n - 1)`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
smul_pow [mul_action M N] [is_scalar_tower M N N] [smul_comm_class M N N] (k : M) (x : N) (p : ℕ) : (k • x) ^ p = k ^ p • x ^ p
begin induction p with p IH, { simp }, { rw [pow_succ', IH, smul_mul_smul, ←pow_succ', ←pow_succ'] } end
lemma
smul_pow
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "is_scalar_tower", "mul_action", "pow_succ'", "smul_comm_class", "smul_mul_smul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
smul_pow' [mul_distrib_mul_action M N] (x : M) (m : N) (n : ℕ) : x • m ^ n = (x • m) ^ n
begin induction n with n ih, { rw [pow_zero, pow_zero], exact smul_one x }, { rw [pow_succ, pow_succ], exact (smul_mul' x m (m ^ n)).trans (congr_arg _ ih) } end
lemma
smul_pow'
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "ih", "mul_distrib_mul_action", "pow_succ", "pow_zero", "smul_mul'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zsmul_one [add_group_with_one A] (n : ℤ) : n • (1 : A) = n
by cases n; simp
lemma
zsmul_one
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "add_group_with_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_mul (a : α) : ∀ m n : ℤ, a ^ (m * n) = (a ^ m) ^ n
| (m : ℕ) (n : ℕ) := by { rw [zpow_coe_nat, zpow_coe_nat, ← pow_mul, ← zpow_coe_nat], refl } | (m : ℕ) -[1+ n] := by { rw [zpow_coe_nat, zpow_neg_succ_of_nat, ← pow_mul, coe_nat_mul_neg_succ, zpow_neg, inv_inj, ← zpow_coe_nat], refl } | -[1+ m] (n : ℕ) := by { rw [zpow_coe_nat, zpow_neg_succ_of_nat, ← inv_pow, ← po...
lemma
zpow_mul
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "inv_inj", "inv_inv", "inv_pow", "pow_mul", "zpow_coe_nat", "zpow_neg", "zpow_neg_succ_of_nat" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_mul' (a : α) (m n : ℤ) : a ^ (m * n) = (a ^ n) ^ m
by rw [mul_comm, zpow_mul]
lemma
zpow_mul'
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "mul_comm", "zpow_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_bit0 (a : α) : ∀ n : ℤ, a ^ bit0 n = a ^ n * a ^ n
| (n : ℕ) := by simp only [zpow_coe_nat, ←int.coe_nat_bit0, pow_bit0] | -[1+n] := by { simp [←mul_inv_rev, ←pow_bit0], rw [neg_succ_of_nat_eq, bit0_neg, zpow_neg], norm_cast }
lemma
zpow_bit0
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "bit0_neg", "pow_bit0", "zpow_coe_nat", "zpow_neg" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_bit0' (a : α) (n : ℤ) : a ^ bit0 n = (a * a) ^ n
(zpow_bit0 a n).trans ((commute.refl a).mul_zpow n).symm
lemma
zpow_bit0'
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "commute.refl", "mul_zpow", "zpow_bit0" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_bit0_neg [has_distrib_neg α] (x : α) (n : ℤ) : (-x) ^ (bit0 n) = x ^ bit0 n
by rw [zpow_bit0', zpow_bit0', neg_mul_neg]
lemma
zpow_bit0_neg
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "has_distrib_neg", "neg_mul_neg", "zpow_bit0'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_add_one (a : G) : ∀ n : ℤ, a ^ (n + 1) = a ^ n * a
| (n : ℕ) := by simp only [← int.coe_nat_succ, zpow_coe_nat, pow_succ'] | -[1+ 0] := by erw [zpow_zero, zpow_neg_succ_of_nat, pow_one, mul_left_inv] | -[1+ n+1] := begin rw [zpow_neg_succ_of_nat, pow_succ, mul_inv_rev, inv_mul_cancel_right], rw [int.neg_succ_of_nat_eq, neg_add, add_assoc, neg_add_self, add_zero], ...
lemma
zpow_add_one
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "inv_mul_cancel_right", "mul_inv_rev", "mul_left_inv", "pow_one", "pow_succ", "pow_succ'", "zpow_coe_nat", "zpow_neg_succ_of_nat", "zpow_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_sub_one (a : G) (n : ℤ) : a ^ (n - 1) = a ^ n * a⁻¹
calc a ^ (n - 1) = a ^ (n - 1) * a * a⁻¹ : (mul_inv_cancel_right _ _).symm ... = a^n * a⁻¹ : by rw [← zpow_add_one, sub_add_cancel]
lemma
zpow_sub_one
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "mul_inv_cancel_right", "zpow_add_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_add (a : G) (m n : ℤ) : a ^ (m + n) = a ^ m * a ^ n
begin induction n using int.induction_on with n ihn n ihn, case hz : { simp }, { simp only [← add_assoc, zpow_add_one, ihn, mul_assoc] }, { rw [zpow_sub_one, ← mul_assoc, ← ihn, ← zpow_sub_one, add_sub_assoc] } end
lemma
zpow_add
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "int.induction_on", "mul_assoc", "zpow_add_one", "zpow_sub_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mul_self_zpow (b : G) (m : ℤ) : b*b^m = b^(m+1)
by { conv_lhs {congr, rw ← zpow_one b }, rw [← zpow_add, add_comm] }
lemma
mul_self_zpow
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "zpow_add", "zpow_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mul_zpow_self (b : G) (m : ℤ) : b^m*b = b^(m+1)
by { conv_lhs {congr, skip, rw ← zpow_one b }, rw [← zpow_add, add_comm] }
lemma
mul_zpow_self
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "zpow_add", "zpow_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_sub (a : G) (m n : ℤ) : a ^ (m - n) = a ^ m * (a ^ n)⁻¹
by rw [sub_eq_add_neg, zpow_add, zpow_neg]
lemma
zpow_sub
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "zpow_add", "zpow_neg" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_one_add (a : G) (i : ℤ) : a ^ (1 + i) = a * a ^ i
by rw [zpow_add, zpow_one]
theorem
zpow_one_add
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "zpow_add", "zpow_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_mul_comm (a : G) (i j : ℤ) : a ^ i * a ^ j = a ^ j * a ^ i
(commute.refl _).zpow_zpow _ _
lemma
zpow_mul_comm
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "commute.refl" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_bit1 (a : G) (n : ℤ) : a ^ bit1 n = a ^ n * a ^ n * a
by rw [bit1, zpow_add, zpow_bit0, zpow_one]
theorem
zpow_bit1
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "zpow_add", "zpow_bit0", "zpow_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_induction_left {g : G} {P : G → Prop} (h_one : P (1 : G)) (h_mul : ∀ a, P a → P (g * a)) (h_inv : ∀ a, P a → P (g⁻¹ * a)) (n : ℤ) : P (g ^ n)
begin induction n using int.induction_on with n ih n ih, { rwa zpow_zero }, { rw [add_comm, zpow_add, zpow_one], exact h_mul _ ih }, { rw [sub_eq_add_neg, add_comm, zpow_add, zpow_neg_one], exact h_inv _ ih } end
lemma
zpow_induction_left
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "ih", "int.induction_on", "zpow_add", "zpow_neg_one", "zpow_one", "zpow_zero" ]
To show a property of all powers of `g` it suffices to show it is closed under multiplication by `g` and `g⁻¹` on the left. For subgroups generated by more than one element, see `subgroup.closure_induction_left`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_induction_right {g : G} {P : G → Prop} (h_one : P (1 : G)) (h_mul : ∀ a, P a → P (a * g)) (h_inv : ∀ a, P a → P (a * g⁻¹)) (n : ℤ) : P (g ^ n)
begin induction n using int.induction_on with n ih n ih, { rwa zpow_zero }, { rw zpow_add_one, exact h_mul _ ih }, { rw zpow_sub_one, exact h_inv _ ih } end
lemma
zpow_induction_right
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "ih", "int.induction_on", "zpow_add_one", "zpow_sub_one", "zpow_zero" ]
To show a property of all powers of `g` it suffices to show it is closed under multiplication by `g` and `g⁻¹` on the right. For subgroups generated by more than one element, see `subgroup.closure_induction_right`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
one_lt_zpow' (ha : 1 < a) {k : ℤ} (hk : (0:ℤ) < k) : 1 < a^k
begin lift k to ℕ using int.le_of_lt hk, rw zpow_coe_nat, exact one_lt_pow' ha (coe_nat_pos.mp hk).ne', end
lemma
one_lt_zpow'
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "lift", "one_lt_pow'", "zpow_coe_nat" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_strict_mono_right (ha : 1 < a) : strict_mono (λ n : ℤ, a ^ n)
λ m n h, calc a ^ m = a ^ m * 1 : (mul_one _).symm ... < a ^ m * a ^ (n - m) : mul_lt_mul_left' (one_lt_zpow' ha $ sub_pos_of_lt h) _ ... = a ^ n : by { rw ←zpow_add, simp }
lemma
zpow_strict_mono_right
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "mul_lt_mul_left'", "mul_one", "one_lt_zpow'", "strict_mono" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_mono_right (ha : 1 ≤ a) : monotone (λ n : ℤ, a ^ n)
λ m n h, calc a ^ m = a ^ m * 1 : (mul_one _).symm ... ≤ a ^ m * a ^ (n - m) : mul_le_mul_left' (one_le_zpow ha $ sub_nonneg_of_le h) _ ... = a ^ n : by { rw ←zpow_add, simp }
lemma
zpow_mono_right
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "monotone", "mul_le_mul_left'", "mul_one", "one_le_zpow" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_le_zpow (ha : 1 ≤ a) (h : m ≤ n) : a ^ m ≤ a ^ n
zpow_mono_right ha h
lemma
zpow_le_zpow
algebra.group_power
src/algebra/group_power/lemmas.lean
[ "algebra.invertible", "algebra.group_power.ring", "algebra.order.monoid.with_top", "data.nat.pow", "data.int.cast.lemmas" ]
[ "zpow_mono_right" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83