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 ifl
satisfiesζ ^ l = 1
thenk ∣ 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 k
is 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φ k
of 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
- h.toRootsOfUnity = rootsOfUnity.mkOfPowEq μ ⋯
Instances For
primitiveRoots k R
is the finset of primitive k
-th roots of unity
in the integral domain R
.
Equations
- primitiveRoots k R = Finset.filter (fun (ζ : R) => IsPrimitiveRoot ζ k) (Polynomial.nthRoots k 1).toFinset
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
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
if there is a primitive n
th root of unity in R
.
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