Computable Univariate To Polynomial #
Conversions between computable univariate polynomials and mathlib Polynomial.
Convert a mathlib Polynomial to a CPolynomial.Raw by extracting coefficients
up to the degree.
Equations
Instances For
Convert a CPolynomial.Raw to a (mathlib) Polynomial.
Equations
Instances For
Alternative definition of toPoly using Finsupp; currently unused.
Equations
- p.toPoly' = { toFinsupp := AddMonoidAlgebra.ofCoeff (Finsupp.onFinset (Finset.range (Array.size p)) p.coeff ⋯) }
Instances For
Convert a canonical polynomial to a (mathlib) Polynomial.
Instances For
Alias of Polynomial.toImpl.
Convert a mathlib Polynomial to a CPolynomial.Raw by extracting coefficients
up to the degree.
Equations
Instances For
Evaluation is preserved by toPoly.
toImpl is a right-inverse of toPoly: the round-trip from Polynomial is the identity.
toPoly of a right-scalar multiplication is multiplication by Polynomial.C r
on the right.
Non-zero polynomials map to non-empty arrays.
The last coefficient of toImpl p is the leading coefficient of p.
toImpl lands in the semantic canonical carrier used by CPolynomial.
On canonical polynomials, toImpl is a left-inverse of toPoly.
This shows toPoly is a bijection from CPolynomial R to Polynomial R.
Evaluation is preserved by toImpl.