Documentation

CslibFrontier.Foundations.RingTheory.RootsOfUnity.Principal

Principal roots of unity #

An element ω of a commutative ring is a principal n-th root of unity when ω ^ n = 1 and ∑ i < n, (ω ^ l) ^ i = 0 for every 0 < l < n. This geometric-sum condition is what the inversion formula of the discrete Fourier transform needs (the summation lemma, [CLRS09], Lemma 30.6). In an integral domain every primitive n-th root of unity is principal (IsPrimitiveRoot.isPrincipalRoot). Conversely, a principal root is primitive whenever (n : R) ≠ 0 (IsPrincipalRoot.isPrimitiveRoot), in any commutative ring. Neither notion implies the other in general. ω = 4 is a primitive square root of unity in ZMod 15, yet 1 + 4 = 5 ≠ 0, so it is not principal. ω = 1 is a principal square root of unity in ZMod 2, since 1 + 1 = 0, but it is not primitive.

The radix-2 fast Fourier transform needs ω ^ (2 ^ k) = -1. This condition alone makes ω a principal 2 ^ (k + 1)-th root of unity in every commutative ring (IsPrincipalRoot.of_pow_two_pow_eq_neg_one); no unit or domain hypothesis is required.

Main definitions #

Main results #

References #

structure IsPrincipalRoot {R : Type u_1} [CommRing R] (ω : R) (n : ℕ) :

ω is a principal n-th root of unity: ω ^ n = 1, and for 0 < l < n the geometric sum ∑ i < n, (ω ^ l) ^ i vanishes. This is the hypothesis of the DFT inversion formula ([CLRS09], Lemma 30.6).

  • pow_eq_one : ω ^ n = 1

    ω is an n-th root of unity.

  • geom_sum_eq_zero (l : ℕ) : 0 < l → l < n → ∑ i ∈ Finset.range n, (ω ^ l) ^ i = 0

    The geometric sums of the nontrivial powers ω ^ l, 0 < l < n, vanish.

theorem IsPrincipalRoot.geom_sum_pow {R : Type u_1} [CommRing R] {ω : R} {n : ℕ} (h : IsPrincipalRoot ω n) (l : ℕ) :
∑ i ∈ Finset.range n, (ω ^ l) ^ i = if n ∣ l then ↑n else 0

The geometric sum of any power of a principal n-th root of unity: it is n when n ∣ l and 0 otherwise.

theorem IsPrincipalRoot.isPrimitiveRoot {R : Type u_1} [CommRing R] {ω : R} {n : ℕ} (h : IsPrincipalRoot ω n) (hn : ↑n ≠ 0) :

A principal n-th root of unity is primitive when (n : R) ≠ 0: if ω ^ l = 1 with 0 < l < n, the vanishing geometric sum of ω ^ l would be n. Without this hypothesis the implication fails: 1 is a principal, non-primitive square root of unity in ZMod 2.

theorem IsPrincipalRoot.of_pow_two_pow_eq_neg_one {R : Type u_1} [CommRing R] {ω : R} {k : ℕ} (h : ω ^ 2 ^ k = -1) :
IsPrincipalRoot ω (2 ^ (k + 1))

An element with ω ^ (2 ^ k) = -1 is a principal 2 ^ (k + 1)-th root of unity, in any commutative ring. Write 0 < l < 2 ^ (k + 1) as 2 ^ v * u with u odd; then v ≤ k and (ω ^ l) ^ (2 ^ (k - v)) = (-1) ^ u = -1, so the geometric sum of ω ^ l telescopes to zero.

theorem IsPrimitiveRoot.isPrincipalRoot {R : Type u_1} [CommRing R] [IsDomain R] {ω : R} {n : ℕ} (h : IsPrimitiveRoot ω n) :

In an integral domain, a primitive n-th root of unity is principal.

theorem IsPrimitiveRoot.pow_two_pow_eq_neg_one {R : Type u_1} [CommRing R] [IsDomain R] {ω : R} {k : ℕ} (h : IsPrimitiveRoot ω (2 ^ (k + 1))) :
ω ^ 2 ^ k = -1

In an integral domain, a primitive 2 ^ (k + 1)-th root of unity ω satisfies ω ^ (2 ^ k) = -1, the hypothesis of the radix-2 fast Fourier transform.