Documentation

CslibFrontier.Foundations.Algebra.Group.ZPowCoprime

Common roots of group elements with coprime integer exponents #

Let a and b be commuting elements of a group with a ^ m = b ^ n, and let m * s + n * t = 1. Then c = b ^ s * a ^ t satisfies c ^ m = b and c ^ n = a, and it is the only element that does. No condition on the order of the group or of a and b is needed. This is what distinguishes the statement from Mathlib's powCoprime, which inverts x ↦ x ^ k for k coprime to the order of a finite group.

This is the identity that makes the output of the algorithm in Theorem 10.6 of [BS23] ("Shamir's trick", p. 416) correct, in any group: from w ^ e = y ^ f for units w, y modulo n and coprime e, f, that algorithm computes the e-th root y ^ s * w ^ t of y, where e * s + f * t = 1, without knowing the order of (ℤ/nℤ)ˣ. The algorithm on encoded inputs and its running time are not part of this file.

The characterization Commute.zpow_eq_zpow_iff_of_isCoprime is the counterpart, for groups and integer exponents, of Mathlib's Commute.pow_eq_pow_iff_of_coprime for groups with zero and natural exponents. Integer exponents matter in the applications: Bézout coefficients have mixed signs, and the book applies the result with a possibly negative exponent.

Main results #

Each has an additive version generated by to_additive.

References #

theorem Commute.zpow_mul_zpow_zpow_eq_right {α : Type u_1} [Group α] {a b : α} {m n s t : ℤ} (hab : Commute a b) (hst : m * s + n * t = 1) (h : a ^ m = b ^ n) :
(b ^ s * a ^ t) ^ m = b

If a and b commute, a ^ m = b ^ n and m * s + n * t = 1, then b ^ s * a ^ t is an m-th root of b.

theorem AddCommute.zsmul_add_zsmul_zsmul_eq_right {α : Type u_1} [AddGroup α] {a b : α} {m n s t : ℤ} (hab : AddCommute a b) (hst : m * s + n * t = 1) (h : m • a = n • b) :
m • (s • b + t • a) = b

If a and b commute, m • a = n • b and m * s + n * t = 1, then s • b + t • a is an element whose m-th multiple is b.

theorem Commute.zpow_mul_zpow_zpow_eq_left {α : Type u_1} [Group α] {a b : α} {m n s t : ℤ} (hab : Commute a b) (hst : m * s + n * t = 1) (h : a ^ m = b ^ n) :
(b ^ s * a ^ t) ^ n = a

If a and b commute, a ^ m = b ^ n and m * s + n * t = 1, then b ^ s * a ^ t is an n-th root of a.

theorem AddCommute.zsmul_add_zsmul_zsmul_eq_left {α : Type u_1} [AddGroup α] {a b : α} {m n s t : ℤ} (hab : AddCommute a b) (hst : m * s + n * t = 1) (h : m • a = n • b) :
n • (s • b + t • a) = a

If a and b commute, m • a = n • b and m * s + n * t = 1, then s • b + t • a is an element whose n-th multiple is a.

theorem eq_zpow_mul_zpow_of_zpow_eq {α : Type u_1} [Group α] {a b c : α} {m n s t : ℤ} (hst : m * s + n * t = 1) (hb : c ^ m = b) (ha : c ^ n = a) :
c = b ^ s * a ^ t

If c ^ m = b, c ^ n = a and m * s + n * t = 1, then c = b ^ s * a ^ t. In particular an element with these two powers is unique, and b ^ s * a ^ t does not depend on the choice of s and t. No commutativity hypothesis is needed.

theorem eq_zsmul_add_zsmul_of_zsmul_eq {α : Type u_1} [AddGroup α] {a b c : α} {m n s t : ℤ} (hst : m * s + n * t = 1) (hb : m • c = b) (ha : n • c = a) :
c = s • b + t • a

If m • c = b, n • c = a and m * s + n * t = 1, then c = s • b + t • a. In particular an element with these two multiples is unique, and s • b + t • a does not depend on the choice of s and t.

theorem Commute.zpow_eq_zpow_iff_of_isCoprime {α : Type u_1} [Group α] {a b : α} {m n : ℤ} (hab : Commute a b) (hmn : IsCoprime m n) :
a ^ m = b ^ n ↔ ∃ (c : α), a = c ^ n ∧ b = c ^ m

For commuting a, b and coprime integers m, n, a ^ m = b ^ n if and only if a and b are the n-th and m-th powers of one element. This is the group, integer-exponent counterpart of Commute.pow_eq_pow_iff_of_coprime.

theorem AddCommute.zsmul_eq_zsmul_iff_of_isCoprime {α : Type u_1} [AddGroup α] {a b : α} {m n : ℤ} (hab : AddCommute a b) (hmn : IsCoprime m n) :
m • a = n • b ↔ ∃ (c : α), a = n • c ∧ b = m • c

For commuting a, b and coprime integers m, n, m • a = n • b if and only if a and b are the n-th and m-th multiples of one element.

theorem zpow_eq_zpow_iff_of_isCoprime {α : Type u_1} [CommGroup α] {a b : α} {m n : ℤ} (hmn : IsCoprime m n) :
a ^ m = b ^ n ↔ ∃ (c : α), a = c ^ n ∧ b = c ^ m

In a commutative group, for coprime integers m, n, a ^ m = b ^ n if and only if a and b are the n-th and m-th powers of one element.

theorem zsmul_eq_zsmul_iff_of_isCoprime {α : Type u_1} [AddCommGroup α] {a b : α} {m n : ℤ} (hmn : IsCoprime m n) :
m • a = n • b ↔ ∃ (c : α), a = n • c ∧ b = m • c

In a commutative additive group, for coprime integers m, n, m • a = n • b if and only if a and b are the n-th and m-th multiples of one element.