The areas / V11. Fields and Galois theory
Mathlib.RingTheory.RootsOfUnity.PrimitiveRoots
110 declarations and 2 deprecated aliases. Mathlib docs · Source
Primitive roots of unity
We define a predicate IsPrimitiveRoot on commutative
monoids, expressing that an element is a primitive root of unity.
Main definitions
IsPrimitiveRoot ζ k: an elementζis a primitivek-th root of unity ifζ ^ k = 1, and iflsatisfiesζ ^ l = 1thenk ∣ l.primitiveRoots k R: the finset of primitivek-th roots of unity in an integral domainR.IsPrimitiveRoot.autToPow: the monoid hom that takes an automorphism of a ring to the power it sends that specific primitive root, as a member of(ZMod n)ˣ.
Main results
IsPrimitiveRoot.zmodEquivZPowers:ZMod kis equivalent to the subgroup generated by a primitivek-th root of unity.IsPrimitiveRoot.zpowers_eq: in an integral domain, the subgroup generated by a primitivek-th root of unity is equal to thek-th roots of unity.IsPrimitiveRoot.card_primitiveRoots: if an integral domain has a primitivek-th root of unity, then it hasφ kof them.primitiveRootsPowEquivOfCoprime: An equivalence betweenprimitiveRoots k Rthat takes each root to a coprime powera.nthRootsFinset_eq_of_prime: forpprime, thep-th roots of unity are the primitivep-th roots of unity together with1.
Implementation notes
For primitive roots of unity, it is desirable to have a predicate
not just on units, but directly on elements of the ring/field.
For example, we want to say that exp (2 * pi * I / n) is a primitive n-th root of unity
in the complex numbers, without having to turn that number into a unit first.
This creates a little bit of friction with how rootsOfUnity is implemented (as a subgroup
of the Units), but lemmas like IsPrimitiveRoot.isUnit and
IsPrimitiveRoot.coe_units_iff should provide the necessary glue.
theorem IsPrimitiveRoot.zmodEquivZPowers.congr_simp E1 #
∀ {R : Type u_4} {k : ℕ} [inst : CommRing R] {ζ : Rˣ} (h : IsPrimitiveRoot ζ k), h.zmodEquivZPowers = h.zmodEquivZPowers
theorem primitiveRoots.congr_simp E1 #
∀ (k k_1 : ℕ),
k = k_1 → ∀ (R : Type u_7) [inst : CommRing R] [inst_1 : IsDomain R], primitiveRoots k R = primitiveRoots k_1 R
structure IsPrimitiveRoot E1 #
{M : Type u_1} → [CommMonoid M] → M → ℕ → Prop
An element ζ is a primitive k-th root of unity if ζ ^ k = 1,
and if l satisfies ζ ^ l = 1 then k ∣ l.
theorem IsPrimitiveRoot.iff_def E0 #
∀ {M : Type u_1} [inst : CommMonoid M] (ζ : M) (k : ℕ), IsPrimitiveRoot ζ k ↔ ζ ^ k = 1 ∧ ∀ (l : ℕ), ζ ^ l = 1 → k ∣ l
ctor IsPrimitiveRoot.mk E0 #
∀ {M : Type u_1} [inst : CommMonoid M] {ζ : M} {k : ℕ}, ζ ^ k = 1 → (∀ (l : ℕ), ζ ^ l = 1 → k ∣ l) → IsPrimitiveRoot ζ k
theorem IsPrimitiveRoot.pow_eq_one E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {ζ : M} {k : ℕ}, IsPrimitiveRoot ζ k → ζ ^ k = 1
theorem IsPrimitiveRoot.dvd_of_pow_eq_one E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {ζ : M} {k : ℕ}, IsPrimitiveRoot ζ k → ∀ (l : ℕ), ζ ^ l = 1 → k ∣ l
def IsPrimitiveRoot.toRootsOfUnity E1 #
{M : Type u_1} → [inst : CommMonoid M] → {μ : M} → {n : ℕ} → [NeZero n] → IsPrimitiveRoot μ n → ↥(rootsOfUnity n M)
Turn a primitive root μ into a member of the rootsOfUnity subgroup.
theorem IsPrimitiveRoot.val_toRootsOfUnity_coe E0 #
∀ {M : Type u_1} [inst : CommMonoid M] {μ : M} {n : ℕ} [inst_1 : NeZero n] (h : IsPrimitiveRoot μ n),
↑↑h.toRootsOfUnity = μ
theorem IsPrimitiveRoot.val_inv_toRootsOfUnity_coe E0 #
∀ {M : Type u_1} [inst : CommMonoid M] {μ : M} {n : ℕ} [inst_1 : NeZero n] (h : IsPrimitiveRoot μ n),
↑(↑h.toRootsOfUnity)⁻¹ = μ ^ (n - 1)
def primitiveRoots E1 #
ℕ → (R : Type u_7) → [inst : CommRing R] → [IsDomain R] → Finset R
primitiveRoots k R is the finset of primitive k-th roots of unity
in the integral domain R.
theorem mem_primitiveRoots E0 #
∀ {R : Type u_4} {k : ℕ} [inst : CommRing R] [inst_1 : IsDomain R] {ζ : R},
0 < k → (ζ ∈ primitiveRoots k R ↔ IsPrimitiveRoot ζ k)
theorem primitiveRoots_zero E0 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R], primitiveRoots 0 R = ∅
theorem isPrimitiveRoot_of_mem_primitiveRoots E1 #
∀ {R : Type u_4} {k : ℕ} [inst : CommRing R] [inst_1 : IsDomain R] {ζ : R}, ζ ∈ primitiveRoots k R → IsPrimitiveRoot ζ k
theorem IsPrimitiveRoot.mk_of_lt E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} (ζ : M),
0 < k → ζ ^ k = 1 → (∀ (l : ℕ), 0 < l → l < k → ζ ^ l ≠ 1) → IsPrimitiveRoot ζ k
theorem IsPrimitiveRoot.of_subsingleton E1 #
∀ {M : Type u_1} [inst : CommMonoid M] [Subsingleton M] (x : M), IsPrimitiveRoot x 1
theorem IsPrimitiveRoot.pow_eq_one_iff_dvd E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} {ζ : M}, IsPrimitiveRoot ζ k → ∀ (l : ℕ), ζ ^ l = 1 ↔ k ∣ l
theorem IsPrimitiveRoot.isUnit E2 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} {ζ : M}, IsPrimitiveRoot ζ k → k ≠ 0 → IsUnit ζ
theorem IsPrimitiveRoot.isOfFinOrder E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} {ζ : M}, IsPrimitiveRoot ζ k → k ≠ 0 → IsOfFinOrder ζ
theorem IsPrimitiveRoot.pow_ne_one_of_pos_of_lt E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {k l : ℕ} {ζ : M}, IsPrimitiveRoot ζ k → l ≠ 0 → l < k → ζ ^ l ≠ 1
theorem IsPrimitiveRoot.ne_one E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} {ζ : M}, IsPrimitiveRoot ζ k → 1 < k → ζ ≠ 1
theorem IsPrimitiveRoot.pow_inj E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} {ζ : M},
IsPrimitiveRoot ζ k → ∀ ⦃i j : ℕ⦄, i < k → j < k → ζ ^ i = ζ ^ j → i = j
theorem IsPrimitiveRoot.one E1 #
∀ {M : Type u_1} [inst : CommMonoid M], IsPrimitiveRoot 1 1
theorem IsPrimitiveRoot.one_right_iff E0 #
∀ {M : Type u_1} [inst : CommMonoid M] {ζ : M}, IsPrimitiveRoot ζ 1 ↔ ζ = 1
theorem IsPrimitiveRoot.one_left_iff E0 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ}, IsPrimitiveRoot 1 k ↔ k = 1
theorem IsPrimitiveRoot.coe_submonoidClass_iff E0 #
∀ {k : ℕ} {M : Type u_7} {B : Type u_8} [inst : CommMonoid M] [inst_1 : SetLike B M] [inst_2 : SubmonoidClass B M]
{N : B} {ζ : ↥N}, IsPrimitiveRoot (↑ζ) k ↔ IsPrimitiveRoot ζ k
theorem IsPrimitiveRoot.coe_units_iff E0 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} {ζ : Mˣ}, IsPrimitiveRoot (↑ζ) k ↔ IsPrimitiveRoot ζ k
theorem IsPrimitiveRoot.isUnit_unit E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {ζ : M} {n : ℕ} (hn : n ≠ 0) (hζ : IsPrimitiveRoot ζ n), IsPrimitiveRoot ⋯.unit n
theorem IsPrimitiveRoot.isUnit_unit' E1 #
∀ {G : Type u_3} [inst : DivisionCommMonoid G] {ζ : G} {n : ℕ} (hn : n ≠ 0) (hζ : IsPrimitiveRoot ζ n),
IsPrimitiveRoot ⋯.unit' n
theorem IsPrimitiveRoot.pow_div_gcd E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} {ζ : M},
IsPrimitiveRoot ζ k → ∀ (j : ℕ), k.gcd j ≠ 0 → IsPrimitiveRoot (ζ ^ j) (k / k.gcd j)
theorem IsPrimitiveRoot.pow_of_coprime E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} {ζ : M},
IsPrimitiveRoot ζ k → ∀ (i : ℕ), i.Coprime k → IsPrimitiveRoot (ζ ^ i) k
theorem IsPrimitiveRoot.pow_of_prime E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} {ζ : M},
IsPrimitiveRoot ζ k → ∀ {p : ℕ}, Nat.Prime p → ¬p ∣ k → IsPrimitiveRoot (ζ ^ p) k
theorem IsPrimitiveRoot.pow_iff_coprime E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} {ζ : M},
IsPrimitiveRoot ζ k → 0 < k → ∀ (i : ℕ), IsPrimitiveRoot (ζ ^ i) k ↔ i.Coprime k
theorem IsPrimitiveRoot.orderOf E1 #
∀ {M : Type u_1} [inst : CommMonoid M] (ζ : M), IsPrimitiveRoot ζ (orderOf ζ)
theorem IsPrimitiveRoot.unique E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {k l : ℕ} {ζ : M}, IsPrimitiveRoot ζ k → IsPrimitiveRoot ζ l → k = l
theorem IsPrimitiveRoot.iff E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} {ζ : M},
0 < k → (IsPrimitiveRoot ζ k ↔ ζ ^ k = 1 ∧ ∀ (l : ℕ), 0 < l → l < k → ζ ^ l ≠ 1)
theorem IsPrimitiveRoot.not_iff E0 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} {ζ : M}, ¬IsPrimitiveRoot ζ k ↔ orderOf ζ ≠ k
theorem IsPrimitiveRoot.iff_orderOf E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} {ζ : M}, IsPrimitiveRoot ζ k ↔ orderOf ζ = k
theorem IsPrimitiveRoot.pow_mul_pow_lcm E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} {ζ ζ' : M} {k' : ℕ},
IsPrimitiveRoot ζ k →
IsPrimitiveRoot ζ' k' →
k ≠ 0 →
k' ≠ 0 →
IsPrimitiveRoot (ζ ^ (k / k.factorizationLCMLeft k') * ζ' ^ (k' / k.factorizationLCMRight k')) (k.lcm k')
theorem IsPrimitiveRoot.pow_of_dvd E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} {ζ : M},
IsPrimitiveRoot ζ k → ∀ {p : ℕ}, p ≠ 0 → p ∣ k → IsPrimitiveRoot (ζ ^ p) (k / p)
theorem IsPrimitiveRoot.exists_pow_eq_pow_two_mul E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {k : ℕ} {ζ : M},
IsPrimitiveRoot ζ k → Odd k → ∀ (n : ℕ), ∃ m, ζ ^ n = ζ ^ (2 * m)
If ζ is a primitive k-th root of unity with k odd, then every power of ζ is an even
power of ζ.
theorem IsPrimitiveRoot.mem_rootsOfUnity E0 #
∀ {M : Type u_1} [inst : CommMonoid M] {ζ : Mˣ} {n : ℕ}, IsPrimitiveRoot ζ n → ζ ∈ rootsOfUnity n M
theorem IsPrimitiveRoot.pow E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {ζ : M} {n a b : ℕ},
0 < n → IsPrimitiveRoot ζ n → n = a * b → IsPrimitiveRoot (ζ ^ a) b
If there is an n-th primitive root of unity in R and b divides n,
then there is a b-th primitive root of unity in R.
theorem IsPrimitiveRoot.injOn_pow E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {n : ℕ} {ζ : M},
IsPrimitiveRoot ζ n → Set.InjOn (fun x ↦ ζ ^ x) ↑(Finset.range n)
theorem IsPrimitiveRoot.exists_pos E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {ζ : M} {k : ℕ}, ζ ^ k = 1 → k ≠ 0 → ∃ k' > 0, IsPrimitiveRoot ζ k'
theorem IsPrimitiveRoot.existsUnique E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {ζ : M}, ∃! k, IsPrimitiveRoot ζ k
theorem isPrimitiveRoot_of_mem_rootsOfUnity E1 #
∀ {M : Type u_1} [inst : CommMonoid M] {u : Mˣ} {n : ℕ} [NeZero n],
u ∈ rootsOfUnity n M → ∃ d, d ≠ 0 ∧ d ∣ n ∧ IsPrimitiveRoot u d
theorem IsPrimitiveRoot.map_of_injective E0 #
∀ {M : Type u_1} {N : Type u_2} {F : Type u_6} [inst : CommMonoid M] [inst_1 : CommMonoid N] {k : ℕ} {ζ : M} {f : F}
[inst_2 : FunLike F M N] [MonoidHomClass F M N], IsPrimitiveRoot ζ k → Function.Injective ⇑f → IsPrimitiveRoot (f ζ) k
theorem IsPrimitiveRoot.of_map_of_injective E1 #
∀ {M : Type u_1} {N : Type u_2} {F : Type u_6} [inst : CommMonoid M] [inst_1 : CommMonoid N] {k : ℕ} {ζ : M} {f : F}
[inst_2 : FunLike F M N] [MonoidHomClass F M N], IsPrimitiveRoot (f ζ) k → Function.Injective ⇑f → IsPrimitiveRoot ζ k
theorem IsPrimitiveRoot.map_iff_of_injective E0 #
∀ {M : Type u_1} {N : Type u_2} {F : Type u_6} [inst : CommMonoid M] [inst_1 : CommMonoid N] {k : ℕ} {ζ : M} {f : F}
[inst_2 : FunLike F M N] [MonoidHomClass F M N],
Function.Injective ⇑f → (IsPrimitiveRoot (f ζ) k ↔ IsPrimitiveRoot ζ k)
theorem IsPrimitiveRoot.zero E1 #
∀ {M₀ : Type u_7} [inst : CommMonoidWithZero M₀] [Nontrivial M₀], IsPrimitiveRoot 0 0
theorem IsPrimitiveRoot.ne_zero E1 #
∀ {k : ℕ} {M₀ : Type u_7} [inst : CommMonoidWithZero M₀] [Nontrivial M₀] {ζ : M₀}, IsPrimitiveRoot ζ k → k ≠ 0 → ζ ≠ 0
theorem IsPrimitiveRoot.injOn_pow_mul E1 #
∀ {M₀ : Type u_7} [inst : CommMonoidWithZero M₀] [IsCancelMulZero M₀] {n : ℕ} {ζ : M₀},
IsPrimitiveRoot ζ n → ∀ {α : M₀}, α ≠ 0 → Set.InjOn (fun x ↦ ζ ^ x * α) ↑(Finset.range n)
theorem IsPrimitiveRoot.zpow_eq_one E1 #
∀ {G : Type u_3} [inst : DivisionCommMonoid G] {k : ℕ} {ζ : G}, IsPrimitiveRoot ζ k → ζ ^ ↑k = 1
theorem IsPrimitiveRoot.zpow_eq_one_iff_dvd E1 #
∀ {G : Type u_3} [inst : DivisionCommMonoid G] {k : ℕ} {ζ : G}, IsPrimitiveRoot ζ k → ∀ (l : ℤ), ζ ^ l = 1 ↔ ↑k ∣ l
theorem IsPrimitiveRoot.inv E1 #
∀ {G : Type u_3} [inst : DivisionCommMonoid G] {k : ℕ} {ζ : G}, IsPrimitiveRoot ζ k → IsPrimitiveRoot ζ⁻¹ k
theorem IsPrimitiveRoot.inv_iff E0 #
∀ {G : Type u_3} [inst : DivisionCommMonoid G] {k : ℕ} {ζ : G}, IsPrimitiveRoot ζ⁻¹ k ↔ IsPrimitiveRoot ζ k
theorem IsPrimitiveRoot.zpow_of_gcd_eq_one E1 #
∀ {G : Type u_3} [inst : DivisionCommMonoid G] {k : ℕ} {ζ : G},
IsPrimitiveRoot ζ k → ∀ (i : ℤ), i.gcd ↑k = 1 → IsPrimitiveRoot (ζ ^ i) k
theorem IsPrimitiveRoot.sub_one_ne_zero E1 #
∀ {R : Type u_4} [inst : CommRing R] {n : ℕ} {ζ : R}, 1 < n → IsPrimitiveRoot ζ n → ζ - 1 ≠ 0
theorem IsPrimitiveRoot.isRoot E1 #
∀ {R : Type u_4} [inst : CommRing R] {n : ℕ} {ζ : R}, IsPrimitiveRoot ζ n → (Polynomial.X ^ n - 1).IsRoot ζ
theorem IsPrimitiveRoot.isRoot_of_dvd E1 #
∀ {R : Type u_4} [inst : CommRing R] {n n' : ℕ} {ζ : R}, IsPrimitiveRoot ζ n → n ∣ n' → (Polynomial.X ^ n' - 1).IsRoot ζ
theorem IsPrimitiveRoot.primitiveRoots_one E0 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R], primitiveRoots 1 R = {1}
theorem IsPrimitiveRoot.neZero' E1 #
∀ {R : Type u_4} {ζ : R} [inst : CommRing R] [IsDomain R] {n : ℕ} [NeZero n], IsPrimitiveRoot ζ n → NeZero ↑n
theorem IsPrimitiveRoot.mem_nthRootsFinset E0 #
∀ {R : Type u_4} {k : ℕ} {ζ : R} [inst : CommRing R] [inst_1 : IsDomain R],
IsPrimitiveRoot ζ k → 0 < k → ζ ∈ Polynomial.nthRootsFinset k 1
theorem IsPrimitiveRoot.neg_one E1 #
∀ {R : Type u_4} [inst : CommRing R] (p : ℕ) [Nontrivial R] [h : CharP R p], p ≠ 2 → IsPrimitiveRoot (-1) 2
theorem IsPrimitiveRoot.geom_sum_eq_zero E1 #
∀ {R : Type u_4} {k : ℕ} [inst : CommRing R] [IsDomain R] {ζ : R},
IsPrimitiveRoot ζ k → 1 < k → ∑ i ∈ Finset.range k, ζ ^ i = 0
If 1 < k then (∑ i ∈ range k, ζ ^ i) = 0.
theorem IsPrimitiveRoot.isRoot_geom_sum E1 #
∀ {R : Type u_4} {k : ℕ} [inst : CommRing R] [IsDomain R] {ζ : R},
IsPrimitiveRoot ζ k → 1 < k → (∑ i ∈ Finset.range k, Polynomial.X ^ i).IsRoot ζ
theorem IsPrimitiveRoot.pow_sub_one_eq E0 #
∀ {R : Type u_4} {k : ℕ} [inst : CommRing R] [IsDomain R] {ζ : R},
IsPrimitiveRoot ζ k → 1 < k → ζ ^ k.pred = -∑ i ∈ Finset.range k.pred, ζ ^ i
If 1 < k, then ζ ^ k.pred = -(∑ i ∈ range k.pred, ζ ^ i).
def IsPrimitiveRoot.zmodEquivZPowers E3 #
{R : Type u_4} →
{k : ℕ} → [inst : CommRing R] → {ζ : Rˣ} → IsPrimitiveRoot ζ k → ZMod k ≃+ Additive ↥(Subgroup.zpowers ζ)
The (additive) monoid equivalence between ZMod k
and the powers of a primitive root of unity ζ.
theorem IsPrimitiveRoot.zmodEquivZPowers_apply_intCast E0 #
∀ {R : Type u_4} {k : ℕ} [inst : CommRing R] {ζ : Rˣ} (h : IsPrimitiveRoot ζ k) (i : ℤ),
h.zmodEquivZPowers ↑i = Additive.ofMul ⟨ζ ^ i, ⋯⟩
theorem IsPrimitiveRoot.zmodEquivZPowers_apply_natCast E0 #
∀ {R : Type u_4} {k : ℕ} [inst : CommRing R] {ζ : Rˣ} (h : IsPrimitiveRoot ζ k) (i : ℕ),
h.zmodEquivZPowers ↑i = Additive.ofMul ⟨ζ ^ i, ⋯⟩
theorem IsPrimitiveRoot.zmodEquivZPowers_symm_apply_zpow E0 #
∀ {R : Type u_4} {k : ℕ} [inst : CommRing R] {ζ : Rˣ} (h : IsPrimitiveRoot ζ k) (i : ℤ),
h.zmodEquivZPowers.symm (Additive.ofMul ⟨ζ ^ i, ⋯⟩) = ↑i
theorem IsPrimitiveRoot.zmodEquivZPowers_symm_apply_zpow' E0 #
∀ {R : Type u_4} {k : ℕ} [inst : CommRing R] {ζ : Rˣ} (h : IsPrimitiveRoot ζ k) (i : ℤ),
h.zmodEquivZPowers.symm ⟨ζ ^ i, ⋯⟩ = ↑i
theorem IsPrimitiveRoot.zmodEquivZPowers_symm_apply_pow E0 #
∀ {R : Type u_4} {k : ℕ} [inst : CommRing R] {ζ : Rˣ} (h : IsPrimitiveRoot ζ k) (i : ℕ),
h.zmodEquivZPowers.symm (Additive.ofMul ⟨ζ ^ i, ⋯⟩) = ↑i
theorem IsPrimitiveRoot.zmodEquivZPowers_symm_apply_pow' E0 #
∀ {R : Type u_4} {k : ℕ} [inst : CommRing R] {ζ : Rˣ} (h : IsPrimitiveRoot ζ k) (i : ℕ),
h.zmodEquivZPowers.symm ⟨ζ ^ i, ⋯⟩ = ↑i
theorem IsPrimitiveRoot.zpowers_eq E3 #
∀ {R : Type u_4} [inst : CommRing R] [IsDomain R] {k : ℕ} [NeZero k] {ζ : Rˣ},
IsPrimitiveRoot ζ k → Subgroup.zpowers ζ = rootsOfUnity k R
theorem IsPrimitiveRoot.map_rootsOfUnity E0 #
∀ {R : Type u_4} [inst : CommRing R] [IsDomain R] {S : Type u_7} {F : Type u_8} [inst_2 : CommRing S] [IsDomain S]
[inst_4 : FunLike F R S] [inst_5 : MonoidHomClass F R S] {ζ : R} {n : ℕ} [NeZero n],
IsPrimitiveRoot ζ n →
∀ {f : F}, Function.Injective ⇑f → Subgroup.map (Units.map ↑f) (rootsOfUnity n R) = rootsOfUnity n S
def rootsOfUnityEquivOfPrimitiveRoots E1 #
{R : Type u_4} →
[inst : CommRing R] →
[inst_1 : IsDomain R] →
{S : Type u_7} →
{F : Type u_8} →
[inst_2 : CommRing S] →
[IsDomain S] →
[inst_4 : FunLike F R S] →
[MonoidHomClass F R S] →
{n : ℕ} →
[NeZero n] →
{f : F} →
Function.Injective ⇑f →
(primitiveRoots n R).Nonempty → ↥(rootsOfUnity n R) ≃* ↥(rootsOfUnity n S)
If R contains an n-th primitive root, and S/R is a ring extension,
then the n-th roots of unity in R and S are isomorphic.
Also see IsPrimitiveRoot.map_rootsOfUnity for the equality as Subgroup Sˣ.
theorem rootsOfUnityEquivOfPrimitiveRoots_apply_coe_inv_val E0 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {S : Type u_7} {F : Type u_8} [inst_2 : CommRing S]
[inst_3 : IsDomain S] [inst_4 : FunLike F R S] [inst_5 : MonoidHomClass F R S] {n : ℕ} [inst_6 : NeZero n] {f : F}
(hf : Function.Injective ⇑f) (hζ : (primitiveRoots n R).Nonempty) (a : ↥(rootsOfUnity n R)), ⋯ = ⋯
theorem val_rootsOfUnityEquivOfPrimitiveRoots_apply_coe E0 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {S : Type u_7} {F : Type u_8} [inst_2 : CommRing S]
[inst_3 : IsDomain S] [inst_4 : FunLike F R S] [inst_5 : MonoidHomClass F R S] {n : ℕ} [inst_6 : NeZero n] {f : F}
(hf : Function.Injective ⇑f) (hζ : (primitiveRoots n R).Nonempty) (a : ↥(rootsOfUnity n R)),
↑↑((rootsOfUnityEquivOfPrimitiveRoots hf hζ) a) = f ↑↑a
theorem rootsOfUnityEquivOfPrimitiveRoots_symm_apply E0 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {S : Type u_7} {F : Type u_8} [inst_2 : CommRing S]
[inst_3 : IsDomain S] [inst_4 : FunLike F R S] [inst_5 : MonoidHomClass F R S] {n : ℕ} [inst_6 : NeZero n] {f : F}
(hf : Function.Injective ⇑f) (hζ : (primitiveRoots n R).Nonempty) (η : ↥(rootsOfUnity n S)),
f ↑↑((rootsOfUnityEquivOfPrimitiveRoots hf hζ).symm η) = ↑↑η
theorem IsPrimitiveRoot.isPrimitiveRoot_iff' E1 #
∀ {R : Type u_4} [inst : CommRing R] [IsDomain R] {k : ℕ} [NeZero k] {ζ ξ : Rˣ},
IsPrimitiveRoot ζ k → (IsPrimitiveRoot ξ k ↔ ∃ i < k, i.Coprime k ∧ ζ ^ i = ξ)
theorem IsPrimitiveRoot.isPrimitiveRoot_iff E0 #
∀ {R : Type u_4} [inst : CommRing R] [IsDomain R] {k : ℕ} [NeZero k] {ζ ξ : R},
IsPrimitiveRoot ζ k → (IsPrimitiveRoot ξ k ↔ ∃ i < k, i.Coprime k ∧ ζ ^ i = ξ)
theorem IsPrimitiveRoot.nthRoots_eq E0 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {n : ℕ} {ζ : R},
IsPrimitiveRoot ζ n →
∀ {α a : R}, α ^ n = a → Polynomial.nthRoots n a = Multiset.map (fun x ↦ ζ ^ x * α) (Multiset.range n)
theorem IsPrimitiveRoot.adjoin_pair_eq E0 #
∀ {R : Type u_4} [inst : CommRing R] [IsDomain R] (S : Type u_7) [inst_2 : CommSemiring S] [inst_3 : Algebra S R]
{ζ₁ ζ₂ : R} {k₁ k₂ : ℕ},
IsPrimitiveRoot ζ₁ k₁ →
IsPrimitiveRoot ζ₂ k₂ → k₁ ≠ 0 → k₂ ≠ 0 → ∀ {ζ : R}, IsPrimitiveRoot ζ (k₁.lcm k₂) → S[ζ₁, ζ₂] = S[ζ]
The sub-algebra generated by two roots of unity of order k₁ and k₂ resp. is the same as the one
generated by a root of unity of order lcm k₁ k₂.
See IsPrimitiveRoot.pow_mul_pow_lcm for how to construct a root of unity of order lcm k₁ k₂
from roots of unity of order k₁ and k₂.
theorem IsPrimitiveRoot.card_nthRoots E1 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {n : ℕ} {ζ : R},
IsPrimitiveRoot ζ n → ∀ (a : R), (Polynomial.nthRoots n a).card = if ∃ α, α ^ n = a then n else 0
theorem IsPrimitiveRoot.card_rootsOfUnity' E1 #
∀ {R : Type u_4} [inst : CommRing R] {ζ : Rˣ} [IsDomain R] {n : ℕ} [NeZero n],
IsPrimitiveRoot ζ n → Nat.card ↥(rootsOfUnity n R) = n
A variant of IsPrimitiveRoot.card_rootsOfUnity for ζ : Rˣ.
theorem IsPrimitiveRoot.card_rootsOfUnity E1 #
∀ {R : Type u_4} [inst : CommRing R] [IsDomain R] {ζ : R} {n : ℕ} [NeZero n],
IsPrimitiveRoot ζ n → Nat.card ↥(rootsOfUnity n R) = n
theorem card_rootsOfUnity_eq_iff_exists_isPrimitiveRoot E1 #
∀ {R : Type u_4} [inst : CommRing R] [IsDomain R] {n : ℕ} [NeZero n],
Nat.card ↥(rootsOfUnity n R) = n ↔ ∃ ζ, IsPrimitiveRoot ζ n
theorem IsPrimitiveRoot.card_nthRoots_one E1 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {ζ : R} {n : ℕ},
IsPrimitiveRoot ζ n → (Polynomial.nthRoots n 1).card = n
The cardinality of the multiset nthRoots ↑n (1 : R) is n
if there is a primitive root of unity in R.
theorem IsPrimitiveRoot.nthRoots_nodup E1 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {ζ : R} {n : ℕ},
IsPrimitiveRoot ζ n → ∀ {a : R}, a ≠ 0 → (Polynomial.nthRoots n a).Nodup
theorem IsPrimitiveRoot.nthRoots_one_nodup E1 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {ζ : R} {n : ℕ},
IsPrimitiveRoot ζ n → (Polynomial.nthRoots n 1).Nodup
The multiset nthRoots ↑n (1 : R) has no repeated elements
if there is a primitive root of unity in R.
theorem IsPrimitiveRoot.card_nthRootsFinset E1 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {ζ : R} {n : ℕ},
IsPrimitiveRoot ζ n → (Polynomial.nthRootsFinset n 1).card = n
theorem IsPrimitiveRoot.card_primitiveRoots E3 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {ζ : R} {k : ℕ},
IsPrimitiveRoot ζ k → (primitiveRoots k R).card = k.totient
If an integral domain has a primitive k-th root of unity, then it has φ k of them.
def IsPrimitiveRoot.primitiveRootsPowEquiv E1 #
{R : Type u_4} →
[inst : CommRing R] →
[inst_1 : IsDomain R] → {a b n : ℕ} → a * b ≡ 1 [MOD n] → ↥(primitiveRoots n R) ≃ ↥(primitiveRoots n R)
Equivalence of coprime powers of primitive roots. If a * b ≡ 1 (mod n), then x ↦ x ^ a and x ↦ x ^ b restricts to a bijection on the n-th primitive roots.
theorem IsPrimitiveRoot.primitiveRootsPowEquiv_symm_apply_coe E0 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {a b n : ℕ} (h : a * b ≡ 1 [MOD n])
(x : ↥(primitiveRoots n R)), ↑((IsPrimitiveRoot.primitiveRootsPowEquiv h).symm x) = ↑x ^ b
theorem IsPrimitiveRoot.primitiveRootsPowEquiv_apply_coe E0 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {a b n : ℕ} (h : a * b ≡ 1 [MOD n])
(x : ↥(primitiveRoots n R)), ↑((IsPrimitiveRoot.primitiveRootsPowEquiv h) x) = ↑x ^ a
def IsPrimitiveRoot.primitiveRootsPowEquivOfCoprime E3 #
{R : Type u_4} →
[inst : CommRing R] →
[inst_1 : IsDomain R] → {a n : ℕ} → a.Coprime n → [NeZero n] → ↥(primitiveRoots n R) ≃ ↥(primitiveRoots n R)
Equivalence of coprime powers of primitive roots. Every n-th primitive root is taken to the
a-th power given that n and a are coprime.
theorem IsPrimitiveRoot.primitiveRootsPowEquivOfCoprime_apply_coe E0 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {a n : ℕ} (h : a.Coprime n) [inst_2 : NeZero n]
(x : ↥(primitiveRoots n R)), ↑((IsPrimitiveRoot.primitiveRootsPowEquivOfCoprime h) x) = ↑x ^ a
theorem IsPrimitiveRoot.disjoint E1 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {k l : ℕ},
k ≠ l → Disjoint (primitiveRoots k R) (primitiveRoots l R)
The sets primitiveRoots k R are pairwise disjoint.
theorem IsPrimitiveRoot.nthRoots_one_eq_biUnion_primitiveRoots E1 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] [inst_2 : DecidableEq R] {n : ℕ},
Polynomial.nthRootsFinset n 1 = n.divisors.biUnion fun i ↦ primitiveRoots i R
nthRoots n as a Finset is equal to the union of primitiveRoots i R for i ∣ n.
def IsPrimitiveRoot.autToPow E3 #
(R : Type u_4) →
{S : Type u_5} →
[inst : CommRing S] →
[IsDomain S] →
{μ : S} →
{n : ℕ} →
IsPrimitiveRoot μ n → [inst_2 : CommRing R] → [inst_3 : Algebra R S] → [NeZero n] → (S ≃ₐ[R] S) →* (ZMod n)ˣ
The MonoidHom that takes an automorphism to the power of μ that μ gets mapped to
under it.
theorem IsPrimitiveRoot.coe_autToPow_apply E0 #
∀ (R : Type u_4) {S : Type u_5} [inst : CommRing S] [inst_1 : IsDomain S] {μ : S} {n : ℕ} (hμ : IsPrimitiveRoot μ n)
[inst_2 : CommRing R] [inst_3 : Algebra R S] [inst_4 : NeZero n] (f : S ≃ₐ[R] S),
↑((IsPrimitiveRoot.autToPow R hμ) f) = ↑⋯.choose
theorem IsPrimitiveRoot.autToPow_spec E0 #
∀ (R : Type u_4) {S : Type u_5} [inst : CommRing S] [inst_1 : IsDomain S] {μ : S} {n : ℕ} (hμ : IsPrimitiveRoot μ n)
[inst_2 : CommRing R] [inst_3 : Algebra R S] [inst_4 : NeZero n] (f : S ≃ₐ[R] S),
μ ^ (↑((IsPrimitiveRoot.autToPow R hμ) f)).val = f μ
theorem nthRootsFinset_eq_of_prime E3 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {p : ℕ} [inst_2 : DecidableEq R],
Nat.Prime p → Polynomial.nthRootsFinset p 1 = primitiveRoots p R ∪ {1}
If p is prime, the p-th roots of unity in an integral domain are exactly the primitive
p-th roots of unity together with 1.
theorem mem_nthRootsFinset_iff_of_prime E0 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {p : ℕ},
Nat.Prime p → ∀ {η : R}, η ∈ Polynomial.nthRootsFinset p 1 ↔ IsPrimitiveRoot η p ∨ η = 1
For p prime, an element of R is a p-th root of unity if and only if it is either a
primitive p-th root of unity or 1.
theorem isPrimitiveRoot_of_mem_nthRootsFinset E1 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {p : ℕ},
Nat.Prime p → ∀ {η : R}, η ∈ Polynomial.nthRootsFinset p 1 → η ≠ 1 → IsPrimitiveRoot η p
A p-th root of unity that is not 1, with p prime, satisfies IsPrimitiveRoot η p.
theorem mem_primitiveRoots_of_mem_nthRootsFinset E0 #
∀ {R : Type u_4} [inst : CommRing R] [inst_1 : IsDomain R] {p : ℕ},
Nat.Prime p → ∀ {η : R}, η ∈ Polynomial.nthRootsFinset p 1 → η ≠ 1 → η ∈ primitiveRoots p R
A p-th root of unity that is not 1, with p prime, is a primitive p-th root of unity.
theorem IsCyclic.exists_apply_ne_one E1 #
∀ {G : Type u_7} {G' : Type u_8} [inst : Group G] [IsCyclic G] [Finite G] [inst_3 : CommGroup G'],
(∃ ζ, IsPrimitiveRoot ζ (Nat.card G)) → ∀ ⦃a : G⦄, a ≠ 1 → ∃ φ, φ a ≠ 1
If G is cyclic of order n and G' contains a primitive nth root of unity,
then for each a : G with a ≠ 1 there is a homomorphism φ : G →* G' such that φ a ≠ 1.
theorem ZMod.exists_monoidHom_apply_ne_one E1 #
∀ {M : Type u_7} [inst : CommMonoid M] {n : ℕ} [NeZero n],
(∃ ζ, IsPrimitiveRoot ζ n) → ∀ {a : ZMod n}, a ≠ 0 → ∃ φ, φ (Multiplicative.ofAdd a) ≠ 1
If M is a commutative group that contains a primitive nth root of unity
and a : ZMod n is nonzero, then there exists a group homomorphism φ from the
additive group ZMod n to the multiplicative group Mˣ such that φ a ≠ 1.
Deprecated aliases
| Name | New name | Since |
|---|---|---|
IsPrimitiveRoot.zmodEquivZPowers_apply_coe_int | IsPrimitiveRoot.zmodEquivZPowers_apply_intCast | 2026-10-27 |
IsPrimitiveRoot.zmodEquivZPowers_apply_coe_nat | IsPrimitiveRoot.zmodEquivZPowers_apply_natCast | 2026-10-13 |