Documentation

CslibFrontier.Computability.Circuit.Arithmetic.FormulaInterpolation

Interpolation of arithmetic formulas of unbounded fan-in #

Over a field of characteristic zero, a coefficient of a polynomial of degree at most r in one variable is a fixed linear combination of its values at the nodes 0, 1, …, r (Lagrange.coeff_eq_sum_coeff_basis_smul_eval). For a formula Cslib.Circuits.Arithmetic.SPFormula, a value at a node is a substitution of a constant, or of a multiple of an input, for an input, which changes neither the product-depth nor the shape of the formula, and the linear combination is one sum gate on top. So the coefficients of a formula in one of its variables, and its homogeneous components, have formulas of the same product-depth and of r + 1 times the size [ChouKumarSolomon2019, Lemmas 4.10 and 4.11].

The explicit size bounds, with the nodes 0, 1, …, r, are original.

Main definitions #

Main results #

References #

A coefficient in the last variable #

noncomputable def Cslib.Circuits.Arithmetic.SPFormula.coeffLast {K : Type u_1} [Field K] {n : ℕ} (i r : ℕ) (F : SPFormula K (n + 1)) :

The coefficient of y ^ i of a formula of degree at most r in its last variable y: the linear combination, with the coefficients of degree i of the Lagrange basis polynomials at the nodes 0, 1, …, r, of the formulas F with the constant j substituted for y.

theorem Cslib.Circuits.Arithmetic.SPFormula.polynomial_coeffLast {K : Type u_1} [Field K] {n : ℕ} [CharZero K] {F : SPFormula K (n + 1)} {P : Polynomial (MvPolynomial (Fin n) K)} (hP : ∀ (α : K), (MvPolynomial.aeval fun (i : Fin (n + 1)) => Fin.lastCases (MvPolynomial.C α) MvPolynomial.X i) F.polynomial = Polynomial.eval (MvPolynomial.C α) P) {r : ℕ} (hr : P.natDegree ≤ r) (i : ℕ) :

coeffLast i r F computes the coefficient of degree i in the last variable [ChouKumarSolomon2019, Lemma 4.11]: if P, a polynomial in one variable of degree at most r over the polynomials in the other variables, takes at every constant α the value of the polynomial of F with α substituted for its last variable, then coeffLast i r F computes P.coeff i.

Taking a coefficient in the last variable does not increase the product-depth.

The formula of a coefficient in the last variable has at most (r + 1) * F.nodeCount + 1 nodes: r + 1 copies of F and a sum gate.

The homogeneous components of low degree #

noncomputable def Cslib.Circuits.Arithmetic.SPFormula.lowPartFormula {K : Type u_1} [Field K] {n : ℕ} (d r : ℕ) (F : SPFormula K n) :

The sum of the homogeneous components of degree at most d of a formula of total degree at most r: the linear combination of the formulas F with every input scaled by the node j, for the nodes 0, 1, …, r, that extracts the coefficients of degree at most d in the scaling parameter.

lowPartFormula d r F computes the homogeneous components of degree at most d [ChouKumarSolomon2019, Lemma 4.11] of the polynomial of a formula F of total degree at most r.

Taking the homogeneous components of low degree does not increase the product-depth.

The formula of the homogeneous components of low degree has at most (r + 1) * (3 * F.nodeCount) + 1 nodes: r + 1 copies of F with every input replaced by the three nodes of a scaled input, and a sum gate.