Documentation

CslibFrontier.Computability.Complexity.RealAlgebraic.UnivariateDerivativeEvaluation

Modular evaluation of binary-order univariate derivatives #

One bounded counting sum visits addressed coefficients. The algorithm takes the degree bound and derivative order in binary and uses modular descending factorials for the derivative weights.

Adapted from DerivativeEvaluation in lean-canny at 970f28a5ecefc1327402ade16c068aa4b1b2c183 for the sparse root-label tests.

The evaluation residue obtained from the addressed coefficients of the original polynomial.

theorem Cslib.Complexity.RealAlgebraic.univariateDerivativeResidue_cast {p D k z : ℕ} [Fact (Nat.Prime p)] (q : Polynomial (ZMod p)) (hq : q.natDegree ≤ D) (hD : D < p) (c : ℕ → ℕ) (hc : ∀ i ≤ D, ↑(c i) = q.coeff i) :

Correctness includes orders beyond the degree of the polynomial. Only addressed coefficients up to the supplied degree bound need to be correct.