Theory of univariate polynomials
We show that polynomial A is an R-algebra when A is an R-algebra.
We promote eval₂ to an algebra hom in aeval.
Note that this instance also provides algebra R (polynomial R).
When we have [comm_ring R], the function C is the same as algebra_map R (polynomial R).
(But note that C is defined when R is not necessarily commutative, in which case
algebra_map is not available.)
Equations
Given a valuation x of the variable in an R-algebra A, aeval R A x is
the unique R-algebra homomorphism from R[X] to A sending X to x.
Equations
- polynomial.aeval x = {to_fun := (polynomial.eval₂_ring_hom (algebra_map R A) x).to_fun, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _, commutes' := _}
The evaluation map is not generally multiplicative when the coefficient ring is noncommutative,
but nevertheless any polynomial of the form p * (X - monomial 0 r) is sent to zero
when evaluated at r.
This is the key step in our proof of the Cayley-Hamilton theorem.