# mathlib3documentation

algebra.group_power.ring

# Power operations on monoids with zero, semirings, and rings #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

This file provides additional lemmas about the natural power operator on rings and semirings. Further lemmas about ordered semirings and rings can be found in algebra.group_power.lemmas.

theorem zero_pow {M : Type u_3} {n : } :
0 < n 0 ^ n = 0
@[simp]
theorem zero_pow' {M : Type u_3} (n : ) :
n 0 0 ^ n = 0
theorem zero_pow_eq {M : Type u_3} (n : ) :
0 ^ n = ite (n = 0) 1 0
theorem pow_eq_zero_of_le {M : Type u_3} {x : M} {n m : } (hn : n m) (hx : x ^ n = 0) :
x ^ m = 0
theorem pow_eq_zero {M : Type u_3} {x : M} {n : } (H : x ^ n = 0) :
x = 0
@[simp]
theorem pow_eq_zero_iff {M : Type u_3} {a : M} {n : } (hn : 0 < n) :
a ^ n = 0 a = 0
theorem pow_eq_zero_iff' {M : Type u_3} [nontrivial M] {a : M} {n : } :
a ^ n = 0 a = 0 n 0
theorem pow_ne_zero_iff {M : Type u_3} {a : M} {n : } (hn : 0 < n) :
a ^ n 0 a 0
theorem ne_zero_pow {M : Type u_3} {a : M} {n : } (hn : n 0) :
a ^ n 0 a 0
theorem pow_ne_zero {M : Type u_3} {a : M} (n : ) (h : a 0) :
a ^ n 0
@[protected, instance]
def ne_zero.pow {M : Type u_3} {x : M} [ne_zero x] {n : } :
ne_zero (x ^ n)
theorem sq_eq_zero_iff {M : Type u_3} {a : M} :
a ^ 2 = 0 a = 0
@[simp]
theorem zero_pow_eq_zero {M : Type u_3} [nontrivial M] {n : } :
0 ^ n = 0 0 < n
theorem ring.inverse_pow {M : Type u_3} (r : M) (n : ) :
def pow_monoid_with_zero_hom {M : Type u_3} {n : } (hn : 0 < n) :

We define x ↦ x^n (for positive n : ℕ) as a monoid_with_zero_hom

Equations
@[simp]
theorem coe_pow_monoid_with_zero_hom {M : Type u_3} {n : } (hn : 0 < n) :
= λ (_x : M), _x ^ n
@[simp]
theorem pow_monoid_with_zero_hom_apply {M : Type u_3} {n : } (hn : 0 < n) (a : M) :
= a ^ n
theorem pow_dvd_pow_iff {R : Type u_1} {x : R} {n m : } (h0 : x 0) (h1 : ¬) :
x ^ n x ^ m n m
@[protected]
theorem ring_hom.map_pow {R : Type u_1} {S : Type u_2} [semiring R] [semiring S] (f : R →+* S) (a : R) (n : ) :
f (a ^ n) = f a ^ n
theorem min_pow_dvd_add {R : Type u_1} [semiring R] {n m : } {a b c : R} (ha : c ^ n a) (hb : c ^ m b) :
c ^ a + b
theorem add_sq {R : Type u_1} (a b : R) :
(a + b) ^ 2 = a ^ 2 + 2 * a * b + b ^ 2
theorem add_sq' {R : Type u_1} (a b : R) :
(a + b) ^ 2 = a ^ 2 + b ^ 2 + 2 * a * b
theorem add_pow_two {R : Type u_1} (a b : R) :
(a + b) ^ 2 = a ^ 2 + 2 * a * b + b ^ 2

Alias of add_sq.

theorem neg_one_pow_eq_or (R : Type u_1) [monoid R] (n : ) :
(-1) ^ n = 1 (-1) ^ n = -1
theorem neg_pow {R : Type u_1} [monoid R] (a : R) (n : ) :
(-a) ^ n = (-1) ^ n * a ^ n
@[simp]
theorem neg_pow_bit0 {R : Type u_1} [monoid R] (a : R) (n : ) :
(-a) ^ bit0 n = a ^ bit0 n
@[simp]
theorem neg_pow_bit1 {R : Type u_1} [monoid R] (a : R) (n : ) :
(-a) ^ bit1 n = -a ^ bit1 n
@[simp]
theorem neg_sq {R : Type u_1} [monoid R] (a : R) :
(-a) ^ 2 = a ^ 2
@[simp]
theorem neg_one_sq {R : Type u_1} [monoid R]  :
(-1) ^ 2 = 1
theorem neg_pow_two {R : Type u_1} [monoid R] (a : R) :
(-a) ^ 2 = a ^ 2

Alias of neg_sq.

theorem neg_one_pow_two {R : Type u_1} [monoid R]  :
(-1) ^ 2 = 1

Alias of neg_one_sq.

@[protected]
theorem commute.sq_sub_sq {R : Type u_1} [ring R] {a b : R} (h : b) :
a ^ 2 - b ^ 2 = (a + b) * (a - b)
@[simp]
theorem neg_one_pow_mul_eq_zero_iff {R : Type u_1} [ring R] {n : } {r : R} :
(-1) ^ n * r = 0 r = 0
@[simp]
theorem mul_neg_one_pow_eq_zero_iff {R : Type u_1} [ring R] {n : } {r : R} :
r * (-1) ^ n = 0 r = 0
@[protected]
theorem commute.sq_eq_sq_iff_eq_or_eq_neg {R : Type u_1} [ring R] {a b : R} (h : b) :
a ^ 2 = b ^ 2 a = b a = -b
@[simp]
theorem sq_eq_one_iff {R : Type u_1} [ring R] {a : R}  :
a ^ 2 = 1 a = 1 a = -1
theorem sq_ne_one_iff {R : Type u_1} [ring R] {a : R}  :
a ^ 2 1 a 1 a -1
theorem sq_sub_sq {R : Type u_1} [comm_ring R] (a b : R) :
a ^ 2 - b ^ 2 = (a + b) * (a - b)
theorem pow_two_sub_pow_two {R : Type u_1} [comm_ring R] (a b : R) :
a ^ 2 - b ^ 2 = (a + b) * (a - b)

Alias of sq_sub_sq.

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

Alias of sub_sq.

theorem sub_sq' {R : Type u_1} [comm_ring R] (a b : R) :
(a - b) ^ 2 = a ^ 2 + b ^ 2 - 2 * a * b
theorem sq_eq_sq_iff_eq_or_eq_neg {R : Type u_1} [comm_ring R] {a b : R} :
a ^ 2 = b ^ 2 a = b a = -b
theorem eq_or_eq_neg_of_sq_eq_sq {R : Type u_1} [comm_ring R] (a b : R) :
a ^ 2 = b ^ 2 a = b a = -b
@[protected]
theorem units.sq_eq_sq_iff_eq_or_eq_neg {R : Type u_1} [comm_ring R] {a b : Rˣ} :
a ^ 2 = b ^ 2 a = b a = -b
@[protected]
theorem units.eq_or_eq_neg_of_sq_eq_sq {R : Type u_1} [comm_ring R] (a b : Rˣ) (h : a ^ 2 = b ^ 2) :
a = b a = -b