Polynomials over (ℤ / 2 ^ p)[U] / (f) and Lagrange interpolation, on coefficient lists #
Polynomials in z over the coefficient ring A_p = (ℤ / 2 ^ p)[U] / (f) of
CslibFrontier/Computability/PolyTime/GaloisRingArithmetic.lean are lists of coefficients,
constant first, each a coefficient list of A_p (GaloisRingArith.pval).
- Addition (
GaloisRingArith.padd), scaling (GaloisRingArith.psmul) and multiplication byz - v(GaloisRingArith.pmulLinear). - Evaluation (
GaloisRingArith.peval) by Horner's rule. - Lagrange interpolation (
GaloisRingArith.interp) at nodesv₀, …, v_{n-1}: the sum ofy_i (∏_{j ≠ i} (v_i - v_j))⁻¹ ∏_{j ≠ i} (z - v_j), with the inverses ofGaloisRingArith.inv. When those inverses are correct, for instance at nodes with unit differences in a Galois ring, the result takes the valuey_iatv_i(GaloisRingArith.eval_pval_interp). The polynomial of the result is that sum with the computed inverses (GaloisRingArith.pval_interp), so it has degree belown. It has at mostn + 1coefficients, as each basis numerator does (GaloisRingArith.length_basisNum_le). At nodes with unit differences, a polynomial of degree belownis determined by its values there (Lagrange.eq_ringInterpolate).
Every operation is polynomial-time, with the precision in unary
(GaloisRingArith.computableInPolyTime_interp and the rules before it).
This is the interpolation step of the contraction algorithm of [OAI26k]
(Appendix D.4.4, p. 61), which recovers F (t + α z) modulo 2 ^ p_t from its values at
M (2 L - 1) + 1 binary-coordinate lifts.
Main definitions #
Cslib.GaloisRingArith.pval: the polynomial of a list of coefficient lists.Cslib.GaloisRingArith.padd,Cslib.GaloisRingArith.psmul,Cslib.GaloisRingArith.pmulLinear,Cslib.GaloisRingArith.peval: polynomial arithmetic.Cslib.GaloisRingArith.interp: Lagrange interpolation.Cslib.GaloisRingArith.encPoly,Cslib.GaloisRingArith.encElems: the encodings of polynomials and of lists of elements ofA_p, as lists of coefficient lists with entries in binary.
Main results #
Cslib.GaloisRingArith.pval_padd,Cslib.GaloisRingArith.pval_psmul,Cslib.GaloisRingArith.pval_pmulLinear,Cslib.GaloisRingArith.peval_eq: correctness.Cslib.GaloisRingArith.eval_pval_interp: interpolation takes the given values.
References #
- OpenAI, The Exponential Time Hypothesis is False, Appendix D.4.4 (p. 61).
The polynomial ∑ k, P_k z ^ k over A_p of a list of coefficient lists.
Lagrange interpolation #
Interpolation is the Lagrange formula, with the computed inverses of the denominators.
Interpolation takes the given values at the nodes, given correct inverses of the denominators.
Sizes #
Polynomials in z over A_p as lists of coefficients, constant first, each coefficient its
coefficient list with entries in binary: the concatenation of the framed coefficients, each the
concatenation of its framed entries, each encoded by encNat.
Lists of elements of A_p, such as interpolation nodes or values, each element its coefficient
list with entries in binary: the concatenation of the framed elements, each the concatenation of
its framed entries, each encoded by encNat. This is the layout of encPoly; the name records the
role.
Polynomial time #
Addition of polynomials is polynomial-time, with the precision in unary.
Scaling a polynomial is polynomial-time, with the precision in unary.
Multiplication by z - v is polynomial-time, with the precision in unary.
The bound n (2 e (2 (p + 1) + 1) + 1) of length_encPoly_le, on the encoding of at most n
small coefficient lists, is polynomially bounded when n is.
Evaluation is polynomial-time, with the precision in unary.
Lagrange numerators are polynomial-time, with the precision and the index in unary.
Lagrange denominators are polynomial-time, with the precision and the index in unary.
Lagrange interpolation is polynomial-time, with the precision in unary and the nodes and values as lists of coefficient lists.