Reduced Horner updates preserve evaluation at a modulus root
ProvedPvsNP.horner_remainders_preserve_evalfinite-fieldsformal-verificationpolynomials
Suppose two initial polynomials agree at a point where a given modulus vanishes. After the same Horner digit sequence, reducing one accumulator after each update preserves equality of the final evaluations.
Preamble
import Mathlib open Polynomial
Formal statement
theorem PvsNP.horner_remainders_preserve_eval {R F : Type*} [CommRing R] [CommRing F]
(embed : R →+* F) (x : F) (modulus : R[X])
(vanishes : modulus.eval₂ embed x = 0)
(digits : List R) (left right : R[X])
(same : left.eval₂ embed x = right.eval₂ embed x) :
(digits.foldl (fun acc bit => (X * acc + C bit) %ₘ modulus) left).eval₂ embed x =
(digits.foldl (fun acc bit => X * acc + C bit) right).eval₂ embed x := by sorrySource
Conditional one-head signature clock for dense binary geometric rows.