The bit-size of a natural number n, defined as ⌊log₂ n⌋ + 1. This is the
number of bits in the standard binary representation and serves as the cost
parameter n = lg q used throughout Sutherland's complexity analyses.
Instances For
Bit-operation cost of addition/subtraction in 𝔽_p: linear in the bit-size
of p. The constant 3 is a small fixed overhead for carry propagation.
Instances For
Bit-operation cost of addition in 𝔽_q = 𝔽_{p^d}: d independent additions
in 𝔽_p, one per coefficient of the polynomial-basis representation.
Instances For
The cost of adding in 𝔽_q is the sum of the per-coordinate costs in 𝔽_p,
i.e. ∑_{i < d} fpAddBitOps p = fqAddBitOps p d.
Definitional unfolding of fqAddBitOps: fqAddBitOps p d = d · (3 · (⌊log₂ p⌋ + 1)).
Linear-in-bitSize (p^d) bound on the cost of addition in 𝔽_q:
fqAddBitOps p d ≤ 6 · bitSize(p^d). This is the key inequality behind
Theorem 3.24.
Bit-operation cost of subtraction in 𝔽_q: identical to addition.
Instances For
Linear bound for subtraction in 𝔽_q, mirroring fq_add_bitOps_linear.
Theorem 3.24 (formal statement): addition in 𝔽_q runs in O(n) bit
operations where n = lg q. Existence of a universal constant C (here C = 6)
such that fqAddBitOps p d ≤ C · bitSize(p^d) for all primes p and all d.
The cyclic convolution (f * g) mod (X^n − 1). Used as the polynomial-level
operation diagonalised by the DFT in Theorem 3.29.
Instances For
Definitional simp lemma: cyclicConv n f g = (f · g) mod (X^n − 1).
If a is a root of the monic divisor m, then evaluating (p mod m) at a
is the same as evaluating p at a. Used to identify DFT of a cyclic
convolution with the pointwise product.
Theorem 3.29: when ω^n = 1, the DFT diagonalises cyclic convolution, i.e.
DFT_ω(f * g mod X^n − 1) = DFT_ω(f) · DFT_ω(g) pointwise.
The "first half" of a polynomial f: the truncation ∑_{j < m} c_j X^j of
f to degree < m.
Instances For
The "second half" of a polynomial f: the coefficient sequence
(f_m, f_{m+1}, …, f_{2m−1}) repackaged as a degree-< m polynomial.
Instances For
The twisted-difference polynomial s_f(ω, m) := ∑_{j < m} (f_j − f_{m+j}) ω^j X^j
that appears in the recursive FFT identity for odd-indexed DFT values.
Instances For
If ω is a primitive 2^(n+1)-th root of unity, then ω² is a primitive
2^n-th root of unity. Drives the recursion of the FFT.
Evaluation rule for the twisted-difference polynomial:
(fftTwistedDiff ω m f)(x) = ((firstHalf − secondHalf))(ω · x).
Splitting identity: if deg f < 2m, then f(x) = firstHalf(x) + x^m · secondHalf(x).
Even-index FFT identity: under ω^(2m) = 1 and deg f < 2m, the value
f(ω^{2i}) equals (firstHalf + secondHalf)((ω²)^i).
Theorem 3.30 (correctness of the FFT): if ω is a primitive 2^n-th root of
unity and deg f < 2^n, then fft ω n f equals DFT_ω(f) on all of Fin (2^n).
Operation count 5 · 2^k · k for one radix-2 FFT of size 2^k (Theorem 3.30).
Instances For
Operation count n for pointwise multiplication of two n-vectors.
Instances For
Operation count n for computing n consecutive powers of an element.
Instances For
Operation count 2n for scalar multiplication of an n-vector.
Instances For
Total operation count for FFT-based polynomial multiplication at size 2^k:
three FFTs plus pointwise multiplication, twiddle-power generation, and scalar
multiplications. This is the operation budget behind Corollary 3.31.
Instances For
Quantitative form of Corollary 3.31: the FFT polynomial-multiplication cost
at size 2^k is bounded by 20 · 2^k · (k+1) = O(n log n).
If deg(f · g) < n, then the cyclic convolution (f · g) mod (X^n − 1) is
just f · g. This is the soundness step letting one recover the full product
from a single cyclic convolution by padding the input length.
Corollary 3.31 (full statement): over a commutative ring R containing a
primitive 2^(k+1)-th root of unity ω with 2 invertible, two polynomials of
degree < 2^k can be multiplied as a cyclic convolution, the DFT diagonalises
the multiplication, 2^(k+1) is invertible (needed for the inverse FFT), and the
total cost is O(n log n) = 20 · 2^(k+1) · (k+2).
Schoolbook (quadratic) integer-multiplication cost: M(n) = n².
Instances For
Master-recurrence bound for the half-GCD cost: for monotone multiplication
cost M, there is a constant C such that halfGcdCost M n ≤ C · M(n) · (log₂ n + 1).
Theorem 3.40: inversion in 𝔽_p^× takes O(M(n) · log n) bit operations
where n = lg p. Formalised as existence of a constant C with the asymptotic
bound for every prime p.
The size-restriction hypothesis log₂ e = O(log₂ p) used in Theorems 3.35
and 3.41, controlling how large the extension degree e can be relative to the
base prime.
Instances For
Cost model for inversion in 𝔽_q = 𝔽_{p^e}: the Kronecker substitution
converts polynomial inversion into integer inversion of bit-width
e · (bitSize p + bitSize e), then a half-GCD-based integer inversion gives the
final O(M(n) log n) bound.
Instances For
Under the hypothesis LogEBoundedByLogP K p e, the Kronecker bit-width
e · (bitSize p + bitSize e) used in fqInvCost is bounded by
(2K + 5) · bitSize(p^e), i.e. linear in n = lg q.
Theorem 3.41: assuming log e = O(log p) and an M-regular multiplication
cost, inversion in 𝔽_q^× runs in O(M(n) log n) = O(n log² n) bit operations
where n = lg q.
Cost model for multiplication in 𝔽_q = 𝔽_{p^e} via Kronecker substitution:
one integer multiplication of bit-width kroneckerBitWidth p e, plus a coefficient
extraction step costing kroneckerBitWidth p e bit operations.
Instances For
Under LogEBoundedByLogP K p e, the Kronecker bit-width
e · (2 bitSize p + bitSize e) is bounded linearly by (2K + 5) · bitSize(p^e).
Theorem 3.35: multiplication in 𝔽_q runs in O(M(n)) = O(n log n) bit
operations, where n = lg q, under the size hypothesis log e = O(log p) and a
regular integer-multiplication cost model.
Invariant for longDivAux: the running remainder stays strictly less than
the modulus b throughout the bit-by-bit iteration.
Correctness invariant for longDivAux: after processing bits k, k−1, …, 0,
the quotient/remainder pair (q', r') satisfies
q'·b + r' = q·b·2^(k+1) + r·2^(k+1) + (a mod 2^(k+1)).
Bit-operation cost model for long division of an m-bit integer by an
n-bit integer: 3 · m · n.
Instances For
Theorem 3.38: long division uses O(mn) bit operations to divide an m-bit
integer by an n-bit integer, witnessed by the explicit constant C = 3.
The "different type" predicate from Theorem 3.44 (Rabin 1980): two nonzero
elements a, b ∈ 𝔽_q (with char ≠ 2) have different type when their
(q−1)/2-th powers disagree, i.e. one is a square and the other is not. Used in
the root-finding Algorithm 3.45.
Instances For
Decidability of AreDifferentType: each of the three conditions
(a ≠ 0, b ≠ 0, distinct (q−1)/2-th powers) is decidable in a finite field.
Squarefree factorization data (Algorithm 3.46): a polynomial f is given a
squarefree factorization as f = ∏_{i < m} g_i^{i+1} where the g_i are
pairwise coprime squarefree polynomials, m > 0, and the top exponent factor
g_{m-1} is not the constant 1.
- squarefree (i : Fin m) : Squarefree (gs i)
Instances For
Over a perfect field, an irreducible polynomial g satisfies g² ∣ f iff
both g ∣ f and g ∣ f'. The characterization used in Yun's algorithm to
detect squares.
Refined form of the previous lemma: g² ∣ f iff g divides gcd(f, f').
This is the divisibility used directly in Yun's algorithm to peel off the
squarefree part.
Loop state for Yun's algorithm (Algorithm 3.46): the running pair (v_i, w_i)
of polynomials whose GCD with the derivative-difference yields the next factor g_i.
- v : Polynomial k
- w : Polynomial k
Instances For
One iteration of Yun's algorithm: from state (v, w), compute
g = gcd(v, w − v'), then advance to the new state (v/g, (w − v')/g).
Instances For
Initialization of Yun's algorithm: from input f, divide out u = gcd(f, f')
to set v_1 = f/u and w_1 = f'/u.
Instances For
Iterate Yun's algorithm for a bounded number of steps n, collecting the
factor sequence g_1, g_2, …. Stops early when the current v_i equals the
computed g_i.
Instances For
Top-level Yun's algorithm (Algorithm 3.46): start from f, initialize, and
iterate for at most fuel steps, returning the list of squarefree factors
g_1, g_2, …, g_m.
Instances For
simp lemma: the initial v in Yun's algorithm is f / gcd(f, f').
simp lemma: the initial w in Yun's algorithm is f' / gcd(f, f').
Correctness of Yun's algorithm (Algorithm 3.46): for a monic polynomial f
over a perfect field with deg f < char k (or char = 0), there exist a positive
m and pairwise coprime squarefree polynomials g_0, …, g_{m-1} such that
f = ∏_{i} g_i^{i+1}.
The polynomial X^{q^j} - X over a finite field k of cardinality q.
Its roots are exactly the elements of the unique subfield 𝔽_{q^j} ⊆ k̄, so its
factorization isolates irreducibles of degree dividing j. Used in
Algorithm 3.47 / Algorithm 3.46 for distinct-degree factorization.
Instances For
Definitional simp lemma for xPowCardPowSubX.
If an irreducible polynomial g divides X^{q^j} − X, then its degree
divides j. This is the key fact behind distinct-degree factorization: roots of
X^{q^j} − X lie in 𝔽_{q^j}, whose irreducible factors over 𝔽_q have degrees
dividing j.
One step of distinct-degree factorization: from f, compute
g = gcd(f, X^{q^j} − X) (the product of degree-j irreducible factors of f)
and the new remaining polynomial f / g.
Instances For
simp lemma: the first component of distinctDegreeStep is gcd(f, X^{q^j} − X).
simp lemma: the second component of distinctDegreeStep is the quotient
f / gcd(f, X^{q^j} − X).
State for the distinct-degree factorization loop: the polynomial still left
to factor and the list of degree-j partial products accumulated so far.
- remaining : Polynomial k
- factors : List (Polynomial k)
Instances For
A single iteration of the distinct-degree factorization loop: extract the
product of degree-j irreducible factors of the current remaining, and append
it to the factor list.
Instances For
Iterate distinct-degree factorization for j = 1, 2, …, n, starting from f.
Instances For
Top-level distinct-degree factorization (step 2 of Algorithm 3.47): for input
f, run the loop up to degree deg f and return the list of degree-j factors.
Instances For
Distinct-degree factorization specification (step 2 of Algorithm 3.47):
f factors as ∏ h_j where each h_j is a (possibly trivial) squarefree
product of irreducibles all of degree j+1, and the h_j are pairwise coprime.
Instances For
Correctness of distinct-degree factorization (step 2 of Algorithm 3.47): for
any monic squarefree polynomial f over a finite field, there exist d and
factors h_0, …, h_{d-1} with the IsDistinctDegreeFactorization property.