Proofs of Correctness for CPolynomial Operations, wrt Mathlib Specs #
Proofs that operations defined on CPolynomial and CPolynomial.Raw are correct wrt the mathlib specs, using the ring equivalence
CPolynomial.monomial is correct wrt the Mathlib spec.
CPolynomial.C is correct wrt the Mathlib spec.
CPolynomial.X is correct wrt the Mathlib spec.
CPolynomial.eval is correct wrt the Mathlib spec.
CPolynomial.eval₂ is correct wrt the Mathlib spec.
Evaluation at zero returns the constant coefficient.
CPolynomial.leadingCoeff is correct wrt the Mathlib spec.
CPolynomial.erase is correct wrt the Mathlib spec.
CPolynomial.C r mul CPolynomial.X ^ n is correct wrt the Mathlib spec.
CPolynomial.lcoeff is correct wrt the Mathlib spec.
CPolynomial.degreeLE is correct wrt the Mathlib spec.
CPolynomial.degreeLT is correct wrt the Mathlib spec.
Evaluation preserves multiplication.
Univariate eval-extensionality (degree-bounded). Two CPolynomials
over an integral domain that agree on more than $d$ points of a Finset S are
equal, when $d$ bounds the natural degree of their difference.
The degree bound is needed over finite fields, where two distinct polynomials may agree on every field element.
Evaluation of the constant one computable polynomial.
Reducing by a polynomial that vanishes at x preserves evaluation at x.