Substituting bivariate coordinates into indexed formula gates #
This adapts the per-gate polynomial in LeanCanny.ETR.FormulaAtomPolynomials.family
at lean-canny revision 970f28a5ecefc1327402ade16c068aa4b1b2c183 to the frontier term
source. Evaluating both variables recovers the original term evaluated at the specialized
coordinates. The term budget bounds both degrees of the substituted polynomial and the growth
of its coefficient norm. With a radix above the inner degree bound, Kronecker substitution
recovers a bivariate coefficient by reading one univariate coefficient. The executable gate
query evaluates the substituted polynomial modulo a positive modulus when supplied the
specialized coordinate values.
Substitute integer bivariate coordinate polynomials for the variables of an indexed gate term. The coefficient variable is the first variable and the outer variable is the second.
Evaluating the substituted polynomial at a real pair gives the gate term evaluated at the corresponding real coordinates.
Substitution bounds the degree in each variable by the corresponding coordinate degree times the formula's gate-term budget. Swapping the variables exposes the coefficient variable as the outer variable.
The formula's gate-term budget bounds the coefficient norm after substitution, uniformly
over gate indices. Each coordinate must have bivariate coefficient norm at most M ≥ 1.
A radix larger than the gate-term budget times the coordinate inner degree bound
lets a univariate substitution recover the gate's coefficient at inner index i
and outer index j, for i < radix. This is the polynomial identity used by
LeanCanny.ETR.BivariateTermReader.coefficient_eq at the revision above.
The encoded gate query computes the canonical residue of bivariate specialization
from coordinate values in the supplied list. Missing entries have value zero.
This is the evaluation step for the indexed family in
LeanCanny.ETR.FormulaAtomPolynomials.family at the revision above.