The Zcash ArboretumThe Complete Arboretum PDF

9 Roots of unity and evaluation domains

Run a computation for n steps and record, at each step, the value it holds in each of its registers. The record is a table: one column per register, one row per step, every entry an element of a finite field. A proof system of the kind underlying Halo 2 and Zcash Orchard convinces a verifier that such a table obeys its rules—that every row follows from the one before it—without the verifier replaying the computation. Its basic move is to treat each column as the value table of a polynomial: a function given by its values at n fixed points is, by Lagrange interpolation (5.30), the same data as a polynomial of degree less than n, and statements about the table become statements about polynomials—checkable all at once, at a single random point, by the Schwartz–Zippel principle (5.45). For this plan to be workable two demands must be met. The n evaluation points must be structured, so that “every row” conditions, “next row” shifts, and the bookkeeping polynomials attached to the point set stay cheap; and converting between a polynomial’s values and its coefficients—and multiplying two polynomials—must cost far less than the n2 field operations of the schoolbook methods, or provers could never handle tables of practical size. Both demands are met by one choice of point set: the powers of a root of unity. Nearly every operation such a proof system performs—committing to a polynomial, checking that two polynomials agree, enforcing that a constraint vanishes everywhere it should, multiplying or interpolating efficiently—is ultimately a computation indexed by the finite multiplicative subgroup those powers form. This section develops the theory of these subgroups and delivers, in the fast Fourier transform, the O⁢(n⁢log⁡n) arithmetic promised above.

Throughout, 𝔽 denotes a field. When 𝔽 is to be finite, the notation 𝔽q denotes the field with q elements (so q is a prime power, 6.9); when we intend a prime field specifically we write 𝔽p. The multiplicative group of nonzero elements is 𝔽×=𝔽∖{0} (Example 3.7). We reserve the letter n for the order of the domain we shall construct; throughout, n≥1.

The route is as follows. We first define roots of unity and the primitive ones among them, and settle exactly when a finite field contains them: the condition is n∣q−1, a direct consequence of the cyclicity of 𝔽q× proved in §6. We then fix the evaluation domain H, the subgroup those roots form, and work out its toolkit: the vanishing polynomial Xn−1 and its cosets, the Lagrange basis in closed form, and the evaluation/interpolation isomorphism in matrix form. The isomorphism, read as a matrix, is the number-theoretic transform; the convolution theorem turns polynomial multiplication into entrywise multiplication of value vectors; and the fast Fourier transform computes the transform in O⁢(n⁢log⁡n) operations. A closing synthesis assembles the pieces into the reason these domains form the substrate of polynomial proof systems.

9.1 Roots of unity

The starting point is the equation Xn=1. Its solutions in a field are the roots of unity of order dividing n.

Definition 9.1 (Root of unity).

Let 𝔽 be a field and n∈ℕ>0. An element ω∈𝔽 is an n-th root of unity if ωn=1. We write

μn⁢(𝔽)={ω∈𝔽:ωn=1}

for the set of all n-th roots of unity in 𝔽.

Note that 0∉μn⁢(𝔽), since 0n=0≠1; every n-th root of unity is therefore a unit, i.e. lies in 𝔽×. The set μn⁢(𝔽) is not merely a set; it is a group.

Proposition 9.2.

The set μn⁢(𝔽) is a finite subgroup of 𝔽× of order at most n.

Proof.

The identity 1 satisfies 1n=1, so 1∈μn⁢(𝔽). If ω,ζ∈μn⁢(𝔽), then (ω⁢ζ)n=ωn⁢ζn=1⋅1=1 because 𝔽× is abelian, so ω⁢ζ∈μn⁢(𝔽); and (ω−1)n=(ωn)−1=1−1=1, so ω−1∈μn⁢(𝔽). Hence μn⁢(𝔽) is a subgroup of 𝔽× (3.14). For the order bound, every element of μn⁢(𝔽) is a root of the polynomial Xn−1∈𝔽⁢[X], which is nonzero of degree n and so has at most n roots in 𝔽 (5.18). Thus |μn⁢(𝔽)|≤n. □

The bound |μn⁢(𝔽)|≤n need not be attained. Whether it is attained is precisely the question of the existence of a primitive n-th root of unity.

Definition 9.3 (Primitive root of unity).

An element ω∈𝔽 is a primitive n-th root of unity if ωn=1 and ωk≠1 for every integer k with 1≤k<n. Equivalently, ω is a primitive n-th root of unity if its multiplicative order ord⁡(ω) (3.11) equals n.

Here ord⁡(ω) is the least positive integer d with ωd=1; it exists for any ω∈μn⁢(𝔽) because n itself is such an exponent and the positive integers are well-ordered. The two formulations in 9.3 agree: ωk≠1 for 1≤k<n together with ωn=1 states exactly that the least positive exponent killing ω is n.

Remark 9.4 (Primitive roots revisited).

The identification promised in 6.20 can now be stated. A primitive root of a finite field 𝔽q—a generator of the cyclic group 𝔽q×, in the sense of 6.19—is an element of multiplicative order q−1, which by 9.3 is precisely a primitive (q−1)-th root of unity. The group-theoretic vocabulary “generator of 𝔽q×” and the polynomial-flavoured vocabulary “primitive (q−1)-th root of unity” name the same elements.

Lemma 9.5 (Order divides exponent).

Let ω∈𝔽× have finite order d=ord⁡(ω). Then for any integer m we have ωm=1 if and only if d∣m. In particular, ω is an n-th root of unity if and only if d∣n, and ω is a primitive n-th root of unity if and only if d=n.

Proof.

The first claim is 3.12(1), read in the abelian group 𝔽×: if d∣m, write m=d⁢k, so ωm=(ωd)k=1; conversely, division with remainder m=q⁢d+r, 0≤r<d, gives 1=ωm=ωr, and minimality of d forces r=0. The remaining clauses instantiate it: ωn=1⇔d∣n is the case m=n, and primitivity is the case d=n by 9.3. □

The lemma’s constant companion is the order-of-a-power formula in a cyclic group, ord⁡(gk)=ord⁡(g)/gcd⁡(k,ord⁡(g)), proved as Corollary 3.23; we use the pair repeatedly below as the standard device for computing orders.

Proposition 9.6.

If ω∈𝔽 is a primitive n-th root of unity, then

μn⁢(𝔽)=⟨ω⟩={ 1,ω,ω2,…,ωn−1}

is a cyclic group of order exactly n, and these n powers are pairwise distinct.

Proof.

The powers 1,ω,…,ωn−1 are pairwise distinct: if ωi=ωj with 0≤i≤j≤n−1, then ωj−i=1 with 0≤j−i<n, so primitivity (9.5, with d=n) forces j−i=0. Thus ⟨ω⟩ has exactly n elements, all of which lie in μn⁢(𝔽) since (ωk)n=(ωn)k=1. But |μn⁢(𝔽)|≤n by 9.2, so the inclusion ⟨ω⟩⊆μn⁢(𝔽) is an equality of n-element sets. □

Over the complex numbers a primitive n-th root of unity always exists, namely ω=e2⁢π⁢i/n: this is the classical picture of n equally spaced points on the unit circle, with the primitive roots sitting at the angles 2⁢π⁢k/n for gcd⁡(k,n)=1. Over a finite field existence is more delicate, and it is exactly the finite case that matters for cryptography.

Refer to caption
Figure 1: The eight 8-th roots of unity in ℂ, equally spaced on the unit circle at angles 2⁢π⁢k/8, with ω=e2⁢π⁢i/8. The four primitive ones (k=1,3,5,7, exactly the k coprime to 8; marked in colour) each generate the whole cycle; the grey points ω0=1, ω2=i, ω4=−1, ω6=−i have orders 1,4,2,4 and generate proper subgroups. Over a finite field the same group structure survives with the geometry stripped away—the picture to keep is the cycle, not the circle.

9.2 Existence over finite fields: the condition n∣q−1

The decisive structural fact about finite fields is that their multiplicative group 𝔽q× is cyclic of order q−1 (6.17); the existence theorem for roots of unity rests on it.

Theorem 9.7 (Existence and count of primitive n-th roots of unity).

Let 𝔽q be a finite field and n∈ℕ>0 with gcd⁡(n,q)=1 (automatic when n<p, where p=char⁡𝔽q; equivalently, in characteristic p, exactly the condition p∤n). Then:

  1. 1.

    𝔽q contains a primitive n-th root of unity if and only if n∣q−1.

  2. 2.

    When n∣q−1, the group μn⁢(𝔽q) is cyclic of order exactly n, and the number of primitive n-th roots of unity in 𝔽q is φ⁢(n), where φ is Euler’s totient function (2.26).

Proof.

Let g be a generator of 𝔽q×, which is cyclic of order q−1 by 6.17.

(⇒) Suppose ω is a primitive n-th root of unity in 𝔽q. Then ω∈𝔽q× has order n by 9.3, and by Lagrange’s theorem the order of an element divides the group order q−1 (Corollary 3.30). Hence n∣q−1.

(⇐) Suppose n∣q−1, say q−1=n⁢m. Set ω=gm. Then ωn=gm⁢n=gq−1=1, so ω∈μn⁢(𝔽q). Its order is

ord⁡(ω)=ord⁡(gm)=ord⁡(g)gcd⁡(m,ord⁡(g))=q−1gcd⁡(m,q−1)=q−1m=n,

using the order-of-a-power formula (Corollary 3.23) together with m∣q−1 (so gcd⁡(m,q−1)=m). Thus ω is a primitive n-th root of unity, and by 9.6, μn⁢(𝔽q)=⟨ω⟩ is cyclic of order exactly n.

Count. In the cyclic group μn⁢(𝔽q)=⟨ω⟩ of order n, the element ωk has order n/gcd⁡(k,n), again by Corollary 3.23. This equals n precisely when gcd⁡(k,n)=1, and the number of k∈{0,1,…,n−1} with gcd⁡(k,n)=1 is by definition φ⁢(n) (2.26). Hence there are exactly φ⁢(n) primitive n-th roots of unity.

(A side note on the coprimality hypothesis. The condition gcd⁡(n,q)=1 is what guarantees that Xn−1 is separable—gcd⁡(Xn−1,n⁢Xn−1)=1 when n≠0 in 𝔽q—hence has n distinct roots in a splitting field over 𝔽q (5.40); that all n of them lie in 𝔽q itself is exactly the condition n∣q−1. If p=char⁡𝔽q divided n, then Xn−1 would have repeated roots and μn⁢(𝔽q) would be strictly smaller. But n∣q−1 already forces gcd⁡(n,q)=1, since gcd⁡(q−1,q)=1, so the hypothesis is in fact subsumed.) □

Remark 9.8.

The proof shows that for a finite field the clean statement is simply: 𝔽q has a primitive n-th root of unity ⇔n∣q−1, with no separate coprimality side-condition, because n∣q−1 automatically makes n coprime to q. We stated the condition gcd⁡(n,q)=1 explicitly only to flag the role of the characteristic.

Example 9.9.

Take 𝔽q=𝔽p with p=7. Here q−1=6, and 3 is a generator of 𝔽7×: its successive powers are 3,2,6,4,5,1, all six nonzero residues (Example 6.21). For n=3∣6, set m=6/3=2 and ω=32=2. Indeed 21=2, 22=4, 23=8≡1, so ω=2 has order 3 and μ3⁢(𝔽7)={1,2,4}. There are φ⁢(3)=2 primitive cube roots of unity, namely 2 and 4. By contrast 4∤6, so 𝔽7 has no primitive 4-th root of unity: X4−1=(X2−1)⁢(X2+1), and X2+1 is irreducible over 𝔽7 because it has no root there, −1 not being a square modulo 7.

Remark 9.10 (Two-adicity and FFT-friendly primes).

For the fast algorithms below it is desirable that n be a power of two, or at least smooth—a product of small primes, ideally with many factors of two. 9.7 shows this is possible exactly when 2k∣q−1. The largest k with 2k∣q−1 is called the two-adicity of the field. Designers deliberately choose primes p with high two-adicity—so that p−1=2k⋅c for large k—as scalar fields in proof systems precisely so that large smooth evaluation domains exist. Both Pasta primes—those underlying the Pallas and Vesta curves of 10—satisfy 232∣p−1, with two-adicity exactly 32 (the primes are specified in §5.4.9.6, “Pallas and Vesta”, of the Zcash protocol specification), so each Pasta field contains primitive 2k-th roots of unity for every k≤32, furnishing power-of-two evaluation domains of every size up to 232; this is what makes the entire machinery of this section available to Halo 2 and Orchard.

9.3 The evaluation domain H and its vanishing polynomial

We now fix the central object of this section.

Definition 9.11 (Evaluation domain).

Let 𝔽 be a field containing a primitive n-th root of unity ω. The evaluation domain of order n is the multiplicative subgroup

H=⟨ω⟩={ 1,ω,ω2,…,ωn−1}=μn⁢(𝔽)⊆𝔽×,

a cyclic group of order n by 9.6. We index its elements as ω0,ω1,…,ωn−1, and abbreviate ωi by hi when convenient. Both 𝔽 and ω remain fixed for the rest of the section.

Because H is a multiplicative group, it is closed under products and inverses, and 1∈H. These elementary facts are exactly what make H substantially more useful than an arbitrary set of n interpolation points: cosets, products, and shifts of H interact algebraically. The single most important polynomial attached to H is the one that vanishes precisely on it.

Definition 9.12 (Vanishing polynomial).

The vanishing polynomial (or zerofier) of H is

ZH⁢(X)=∏h∈H(X−h)∈𝔽⁢[X].

On a generic n-point set the vanishing polynomial (5.33) is an unstructured product of n linear factors. On the group H it collapses.

Theorem 9.13 (Closed form and factorisation of the vanishing polynomial).

With H=μn⁢(𝔽) of order n generated by a primitive n-th root of unity ω,

ZH⁢(X)=Xn−1=∏i=0n−1(X−ωi).

Moreover ZH is separable: it has n distinct roots and gcd⁡(ZH,ZH′)=1.

Proof.

Every h∈H satisfies hn=1, hence is a root of Xn−1. The n elements of H are distinct (9.6), so Xn−1 has n distinct roots, namely all of H, and factors as Xn−1=c⁢∏h∈H(X−h) for some constant c∈𝔽× by iterating the factor theorem (5.36, with the degree leaving no room for further factors). Comparing leading coefficients—both Xn−1 and the product are monic—gives c=1, whence Xn−1=∏h∈H(X−h)=ZH⁢(X).

For separability, the formal derivative is ZH′⁢(X)=n⁢Xn−1 (5.37). The existence of the n distinct roots already forces char⁡𝔽∤n: if char⁡𝔽=ℓ divided n, say n=ℓ⁢m, the freshman’s dream (6.13) would give Xn−1=(Xm−1)ℓ, a polynomial with at most m<n distinct roots—a contradiction. Hence n≠0 in 𝔽, so n⁢Xn−1 is nonzero at every element of H, since each is nonzero. Thus it has no root in common with Xn−1, so gcd⁡(ZH,ZH′)=1 and ZH is separable (5.40). □

The contraposition through the freshman’s dream is worth isolating as a device: it converts a root count (n distinct n-th roots of unity exist) into a characteristic condition (char⁡𝔽∤n), and thereby licenses dividing by n in 𝔽—which the closed forms below do constantly.

The closed form ZH⁢(X)=Xn−1 is the workhorse of polynomial proof systems: testing whether a polynomial f vanishes on all of H reduces to checking divisibility by Xn−1, which one can verify by exhibiting a quotient t⁢(X) with f⁢(X)=t⁢(X)⁢(Xn−1). Moreover, evaluating ZH at any point costs a single exponentiation Xn, not n multiplications. We record two structural consequences.

Proposition 9.14 (Cosets and shifts).

Let γ∈𝔽× and let γ⁢H={γ⁢h:h∈H} be the corresponding coset (3.27). Then the polynomial vanishing on γ⁢H is

Zγ⁢H⁢(X)=∏h∈H(X−γ⁢h)=Xn−γn.

In particular, distinct cosets of H in 𝔽× have vanishing polynomials Xn−c for distinct constants c=γn, and the cosets of H partition 𝔽× (3.28) into translates of H, on each of which Xn is constant.

Proof.

Substitute Y=X/γ:

∏h∈H(X−γ⁢h)=γn⁢∏h∈H(Y−h)=γn⁢(Yn−1)=γn⁢((X/γ)n−1)=Xn−γn,

using 9.13 for the middle equality. The constant is c=γn, and

γ1⁢H=γ2⁢H⇔γ1/γ2∈H⇔(γ1/γ2)n=1⇔γ1n=γ2n,

so distinct cosets give distinct constants c. □

Lemma 9.15 (Finite geometric series).

Let 𝔽 be a field, ζ∈𝔽 with ζ≠1, and n≥1. Then

∑i=0n−1ζi=ζn−1ζ−1.
Proof.

Write S=1+ζ+ζ2+⋯+ζn−1. Multiplying by ζ advances every term one slot:

ζ⁢S=ζ+ζ2+⋯+ζn−1+ζn.

In the difference ζ⁢S−S, the terms ζ,ζ2,…,ζn−1 appear in both lines and cancel; only the two extremes survive:

(ζ−1)⁢S=ζ⁢S−S=ζn−1.

Since ζ≠1, the factor ζ−1 is invertible, and dividing by it yields the claim. □

Proposition 9.16 (Sum of roots of unity).

If n>1 then ∑i=0n−1ωi=0, and more generally for any integer k,

∑i=0n−1ωk⁢i={nif ⁢n∣k,0if ⁢n∤k.
Proof.

If n∣k, then ωk⁢i=(ωn)k⁢i/n=1 for each i, so the sum is n. If n∤k, set ζ=ωk≠1 (since ω has order n, we have ωk=1⇔n∣k by 9.5), and 9.15 gives

∑i=0n−1ζi=ζn−1ζ−1=(ωn)k−1ζ−1=1−1ζ−1=0,

the denominator being nonzero because ζ≠1. The first claim is the case k=1, valid for n>1 since then n∤1. □

Remark 9.17 (Rotation makes the vanishing inevitable).

For n∤k there is also a proof with no formula at all. The n terms of ∑iωk⁢i run through the subgroup ⟨ζ⟩ generated by ζ=ωk, each element appearing equally often; multiplying the sum by ζ merely rotates that cycle one notch—each term advances to the next, the last wrapping around to the first—so the sum satisfies ζ⁢S=S. A quantity invariant under scaling by something other than 1 can only be zero: (ζ−1)⁢S=0 with ζ≠1 forces S=0. The balanced cycle of 1 is this argument made visible.

Remark 9.18 (Why “orthogonality”).

Call two vectors in 𝔽n orthogonal when their standard inner product (8.21) vanishes. For each frequency k let vk=(1,ωk,ω2⁢k,…,ω(n−1)⁢k) be its vector of powers, and let v¯k=(1,ω−k,ω−2⁢k,…,ω−(n−1)⁢k) be the same construction run with ω−1 in place of ω: the mirror of vk, walking the cycle in the opposite direction, in the role the complex conjugate plays classically (on the unit circle z¯=z−1). Then ⟨v¯k,vk′⟩=∑iωi⁢(k′−k), which 9.16 evaluates to 0 for k≠k′ and to n for k=k′: distinct frequency vectors are orthogonal, and each pairs with its own mirror to n. (Which factor carries the mirror is a convention: with the roles exchanged the exponent is k−k′, and the criterion n∣k′−k is symmetric, so the verdict is the same; the order here matches the product V¯⁢V computed in 9.29.) This is the finite-field counterpart of the orthogonality of the exponentials θ↦e2⁢π⁢i⁢k⁢θ in classical Fourier analysis, the balanced trip around the cycle replacing the integral over the circle. It is the engine of the inverse-transform proof below (9.29): there the vk appear as the columns of the transform matrix, so in the inverse sum every wrong frequency’s contribution rides on one of these vanishing pairings and cancels, while the right one survives n-fold and the 1/n rescales it.

9.4 The Lagrange basis on H

Attention now passes from the group H to the polynomials we study on it. Since H has exactly n points, values on H pin down polynomials of degree less than n (5.20); the basis adapted to this situation is the Lagrange basis of §5.7, which on the group H acquires a closed form it has on no generic point set.

Definition 9.19.

Let 𝔽⁢[X]<n denote the 𝔽-vector space of polynomials of degree strictly less than n, together with the zero polynomial. It has the monomial basis {1,X,…,Xn−1} (8.14), so dim𝔽𝔽⁢[X]<n=n (8.17).

Definition 9.20.

For each i∈{0,1,…,n−1}, the i-th Lagrange basis polynomial for H={ω0,…,ωn−1} is

Li⁢(X)=∏j=0j≠in−1X−ωjωi−ωj∈𝔽⁢[X]<n,

the basis polynomial ℓi of 5.30 for the nodes ω0,…,ωn−1.

Proposition 9.21 (Interpolation property).

The polynomials L0,…,Ln−1 satisfy the Kronecker-delta conditions

Li⁢(ωj)=δi⁢j={1i=j,0i≠j,

they form a basis of 𝔽⁢[X]<n, and they give the unique interpolant: for any data (v0,…,vn−1)∈𝔽n, the polynomial

f⁢(X)=∑i=0n−1vi⁢Li⁢(X)

is the unique element of 𝔽⁢[X]<n with f⁢(ωi)=vi for all i.

Proof.

Each Li is well defined and of degree n−1 because the nodes ωj are distinct (9.6), so the denominators ωi−ωj with j≠i are nonzero. The delta conditions, the interpolation f⁢(ωj)=vj, and the uniqueness are 5.30 (with (4)) applied to these nodes with d=n−1; uniqueness rests, as there, on the root count: two interpolants in 𝔽⁢[X]<n differ by a polynomial of degree <n with n distinct roots, which is the zero polynomial (5.18). It remains to see that the Li form a basis of 𝔽⁢[X]<n. They are linearly independent: if ∑ici⁢Li=0, evaluation at ωj yields cj=0 for every j (8.11). Being n independent vectors in the n-dimensional space 𝔽⁢[X]<n (9.19), they form a basis (8.17). □

The root-count step deserves a name, for it recurs: to prove two polynomials of degree <n equal, show they agree on all n points of H. We use this root-count device for the uniqueness above, for 9.24, and for Example 9.25 below.

On a generic point set the Lagrange polynomials admit no closed form simpler than the defining product. On the group H they collapse to a compact expression involving the vanishing polynomial.

Theorem 9.22 (Closed form of the Lagrange basis on H).

For H=μn⁢(𝔽) with primitive root ω, and for each i,

Li⁢(X)=ωin⋅Xn−1X−ωi=ωi⁢(Xn−1)n⁢(X−ωi).

In particular, dividing out one linear factor and scaling yields all n Lagrange polynomials from the single polynomial ZH⁢(X)=Xn−1.

Proof.

Fix i. From 9.13, ZH⁢(X)=∏j=0n−1(X−ωj), so

ZH⁢(X)X−ωi=∏j=0j≠in−1(X−ωj),

which is exactly the numerator of Li in 9.20. It remains to evaluate the denominator ∏j≠i(ωi−ωj). Writing ZH=(X−ωi)⁢g with g=∏j≠i(X−ωj), the product rule (5.38) gives ZH′=g+(X−ωi)⁢g′, so

ZH′⁢(ωi)=g⁢(ωi)=∏j=0j≠in−1(ωi−ωj)

—the derivative at a simple root equals the product of the differences to the other roots, the computation already made for simple roots in the proof of 5.40. Concretely ZH′⁢(X)=n⁢Xn−1, so

ZH′⁢(ωi)=n⁢(ωi)n−1=n⁢ωi⁢n⁢ω−i=n⋅1⋅ω−i=nωi,

using ωi⁢n=(ωn)i=1. Therefore

Li⁢(X)=ZH⁢(X)/(X−ωi)ZH′⁢(ωi)=(Xn−1)/(X−ωi)n/ωi=ωi⁢(Xn−1)n⁢(X−ωi),

as claimed. □

Remark 9.23 (Barycentric form).

The closed form renders the barycentric interpolation formula on H especially clean. Writing f⁢(X)=∑ivi⁢Li⁢(X) and substituting 9.22,

f⁢(X)=Xn−1n⁢∑i=0n−1ωi⁢viX−ωi.

Evaluating f at a point z∉H thus costs one evaluation of zn−1 and n terms of the sum, with no per-point polynomial reconstruction. A verifier can use this formula when the values vi are known, as for public-input polynomials; a commitment to hidden values does not by itself permit this evaluation.

Proposition 9.24 (Lagrange polynomials sum to one).

The Lagrange basis polynomials for H satisfy ∑i=0n−1Li⁢(X)=1 identically.

Proof.

The polynomial g⁢(X)=∑iLi⁢(X)−1 lies in 𝔽⁢[X]<n and vanishes at every ωj, because ∑iLi⁢(ωj)=∑iδi⁢j=1 (9.21). By the root-count device—a polynomial of degree <n with n distinct roots is zero (5.18)—g≡0. □

Example 9.25 (The all-ones value vector).

The constant polynomial 1 interpolates the data vi=1 for all i; 9.24 is the statement ∑i1⋅Li=1. Likewise the values of X on H are vi=ωi, and, for n≥2, 9.21 gives ∑iωi⁢Li⁢(X)=X: both sides have degree <n and agree on all of H, so the root-count device applies. We invoke these identities constantly when rewriting monomials in the Lagrange basis.

9.5 Evaluation and interpolation as mutually inverse linear maps

An element of 𝔽⁢[X]<n admits two natural descriptions: by its n coefficients, or by its n values on H. Both are coordinate systems on the same n-dimensional vector space, and passage between them is a linear isomorphism—the specialisation to H of the evaluation isomorphism met for general nodes in 5.32.

Definition 9.26 (Evaluation map).

The evaluation map on H is the 𝔽-linear map (8.18)

evH:𝔽⁢[X]<n⟶𝔽n,evH⁢(f)=(f⁢(ω0),f⁢(ω1),…,f⁢(ωn−1)).

Linearity is immediate from (a⁢f+b⁢g)⁢(ωi)=a⁢f⁢(ωi)+b⁢g⁢(ωi), an instance of 5.16.

Theorem 9.27 (Evaluation and interpolation are mutually inverse).

The evaluation map evH is a vector-space isomorphism. Its inverse is the interpolation map

intH:𝔽n⟶𝔽⁢[X]<n,intH⁢(v0,…,vn−1)=∑i=0n−1vi⁢Li⁢(X).

That is, intH∘evH=id𝔽⁢[X]<n and evH∘intH=id𝔽n.

Proof.

Both maps are linear and act between spaces of the same finite dimension n, so verifying one composition would suffice (a one-sided inverse makes evH injective, hence surjective by rank–nullity, 8.19); we check both for clarity. For v∈𝔽n, the polynomial intH⁢(v)=∑ivi⁢Li has value ∑ivi⁢Li⁢(ωj)=vj at ωj by 9.21, so evH⁢(intH⁢(v))=v. For f∈𝔽⁢[X]<n, the polynomial intH⁢(evH⁢(f))=∑if⁢(ωi)⁢Li is, by the uniqueness clause of 9.21, the unique degree-<n polynomial taking the values f⁢(ωi) on H—which is f itself. Hence the two maps are inverse; in particular evH is bijective and linear, i.e. an isomorphism (8.18). □

In coordinates, evH is given by a matrix, which we name here because it is the bridge to the Fourier transform. The notation is worth fixing once, since §8 did not need it: an n×n matrix over 𝔽 is a doubly indexed family A=(Ai⁢k)0≤i,k≤n−1 of elements of 𝔽, acting on a vector c∈𝔽n by (A⁢c)i=∑kAi⁢k⁢ck—the general form, written out through the standard basis (Example 8.15), of a linear map 𝔽n→𝔽n. The product of two matrices is defined so that (A⁢B)⁢c=A⁢(B⁢c), which forces (A⁢B)i⁢j=∑kAi⁢k⁢Bk⁢j; the identity matrix I, with entries δi⁢k, acts as the identity map; and A is invertible if some matrix A−1 satisfies A−1⁢A=A⁢A−1=I.

Definition 9.28 (Vandermonde / DFT matrix).

Let f⁢(X)=∑k=0n−1ck⁢Xk have coefficient vector c=(c0,…,cn−1). Then evH⁢(f) has i-th entry f⁢(ωi)=∑kck⁢ωi⁢k. Thus, relative to the monomial basis on 𝔽⁢[X]<n and the standard basis on 𝔽n, the Vandermonde matrix

V=(ωi⁢k)0≤i,k≤n−1=(111⋯11ωω2⋯ωn−11ω2ω4⋯ω2⁢(n−1)⋮⋮1ωn−1ω2⁢(n−1)⋯ω(n−1)2)

—rows indexed by the evaluation point ωi, columns by the power k—represents evH, so that evH⁢(f)=V⁢c. We call V the (discrete Fourier) transform matrix on H.

Theorem 9.29 (Invertibility and the inverse transform).

The matrix V of 9.28 is invertible, with

(V−1)k,i=1n⁢ω−i⁢k.

Equivalently, V−1=1n⁢V¯, where V¯=(ω−i⁢k)i,k is the transform matrix built from ω−1 (itself a primitive n-th root of unity). Consequently the coefficient and value representations are related by the mutually inverse formulas

ck=1n⁢∑i=0n−1f⁢(ωi)⁢ω−i⁢k,f⁢(ωi)=∑k=0n−1ck⁢ωi⁢k.
Proof.

First note that ω−1=ωn−1 has order n by Corollary 3.23 (with gcd⁡(n−1,n)=1), so V¯ is again a matrix of the shape in 9.28. We show V¯⁢V=n⁢I. The (k,k′) entry of V¯⁢V is

∑i=0n−1ω−i⁢k⁢ωi⁢k′=∑i=0n−1ωi⁢(k′−k).

By 9.16 this sum is n if n∣(k′−k) and 0 otherwise; for k,k′∈{0,…,n−1} we have n∣(k′−k)⇔k=k′. Hence V¯⁢V=n⁢I, and the same computation with the roles of the two factors exchanged gives V⁢V¯=n⁢I. Since n≠0 in 𝔽 (9.13), we may divide by n: V−1=1n⁢V¯. The component formulas write out the matrix identities evH⁢(f)=V⁢c and c=V−1⁢evH⁢(f). □

Remark 9.30.

9.27 and 9.29 are two faces of one statement. The abstract face: evaluation on H is an isomorphism whose inverse is Lagrange interpolation. The concrete face: that isomorphism is the matrix V, and its inverse is, up to the scalar 1/n, the same matrix with ω replaced by ω−1. The near-symmetry between a transform and its inverse—differing only by the substitution ω↦ω−1 and a scale 1/n—is the algebraic reason the fast inverse transform of 9.37 costs exactly as much as the forward one.

9.6 The number-theoretic transform and convolution

The map evH, read as the matrix V, is the discrete Fourier transform, but over a finite field rather than over ℂ. Because it involves no analytic structure—no complex exponentials, no convergence—it is called the number-theoretic transform.

Definition 9.31 (Number-theoretic transform).

Let ω be a primitive n-th root of unity in 𝔽. The number-theoretic transform (NTT) sends the coefficient vector of a polynomial to its value vector on H: it is the evaluation map evH written in coordinates. Explicitly, the NTT of a=(a0,…,an−1)∈𝔽n is a^=(a^0,…,a^n−1) with

a^j=∑k=0n−1ak⁢ωj⁢k,j=0,…,n−1,

each entry being the value at ωj of the polynomial with coefficients a. The inverse number-theoretic transform is interpolation—the recovery of the coefficients from the values—and by 9.29 it too is a single explicit sum:

ak=1n⁢∑j=0n−1a^j⁢ω−j⁢k.

The NTT enjoys the same convolution property as the classical DFT, and this is the mechanism underlying fast polynomial multiplication. Recall that the coefficients of a product are a convolution: with f=∑iai⁢Xi and g=∑jbj⁢Xj, the coefficient of Xk in f⁢g is ∑i+j=kai⁢bj (5.3). The cyclic variant folds indices modulo n: for a,b∈𝔽n, the cyclic convolution a∗b∈𝔽n has entries

(a∗b)k=∑0≤i,j≤n−1i+j≡k(modn)ai⁢bj,k=0,…,n−1.
Theorem 9.32 (Convolution theorem).

For f,g∈𝔽⁢[X]<n with deg⁡f+deg⁡g<n, let c=f⁢g be their product (of degree <n). Then for every h∈H,

c⁢(h)=f⁢(h)⁢g⁢(h),

i.e. pointwise multiplication of value vectors corresponds to polynomial multiplication. Equivalently, writing a,b∈𝔽n for the coefficient vectors of f,g (padded with zeros up to length n),

a∗b^j=a^j⁢b^j(j=0,…,n−1),

so the NTT turns convolution into entrywise multiplication.

Proof.

The first identity is the statement that evaluation at h is a ring homomorphism 𝔽⁢[X]→𝔽 (5.16): (f⁢g)⁢(h)=f⁢(h)⁢g⁢(h). Since deg⁡(f⁢g)<n, interpolation recovers the product c=f⁢g from its values on the n-point set H (9.21), so the entrywise product of the value vectors uniquely determines c.

For the convolution statement the plan is: (i) multiplication in 𝔽⁢[X]/(Xn−1) is cyclic convolution of coefficient vectors; (ii) evaluation on H is a ring isomorphism from that quotient onto 𝔽n with entrywise operations; (iii) the degree bound rules out wrap-around, so the cyclic product is the genuine one. For (i), work in the quotient ring 𝔽⁢[X]/(Xn−1) (4.19 and 4.20, applied to the ideal of multiples of Xn−1, 4.17). Every class has a unique representative of degree <n, by division with remainder (5.12); and multiplying two such representatives and reducing replaces each Xk with k≥n by Xk−n, since Xn≡1. The coefficient of Xk in the reduced product of the representatives with coefficient vectors a and b is therefore ∑i+j≡k⁢(mod⁢n)ai⁢bj=(a∗b)k: multiplication in 𝔽⁢[X]/(Xn−1) is cyclic convolution of coefficient vectors.

Now consider the map [p]↦evH⁢(p) from 𝔽⁢[X]/(Xn−1) to 𝔽n, where 𝔽n is a commutative ring under entrywise addition and multiplication (the ring laws hold in each coordinate because they hold in 𝔽), with multiplicative identity (1,…,1). The map is well defined: two representatives of a class differ by a multiple of Xn−1, which vanishes on H (9.13). It is a ring homomorphism (4.21), because evaluation at each point of H is one (5.16) and the operations on 𝔽n are entrywise. And it is bijective: classes correspond to their degree-<n representatives, on which evH is a bijection by 9.27. Hence it is a ring isomorphism 𝔽⁢[X]/(Xn−1)→∼𝔽n, and it sends the product of the classes of f and g—coefficient vector a∗b—to the entrywise product of a^ and b^. This is the displayed identity. Finally, when deg⁡f+deg⁡g<n, the genuine product f⁢g already has degree <n, so no folding occurs, the cyclic and ordinary products coincide, and the statement computes f⁢g itself. □

Remark 9.33 (Computational significance).

9.32 reduces multiplying two degree-<n/2 polynomials—a quadratic-cost operation by the schoolbook method—to: transform both (NTT), multiply the value vectors entrywise (n multiplications), and transform back (inverse NTT). If the NTT runs in O⁢(n⁢log⁡n) operations, the whole multiplication costs O⁢(n⁢log⁡n). The fast Fourier transform supplies that conditional.

Example 9.34 (The convolution theorem in 𝔽17).

In 𝔽17, the element ω=4 has ω2=16=−1, so it is a primitive 4-th root of unity with domain H={1,4,16,13}. To multiply f=1+2⁢X and g=3+X, pad both coefficient vectors to length 4 and transform: a^=(3,9,16,10) and b^=(4,7,2,16), the values of f and of g on H. Multiplying entrywise gives (12,12,15,7), the values of f⁢g on H, and the inverse transform returns (3,7,2,0): the coefficients of f⁢g=3+7⁢X+2⁢X2, agreeing with the schoolbook product. At n=4 nothing is saved; the point is the shape of the pipeline, which becomes decisive once the transforms themselves cost O⁢(n⁢log⁡n) (§9.7).

9.7 The fast Fourier transform

Computing a^=V⁢a directly from 9.28 costs Θ⁢(n2) field multiplications: each of the n outputs is a sum of n products. The fast Fourier transform (FFT)—here a number-theoretic FFT—computes the same vector in O⁢(n⁢log⁡n) operations by a divide-and-conquer recursion, provided n is a power of two (or, more generally, smooth). This is where the requirement that H have smooth order, 9.10, becomes indispensable.

Theorem 9.35 (Cooley–Tukey radix-2 step).

Suppose n=2⁢m and ω is a primitive n-th root of unity in 𝔽. Given f⁢(X)=∑k=0n−1ak⁢Xk, split its coefficients by parity into

feven⁢(Y)=∑k=0m−1a2⁢k⁢Yk,fodd⁢(Y)=∑k=0m−1a2⁢k+1⁢Yk,

so that f⁢(X)=feven⁢(X2)+X⁢fodd⁢(X2). Then η:=ω2 is a primitive m-th root of unity, and for j=0,…,m−1,

f⁢(ωj) =feven⁢(ηj)+ωj⁢fodd⁢(ηj), (7)
f⁢(ωj+m) =feven⁢(ηj)−ωj⁢fodd⁢(ηj). (8)

Thus the length-n NTT of a reduces to two length-m NTTs (of the even and odd coefficient subsequences, over the domain ⟨η⟩) plus O⁢(n) extra operations.

Proof.

The identity f⁢(X)=feven⁢(X2)+X⁢fodd⁢(X2) regroups the sum ∑kak⁢Xk into even-index and odd-index terms; in the odd terms one factor of X is pulled out, leaving powers X2⁢k. That η=ω2 is a primitive m-th root of unity follows from 9.5 and the order-of-a-power formula (Corollary 3.23): ord⁡(ω2)=n/gcd⁡(2,n)=n/2=m, using 2∣n.

It remains to evaluate. For (7), put X=ωj; then X2=ω2⁢j=ηj, so f⁢(ωj)=feven⁢(ηj)+ωj⁢fodd⁢(ηj). For (8), put X=ωj+m; then X2=ω2⁢j+2⁢m=ω2⁢j⁢ωn=ηj⋅1=ηj (since 2⁢m=n and ωn=1), while the linear factor is ωj+m=ωj⁢ωm=−ωj. Here ωm=−1, because ωm has order n/gcd⁡(m,n)=n/m=2 (Corollary 3.23), and −1 is the unique element of order 2 in a field: x2=1 with x≠1 forces (x−1)⁢(x+1)=0 and so x=−1; and −1≠1, since char⁡𝔽∤n (9.13) with n even forces char⁡𝔽≠2. Substituting, f⁢(ωj+m)=feven⁢(ηj)−ωj⁢fodd⁢(ηj). □

The half-domain trick just used—ωm=−1 whenever n=2⁢m, so the second half of the outputs differs from the first only by a sign on the odd part—recurs in every radix-2 argument over an evaluation domain; it is worth remembering alongside the theorem.

Remark 9.36 (The butterfly).

Equations (7)–(8) constitute the butterfly: from the two subtransform outputs Ej=feven⁢(ηj) and Oj=fodd⁢(ηj) one forms the twiddle tj=ωj⁢Oj and reads off the two outputs Ej+tj and Ej−tj. Pictorially, Ej and Oj sit as two nodes on the left; each is carried to both outputs on the right, the two Ej-edges with weight 1 and the two Oj-edges with weights +ωj and −ωj; the pair of crossing edges forms the × that names the operation. Each butterfly costs one multiplication (the twiddle) and two additions, and there are n/2 of them per level.

Theorem 9.37 (O⁢(n⁢log⁡n) cost of the FFT).

Let n=2t and let T⁢(n) be the number of field additions and multiplications the radix-2 recursion of 9.35 uses to compute a length-n NTT. Then

T⁢(n)=2⁢T⁢(n/2)+c⁢n(n>1),T⁢(1)=O⁢(1),

for a constant c, and therefore T⁢(n)=O⁢(n⁢log⁡n). The inverse NTT has the same cost, since it is the forward NTT with ω replaced by ω−1, followed by scaling each entry by 1/n (9.29).

Proof.

The recursion is exactly 9.35: a length-n transform calls two length-n/2 transforms (on the even and odd coefficient subsequences) and combines them with n/2 butterflies of O⁢(1) operations each, for the c⁢n overhead. Unrolling, with n=2t,

T⁢(2t)=2⁢T⁢(2t−1)+c⁢ 2t.

Divide by 2t and set S⁢(t)=T⁢(2t)/2t: then S⁢(t)=S⁢(t−1)+c, so S⁢(t)=S⁢(0)+c⁢t=O⁢(1)+c⁢t, and T⁢(2t)=2t⁢S⁢(t)=O⁢(2t)+c⁢t⁢ 2t=O⁢(t⁢ 2t). With t=log2⁡n this is T⁢(n)=O⁢(n⁢log⁡n). (Equivalently: the recursion tree has log2⁡n levels, each performing Θ⁢(n) total work across all subproblems at that level.) The inverse-transform claim is 9.29: the inverse is the same Cooley–Tukey recursion with ω−1 in place of ω (also a primitive n-th root of unity), plus a final pass of n divisions by n, all within O⁢(n⁢log⁡n). □

Remark 9.38 (Mixed radix and smoothness).

The hypothesis that enables fast transforms is that n be smooth—a product of small primes—and, crucially, that the field actually contain a primitive n-th root of unity, i.e. n∣q−1 (9.7). A power-of-two n dividing q−1 is the optimal case: pure radix-2 with the cleanest butterfly.

Example 9.39 (A length-4 transform).

Take n=4 with primitive 4-th root ω (so ω2=−1 and ω4=1, and η=ω2=−1 is the primitive 2nd root). For f=a0+a1⁢X+a2⁢X2+a3⁢X3, the two length-2 subtransforms over the domain {1,−1}—each itself a single butterfly, with twiddle η0=1—are

E=(a0+a2,a0−a2),O=(a1+a3,a1−a3),

and the butterflies give

a^0=E0+ω0⁢O0,a^2=E0−ω0⁢O0,a^1=E1+ω1⁢O1,a^3=E1−ω1⁢O1.

(Note the output indexing: outputs j and j+m pair up, per (7)–(8).) This uses 2 subtransforms of 2 additions each plus 2 butterflies of 2 additions each (n/2=2 per level, 9.36)—together 2 twiddle multiplications and 8 additions—versus 16 coefficient-products and 12 additions for the direct 4×4 matrix multiply; and the gap widens as n grows.

Refer to caption
Figure 2: The length-4 transform of 9.39 as a circuit. The inputs split by parity into two length-2 subtransforms, whose outputs E0,E1 and O0,O1 feed the two butterflies of 9.36: each Ej is carried to outputs a^j and a^j+2 with weight 1, each Oj with weights +ωj and −ωj (7–8); the crossing pair of weighted edges is the × that names the butterfly.

9.8 The role of smooth multiplicative domains in polynomial proof systems

This section closes by assembling the pieces into the reason these domains form the substrate of Halo 2 and Orchard. A proof system of the polynomial type encodes a computation as a system of polynomial identities and convinces a verifier that those identities hold. The evaluation domain H=μn is where the encoding lives—the n-step table of the section’s opening is laid out on the n points of H—and every property proved above is load-bearing.

Remark 9.40 (The roles played by H, ZH, the Lagrange basis, and the FFT).
  • •

    Witnesses as evaluations on H. A prover lays out the trace of a computation as the values of one or more polynomials on the n points of H. By 9.27 this is the same data as a polynomial of degree <n; the prover may move freely between the value (Lagrange) representation, natural for stating constraints row by row, and the coefficient representation, natural for committing and for low-degree testing. The change of representation is the (inverse) NTT.

  • •

    Constraints as divisibility by ZH. “Constraint polynomial C holds on every row” means C vanishes on all of H, which by 9.13 means exactly that ZH=Xn−1 divides C. The prover demonstrates this by exhibiting a quotient t with C⁢(X)=t⁢(X)⁢(Xn−1). The inexpensive closed form ZH⁢(X)=Xn−1—one exponentiation to evaluate—is what makes this check cheap at a random point. 9.14 extends the same technique to cosets γ⁢H, used to separate quotient and remainder domains.

  • •

    Lagrange selectors. The Lagrange polynomials Li of 9.20 are selectors: Li is 1 on row i and 0 elsewhere (9.21), so boundary and instance constraints (e.g. “the first row equals the public input”) become L0⋅(…). The closed form and the barycentric formula (9.22, 9.23) let the verifier evaluate these at a random challenge in O⁢(n) or even O⁢(log⁡n) field operations rather than reconstructing polynomials.

  • •

    Group structure for permutations and shifts. Because H is a cyclic group (9.11), multiplication by ω is the cyclic “next-row” shift ωi↦ωi+1. Constraints relating a row to its neighbour become f⁢(ω⁢X) versus f⁢(X); permutation arguments—the heart of Halo 2’s copy constraints—rest on the action of the group on itself and on its cosets. An arbitrary set of n points offers none of this.

  • •

    Smoothness for speed. Provers manipulate polynomials of size n (often after blowing the domain up by a small constant factor for low-degree testing). Every transform between representations, every multiplication, every coset evaluation is an NTT. By 9.37 these cost O⁢(n⁢log⁡n) instead of O⁢(n2)—the difference between feasible and infeasible at the sizes used in practice—provided n is smooth and 𝔽q contains a primitive n-th root of unity. By 9.7 that requires n∣q−1; by 9.10 this is why high-two-adicity primes are chosen for the scalar fields of the Pallas and Vesta curves (10).

In summary: the existence condition n∣q−1 (9.7) supplies the group H; the group supplies the clean vanishing polynomial (9.13), the closed-form Lagrange basis (9.22), and the evaluation/interpolation isomorphism (9.27); and smoothness of n supplies the O⁢(n⁢log⁡n) FFT (9.37). Together these discharge both demands of the section’s opening—a structured point set on which an execution trace can live, and O⁢(n⁢log⁡n) multiplication and interpolation on it—and they are exactly the ingredients a polynomial proof system requires, which is why such systems rest on smooth multiplicative evaluation domains and on the fields that contain them.