# Documentation

Mathlib.Data.Polynomial.AlgebraMap

# Theory of univariate polynomials #

We show that A[X] is an R-algebra when A is an R-algebra. We promote eval₂ to an algebra hom in aeval.

instance Polynomial.algebraOfAlgebra {R : Type u} {A : Type z} [] [] [Algebra R A] :
Algebra R ()

Note that this instance also provides Algebra R R[X].

theorem Polynomial.algebraMap_apply {R : Type u} {A : Type z} [] [] [Algebra R A] (r : R) :
↑(algebraMap R ()) r = Polynomial.C (↑() r)
@[simp]
theorem Polynomial.toFinsupp_algebraMap {R : Type u} {A : Type z} [] [] [Algebra R A] (r : R) :
(↑(algebraMap R ()) r).toFinsupp = ↑() r
theorem Polynomial.ofFinsupp_algebraMap {R : Type u} {A : Type z} [] [] [Algebra R A] (r : R) :
{ toFinsupp := ↑() r } = ↑(algebraMap R ()) r
theorem Polynomial.C_eq_algebraMap {R : Type u} [] (r : R) :
Polynomial.C r = ↑(algebraMap R ()) r

When we have [CommSemiring R], the function C is the same as algebraMap R R[X].

(But note that C is defined when R is not necessarily commutative, in which case algebraMap is not available.)

theorem Polynomial.algHom_ext' {R : Type u} {A' : Type u_1} {B' : Type u_2} [] [Semiring B'] [] [Algebra R A'] [Algebra R B'] {f : →ₐ[R] B'} {g : →ₐ[R] B'} (h₁ : AlgHom.comp f (IsScalarTower.toAlgHom R A' ()) = AlgHom.comp g (IsScalarTower.toAlgHom R A' ())) (h₂ : f Polynomial.X = g Polynomial.X) :
f = g

Extensionality lemma for algebra maps out of A'[X] over a smaller base ring than A'

@[simp]
theorem Polynomial.toFinsuppIsoAlg_apply (R : Type u) [] (self : ) :
↑() self = self.toFinsupp
@[simp]
theorem Polynomial.toFinsuppIsoAlg_symm_apply_toFinsupp (R : Type u) [] (toFinsupp : ) :
(↑() toFinsupp).toFinsupp = toFinsupp

Algebra isomorphism between R[X] and R[ℕ]. This is just an implementation detail, but it can be useful to transfer results from Finsupp to polynomials.

Instances For
instance Polynomial.subalgebraNontrivial {R : Type u} {A : Type z} [] [] [Algebra R A] [] :
@[simp]
theorem Polynomial.algHom_eval₂_algebraMap {R : Type u_3} {A : Type u_4} {B : Type u_5} [] [] [] [Algebra R A] [Algebra R B] (p : ) (f : A →ₐ[R] B) (a : A) :
f (Polynomial.eval₂ () a p) = Polynomial.eval₂ () (f a) p
@[simp]
theorem Polynomial.eval₂_algebraMap_X {R : Type u_3} {A : Type u_4} [] [] [Algebra R A] (p : ) (f : →ₐ[R] A) :
Polynomial.eval₂ () (f Polynomial.X) p = f p
@[simp]
theorem Polynomial.ringHom_eval₂_cast_int_ringHom {R : Type u_3} {S : Type u_4} [Ring R] [Ring S] (p : ) (f : R →+* S) (r : R) :
f () = Polynomial.eval₂ () (f r) p
@[simp]
theorem Polynomial.eval₂_int_castRingHom_X {R : Type u_3} [Ring R] (p : ) (f : ) :
Polynomial.eval₂ () (f Polynomial.X) p = f p
def Polynomial.aeval {R : Type u} {A : Type z} [] [] [Algebra R A] (x : A) :

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.

This is a stronger variant of the linear map Polynomial.leval.

Instances For
@[simp]
theorem Polynomial.adjoin_X {R : Type u} [] :
theorem Polynomial.algHom_ext {R : Type u} {A : Type z} [] [] [Algebra R A] {f : →ₐ[R] A} {g : →ₐ[R] A} (h : f Polynomial.X = g Polynomial.X) :
f = g
theorem Polynomial.aeval_def {R : Type u} {A : Type z} [] [] [Algebra R A] (x : A) (p : ) :
↑() p = Polynomial.eval₂ () x p
theorem Polynomial.aeval_zero {R : Type u} {A : Type z} [] [] [Algebra R A] (x : A) :
↑() 0 = 0
@[simp]
theorem Polynomial.aeval_X {R : Type u} {A : Type z} [] [] [Algebra R A] (x : A) :
↑() Polynomial.X = x
@[simp]
theorem Polynomial.aeval_C {R : Type u} {A : Type z} [] [] [Algebra R A] (x : A) (r : R) :
↑() (Polynomial.C r) = ↑() r
@[simp]
theorem Polynomial.aeval_monomial {R : Type u} {A : Type z} [] [] [Algebra R A] (x : A) {n : } {r : R} :
↑() (↑() r) = ↑() r * x ^ n
theorem Polynomial.aeval_X_pow {R : Type u} {A : Type z} [] [] [Algebra R A] (x : A) {n : } :
↑() (Polynomial.X ^ n) = x ^ n
theorem Polynomial.aeval_add {R : Type u} {A : Type z} [] {p : } {q : } [] [Algebra R A] (x : A) :
↑() (p + q) = ↑() p + ↑() q
theorem Polynomial.aeval_one {R : Type u} {A : Type z} [] [] [Algebra R A] (x : A) :
↑() 1 = 1
@[deprecated]
theorem Polynomial.aeval_bit0 {R : Type u} {A : Type z} [] {p : } [] [Algebra R A] (x : A) :
↑() (bit0 p) = bit0 (↑() p)
@[deprecated]
theorem Polynomial.aeval_bit1 {R : Type u} {A : Type z} [] {p : } [] [Algebra R A] (x : A) :
↑() (bit1 p) = bit1 (↑() p)
theorem Polynomial.aeval_nat_cast {R : Type u} {A : Type z} [] [] [Algebra R A] (x : A) (n : ) :
↑() n = n
theorem Polynomial.aeval_mul {R : Type u} {A : Type z} [] {p : } {q : } [] [Algebra R A] (x : A) :
↑() (p * q) = ↑() p * ↑() q
theorem Polynomial.aeval_comp {R : Type u} [] {p : } {q : } {A : Type u_4} [] [Algebra R A] (x : A) :
↑() () = ↑(Polynomial.aeval (↑() q)) p
theorem Polynomial.aeval_algHom {R : Type u} {A : Type z} [] [] [Algebra R A] {B : Type u_3} [] [Algebra R B] (f : A →ₐ[R] B) (x : A) :
@[simp]
theorem Polynomial.aeval_X_left {R : Type u} [] :
Polynomial.aeval Polynomial.X = AlgHom.id R ()
theorem Polynomial.aeval_X_left_apply {R : Type u} [] (p : ) :
↑(Polynomial.aeval Polynomial.X) p = p
theorem Polynomial.eval_unique {R : Type u} {A : Type z} [] [] [Algebra R A] (φ : →ₐ[R] A) (p : ) :
φ p = Polynomial.eval₂ () (φ Polynomial.X) p
theorem Polynomial.aeval_algHom_apply {R : Type u} {A : Type z} [] [] [Algebra R A] {B : Type u_3} [] [Algebra R B] {F : Type u_4} [AlgHomClass F R A B] (f : F) (x : A) (p : ) :
↑(Polynomial.aeval (f x)) p = f (↑() p)
theorem Polynomial.aeval_algEquiv {R : Type u} {A : Type z} [] [] [Algebra R A] {B : Type u_3} [] [Algebra R B] (f : A ≃ₐ[R] B) (x : A) :
Polynomial.aeval (f x) = AlgHom.comp (f) ()
theorem Polynomial.aeval_algebraMap_apply_eq_algebraMap_eval {R : Type u} {A : Type z} [] [] [Algebra R A] (x : R) (p : ) :
↑(Polynomial.aeval (↑() x)) p = ↑() ()
@[simp]
theorem Polynomial.coe_aeval_eq_eval {R : Type u} [] (r : R) :
@[simp]
theorem Polynomial.coe_aeval_eq_evalRingHom {R : Type u} [] (x : R) :
@[simp]
theorem Polynomial.aeval_fn_apply {R : Type u} [] {X : Type u_4} (g : ) (f : XR) (x : X) :
↑() g x = ↑(Polynomial.aeval (f x)) g
theorem Polynomial.aeval_subalgebra_coe {R : Type u} [] (g : ) {A : Type u_4} [] [Algebra R A] (s : ) (f : { x // x s }) :
↑(↑() g) = ↑() g
theorem Polynomial.coeff_zero_eq_aeval_zero {R : Type u} [] (p : ) :
= ↑() p
theorem Polynomial.coeff_zero_eq_aeval_zero' {R : Type u} {A : Type z} [] [] [Algebra R A] (p : ) :
↑() () = ↑() p
theorem Polynomial.map_aeval_eq_aeval_map {R : Type u} [] {S : Type u_4} {T : Type u_5} {U : Type u_6} [] [] [] [Algebra R S] [Algebra T U] {φ : R →+* T} {ψ : S →+* U} (h : RingHom.comp () φ = RingHom.comp ψ ()) (p : ) (a : S) :
ψ (↑() p) = ↑(Polynomial.aeval (ψ a)) ()
theorem Polynomial.aeval_eq_zero_of_dvd_aeval_eq_zero {S : Type v} {T : Type w} [] [] [Algebra S T] {p : } {q : } (h₁ : p q) {a : T} (h₂ : ↑() p = 0) :
↑() q = 0
theorem Algebra.adjoin_singleton_eq_range_aeval (R : Type u) {A : Type z} [] [] [Algebra R A] (x : A) :
theorem Polynomial.aeval_eq_sum_range {R : Type u} {S : Type v} [] [] [Algebra R S] {p : } (x : S) :
↑() p = Finset.sum () fun i => x ^ i
theorem Polynomial.aeval_eq_sum_range' {R : Type u} {S : Type v} [] [] [Algebra R S] {p : } {n : } (hn : ) (x : S) :
↑() p = Finset.sum () fun i => x ^ i
theorem Polynomial.isRoot_of_eval₂_map_eq_zero {R : Type u} {S : Type v} [] {p : } [] {f : R →+* S} (hf : ) {r : R} :
Polynomial.eval₂ f (f r) p = 0
theorem Polynomial.isRoot_of_aeval_algebraMap_eq_zero {R : Type u} {S : Type v} [] [] [Algebra R S] {p : } (inj : Function.Injective ↑()) {r : R} (hr : ↑(Polynomial.aeval (↑() r)) p = 0) :
def Polynomial.aevalTower {R : Type u} {S : Type v} {A' : Type u_1} [] [] [] [Algebra S R] [Algebra S A'] (f : R →ₐ[S] A') (x : A') :

Version of aeval for defining algebra homs out of R[X] over a smaller base ring than R.

Instances For
@[simp]
theorem Polynomial.aevalTower_X {R : Type u} {S : Type v} {A' : Type u_1} [] [] [] [Algebra S R] [Algebra S A'] (g : R →ₐ[S] A') (y : A') :
↑() Polynomial.X = y
@[simp]
theorem Polynomial.aevalTower_C {R : Type u} {S : Type v} {A' : Type u_1} [] [] [] [Algebra S R] [Algebra S A'] (g : R →ₐ[S] A') (y : A') (x : R) :
↑() (Polynomial.C x) = g x
@[simp]
theorem Polynomial.aevalTower_comp_C {R : Type u} {S : Type v} {A' : Type u_1} [] [] [] [Algebra S R] [Algebra S A'] (g : R →ₐ[S] A') (y : A') :
RingHom.comp (↑()) Polynomial.C = g
@[simp]
theorem Polynomial.aevalTower_algebraMap {R : Type u} {S : Type v} {A' : Type u_1} [] [] [] [Algebra S R] [Algebra S A'] (g : R →ₐ[S] A') (y : A') (x : R) :
↑() (↑(algebraMap R ()) x) = g x
@[simp]
theorem Polynomial.aevalTower_comp_algebraMap {R : Type u} {S : Type v} {A' : Type u_1} [] [] [] [Algebra S R] [Algebra S A'] (g : R →ₐ[S] A') (y : A') :
RingHom.comp (↑()) (algebraMap R ()) = g
theorem Polynomial.aevalTower_toAlgHom {R : Type u} {S : Type v} {A' : Type u_1} [] [] [] [Algebra S R] [Algebra S A'] (g : R →ₐ[S] A') (y : A') (x : R) :
↑() (↑() x) = g x
@[simp]
theorem Polynomial.aevalTower_comp_toAlgHom {R : Type u} {S : Type v} {A' : Type u_1} [] [] [] [Algebra S R] [Algebra S A'] (g : R →ₐ[S] A') (y : A') :
AlgHom.comp () () = g
@[simp]
theorem Polynomial.aevalTower_id {S : Type v} [] :
= Polynomial.aeval
@[simp]
theorem Polynomial.aevalTower_ofId {S : Type v} {A' : Type u_1} [] [] [Algebra S A'] :
= Polynomial.aeval
theorem Polynomial.dvd_term_of_dvd_eval_of_dvd_terms {S : Type v} [] {z : S} {p : S} {f : } (i : ) (dvd_eval : p ) (dvd_terms : ∀ (j : ), j ip * z ^ j) :
p * z ^ i
theorem Polynomial.dvd_term_of_isRoot_of_dvd_terms {S : Type v} [] {r : S} {p : S} {f : } (i : ) (hr : ) (h : ∀ (j : ), j ip * r ^ j) :
p * r ^ i
theorem Polynomial.eval_mul_X_sub_C {R : Type u} [Ring R] {p : } (r : R) :
Polynomial.eval r (p * (Polynomial.X - Polynomial.C r)) = 0

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.

theorem Polynomial.not_isUnit_X_sub_C {R : Type u} [Ring R] [] (r : R) :
¬IsUnit (Polynomial.X - Polynomial.C r)
theorem Polynomial.aeval_endomorphism {R : Type u} {M : Type u_3} [] [] [Module R M] (f : M →ₗ[R] M) (v : M) (p : ) :
↑(↑() p) v = Polynomial.sum p fun n b => b ↑(f ^ n) v