Evaluating a polynomial #
Main definitions #
Polynomial.eval₂: evaluatep : R[X]inSgiven a ring homf : R →+* Sandx : S.Polynomial.eval: evaluatep : R[X]givenx : R.Polynomial.IsRoot:x : Ris a root ofp : R[X].Polynomial.comp: compose two polynomialsp q : R[X]by evaluatingpatq.Polynomial.map: applyf : R →+* Sto the coefficients ofp : R[X].
We also provide the following bundled versions:
Polynomial.eval₂AddMonoidHom,Polynomial.eval₂RingHomPolynomial.evalRingHomPolynomial.compRingHomPolynomial.mapRingHom
We include results on applying the definitions to C, X and ring operations.
Evaluate a polynomial p given a ring hom f from the scalar ring
to the target and a value x for the variable in the target
Equations
Instances For
eval₂AddMonoidHom (f : R →+* S) (x : S) is the AddMonoidHom from
R[X] to S obtained by evaluating the pushforward of p along f at x.
Equations
Instances For
We next prove that eval₂ is multiplicative as long as target ring is commutative (even if the source ring is not).
Equations
Instances For
Polynomial evaluation commutes with List.sum.
Polynomial evaluation commutes with Multiset.sum.
Equations
The composition of polynomials as a polynomial.
Equations
Instances For
map f p maps a polynomial p across a ring hom f
Equations
Instances For
Polynomial.map as a RingHom.
Equations
Instances For
comp p, regarded as a ring homomorphism from R[X] to itself.
Equations
Instances For
Polynomial evaluation commutes with List.prod
Polynomial evaluation commutes with Multiset.prod
Polynomial evaluation commutes with Finset.prod