File: Mathlib/Algebra/Polynomial/AlgebraMap.lean

full_name: Polynomial.algebraOfAlgebra
code: /-- Note that this instance also provides `Algebra R R[X]`. -/
instance algebraOfAlgebra : Algebra R A[X] 
goal: Algebra R A[X]

full_name: Polynomial.algebraMap_apply
code: @[simp]
theorem algebraMap_apply (r : R) : algebraMap R A[X] r = C (algebraMap R A r) 
goal: (algebraMap R A[X]) r = Polynomial.C ((algebraMap R A) r)

full_name: Polynomial.toFinsupp_algebraMap
code: @[simp]
theorem toFinsupp_algebraMap (r : R) : (algebraMap R A[X] r).toFinsupp = algebraMap R _ r 
goal: ((algebraMap R A[X]) r).toFinsupp = (algebraMap R (AddMonoidAlgebra A ℕ)) r

full_name: Polynomial.ofFinsupp_algebraMap
code: theorem ofFinsupp_algebraMap (r : R) : (⟨algebraMap R _ r⟩ : A[X]) = algebraMap R A[X] r 
goal: { toFinsupp := (algebraMap R (AddMonoidAlgebra A ℕ)) r } = (algebraMap R A[X]) r

full_name: Polynomial.C_eq_algebraMap
code: /-- 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 C_eq_algebraMap (r : R) : C r = algebraMap R R[X] r 
goal: Polynomial.C r = (algebraMap R R[X]) r

full_name: Polynomial.algebraMap_eq
code: @[simp]
theorem algebraMap_eq : algebraMap R R[X] = C 
goal: algebraMap R R[X] = Polynomial.C

full_name: Polynomial.CAlgHom
code: /-- `Polynomial.C` as an `AlgHom`. -/
@[simps! apply]
def CAlgHom : A →ₐ[R] A[X] 
goal: A →ₐ[R] A[X]

full_name: Polynomial.CAlgHom_apply
code: /-- `Polynomial.C` as an `AlgHom`. -/
@[simps! apply]
def CAlgHom : A →ₐ[R] A[X] 
goal: ∀ (a : A), Polynomial.CAlgHom a = Polynomial.C a

full_name: Polynomial.algHom_ext'
code: /-- Extensionality lemma for algebra maps out of `A'[X]` over a smaller base ring than `A'`
-/
@[ext 1100]
theorem algHom_ext' {f g : A[X] →ₐ[R] B}
    (hC : f.comp CAlgHom = g.comp CAlgHom)
    (hX : f X = g X) : f = g 
goal: f = g

full_name: Polynomial.toFinsuppIsoAlg_symm_apply_toFinsupp
code: /-- 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. -/
@[simps!]
def toFinsuppIsoAlg : R[X] ≃ₐ[R] R[ℕ] 
goal: ((Polynomial.toFinsuppIsoAlg R).symm toFinsupp).toFinsupp = toFinsupp

full_name: Polynomial.toFinsuppIsoAlg_apply
code: /-- 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. -/
@[simps!]
def toFinsuppIsoAlg : R[X] ≃ₐ[R] R[ℕ] 
goal: (Polynomial.toFinsuppIsoAlg R) self = self.toFinsupp

full_name: Polynomial.toFinsuppIsoAlg
code: /-- 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. -/
@[simps!]
def toFinsuppIsoAlg : R[X] ≃ₐ[R] R[ℕ] 
goal: R[X] ≃ₐ[R] AddMonoidAlgebra R ℕ

full_name: Polynomial.subalgebraNontrivial
code: instance subalgebraNontrivial [Nontrivial A] : Nontrivial (Subalgebra R A[X]) 
goal: Nontrivial (Subalgebra R A[X])

full_name: Polynomial.algHom_eval₂_algebraMap
code: @[simp]
theorem algHom_eval₂_algebraMap {R A B : Type*} [CommSemiring R] [Semiring A] [Semiring B]
    [Algebra R A] [Algebra R B] (p : R[X]) (f : A →ₐ[R] B) (a : A) :
    f (eval₂ (algebraMap R A) a p) = eval₂ (algebraMap R B) (f a) p 
goal: f (Polynomial.eval₂ (algebraMap R A) a p) = Polynomial.eval₂ (algebraMap R B) (f a) p

full_name: Polynomial.eval₂_algebraMap_X
code: @[simp]
theorem eval₂_algebraMap_X {R A : Type*} [CommSemiring R] [Semiring A] [Algebra R A] (p : R[X])
    (f : R[X] →ₐ[R] A) : eval₂ (algebraMap R A) (f X) p = f p 
goal: Polynomial.eval₂ (algebraMap R A) (f Polynomial.X) p = f p

full_name: Polynomial.ringHom_eval₂_intCastRingHom
code: @[simp]
theorem ringHom_eval₂_intCastRingHom {R S : Type*} [Ring R] [Ring S] (p : ℤ[X]) (f : R →+* S)
    (r : R) : f (eval₂ (Int.castRingHom R) r p) = eval₂ (Int.castRingHom S) (f r) p 
goal: f (Polynomial.eval₂ (Int.castRingHom R) r p) = Polynomial.eval₂ (Int.castRingHom S) (f r) p

full_name: Polynomial.eval₂_intCastRingHom_X
code: @[simp]
theorem eval₂_intCastRingHom_X {R : Type*} [Ring R] (p : ℤ[X]) (f : ℤ[X] →+* R) :
    eval₂ (Int.castRingHom R) (f X) p = f p 
goal: Polynomial.eval₂ (Int.castRingHom R) (f Polynomial.X) p = f p

full_name: Polynomial.eval₂AlgHom'_apply
code: /-- `Polynomial.eval₂` as an `AlgHom` for noncommutative algebras.

This is `Polynomial.eval₂RingHom'` for `AlgHom`s. -/
@[simps!]
def eval₂AlgHom' (f : A →ₐ[R] B) (b : B) (hf : ∀ a, Commute (f a) b) : A[X] →ₐ[R] B 
goal: (Polynomial.eval₂AlgHom' f b hf) p = Polynomial.eval₂ (↑f) b p

full_name: Polynomial.eval₂AlgHom'
code: /-- `Polynomial.eval₂` as an `AlgHom` for noncommutative algebras.

This is `Polynomial.eval₂RingHom'` for `AlgHom`s. -/
@[simps!]
def eval₂AlgHom' (f : A →ₐ[R] B) (b : B) (hf : ∀ a, Commute (f a) b) : A[X] →ₐ[R] B 
goal: A[X] →ₐ[R] B

full_name: Polynomial.mapAlgHom
code: /-- `Polynomial.map` as an `AlgHom` for noncommutative algebras.

  This is the algebra version of `Polynomial.mapRingHom`. -/
def mapAlgHom (f : A →ₐ[R] B) : Polynomial A →ₐ[R] Polynomial B 
goal: A[X] →ₐ[R] B[X]

full_name: Polynomial.coe_mapAlgHom
code: @[simp]
theorem coe_mapAlgHom (f : A →ₐ[R] B) : ⇑(mapAlgHom f) = map f 
goal: ⇑(Polynomial.mapAlgHom f) = Polynomial.map ↑f

full_name: Polynomial.mapAlgHom_id
code: @[simp]
theorem mapAlgHom_id : mapAlgHom (AlgHom.id R A) = AlgHom.id R (Polynomial A) 
goal: Polynomial.mapAlgHom (AlgHom.id R A) = AlgHom.id R A[X]

full_name: Polynomial.mapAlgHom_coe_ringHom
code: @[simp]
theorem mapAlgHom_coe_ringHom (f : A →ₐ[R] B) :
    ↑(mapAlgHom f : _ →ₐ[R] Polynomial B) = (mapRingHom ↑f : Polynomial A →+* Polynomial B) 
goal: ↑(Polynomial.mapAlgHom f) = Polynomial.mapRingHom ↑f

full_name: Polynomial.mapAlgHom_comp
code: @[simp]
theorem mapAlgHom_comp (C : Type z) [Semiring C] [Algebra R C] (f : B →ₐ[R] C) (g : A →ₐ[R] B) :
    (mapAlgHom f).comp (mapAlgHom g) = mapAlgHom (f.comp g) 
goal: (Polynomial.mapAlgHom f).comp (Polynomial.mapAlgHom g) = Polynomial.mapAlgHom (f.comp g)

full_name: Polynomial.mapAlgHom_eq_eval₂AlgHom'_CAlgHom
code: theorem mapAlgHom_eq_eval₂AlgHom'_CAlgHom (f : A →ₐ[R] B) : mapAlgHom f = eval₂AlgHom'
    (CAlgHom.comp f) X (fun a => (commute_X (C (f a))).symm) 
goal: Polynomial.mapAlgHom f = Polynomial.eval₂AlgHom' (Polynomial.CAlgHom.comp f) Polynomial.X ⋯

full_name: Polynomial.mapAlgEquiv
code: /-- If `A` and `B` are isomorphic as `R`-algebras, then so are their polynomial rings -/
def mapAlgEquiv (f : A ≃ₐ[R] B) : Polynomial A ≃ₐ[R] Polynomial B 
goal: A[X] ≃ₐ[R] B[X]

full_name: Polynomial.coe_mapAlgEquiv
code: @[simp]
theorem coe_mapAlgEquiv (f : A ≃ₐ[R] B) : ⇑(mapAlgEquiv f) = map f 
goal: ⇑(Polynomial.mapAlgEquiv f) = Polynomial.map ↑f

full_name: Polynomial.mapAlgEquiv_id
code: @[simp]
theorem mapAlgEquiv_id : mapAlgEquiv (@AlgEquiv.refl R A _ _ _) = AlgEquiv.refl 
goal: Polynomial.mapAlgEquiv AlgEquiv.refl = AlgEquiv.refl

full_name: Polynomial.mapAlgEquiv_coe_ringHom
code: @[simp]
theorem mapAlgEquiv_coe_ringHom (f : A ≃ₐ[R] B) :
    ↑(mapAlgEquiv f : _ ≃ₐ[R] Polynomial B) = (mapRingHom ↑f : Polynomial A →+* Polynomial B) 
goal: ↑(Polynomial.mapAlgEquiv f) = Polynomial.mapRingHom ↑f

full_name: Polynomial.mapAlgEquiv_comp
code: @[simp]
theorem mapAlgEquiv_comp (C : Type z) [Semiring C] [Algebra R C] (f : A ≃ₐ[R] B) (g : B ≃ₐ[R] C) :
    (mapAlgEquiv f).trans (mapAlgEquiv g) = mapAlgEquiv (f.trans g) 
goal: (Polynomial.mapAlgEquiv f).trans (Polynomial.mapAlgEquiv g) = Polynomial.mapAlgEquiv (f.trans g)

full_name: Polynomial.aeval
code: /-- 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`. -/
def aeval : R[X] →ₐ[R] A 
goal: R[X] →ₐ[R] A

full_name: Polynomial.adjoin_X
code: @[simp]
theorem adjoin_X : Algebra.adjoin R ({X} : Set R[X]) = ⊤ 
goal: Algebra.adjoin R {Polynomial.X} = ⊤

full_name: Polynomial.algHom_ext
code: @[ext 1200]
theorem algHom_ext {f g : R[X] →ₐ[R] B} (hX : f X = g X) :
    f = g 
goal: f = g

full_name: Polynomial.aeval_def
code: theorem aeval_def (p : R[X]) : aeval x p = eval₂ (algebraMap R A) x p 
goal: (Polynomial.aeval x) p = Polynomial.eval₂ (algebraMap R A) x p

full_name: Polynomial.aeval_zero
code: theorem aeval_zero : aeval x (0 : R[X]) = 0 
goal: (Polynomial.aeval x) 0 = 0

full_name: Polynomial.aeval_X
code: @[simp]
theorem aeval_X : aeval x (X : R[X]) = x 
goal: (Polynomial.aeval x) Polynomial.X = x

full_name: Polynomial.aeval_C
code: @[simp]
theorem aeval_C (r : R) : aeval x (C r) = algebraMap R A r 
goal: (Polynomial.aeval x) (Polynomial.C r) = (algebraMap R A) r

full_name: Polynomial.aeval_monomial
code: @[simp]
theorem aeval_monomial {n : ℕ} {r : R} : aeval x (monomial n r) = algebraMap _ _ r * x ^ n 
goal: (Polynomial.aeval x) ((Polynomial.monomial n) r) = (algebraMap R A) r * x ^ n

full_name: Polynomial.aeval_X_pow
code: theorem aeval_X_pow {n : ℕ} : aeval x ((X : R[X]) ^ n) = x ^ n 
goal: (Polynomial.aeval x) (Polynomial.X ^ n) = x ^ n

full_name: Polynomial.aeval_add
code: theorem aeval_add : aeval x (p + q) = aeval x p + aeval x q 
goal: (Polynomial.aeval x) (p + q) = (Polynomial.aeval x) p + (Polynomial.aeval x) q

full_name: Polynomial.aeval_one
code: theorem aeval_one : aeval x (1 : R[X]) = 1 
goal: (Polynomial.aeval x) 1 = 1

full_name: Polynomial.aeval_natCast
code: theorem aeval_natCast (n : ℕ) : aeval x (n : R[X]) = n 
goal: (Polynomial.aeval x) ↑n = ↑n

full_name: Polynomial.aeval_mul
code: theorem aeval_mul : aeval x (p * q) = aeval x p * aeval x q 
goal: (Polynomial.aeval x) (p * q) = (Polynomial.aeval x) p * (Polynomial.aeval x) q

full_name: Polynomial.comp_eq_aeval
code: theorem comp_eq_aeval : p.comp q = aeval q p 
goal: p.comp q = (Polynomial.aeval q) p

full_name: Polynomial.aeval_comp
code: theorem aeval_comp {A : Type*} [Semiring A] [Algebra R A] (x : A) :
    aeval x (p.comp q) = aeval (aeval x q) p 
goal: (Polynomial.aeval x) (p.comp q) = (Polynomial.aeval ((Polynomial.aeval x) q)) p

full_name: Polynomial.algEquivOfCompEqX_symm_apply
code: /-- Two polynomials `p` and `q` such that `p(q(X))=X` and `q(p(X))=X`
  induces an automorphism of the polynomial algebra. -/
@[simps!]
def algEquivOfCompEqX (p q : R[X]) (hpq : p.comp q = X) (hqp : q.comp p = X) : R[X] ≃ₐ[R] R[X] 
goal: (p.algEquivOfCompEqX q hpq hqp).symm a = (Polynomial.aeval q) a

full_name: Polynomial.algEquivOfCompEqX
code: /-- Two polynomials `p` and `q` such that `p(q(X))=X` and `q(p(X))=X`
  induces an automorphism of the polynomial algebra. -/
@[simps!]
def algEquivOfCompEqX (p q : R[X]) (hpq : p.comp q = X) (hqp : q.comp p = X) : R[X] ≃ₐ[R] R[X] 
goal: R[X] ≃ₐ[R] R[X]

full_name: Polynomial.algEquivOfCompEqX_apply
code: /-- Two polynomials `p` and `q` such that `p(q(X))=X` and `q(p(X))=X`
  induces an automorphism of the polynomial algebra. -/
@[simps!]
def algEquivOfCompEqX (p q : R[X]) (hpq : p.comp q = X) (hqp : q.comp p = X) : R[X] ≃ₐ[R] R[X] 
goal: (p.algEquivOfCompEqX q hpq hqp) a = (Polynomial.aeval p) a

full_name: Polynomial.algEquivAevalXAddC_symm_apply
code: /-- The automorphism of the polynomial algebra given by `p(X) ↦ p(X+t)`,
  with inverse `p(X) ↦ p(X-t)`. -/
@[simps!]
def algEquivAevalXAddC {R} [CommRing R] (t : R) : R[X] ≃ₐ[R] R[X] 
goal: (Polynomial.algEquivAevalXAddC t).symm a = (Polynomial.aeval (Polynomial.X - Polynomial.C t)) a

full_name: Polynomial.algEquivAevalXAddC
code: /-- The automorphism of the polynomial algebra given by `p(X) ↦ p(X+t)`,
  with inverse `p(X) ↦ p(X-t)`. -/
@[simps!]
def algEquivAevalXAddC {R} [CommRing R] (t : R) : R[X] ≃ₐ[R] R[X] 
goal: R[X] ≃ₐ[R] R[X]

full_name: Polynomial.algEquivAevalXAddC_apply
code: /-- The automorphism of the polynomial algebra given by `p(X) ↦ p(X+t)`,
  with inverse `p(X) ↦ p(X-t)`. -/
@[simps!]
def algEquivAevalXAddC {R} [CommRing R] (t : R) : R[X] ≃ₐ[R] R[X] 
goal: (Polynomial.algEquivAevalXAddC t) a = (Polynomial.aeval (Polynomial.X + Polynomial.C t)) a

full_name: Polynomial.aeval_algHom
code: theorem aeval_algHom (f : A →ₐ[R] B) (x : A) : aeval (f x) = f.comp (aeval x) 
goal: Polynomial.aeval (f x) = f.comp (Polynomial.aeval x)

full_name: Polynomial.aeval_X_left
code: @[simp]
theorem aeval_X_left : aeval (X : R[X]) = AlgHom.id R R[X] 
goal: Polynomial.aeval Polynomial.X = AlgHom.id R R[X]

full_name: Polynomial.aeval_X_left_apply
code: theorem aeval_X_left_apply (p : R[X]) : aeval X p = p 
goal: (Polynomial.aeval Polynomial.X) p = p

full_name: Polynomial.eval_unique
code: theorem eval_unique (φ : R[X] →ₐ[R] A) (p) : φ p = eval₂ (algebraMap R A) (φ X) p 
goal: φ p = Polynomial.eval₂ (algebraMap R A) (φ Polynomial.X) p

full_name: Polynomial.aeval_algHom_apply
code: theorem aeval_algHom_apply {F : Type*} [FunLike F A B] [AlgHomClass F R A B]
    (f : F) (x : A) (p : R[X]) :
    aeval (f x) p = f (aeval x p) 
goal: (Polynomial.aeval (f x)) p = f ((Polynomial.aeval x) p)

full_name: Polynomial.coe_aeval_mk_apply
code: @[simp]
lemma coe_aeval_mk_apply {S : Subalgebra R A} (h : x ∈ S) :
    (aeval (⟨x, h⟩ : S) p : A) = aeval x p 
goal: ↑((Polynomial.aeval ⟨x, h⟩) p) = (Polynomial.aeval x) p

full_name: Polynomial.aeval_algEquiv
code: theorem aeval_algEquiv (f : A ≃ₐ[R] B) (x : A) : aeval (f x) = (f : A →ₐ[R] B).comp (aeval x) 
goal: Polynomial.aeval (f x) = (↑f).comp (Polynomial.aeval x)

full_name: Polynomial.aeval_algebraMap_apply_eq_algebraMap_eval
code: theorem aeval_algebraMap_apply_eq_algebraMap_eval (x : R) (p : R[X]) :
    aeval (algebraMap R A x) p = algebraMap R A (p.eval x) 
goal: (Polynomial.aeval ((algebraMap R A) x)) p = (algebraMap R A) (Polynomial.eval x p)

full_name: Polynomial.coe_aeval_eq_eval
code: @[simp]
theorem coe_aeval_eq_eval (r : R) : (aeval r : R[X] → R) = eval r 
goal: ⇑(Polynomial.aeval r) = Polynomial.eval r

full_name: Polynomial.coe_aeval_eq_evalRingHom
code: @[simp]
theorem coe_aeval_eq_evalRingHom (x : R) :
    ((aeval x : R[X] →ₐ[R] R) : R[X] →+* R) = evalRingHom x 
goal: ↑(Polynomial.aeval x) = Polynomial.evalRingHom x

full_name: Polynomial.aeval_fn_apply
code: @[simp]
theorem aeval_fn_apply {X : Type*} (g : R[X]) (f : X → R) (x : X) :
    ((aeval f) g) x = aeval (f x) g 
goal: (Polynomial.aeval f) g x = (Polynomial.aeval (f x)) g

full_name: Polynomial.aeval_subalgebra_coe
code: @[norm_cast]
theorem aeval_subalgebra_coe (g : R[X]) {A : Type*} [Semiring A] [Algebra R A] (s : Subalgebra R A)
    (f : s) : (aeval f g : A) = aeval (f : A) g 
goal: ↑((Polynomial.aeval f) g) = (Polynomial.aeval ↑f) g

full_name: Polynomial.coeff_zero_eq_aeval_zero
code: theorem coeff_zero_eq_aeval_zero (p : R[X]) : p.coeff 0 = aeval 0 p 
goal: p.coeff 0 = (Polynomial.aeval 0) p

full_name: Polynomial.coeff_zero_eq_aeval_zero'
code: theorem coeff_zero_eq_aeval_zero' (p : R[X]) : algebraMap R A (p.coeff 0) = aeval (0 : A) p 
goal: (algebraMap R A) (p.coeff 0) = (Polynomial.aeval 0) p

full_name: Polynomial.map_aeval_eq_aeval_map
code: theorem map_aeval_eq_aeval_map {S T U : Type*} [Semiring S] [CommSemiring T] [Semiring U]
    [Algebra R S] [Algebra T U] {φ : R →+* T} {ψ : S →+* U}
    (h : (algebraMap T U).comp φ = ψ.comp (algebraMap R S)) (p : R[X]) (a : S) :
    ψ (aeval a p) = aeval (ψ a) (p.map φ) 
goal: ψ ((Polynomial.aeval a) p) = (Polynomial.aeval (ψ a)) (Polynomial.map φ p)

full_name: Polynomial.aeval_eq_zero_of_dvd_aeval_eq_zero
code: theorem aeval_eq_zero_of_dvd_aeval_eq_zero [CommSemiring S] [CommSemiring T] [Algebra S T]
    {p q : S[X]} (h₁ : p ∣ q) {a : T} (h₂ : aeval a p = 0) : aeval a q = 0 
goal: (Polynomial.aeval a) q = 0

full_name: Algebra.adjoin_singleton_eq_range_aeval
code: theorem _root_.Algebra.adjoin_singleton_eq_range_aeval (x : A) :
    Algebra.adjoin R {x} = (Polynomial.aeval x).range 
goal: Algebra.adjoin R {x} = (Polynomial.aeval x).range

full_name: Polynomial.aeval_mem_adjoin_singleton
code: @[simp]
theorem aeval_mem_adjoin_singleton :
    aeval x p ∈ Algebra.adjoin R {x} 
goal: (Polynomial.aeval x) p ∈ Algebra.adjoin R {x}

full_name: Polynomial.instCommSemiringAdjoinSingleton
code: instance instCommSemiringAdjoinSingleton :
    CommSemiring <| Algebra.adjoin R {x} 
goal: CommSemiring ↥(Algebra.adjoin R {x})

full_name: Polynomial.instCommRingAdjoinSingleton
code: instance instCommRingAdjoinSingleton {R A : Type*} [CommRing R] [Ring A] [Algebra R A] (x : A) :
    CommRing <| Algebra.adjoin R {x} 
goal: CommRing ↥(Algebra.adjoin R {x})

full_name: Polynomial.aeval_eq_sum_range
code: theorem aeval_eq_sum_range [Algebra R S] {p : R[X]} (x : S) :
    aeval x p = ∑ i ∈ Finset.range (p.natDegree + 1), p.coeff i • x ^ i 
goal: (Polynomial.aeval x) p = ∑ i ∈ Finset.range (p.natDegree + 1), p.coeff i • x ^ i

full_name: Polynomial.aeval_eq_sum_range'
code: theorem aeval_eq_sum_range' [Algebra R S] {p : R[X]} {n : ℕ} (hn : p.natDegree < n) (x : S) :
    aeval x p = ∑ i ∈ Finset.range n, p.coeff i • x ^ i 
goal: (Polynomial.aeval x) p = ∑ i ∈ Finset.range n, p.coeff i • x ^ i

full_name: Polynomial.isRoot_of_eval₂_map_eq_zero
code: theorem isRoot_of_eval₂_map_eq_zero (hf : Function.Injective f) {r : R} :
    eval₂ f (f r) p = 0 → p.IsRoot r 
goal: Polynomial.eval₂ f (f r) p = 0 → p.IsRoot r

full_name: Polynomial.isRoot_of_aeval_algebraMap_eq_zero
code: theorem isRoot_of_aeval_algebraMap_eq_zero [Algebra R S] {p : R[X]}
    (inj : Function.Injective (algebraMap R S)) {r : R} (hr : aeval (algebraMap R S r) p = 0) :
    p.IsRoot r 
goal: p.IsRoot r

full_name: Polynomial.aevalTower
code: /-- Version of `aeval` for defining algebra homs out of `R[X]` over a smaller base ring
  than `R`. -/
def aevalTower (f : R →ₐ[S] A') (x : A') : R[X] →ₐ[S] A' 
goal: R[X] →ₐ[S] A'

full_name: Polynomial.aevalTower_X
code: @[simp]
theorem aevalTower_X : aevalTower g y X = y 
goal: (Polynomial.aevalTower g y) Polynomial.X = y

full_name: Polynomial.aevalTower_C
code: @[simp]
theorem aevalTower_C (x : R) : aevalTower g y (C x) = g x 
goal: (Polynomial.aevalTower g y) (Polynomial.C x) = g x

full_name: Polynomial.aevalTower_comp_C
code: @[simp]
theorem aevalTower_comp_C : (aevalTower g y : R[X] →+* A').comp C = g 
goal: (↑(Polynomial.aevalTower g y)).comp Polynomial.C = ↑g

full_name: Polynomial.aevalTower_algebraMap
code: theorem aevalTower_algebraMap (x : R) : aevalTower g y (algebraMap R R[X] x) = g x 
goal: (Polynomial.aevalTower g y) ((algebraMap R R[X]) x) = g x

full_name: Polynomial.aevalTower_comp_algebraMap
code: theorem aevalTower_comp_algebraMap : (aevalTower g y : R[X] →+* A').comp (algebraMap R R[X]) = g 
goal: (↑(Polynomial.aevalTower g y)).comp (algebraMap R R[X]) = ↑g

full_name: Polynomial.aevalTower_toAlgHom
code: theorem aevalTower_toAlgHom (x : R) : aevalTower g y (IsScalarTower.toAlgHom S R R[X] x) = g x 
goal: (Polynomial.aevalTower g y) ((IsScalarTower.toAlgHom S R R[X]) x) = g x

full_name: Polynomial.aevalTower_comp_toAlgHom
code: @[simp]
theorem aevalTower_comp_toAlgHom : (aevalTower g y).comp (IsScalarTower.toAlgHom S R R[X]) = g 
goal: (Polynomial.aevalTower g y).comp (IsScalarTower.toAlgHom S R R[X]) = g

full_name: Polynomial.aevalTower_id
code: @[simp]
theorem aevalTower_id : aevalTower (AlgHom.id S S) = aeval 
goal: Polynomial.aevalTower (AlgHom.id S S) = Polynomial.aeval

full_name: Polynomial.aevalTower_ofId
code: @[simp]
theorem aevalTower_ofId : aevalTower (Algebra.ofId S A') = aeval 
goal: Polynomial.aevalTower (Algebra.ofId S A') = Polynomial.aeval

full_name: Polynomial.dvd_term_of_dvd_eval_of_dvd_terms
code: theorem dvd_term_of_dvd_eval_of_dvd_terms {z p : S} {f : S[X]} (i : ℕ) (dvd_eval : p ∣ f.eval z)
    (dvd_terms : ∀ j ≠ i, p ∣ f.coeff j * z ^ j) : p ∣ f.coeff i * z ^ i 
goal: p ∣ f.coeff i * z ^ i

full_name: Polynomial.dvd_term_of_isRoot_of_dvd_terms
code: theorem dvd_term_of_isRoot_of_dvd_terms {r p : S} {f : S[X]} (i : ℕ) (hr : f.IsRoot r)
    (h : ∀ j ≠ i, p ∣ f.coeff j * r ^ j) : p ∣ f.coeff i * r ^ i 
goal: p ∣ f.coeff i * r ^ i

full_name: Polynomial.eval_mul_X_sub_C
code: /-- 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 eval_mul_X_sub_C {p : R[X]} (r : R) : (p * (X - C r)).eval r = 0 
goal: Polynomial.eval r (p * (Polynomial.X - Polynomial.C r)) = 0

full_name: Polynomial.not_isUnit_X_sub_C
code: theorem not_isUnit_X_sub_C [Nontrivial R] (r : R) : ¬IsUnit (X - C r) 
goal: ¬IsUnit (Polynomial.X - Polynomial.C r)

full_name: Polynomial.aeval_endomorphism
code: theorem aeval_endomorphism {M : Type*} [CommRing R] [AddCommGroup M] [Module R M] (f : M →ₗ[R] M)
    (v : M) (p : R[X]) : aeval f p v = p.sum fun n b => b • (f ^ n) v 
goal: ((Polynomial.aeval f) p) v = p.sum fun n b => b • (f ^ n) v

full_name: Polynomial.aeval_apply_smul_mem_of_le_comap'
code: lemma aeval_apply_smul_mem_of_le_comap'
    [Semiring A] [Algebra R A] [Module A M] [IsScalarTower R A M] (a : A)
    (hq : q ≤ q.comap (Algebra.lsmul R R M a)) :
    aeval a p • m ∈ q 
goal: (Polynomial.aeval a) p • m ∈ q

full_name: Polynomial.aeval_apply_smul_mem_of_le_comap
code: lemma aeval_apply_smul_mem_of_le_comap (f : Module.End R M) (hq : q ≤ q.comap f) :
    aeval f p m ∈ q 
goal: ((Polynomial.aeval f) p) m ∈ q