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.
Implementation details #
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.
Turn a primitive root μ into a member of the rootsOfUnity subgroup.
Equations
Instances For
primitiveRoots k R is the finset of primitive k-th roots of unity
in the integral domain R.
Equations
- primitiveRoots k R = {ζ ∈ (Polynomial.nthRoots k 1).toFinset | IsPrimitiveRoot ζ k}
Instances For
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.
If 1 < k then (∑ i ∈ range k, ζ ^ i) = 0.
If 1 < k, then ζ ^ k.pred = -(∑ i ∈ range k.pred, ζ ^ i).
The (additive) monoid equivalence between ZMod k
and the powers of a primitive root of unity ζ.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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ˣ.
Equations
- rootsOfUnityEquivOfPrimitiveRoots hf hζ = ((rootsOfUnity n R).equivMapOfInjective (Units.map ↑f) ⋯).trans (MulEquiv.subgroupCongr ⋯)
Instances For
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₂.
A variant of IsPrimitiveRoot.card_rootsOfUnity for ζ : Rˣ.
The cardinality of the multiset nthRoots ↑n (1 : R) is n
if there is a primitive root of unity in R.
The multiset nthRoots ↑n (1 : R) has no repeated elements
if there is a primitive root of unity in R.
If an integral domain has a primitive k-th root of unity, then it has φ k of them.
The sets primitiveRoots k R are pairwise disjoint.
nthRoots n as a Finset is equal to the union of primitiveRoots i R for i ∣ n.
The MonoidHom that takes an automorphism to the power of μ that μ gets mapped to
under it.
Equations
- IsPrimitiveRoot.autToPow R hμ = { toFun := fun (σ : S ≃ₐ[R] S) => ↑⋯.choose, map_one' := ⋯, map_mul' := ⋯ }.toHomUnits
Instances For
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.
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.