Documentation

CslibFrontier.Foundations.Algebra.Polynomial.BivariateKronecker

Recovering bivariate coefficients after Kronecker substitution #

Substituting X ^ radix for the outer variable packs the two indices into one exponent. If the inner degree is strictly below radix, the coefficient at i + radix * j recovers the coefficient at inner degree i and outer degree j. This adapts LeanCanny.Algebra.PolynomialKronecker.coefficient from lean-canny at 970f28a5ecefc1327402ade16c068aa4b1b2c183 using the ordinary polynomial evaluation API.

theorem Polynomial.Bivariate.coeff_eval_X_pow {R : Type u_1} [CommSemiring R] (p : Polynomial (Polynomial R)) {radix : ℕ} (hdegree : (swap p).natDegree < radix) (i j : ℕ) (hi : i < radix) :
(eval (X ^ radix) p).coeff (i + radix * j) = (p.coeff j).coeff i

Kronecker substitution recovers the original coefficient at inner index i and outer index j when both i and the inner degree are strictly below the radix.

The packed degree is at most the inner degree plus the radix times the outer degree.

theorem Polynomial.Bivariate.aeval_eval_X_pow {R : Type u_1} {A : Type u_2} [CommSemiring R] [CommSemiring A] [Algebra R A] (p : Polynomial (Polynomial R)) (radix : ℕ) (z : A) :
(aeval z) (eval (X ^ radix) p) = (aevalAeval z (z ^ radix)) p

Evaluating the packed polynomial at z evaluates the bivariate polynomial at z and z ^ radix.