mathlib documentation

algebra.​group_power

algebra.​group_power

Power operations on monoids and groups

The power operation on monoids and groups. We separate this from group, because it depends on ℕ, which in turn depends on other parts of algebra.

Notation

The class has_pow α β provides the notation a^b for powers. We define instances of has_pow M ℕ, for monoids M, and has_pow G ℤ for groups G.

We also define infix operators •ℕ and •ℤ for scalar multiplication by a natural and an integer numbers, respectively.

Implementation details

We adopt the convention that 0^0 = 1.

def monoid.​pow {M : Type u} [has_mul M] [has_one M] :
M → ℕ → M

The power operation in a monoid. a^n = a*a*...*a n times.

Equations
def nsmul {A : Type y} [has_add A] [has_zero A] :
ℕ → A → A

The scalar multiplication in an additive monoid. n •ℕ a = a+a+...+a n times.

Equations
@[instance]
def monoid.​has_pow {M : Type u} [monoid M] :

Equations

Commutativity

First we prove some facts about semiconj_by and commute. They do not require any theory about pow and/or nsmul and will be useful later in this file.

@[simp]
theorem semiconj_by.​pow_right {M : Type u} [monoid M] {a x y : M} (h : semiconj_by a x y) (n : ℕ) :
semiconj_by a (x ^ n) (y ^ n)

@[simp]
theorem commute.​pow_right {M : Type u} [monoid M] {a b : M} (h : commute a b) (n : ℕ) :
commute a (b ^ n)

@[simp]
theorem commute.​pow_left {M : Type u} [monoid M] {a b : M} (h : commute a b) (n : ℕ) :
commute (a ^ n) b

@[simp]
theorem commute.​pow_pow {M : Type u} [monoid M] {a b : M} (h : commute a b) (m n : ℕ) :
commute (a ^ m) (b ^ n)

@[simp]
theorem commute.​self_pow {M : Type u} [monoid M] (a : M) (n : ℕ) :
commute a (a ^ n)

@[simp]
theorem commute.​pow_self {M : Type u} [monoid M] (a : M) (n : ℕ) :
commute (a ^ n) a

@[simp]
theorem commute.​pow_pow_self {M : Type u} [monoid M] (a : M) (m n : ℕ) :
commute (a ^ m) (a ^ n)

(Additive) monoid

@[simp]
theorem pow_zero {M : Type u} [monoid M] (a : M) :
a ^ 0 = 1

@[simp]
theorem zero_nsmul {A : Type y} [add_monoid A] (a : A) :
0 •ℕ a = 0

theorem pow_succ {M : Type u} [monoid M] (a : M) (n : ℕ) :
a ^ (n + 1) = a * a ^ n

theorem succ_nsmul {A : Type y} [add_monoid A] (a : A) (n : ℕ) :
(n + 1) •ℕ a = a + n •ℕ a

@[simp]
theorem pow_one {M : Type u} [monoid M] (a : M) :
a ^ 1 = a

@[simp]
theorem one_nsmul {A : Type y} [add_monoid A] (a : A) :
1 •ℕ a = a

@[simp]
theorem pow_ite {M : Type u} [monoid M] (P : Prop) [decidable P] (a : M) (b c : ℕ) :
a ^ ite P b c = ite P (a ^ b) (a ^ c)

@[simp]
theorem ite_pow {M : Type u} [monoid M] (P : Prop) [decidable P] (a b : M) (c : ℕ) :
ite P a b ^ c = ite P (a ^ c) (b ^ c)

@[simp]
theorem pow_boole {M : Type u} [monoid M] (P : Prop) [decidable P] (a : M) :
a ^ ite P 1 0 = ite P a 1

theorem pow_mul_comm' {M : Type u} [monoid M] (a : M) (n : ℕ) :
a ^ n * a = a * a ^ n

theorem nsmul_add_comm' {A : Type y} [add_monoid A] (a : A) (n : ℕ) :
n •ℕ a + a = a + n •ℕ a

theorem pow_succ' {M : Type u} [monoid M] (a : M) (n : ℕ) :
a ^ (n + 1) = a ^ n * a

theorem succ_nsmul' {A : Type y} [add_monoid A] (a : A) (n : ℕ) :
(n + 1) •ℕ a = n •ℕ a + a

theorem pow_two {M : Type u} [monoid M] (a : M) :
a ^ 2 = a * a

theorem two_nsmul {A : Type y} [add_monoid A] (a : A) :
2 •ℕ a = a + a

theorem pow_add {M : Type u} [monoid M] (a : M) (m n : ℕ) :
a ^ (m + n) = a ^ m * a ^ n

theorem add_nsmul {A : Type y} [add_monoid A] (a : A) (m n : ℕ) :
(m + n) •ℕ a = m •ℕ a + n •ℕ a

@[simp]
theorem one_pow {M : Type u} [monoid M] (n : ℕ) :
1 ^ n = 1

@[simp]
theorem nsmul_zero {A : Type y} [add_monoid A] (n : ℕ) :
n •ℕ 0 = 0

theorem pow_mul {M : Type u} [monoid M] (a : M) (m n : ℕ) :
a ^ (m * n) = (a ^ m) ^ n

theorem mul_nsmul' {A : Type y} [add_monoid A] (a : A) (m n : ℕ) :
m * n •ℕ a = n •ℕ (m •ℕ a)

theorem pow_mul' {M : Type u} [monoid M] (a : M) (m n : ℕ) :
a ^ (m * n) = (a ^ n) ^ m

theorem mul_nsmul {A : Type y} [add_monoid A] (a : A) (m n : ℕ) :
m * n •ℕ a = m •ℕ (n •ℕ a)

@[simp]
theorem nsmul_one {A : Type y} [add_monoid A] [has_one A] (n : ℕ) :
n •ℕ 1 = ↑n

theorem pow_bit0 {M : Type u} [monoid M] (a : M) (n : ℕ) :
a ^ bit0 n = a ^ n * a ^ n

theorem bit0_nsmul {A : Type y} [add_monoid A] (a : A) (n : ℕ) :
bit0 n •ℕ a = n •ℕ a + n •ℕ a

theorem pow_bit1 {M : Type u} [monoid M] (a : M) (n : ℕ) :
a ^ bit1 n = a ^ n * a ^ n * a

theorem bit1_nsmul {A : Type y} [add_monoid A] (a : A) (n : ℕ) :
bit1 n •ℕ a = n •ℕ a + n •ℕ a + a

theorem pow_mul_comm {M : Type u} [monoid M] (a : M) (m n : ℕ) :
a ^ m * a ^ n = a ^ n * a ^ m

theorem nsmul_add_comm {A : Type y} [add_monoid A] (a : A) (m n : ℕ) :
m •ℕ a + n •ℕ a = n •ℕ a + m •ℕ a

@[simp]
theorem list.​prod_repeat {M : Type u} [monoid M] (a : M) (n : ℕ) :
(list.repeat a n).prod = a ^ n

@[simp]
theorem list.​sum_repeat {A : Type y} [add_monoid A] (a : A) (n : ℕ) :

theorem monoid_hom.​map_pow {M : Type u} {N : Type v} [monoid M] [monoid N] (f : M →* N) (a : M) (n : ℕ) :
⇑f (a ^ n) = ⇑f a ^ n

theorem add_monoid_hom.​map_nsmul {A : Type y} {B : Type z} [add_monoid A] [add_monoid B] (f : A →+ B) (a : A) (n : ℕ) :
⇑f (n •ℕ a) = n •ℕ ⇑f a

theorem is_monoid_hom.​map_pow {M : Type u} {N : Type v} [monoid M] [monoid N] (f : M → N) [is_monoid_hom f] (a : M) (n : ℕ) :
f (a ^ n) = f a ^ n

theorem is_add_monoid_hom.​map_nsmul {A : Type y} {B : Type z} [add_monoid A] [add_monoid B] (f : A → B) [is_add_monoid_hom f] (a : A) (n : ℕ) :
f (n •ℕ a) = n •ℕ f a

@[simp]
theorem units.​coe_pow {M : Type u} [monoid M] (u : units M) (n : ℕ) :
↑(u ^ n) = ↑u ^ n

theorem commute.​mul_pow {M : Type u} [monoid M] {a b : M} (h : commute a b) (n : ℕ) :
(a * b) ^ n = a ^ n * b ^ n

theorem neg_pow {R : Type u₁} [ring R] (a : R) (n : ℕ) :
(-a) ^ n = (-1) ^ n * a ^ n

@[simp]
theorem nat.​pow_eq_pow (p q : ℕ) :
p ^ q = p ^ q

theorem nat.​nsmul_eq_mul (m n : ℕ) :
m •ℕ n = m * n

Commutative (additive) monoid

theorem mul_pow {M : Type u} [comm_monoid M] (a b : M) (n : ℕ) :
(a * b) ^ n = a ^ n * b ^ n

theorem nsmul_add {A : Type y} [add_comm_monoid A] (a b : A) (n : ℕ) :
n •ℕ (a + b) = n •ℕ a + n •ℕ b

@[instance]
def pow.​is_monoid_hom {M : Type u} [comm_monoid M] (n : ℕ) :
is_monoid_hom (λ (_x : M), _x ^ n)

Equations
  • _ = _
@[instance]

Equations
  • _ = _
theorem dvd_pow {M : Type u} [comm_monoid M] {x y : M} {n : ℕ} :
x ∣ y → n ≠ 0 → x ∣ y ^ n

@[simp]
theorem inv_pow {G : Type w} [group G] (a : G) (n : ℕ) :
a⁻¹ ^ n = (a ^ n)⁻¹

@[simp]
theorem neg_nsmul {A : Type y} [add_group A] (a : A) (n : ℕ) :
n •ℕ -a = -(n •ℕ a)

theorem pow_sub {G : Type w} [group G] (a : G) {m n : ℕ} :
n ≤ m → a ^ (m - n) = a ^ m * (a ^ n)⁻¹

theorem nsmul_sub {A : Type y} [add_group A] (a : A) {m n : ℕ} :
n ≤ m → (m - n) •ℕ a = m •ℕ a - n •ℕ a

theorem pow_inv_comm {G : Type w} [group G] (a : G) (m n : ℕ) :
a⁻¹ ^ m * a ^ n = a ^ n * a⁻¹ ^ m

theorem nsmul_neg_comm {A : Type y} [add_group A] (a : A) (m n : ℕ) :
m •ℕ -a + n •ℕ a = n •ℕ a + m •ℕ -a

def gpow {G : Type w} [group G] :
G → ℤ → G

The power operation in a group. This extends monoid.pow to negative integers with the definition a^(-n) = (a^n)⁻¹.

Equations
def gsmul {A : Type y} [add_group A] :
ℤ → A → A

The scalar multiplication by integers on an additive group. This extends nsmul to negative integers with the definition (-n) •ℤ a = -(n •ℕ a).

Equations
@[instance]
def group.​has_pow {G : Type w} [group G] :

Equations
@[simp]
theorem gpow_coe_nat {G : Type w} [group G] (a : G) (n : ℕ) :
a ^ ↑n = a ^ n

@[simp]
theorem gsmul_coe_nat {A : Type y} [add_group A] (a : A) (n : ℕ) :

theorem gpow_of_nat {G : Type w} [group G] (a : G) (n : ℕ) :
a ^ int.of_nat n = a ^ n

theorem gsmul_of_nat {A : Type y} [add_group A] (a : A) (n : ℕ) :

@[simp]
theorem gpow_neg_succ_of_nat {G : Type w} [group G] (a : G) (n : ℕ) :
a ^ -[1+ n] = (a ^ n.succ)⁻¹

@[simp]
theorem gsmul_neg_succ_of_nat {A : Type y} [add_group A] (a : A) (n : ℕ) :

@[simp]
theorem gpow_zero {G : Type w} [group G] (a : G) :
a ^ 0 = 1

@[simp]
theorem zero_gsmul {A : Type y} [add_group A] (a : A) :
0 •ℤ a = 0

@[simp]
theorem gpow_one {G : Type w} [group G] (a : G) :
a ^ 1 = a

@[simp]
theorem one_gsmul {A : Type y} [add_group A] (a : A) :
1 •ℤ a = a

@[simp]
theorem one_gpow {G : Type w} [group G] (n : ℤ) :
1 ^ n = 1

@[simp]
theorem gsmul_zero {A : Type y} [add_group A] (n : ℤ) :
n •ℤ 0 = 0

@[simp]
theorem gpow_neg {G : Type w} [group G] (a : G) (n : ℤ) :
a ^ -n = (a ^ n)⁻¹

theorem mul_gpow_neg_one {G : Type w} [group G] (a b : G) :
(a * b) ^ -1 = b ^ -1 * a ^ -1

@[simp]
theorem neg_gsmul {A : Type y} [add_group A] (a : A) (n : ℤ) :
-n •ℤ a = -(n •ℤ a)

theorem gpow_neg_one {G : Type w} [group G] (x : G) :
x ^ -1 = x⁻¹

theorem neg_one_gsmul {A : Type y} [add_group A] (x : A) :
(-1) •ℤ x = -x

theorem gsmul_one {A : Type y} [add_group A] [has_one A] (n : ℤ) :
n •ℤ 1 = ↑n

theorem inv_gpow {G : Type w} [group G] (a : G) (n : ℤ) :
a⁻¹ ^ n = (a ^ n)⁻¹

theorem gsmul_neg {A : Type y} [add_group A] (a : A) (n : ℤ) :
n •ℤ -a = -(n •ℤ a)

theorem gpow_add_one {G : Type w} [group G] (a : G) (n : ℤ) :
a ^ (n + 1) = a ^ n * a

theorem add_one_gsmul {A : Type y} [add_group A] (a : A) (i : ℤ) :
(i + 1) •ℤ a = i •ℤ a + a

theorem gpow_sub_one {G : Type w} [group G] (a : G) (n : ℤ) :
a ^ (n - 1) = a ^ n * a⁻¹

theorem gpow_add {G : Type w} [group G] (a : G) (m n : ℤ) :
a ^ (m + n) = a ^ m * a ^ n

theorem mul_self_gpow {G : Type w} [group G] (b : G) (m : ℤ) :
b * b ^ m = b ^ (m + 1)

theorem mul_gpow_self {G : Type w} [group G] (b : G) (m : ℤ) :
b ^ m * b = b ^ (m + 1)

theorem add_gsmul {A : Type y} [add_group A] (a : A) (i j : ℤ) :
(i + j) •ℤ a = i •ℤ a + j •ℤ a

theorem gpow_sub {G : Type w} [group G] (a : G) (m n : ℤ) :
a ^ (m - n) = a ^ m * (a ^ n)⁻¹

theorem sub_gsmul {A : Type y} [add_group A] (m n : ℤ) (a : A) :
(m - n) •ℤ a = m •ℤ a - n •ℤ a

theorem gpow_one_add {G : Type w} [group G] (a : G) (i : ℤ) :
a ^ (1 + i) = a * a ^ i

theorem one_add_gsmul {A : Type y} [add_group A] (a : A) (i : ℤ) :
(1 + i) •ℤ a = a + i •ℤ a

theorem gpow_mul_comm {G : Type w} [group G] (a : G) (i j : ℤ) :
a ^ i * a ^ j = a ^ j * a ^ i

theorem gsmul_add_comm {A : Type y} [add_group A] (a : A) (i j : ℤ) :
i •ℤ a + j •ℤ a = j •ℤ a + i •ℤ a

theorem gpow_mul {G : Type w} [group G] (a : G) (m n : ℤ) :
a ^ (m * n) = (a ^ m) ^ n

theorem gsmul_mul' {A : Type y} [add_group A] (a : A) (m n : ℤ) :
m * n •ℤ a = n •ℤ (m •ℤ a)

theorem gpow_mul' {G : Type w} [group G] (a : G) (m n : ℤ) :
a ^ (m * n) = (a ^ n) ^ m

theorem gsmul_mul {A : Type y} [add_group A] (a : A) (m n : ℤ) :
m * n •ℤ a = m •ℤ (n •ℤ a)

theorem gpow_bit0 {G : Type w} [group G] (a : G) (n : ℤ) :
a ^ bit0 n = a ^ n * a ^ n

theorem bit0_gsmul {A : Type y} [add_group A] (a : A) (n : ℤ) :
bit0 n •ℤ a = n •ℤ a + n •ℤ a

theorem gpow_bit1 {G : Type w} [group G] (a : G) (n : ℤ) :
a ^ bit1 n = a ^ n * a ^ n * a

theorem bit1_gsmul {A : Type y} [add_group A] (a : A) (n : ℤ) :
bit1 n •ℤ a = n •ℤ a + n •ℤ a + a

theorem monoid_hom.​map_gpow {G : Type w} {H : Type x} [group G] [group H] (f : G →* H) (a : G) (n : ℤ) :
⇑f (a ^ n) = ⇑f a ^ n

theorem add_monoid_hom.​map_gsmul {A : Type y} {B : Type z} [add_group A] [add_group B] (f : A →+ B) (a : A) (n : ℤ) :
⇑f (n •ℤ a) = n •ℤ ⇑f a

@[simp]
theorem units.​coe_gpow {G : Type w} [group G] (u : units G) (n : ℤ) :
↑(u ^ n) = ↑u ^ n

theorem commute.​mul_gpow {G : Type w} [group G] {a b : G} (h : commute a b) (n : ℤ) :
(a * b) ^ n = a ^ n * b ^ n

theorem mul_gpow {G : Type w} [comm_group G] (a b : G) (n : ℤ) :
(a * b) ^ n = a ^ n * b ^ n

theorem gsmul_add {A : Type y} [add_comm_group A] (a b : A) (n : ℤ) :
n •ℤ (a + b) = n •ℤ a + n •ℤ b

theorem gsmul_sub {A : Type y} [add_comm_group A] (a b : A) (n : ℤ) :
n •ℤ (a - b) = n •ℤ a - n •ℤ b

@[instance]
def gpow.​is_group_hom {G : Type w} [comm_group G] (n : ℤ) :
is_group_hom (λ (_x : G), _x ^ n)

Equations
@[instance]

Equations
@[simp]
theorem with_bot.​coe_nsmul {A : Type y} [add_monoid A] (a : A) (n : ℕ) :

theorem nsmul_eq_mul' {R : Type u₁} [semiring R] (a : R) (n : ℕ) :
n •ℕ a = a * ↑n

@[simp]
theorem nsmul_eq_mul {R : Type u₁} [semiring R] (n : ℕ) (a : R) :
n •ℕ a = ↑n * a

theorem mul_nsmul_left {R : Type u₁} [semiring R] (a b : R) (n : ℕ) :
n •ℕ (a * b) = a * (n •ℕ b)

theorem mul_nsmul_assoc {R : Type u₁} [semiring R] (a b : R) (n : ℕ) :
n •ℕ (a * b) = n •ℕ a * b

theorem zero_pow {R : Type u₁} [monoid_with_zero R] {n : ℕ} :
0 < n → 0 ^ n = 0

@[simp]
theorem nat.​cast_pow {R : Type u₁} [semiring R] (n m : ℕ) :
↑(n ^ m) = ↑n ^ m

@[simp]
theorem int.​coe_nat_pow (n m : ℕ) :
↑(n ^ m) = ↑n ^ m

theorem int.​nat_abs_pow (n : ℤ) (k : ℕ) :
(n ^ k).nat_abs = n.nat_abs ^ k

@[simp]
theorem ring_hom.​map_pow {R : Type u₁} {S : Type u₂} [semiring R] [semiring S] (f : R →+* S) (a : R) (n : ℕ) :
⇑f (a ^ n) = ⇑f a ^ n

theorem neg_one_pow_eq_or {R : Type u₁} [ring R] (n : ℕ) :
(-1) ^ n = 1 ∨ (-1) ^ n = -1

theorem pow_dvd_pow {R : Type u₁} [monoid R] (a : R) {m n : ℕ} :
m ≤ n → a ^ m ∣ a ^ n

theorem pow_dvd_pow_of_dvd {R : Type u₁} [comm_monoid R] {a b : R} (h : a ∣ b) (n : ℕ) :
a ^ n ∣ b ^ n

theorem pow_two_sub_pow_two {R : Type u_1} [comm_ring R] (a b : R) :
a ^ 2 - b ^ 2 = (a + b) * (a - b)

theorem eq_or_eq_neg_of_pow_two_eq_pow_two {R : Type u₁} [integral_domain R] (a b : R) :
a ^ 2 = b ^ 2 → a = b ∨ a = -b

theorem bit0_mul {R : Type u₁} [ring R] {n r : R} :
bit0 n * r = 2 •ℤ (n * r)

theorem mul_bit0 {R : Type u₁} [ring R] {n r : R} :
r * bit0 n = 2 •ℤ (r * n)

theorem bit1_mul {R : Type u₁} [ring R] {n r : R} :
bit1 n * r = 2 •ℤ (n * r) + r

theorem mul_bit1 {R : Type u₁} [ring R] {n r : R} :
r * bit1 n = 2 •ℤ (r * n) + r

@[simp]
theorem gsmul_eq_mul {R : Type u₁} [ring R] (a : R) (n : ℤ) :
n •ℤ a = ↑n * a

theorem gsmul_eq_mul' {R : Type u₁} [ring R] (a : R) (n : ℤ) :
n •ℤ a = a * ↑n

theorem mul_gsmul_left {R : Type u₁} [ring R] (a b : R) (n : ℤ) :
n •ℤ (a * b) = a * (n •ℤ b)

theorem mul_gsmul_assoc {R : Type u₁} [ring R] (a b : R) (n : ℤ) :
n •ℤ (a * b) = n •ℤ a * b

@[simp]
theorem gsmul_int_int (a b : ℤ) :
a •ℤ b = a * b

theorem gsmul_int_one (n : ℤ) :
n •ℤ 1 = n

@[simp]
theorem int.​cast_pow {R : Type u₁} [ring R] (n : ℤ) (m : ℕ) :
↑(n ^ m) = ↑n ^ m

theorem neg_one_pow_eq_pow_mod_two {R : Type u₁} [ring R] {n : ℕ} :
(-1) ^ n = (-1) ^ (n % 2)

theorem sq_sub_sq {R : Type u₁} [comm_ring R] (a b : R) :
a ^ 2 - b ^ 2 = (a + b) * (a - b)

theorem pow_eq_zero {R : Type u₁} [monoid_with_zero R] [no_zero_divisors R] {x : R} {n : ℕ} :
x ^ n = 0 → x = 0

theorem pow_ne_zero {R : Type u₁} [monoid_with_zero R] [no_zero_divisors R] {a : R} (n : ℕ) :
a ≠ 0 → a ^ n ≠ 0

theorem nsmul_nonneg {R : Type u₁} [ordered_add_comm_monoid R] {a : R} (H : 0 ≤ a) (n : ℕ) :
0 ≤ n •ℕ a

theorem pow_abs {R : Type u₁} [decidable_linear_ordered_comm_ring R] (a : R) (n : ℕ) :
abs a ^ n = abs (a ^ n)

theorem abs_neg_one_pow {R : Type u₁} [decidable_linear_ordered_comm_ring R] (n : ℕ) :
abs ((-1) ^ n) = 1

theorem nsmul_le_nsmul {A : Type y} [ordered_add_comm_monoid A] {a : A} {n m : ℕ} :
0 ≤ a → n ≤ m → n •ℕ a ≤ m •ℕ a

theorem nsmul_le_nsmul_of_le_right {A : Type y} [ordered_add_comm_monoid A] {a b : A} (hab : a ≤ b) (i : ℕ) :
i •ℕ a ≤ i •ℕ b

theorem canonically_ordered_semiring.​pow_pos {R : Type u₁} [canonically_ordered_comm_semiring R] {a : R} (H : 0 < a) (n : ℕ) :
0 < a ^ n

theorem canonically_ordered_semiring.​pow_le_pow_of_le_left {R : Type u₁} [canonically_ordered_comm_semiring R] {a b : R} (hab : a ≤ b) (i : ℕ) :
a ^ i ≤ b ^ i

theorem canonically_ordered_semiring.​one_le_pow_of_one_le {R : Type u₁} [canonically_ordered_comm_semiring R] {a : R} (H : 1 ≤ a) (n : ℕ) :
1 ≤ a ^ n

theorem canonically_ordered_semiring.​pow_le_one {R : Type u₁} [canonically_ordered_comm_semiring R] {a : R} (H : a ≤ 1) (n : ℕ) :
a ^ n ≤ 1

theorem pow_pos {R : Type u₁} [linear_ordered_semiring R] {a : R} (H : 0 < a) (n : ℕ) :
0 < a ^ n

theorem pow_nonneg {R : Type u₁} [linear_ordered_semiring R] {a : R} (H : 0 ≤ a) (n : ℕ) :
0 ≤ a ^ n

theorem pow_lt_pow_of_lt_left {R : Type u₁} [linear_ordered_semiring R] {x y : R} {n : ℕ} :
x < y → 0 ≤ x → 0 < n → x ^ n < y ^ n

theorem pow_left_inj {R : Type u₁} [linear_ordered_semiring R] {x y : R} {n : ℕ} :
0 ≤ x → 0 ≤ y → 0 < n → x ^ n = y ^ n → x = y

theorem one_le_pow_of_one_le {R : Type u₁} [linear_ordered_semiring R] {a : R} (H : 1 ≤ a) (n : ℕ) :
1 ≤ a ^ n

theorem one_add_mul_le_pow' {R : Type u₁} [linear_ordered_semiring R] {a : R} (Hsqr : 0 ≤ a * a) (H : 0 ≤ 1 + a) (n : ℕ) :
1 + n •ℕ a ≤ (1 + a) ^ n

Bernoulli's inequality. This version works for semirings but requires an additional hypothesis 0 ≤ a * a.

theorem pow_le_pow {R : Type u₁} [linear_ordered_semiring R] {a : R} {n m : ℕ} :
1 ≤ a → n ≤ m → a ^ n ≤ a ^ m

theorem pow_lt_pow {R : Type u₁} [linear_ordered_semiring R] {a : R} {n m : ℕ} :
1 < a → n < m → a ^ n < a ^ m

theorem pow_le_pow_of_le_left {R : Type u₁} [linear_ordered_semiring R] {a b : R} (ha : 0 ≤ a) (hab : a ≤ b) (i : ℕ) :
a ^ i ≤ b ^ i

theorem lt_of_pow_lt_pow {R : Type u₁} [linear_ordered_semiring R] {a b : R} (n : ℕ) :
0 ≤ b → a ^ n < b ^ n → a < b

theorem pow_lt_pow_of_lt_one {R : Type u₁} [linear_ordered_semiring R] {a : R} (h : 0 < a) (ha : a < 1) {i j : ℕ} :
i < j → a ^ j < a ^ i

theorem pow_le_pow_of_le_one {R : Type u₁} [linear_ordered_semiring R] {a : R} (h : 0 ≤ a) (ha : a ≤ 1) {i j : ℕ} :
i ≤ j → a ^ j ≤ a ^ i

theorem pow_le_one {R : Type u₁} [linear_ordered_semiring R] {x : R} (n : ℕ) :
0 ≤ x → x ≤ 1 → x ^ n ≤ 1

theorem pow_two_nonneg {R : Type u₁} [linear_ordered_ring R] (a : R) :
0 ≤ a ^ 2

theorem pow_two_pos_of_ne_zero {R : Type u₁} [linear_ordered_ring R] (a : R) :
a ≠ 0 → 0 < a ^ 2

theorem one_add_mul_le_pow {R : Type u₁} [linear_ordered_ring R] {a : R} (H : -2 ≤ a) (n : ℕ) :
1 + n •ℕ a ≤ (1 + a) ^ n

Bernoulli's inequality for n : ℕ, -2 ≤ a.

theorem one_add_sub_mul_le_pow {R : Type u₁} [linear_ordered_ring R] {a : R} (H : -1 ≤ a) (n : ℕ) :
1 + n •ℕ (a - 1) ≤ a ^ n

Bernoulli's inequality reformulated to estimate a^n.

theorem int.​units_pow_two (u : units ℤ) :
u ^ 2 = 1

theorem int.​units_pow_eq_pow_mod_two (u : units ℤ) (n : ℕ) :
u ^ n = u ^ (n % 2)

@[simp]
theorem int.​nat_abs_pow_two (x : ℤ) :
↑(x.nat_abs) ^ 2 = x ^ 2

@[simp]
theorem neg_square {α : Type u_1} [ring α] (z : α) :
(-z) ^ 2 = z ^ 2

theorem of_add_nsmul {A : Type y} [add_monoid A] (x : A) (n : ℕ) :

theorem of_add_gsmul {A : Type y} [add_group A] (x : A) (n : ℤ) :

def powers_hom (M : Type u) [monoid M] :

Monoid homomorphisms from multiplicative ℕ are defined by the image of multiplicative.of_add 1.

Equations
def gpowers_hom (G : Type w) [group G] :

Monoid homomorphisms from multiplicative ℤ are defined by the image of multiplicative.of_add 1.

Equations
def multiples_hom (A : Type y) [add_monoid A] :
A ≃ (ℕ →+ A)

Additive homomorphisms from ℕ are defined by the image of 1.

Equations
def gmultiples_hom (A : Type y) [add_group A] :
A ≃ (ℤ →+ A)

Additive homomorphisms from ℤ are defined by the image of 1.

Equations
@[simp]
theorem powers_hom_apply {M : Type u} [monoid M] (x : M) (n : multiplicative ℕ) :
⇑(⇑(powers_hom M) x) n = x ^ n.to_add

@[simp]
theorem powers_hom_symm_apply {M : Type u} [monoid M] (f : multiplicative ℕ →* M) :

theorem mnat_monoid_hom_ext {M : Type u} [monoid M] ⦃f g : multiplicative ℕ →* M⦄ :

Commutativity (again)

Facts about semiconj_by and commute that require gpow or gsmul, or the fact that integer multiplication equals semiring multiplication.

@[simp]
theorem semiconj_by.​cast_nat_mul_right {R : Type u₁} [semiring R] {a x y : R} (h : semiconj_by a x y) (n : ℕ) :
semiconj_by a (↑n * x) (↑n * y)

@[simp]
theorem semiconj_by.​cast_nat_mul_left {R : Type u₁} [semiring R] {a x y : R} (h : semiconj_by a x y) (n : ℕ) :
semiconj_by (↑n * a) x y

@[simp]
theorem semiconj_by.​cast_nat_mul_cast_nat_mul {R : Type u₁} [semiring R] {a x y : R} (h : semiconj_by a x y) (m n : ℕ) :
semiconj_by (↑m * a) (↑n * x) (↑n * y)

@[simp]
theorem semiconj_by.​units_gpow_right {M : Type u} [monoid M] {a : M} {x y : units M} (h : semiconj_by a ↑x ↑y) (m : ℤ) :
semiconj_by a ↑(x ^ m) ↑(y ^ m)

@[simp]
theorem semiconj_by.​gpow_right {G : Type w} [group G] {a x y : G} (h : semiconj_by a x y) (m : ℤ) :
semiconj_by a (x ^ m) (y ^ m)

@[simp]
theorem semiconj_by.​cast_int_mul_right {R : Type u₁} [ring R] {a x y : R} (h : semiconj_by a x y) (m : ℤ) :
semiconj_by a (↑m * x) (↑m * y)

@[simp]
theorem semiconj_by.​cast_int_mul_left {R : Type u₁} [ring R] {a x y : R} (h : semiconj_by a x y) (m : ℤ) :
semiconj_by (↑m * a) x y

@[simp]
theorem semiconj_by.​cast_int_mul_cast_int_mul {R : Type u₁} [ring R] {a x y : R} (h : semiconj_by a x y) (m n : ℤ) :
semiconj_by (↑m * a) (↑n * x) (↑n * y)

@[simp]
theorem commute.​cast_nat_mul_right {R : Type u₁} [semiring R] {a b : R} (h : commute a b) (n : ℕ) :
commute a (↑n * b)

@[simp]
theorem commute.​cast_nat_mul_left {R : Type u₁} [semiring R] {a b : R} (h : commute a b) (n : ℕ) :
commute (↑n * a) b

@[simp]
theorem commute.​cast_nat_mul_cast_nat_mul {R : Type u₁} [semiring R] {a b : R} (h : commute a b) (m n : ℕ) :
commute (↑m * a) (↑n * b)

@[simp]
theorem commute.​self_cast_nat_mul {R : Type u₁} [semiring R] {a : R} (n : ℕ) :
commute a (↑n * a)

@[simp]
theorem commute.​cast_nat_mul_self {R : Type u₁} [semiring R] {a : R} (n : ℕ) :
commute (↑n * a) a

@[simp]
theorem commute.​self_cast_nat_mul_cast_nat_mul {R : Type u₁} [semiring R] {a : R} (m n : ℕ) :
commute (↑m * a) (↑n * a)

@[simp]
theorem commute.​units_gpow_right {M : Type u} [monoid M] {a : M} {u : units M} (h : commute a ↑u) (m : ℤ) :
commute a ↑(u ^ m)

@[simp]
theorem commute.​units_gpow_left {M : Type u} [monoid M] {u : units M} {a : M} (h : commute ↑u a) (m : ℤ) :
commute ↑(u ^ m) a

@[simp]
theorem commute.​gpow_right {G : Type w} [group G] {a b : G} (h : commute a b) (m : ℤ) :
commute a (b ^ m)

@[simp]
theorem commute.​gpow_left {G : Type w} [group G] {a b : G} (h : commute a b) (m : ℤ) :
commute (a ^ m) b

theorem commute.​gpow_gpow {G : Type w} [group G] {a b : G} (h : commute a b) (m n : ℤ) :
commute (a ^ m) (b ^ n)

@[simp]
theorem commute.​self_gpow {G : Type w} [group G] (a : G) (n : ℕ) :
commute a (a ^ n)

@[simp]
theorem commute.​gpow_self {G : Type w} [group G] (a : G) (n : ℕ) :
commute (a ^ n) a

@[simp]
theorem commute.​gpow_gpow_self {G : Type w} [group G] (a : G) (m n : ℕ) :
commute (a ^ m) (a ^ n)

@[simp]
theorem commute.​cast_int_mul_right {R : Type u₁} [ring R] {a b : R} (h : commute a b) (m : ℤ) :
commute a (↑m * b)

@[simp]
theorem commute.​cast_int_mul_left {R : Type u₁} [ring R] {a b : R} (h : commute a b) (m : ℤ) :
commute (↑m * a) b

theorem commute.​cast_int_mul_cast_int_mul {R : Type u₁} [ring R] {a b : R} (h : commute a b) (m n : ℤ) :
commute (↑m * a) (↑n * b)

@[simp]
theorem commute.​self_cast_int_mul {R : Type u₁} [ring R] (a : R) (n : ℤ) :
commute a (↑n * a)

@[simp]
theorem commute.​cast_int_mul_self {R : Type u₁} [ring R] (a : R) (n : ℤ) :
commute (↑n * a) a

theorem commute.​self_cast_int_mul_cast_int_mul {R : Type u₁} [ring R] (a : R) (m n : ℤ) :
commute (↑m * a) (↑n * a)

@[simp]
theorem nat.​to_add_pow (a : multiplicative ℕ) (b : ℕ) :
(a ^ b).to_add = a.to_add * b

@[simp]
theorem int.​to_add_pow (a : multiplicative ℤ) (b : ℕ) :
(a ^ b).to_add = a.to_add * ↑b

@[simp]
theorem int.​to_add_gpow (a : multiplicative ℤ) (b : ℤ) :
(a ^ b).to_add = a.to_add * b

theorem units.​conj_pow {M : Type u} [monoid M] (u : units M) (x : M) (n : ℕ) :
(↑u * x * ↑u⁻¹) ^ n = ↑u * x ^ n * ↑u⁻¹

theorem units.​conj_pow' {M : Type u} [monoid M] (u : units M) (x : M) (n : ℕ) :
(↑u⁻¹ * x * ↑u) ^ n = ↑u⁻¹ * x ^ n * ↑u

@[simp]
theorem units.​op_pow {M : Type u} [monoid M] (x : M) (n : ℕ) :

Moving to the opposite monoid commutes with taking powers.

@[simp]
theorem units.​unop_pow {M : Type u} [monoid M] (x : Mᵒᵖ) (n : ℕ) :