/-
Copyright (c) 2018 Chris Hughes. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Hughes, Johannes Hölzl, Scott Morrison, Jens Wagemaker

! This file was ported from Lean 3 source module data.polynomial.algebra_map
! leanprover-community/mathlib commit 10bf4f825ad729c5653adc039dafa3622e7f93c9
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Algebra.Algebra.Pi
import Mathbin.RingTheory.Adjoin.Basic
import Mathbin.Data.Polynomial.Eval

/-!
# Theory of univariate polynomials

> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
> Any changes to this file require a corresponding PR to mathlib4.

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

noncomputable section

open Finset

open BigOperators Polynomial

namespace Polynomial

universe u v w z

variable {R : Type u} {S : Type v} {T : Type w} {A : Type z} {A' B' : Type _} {a b : R} {n : ℕ}

variable [CommSemiring A'] [Semiring B']

section CommSemiring

variable [CommSemiring R] {p q r : R[X]}

variable [Semiring A] [Algebra R A]

#print Polynomial.algebraOfAlgebra /-
/-- Note that this instance also provides `algebra R R[X]`. -/
instance algebraOfAlgebra : Algebra R A[X]
    where
  smul_def' r p :=
    toFinsupp_injective <|
      by
      dsimp only [RingHom.toFun_eq_coe, RingHom.comp_apply]
      rw [to_finsupp_smul, to_finsupp_mul, to_finsupp_C]
      exact Algebra.smul_def' _ _
  commutes' r p :=
    toFinsupp_injective <|
      by
      dsimp only [RingHom.toFun_eq_coe, RingHom.comp_apply]
      simp_rw [to_finsupp_mul, to_finsupp_C]
      convert Algebra.commutes' r p.to_finsupp
  toRingHom := C.comp (algebraMap R A)
#align polynomial.algebra_of_algebra Polynomial.algebraOfAlgebra
-/

/- warning: polynomial.algebra_map_apply -> Polynomial.algebraMap_apply is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : Semiring.{u2} A] [_inst_5 : Algebra.{u1, u2} R A _inst_3 _inst_4] (r : R), Eq.{succ u2} (Polynomial.{u2} A _inst_4) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) (fun (_x : RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) => R -> (Polynomial.{u2} A _inst_4)) (RingHom.hasCoeToFun.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) (algebraMap.{u1, u2} R (Polynomial.{u2} A _inst_4) _inst_3 (Polynomial.semiring.{u2} A _inst_4) (Polynomial.algebraOfAlgebra.{u1, u2} R A _inst_3 _inst_4 _inst_5)) r) (coeFn.{succ u2, succ u2} (RingHom.{u2, u2} A (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) (fun (_x : RingHom.{u2, u2} A (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) => A -> (Polynomial.{u2} A _inst_4)) (RingHom.hasCoeToFun.{u2, u2} A (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) (Polynomial.C.{u2} A _inst_4) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4)) (fun (_x : RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4)) => R -> A) (RingHom.hasCoeToFun.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4)) (algebraMap.{u1, u2} R A _inst_3 _inst_4 _inst_5) r))
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : Semiring.{u2} A] [_inst_5 : Algebra.{u1, u2} R A _inst_3 _inst_4] (r : R), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => Polynomial.{u2} A _inst_4) r) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => Polynomial.{u2} A _inst_4) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) R (Polynomial.{u2} A _inst_4) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u2} (Polynomial.{u2} A _inst_4) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4)))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) R (Polynomial.{u2} A _inst_4) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4)) (RingHom.instRingHomClassRingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4)))))) (algebraMap.{u1, u2} R (Polynomial.{u2} A _inst_4) _inst_3 (Polynomial.semiring.{u2} A _inst_4) (Polynomial.algebraOfAlgebra.{u1, u2} R A _inst_3 _inst_4 _inst_5)) r) (FunLike.coe.{succ u2, succ u2, succ u2} (RingHom.{u2, u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Polynomial.semiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) (fun (_x : (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) => Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) _x) (MulHomClass.toFunLike.{u2, u2, u2} (RingHom.{u2, u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Polynomial.semiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (NonUnitalNonAssocSemiring.toMul.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4))) (NonUnitalNonAssocSemiring.toMul.{u2} (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Polynomial.semiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4)))) (NonUnitalRingHomClass.toMulHomClass.{u2, u2, u2} (RingHom.{u2, u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Polynomial.semiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Polynomial.semiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4))) (RingHomClass.toNonUnitalRingHomClass.{u2, u2, u2} (RingHom.{u2, u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Polynomial.semiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Polynomial.semiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4)) (RingHom.instRingHomClassRingHom.{u2, u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (Polynomial.semiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4)))))) (Polynomial.C.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) r) _inst_4) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4)) R A (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4)) R A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4)) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4)) R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4) (RingHom.instRingHomClassRingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4))))) (algebraMap.{u1, u2} R A _inst_3 _inst_4 _inst_5) r))
Case conversion may be inaccurate. Consider using '#align polynomial.algebra_map_apply Polynomial.algebraMap_applyₓ'. -/
theorem algebraMap_apply (r : R) : algebraMap R A[X] r = C (algebraMap R A r) :=
  rfl
#align polynomial.algebra_map_apply Polynomial.algebraMap_apply

/- warning: polynomial.to_finsupp_algebra_map -> Polynomial.toFinsupp_algebraMap is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : Semiring.{u2} A] [_inst_5 : Algebra.{u1, u2} R A _inst_3 _inst_4] (r : R), Eq.{succ u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Polynomial.toFinsupp.{u2} A _inst_4 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) (fun (_x : RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) => R -> (Polynomial.{u2} A _inst_4)) (RingHom.hasCoeToFun.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) (algebraMap.{u1, u2} R (Polynomial.{u2} A _inst_4) _inst_3 (Polynomial.semiring.{u2} A _inst_4) (Polynomial.algebraOfAlgebra.{u1, u2} R A _inst_3 _inst_4 _inst_5)) r)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid))) (fun (_x : RingHom.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid))) => R -> (AddMonoidAlgebra.{u2, 0} A Nat _inst_4)) (RingHom.hasCoeToFun.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid))) (algebraMap.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) _inst_3 (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid) (AddMonoidAlgebra.algebra.{u2, 0, u1} A Nat R _inst_3 _inst_4 _inst_5 Nat.addMonoid)) r)
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : Semiring.{u2} A] [_inst_5 : Algebra.{u1, u2} R A _inst_3 _inst_4] (r : R), Eq.{succ u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Polynomial.toFinsupp.{u2} A _inst_4 (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => Polynomial.{u2} A _inst_4) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) R (Polynomial.{u2} A _inst_4) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u2} (Polynomial.{u2} A _inst_4) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4)))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) R (Polynomial.{u2} A _inst_4) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4)) (RingHom.instRingHomClassRingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4)))))) (algebraMap.{u1, u2} R (Polynomial.{u2} A _inst_4) _inst_3 (Polynomial.semiring.{u2} A _inst_4) (Polynomial.algebraOfAlgebra.{u1, u2} R A _inst_3 _inst_4 _inst_5)) r)) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RingHom.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => AddMonoidAlgebra.{u2, 0} A Nat _inst_4) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (RingHom.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid))) R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid)))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid))) R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid))) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid))) R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid)) (RingHom.instRingHomClassRingHom.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid)))))) (algebraMap.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) _inst_3 (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid) (AddMonoidAlgebra.algebra.{u2, 0, u1} A Nat R _inst_3 _inst_4 _inst_5 Nat.addMonoid)) r)
Case conversion may be inaccurate. Consider using '#align polynomial.to_finsupp_algebra_map Polynomial.toFinsupp_algebraMapₓ'. -/
@[simp]
theorem toFinsupp_algebraMap (r : R) : (algebraMap R A[X] r).toFinsupp = algebraMap R _ r :=
  show toFinsupp (C (algebraMap _ _ r)) = _
    by
    rw [to_finsupp_C]
    rfl
#align polynomial.to_finsupp_algebra_map Polynomial.toFinsupp_algebraMap

/- warning: polynomial.of_finsupp_algebra_map -> Polynomial.ofFinsupp_algebraMap is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : Semiring.{u2} A] [_inst_5 : Algebra.{u1, u2} R A _inst_3 _inst_4] (r : R), Eq.{succ u2} (Polynomial.{u2} A _inst_4) (Polynomial.ofFinsupp.{u2} A _inst_4 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid))) (fun (_x : RingHom.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid))) => R -> (AddMonoidAlgebra.{u2, 0} A Nat _inst_4)) (RingHom.hasCoeToFun.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid))) (algebraMap.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) _inst_3 (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid) (AddMonoidAlgebra.algebra.{u2, 0, u1} A Nat R _inst_3 _inst_4 _inst_5 Nat.addMonoid)) r)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) (fun (_x : RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) => R -> (Polynomial.{u2} A _inst_4)) (RingHom.hasCoeToFun.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) (algebraMap.{u1, u2} R (Polynomial.{u2} A _inst_4) _inst_3 (Polynomial.semiring.{u2} A _inst_4) (Polynomial.algebraOfAlgebra.{u1, u2} R A _inst_3 _inst_4 _inst_5)) r)
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : Semiring.{u2} A] [_inst_5 : Algebra.{u1, u2} R A _inst_3 _inst_4] (r : R), Eq.{succ u2} (Polynomial.{u2} A _inst_4) (Polynomial.ofFinsupp.{u2} A _inst_4 (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RingHom.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => AddMonoidAlgebra.{u2, 0} A Nat _inst_4) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (RingHom.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid))) R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid)))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid))) R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid))) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid))) R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid)) (RingHom.instRingHomClassRingHom.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid)))))) (algebraMap.{u1, u2} R (AddMonoidAlgebra.{u2, 0} A Nat _inst_4) _inst_3 (AddMonoidAlgebra.semiring.{u2, 0} A Nat _inst_4 Nat.addMonoid) (AddMonoidAlgebra.algebra.{u2, 0, u1} A Nat R _inst_3 _inst_4 _inst_5 Nat.addMonoid)) r)) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => Polynomial.{u2} A _inst_4) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) R (Polynomial.{u2} A _inst_4) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u2} (Polynomial.{u2} A _inst_4) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4)))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) R (Polynomial.{u2} A _inst_4) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4))) R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4)) (RingHom.instRingHomClassRingHom.{u1, u2} R (Polynomial.{u2} A _inst_4) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A _inst_4) (Polynomial.semiring.{u2} A _inst_4)))))) (algebraMap.{u1, u2} R (Polynomial.{u2} A _inst_4) _inst_3 (Polynomial.semiring.{u2} A _inst_4) (Polynomial.algebraOfAlgebra.{u1, u2} R A _inst_3 _inst_4 _inst_5)) r)
Case conversion may be inaccurate. Consider using '#align polynomial.of_finsupp_algebra_map Polynomial.ofFinsupp_algebraMapₓ'. -/
theorem ofFinsupp_algebraMap (r : R) : (⟨algebraMap R _ r⟩ : A[X]) = algebraMap R A[X] r :=
  toFinsupp_injective (toFinsupp_algebraMap _).symm
#align polynomial.of_finsupp_algebra_map Polynomial.ofFinsupp_algebraMap

/- warning: polynomial.C_eq_algebra_map -> Polynomial.C_eq_algebraMap is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} [_inst_3 : CommSemiring.{u1} R] (r : R), Eq.{succ u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (coeFn.{succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (fun (_x : RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) => R -> (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (RingHom.hasCoeToFun.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (Polynomial.C.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) r) (coeFn.{succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (fun (_x : RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) => R -> (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (RingHom.hasCoeToFun.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (algebraMap.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3))) r)
but is expected to have type
  forall {R : Type.{u1}} [_inst_3 : CommSemiring.{u1} R] (r : R), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) r) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (RingHom.instRingHomClassRingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))))) (Polynomial.C.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) r) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (RingHom.instRingHomClassRingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))))) (algebraMap.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3))) r)
Case conversion may be inaccurate. Consider using '#align polynomial.C_eq_algebra_map Polynomial.C_eq_algebraMapₓ'. -/
/-- When we have `[comm_semiring R]`, the function `C` is the same as `algebra_map R R[X]`.

(But note that `C` is defined when `R` is not necessarily commutative, in which case
`algebra_map` is not available.)
-/
theorem C_eq_algebraMap (r : R) : C r = algebraMap R R[X] r :=
  rfl
#align polynomial.C_eq_algebra_map Polynomial.C_eq_algebraMap

variable {R}

/- warning: polynomial.alg_hom_ext' -> Polynomial.algHom_ext' is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A' : Type.{u2}} {B' : Type.{u3}} [_inst_1 : CommSemiring.{u2} A'] [_inst_2 : Semiring.{u3} B'] [_inst_3 : CommSemiring.{u1} R] [_inst_6 : Algebra.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1)] [_inst_7 : Algebra.{u1, u3} R B' _inst_3 _inst_2] {f : AlgHom.{u1, u2, u3} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7} {g : AlgHom.{u1, u2, u3} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7}, (Eq.{max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} R A' B' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_2 _inst_6 _inst_7) (AlgHom.comp.{u1, u2, u2, u3} R A' (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 _inst_6 (Polynomial.algebraOfAlgebra.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7 f (IsScalarTower.toAlgHom.{u1, u2, u2} R A' (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_3 _inst_1 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_6 (Polynomial.algebraOfAlgebra.{u2, u2} A' A' _inst_1 (CommSemiring.toSemiring.{u2} A' _inst_1) (Algebra.id.{u2} A' _inst_1)) (Polynomial.algebraOfAlgebra.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) (Polynomial.isScalarTower.{u2, u1, u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1) R A' (SMulZeroClass.toHasSmul.{u1, u2} R A' (AddZeroClass.toHasZero.{u2} A' (AddMonoid.toAddZeroClass.{u2} A' (AddCommMonoid.toAddMonoid.{u2} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A' (Semiring.toNonAssocSemiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))))))) (SMulWithZero.toSmulZeroClass.{u1, u2} R A' (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) (AddZeroClass.toHasZero.{u2} A' (AddMonoid.toAddZeroClass.{u2} A' (AddCommMonoid.toAddMonoid.{u2} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A' (Semiring.toNonAssocSemiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))))))) (MulActionWithZero.toSMulWithZero.{u1, u2} R A' (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (AddZeroClass.toHasZero.{u2} A' (AddMonoid.toAddZeroClass.{u2} A' (AddCommMonoid.toAddMonoid.{u2} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A' (Semiring.toNonAssocSemiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))))))) (Module.toMulActionWithZero.{u1, u2} R A' (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A' (Semiring.toNonAssocSemiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))) (Algebra.toModule.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6))))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (MonoidWithZero.toMonoid.{u2} A' (Semiring.toMonoidWithZero.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))) (Module.toDistribMulAction.{u1, u2} R A' (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A' (Semiring.toNonAssocSemiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))) (Algebra.toModule.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6)) (Module.toDistribMulAction.{u2, u2} A' A' (CommSemiring.toSemiring.{u2} A' _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A' (Semiring.toNonAssocSemiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))) (Semiring.toModule.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))) (IsScalarTower.right.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6)))) (AlgHom.comp.{u1, u2, u2, u3} R A' (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 _inst_6 (Polynomial.algebraOfAlgebra.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7 g (IsScalarTower.toAlgHom.{u1, u2, u2} R A' (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_3 _inst_1 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_6 (Polynomial.algebraOfAlgebra.{u2, u2} A' A' _inst_1 (CommSemiring.toSemiring.{u2} A' _inst_1) (Algebra.id.{u2} A' _inst_1)) (Polynomial.algebraOfAlgebra.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) (Polynomial.isScalarTower.{u2, u1, u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1) R A' (SMulZeroClass.toHasSmul.{u1, u2} R A' (AddZeroClass.toHasZero.{u2} A' (AddMonoid.toAddZeroClass.{u2} A' (AddCommMonoid.toAddMonoid.{u2} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A' (Semiring.toNonAssocSemiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))))))) (SMulWithZero.toSmulZeroClass.{u1, u2} R A' (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) (AddZeroClass.toHasZero.{u2} A' (AddMonoid.toAddZeroClass.{u2} A' (AddCommMonoid.toAddMonoid.{u2} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A' (Semiring.toNonAssocSemiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))))))) (MulActionWithZero.toSMulWithZero.{u1, u2} R A' (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (AddZeroClass.toHasZero.{u2} A' (AddMonoid.toAddZeroClass.{u2} A' (AddCommMonoid.toAddMonoid.{u2} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A' (Semiring.toNonAssocSemiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))))))) (Module.toMulActionWithZero.{u1, u2} R A' (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A' (Semiring.toNonAssocSemiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))) (Algebra.toModule.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6))))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (MonoidWithZero.toMonoid.{u2} A' (Semiring.toMonoidWithZero.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))) (Module.toDistribMulAction.{u1, u2} R A' (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A' (Semiring.toNonAssocSemiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))) (Algebra.toModule.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6)) (Module.toDistribMulAction.{u2, u2} A' A' (CommSemiring.toSemiring.{u2} A' _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A' (Semiring.toNonAssocSemiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))) (Semiring.toModule.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))) (IsScalarTower.right.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6))))) -> (Eq.{succ u3} B' (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) (fun (_x : AlgHom.{u1, u2, u3} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) => (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) -> B') ([anonymous].{u1, u2, u3} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) f (Polynomial.X.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) (fun (_x : AlgHom.{u1, u2, u3} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) => (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) -> B') ([anonymous].{u1, u2, u3} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) g (Polynomial.X.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))) -> (Eq.{max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u1, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) f g)
but is expected to have type
  forall {R : Type.{u3}} {A' : Type.{u2}} {B' : Type.{u1}} [_inst_1 : CommSemiring.{u2} A'] [_inst_2 : Semiring.{u1} B'] [_inst_3 : CommSemiring.{u3} R] [_inst_6 : Algebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1)] [_inst_7 : Algebra.{u3, u1} R B' _inst_3 _inst_2] {f : AlgHom.{u3, u2, u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7} {g : AlgHom.{u3, u2, u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7}, (Eq.{max (succ u2) (succ u1)} (AlgHom.{u3, u2, u1} R A' B' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_2 _inst_6 _inst_7) (AlgHom.comp.{u3, u2, u2, u1} R A' (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 _inst_6 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7 f (IsScalarTower.toAlgHom.{u3, u2, u2} R A' (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_3 _inst_1 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_6 (Polynomial.algebraOfAlgebra.{u2, u2} A' A' _inst_1 (CommSemiring.toSemiring.{u2} A' _inst_1) (Algebra.id.{u2} A' _inst_1)) (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) (Polynomial.isScalarTower.{u2, u3, u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1) R A' (Algebra.toSMul.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (MonoidWithZero.toMonoid.{u2} A' (Semiring.toMonoidWithZero.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))) (Module.toDistribMulAction.{u3, u2} R A' (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A' (Semiring.toNonAssocSemiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))) (Algebra.toModule.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6)) (Module.toDistribMulAction.{u2, u2} A' A' (CommSemiring.toSemiring.{u2} A' _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A' (Semiring.toNonAssocSemiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))) (Semiring.toModule.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))) (IsScalarTower.right.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6)))) (AlgHom.comp.{u3, u2, u2, u1} R A' (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 _inst_6 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7 g (IsScalarTower.toAlgHom.{u3, u2, u2} R A' (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_3 _inst_1 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_6 (Polynomial.algebraOfAlgebra.{u2, u2} A' A' _inst_1 (CommSemiring.toSemiring.{u2} A' _inst_1) (Algebra.id.{u2} A' _inst_1)) (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) (Polynomial.isScalarTower.{u2, u3, u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1) R A' (Algebra.toSMul.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (MonoidWithZero.toMonoid.{u2} A' (Semiring.toMonoidWithZero.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))) (Module.toDistribMulAction.{u3, u2} R A' (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A' (Semiring.toNonAssocSemiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))) (Algebra.toModule.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6)) (Module.toDistribMulAction.{u2, u2} A' A' (CommSemiring.toSemiring.{u2} A' _inst_1) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A' (Semiring.toNonAssocSemiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))) (Semiring.toModule.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))) (IsScalarTower.right.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6))))) -> (Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) => B') (Polynomial.X.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (AlgHom.{u3, u2, u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (fun (_x : Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) => B') _x) (SMulHomClass.toFunLike.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' (SMulZeroClass.toSMul.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (AddMonoid.toZero.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))))))) (DistribSMul.toSMulZeroClass.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))))))) (DistribMulAction.toDistribSMul.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))))) (Module.toDistribMulAction.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))))) (Algebra.toModule.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6)))))) (SMulZeroClass.toSMul.{u3, u1} R B' (AddMonoid.toZero.{u1} B' (AddCommMonoid.toAddMonoid.{u1} B' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B' (Semiring.toNonAssocSemiring.{u1} B' _inst_2))))) (DistribSMul.toSMulZeroClass.{u3, u1} R B' (AddMonoid.toAddZeroClass.{u1} B' (AddCommMonoid.toAddMonoid.{u1} B' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B' (Semiring.toNonAssocSemiring.{u1} B' _inst_2))))) (DistribMulAction.toDistribSMul.{u3, u1} R B' (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u1} B' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B' (Semiring.toNonAssocSemiring.{u1} B' _inst_2)))) (Module.toDistribMulAction.{u3, u1} R B' (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B' (Semiring.toNonAssocSemiring.{u1} B' _inst_2))) (Algebra.toModule.{u3, u1} R B' _inst_3 _inst_2 _inst_7))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))))) (AddCommMonoid.toAddMonoid.{u1} B' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B' (Semiring.toNonAssocSemiring.{u1} B' _inst_2)))) (Module.toDistribMulAction.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))))) (Algebra.toModule.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6))) (Module.toDistribMulAction.{u3, u1} R B' (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B' (Semiring.toNonAssocSemiring.{u1} B' _inst_2))) (Algebra.toModule.{u3, u1} R B' _inst_3 _inst_2 _inst_7)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B' (Semiring.toNonAssocSemiring.{u1} B' _inst_2)) (Module.toDistribMulAction.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))))) (Algebra.toModule.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6))) (Module.toDistribMulAction.{u3, u1} R B' (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B' (Semiring.toNonAssocSemiring.{u1} B' _inst_2))) (Algebra.toModule.{u3, u1} R B' _inst_3 _inst_2 _inst_7)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u2, u1, max u2 u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7 (AlgHom.{u3, u2, u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) (AlgHom.algHomClass.{u3, u2, u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7))))) f (Polynomial.X.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (AlgHom.{u3, u2, u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (fun (_x : Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) => B') _x) (SMulHomClass.toFunLike.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' (SMulZeroClass.toSMul.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (AddMonoid.toZero.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))))))) (DistribSMul.toSMulZeroClass.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))))))) (DistribMulAction.toDistribSMul.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))))) (Module.toDistribMulAction.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))))) (Algebra.toModule.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6)))))) (SMulZeroClass.toSMul.{u3, u1} R B' (AddMonoid.toZero.{u1} B' (AddCommMonoid.toAddMonoid.{u1} B' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B' (Semiring.toNonAssocSemiring.{u1} B' _inst_2))))) (DistribSMul.toSMulZeroClass.{u3, u1} R B' (AddMonoid.toAddZeroClass.{u1} B' (AddCommMonoid.toAddMonoid.{u1} B' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B' (Semiring.toNonAssocSemiring.{u1} B' _inst_2))))) (DistribMulAction.toDistribSMul.{u3, u1} R B' (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u1} B' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B' (Semiring.toNonAssocSemiring.{u1} B' _inst_2)))) (Module.toDistribMulAction.{u3, u1} R B' (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B' (Semiring.toNonAssocSemiring.{u1} B' _inst_2))) (Algebra.toModule.{u3, u1} R B' _inst_3 _inst_2 _inst_7))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))))) (AddCommMonoid.toAddMonoid.{u1} B' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B' (Semiring.toNonAssocSemiring.{u1} B' _inst_2)))) (Module.toDistribMulAction.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))))) (Algebra.toModule.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6))) (Module.toDistribMulAction.{u3, u1} R B' (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B' (Semiring.toNonAssocSemiring.{u1} B' _inst_2))) (Algebra.toModule.{u3, u1} R B' _inst_3 _inst_2 _inst_7)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B' (Semiring.toNonAssocSemiring.{u1} B' _inst_2)) (Module.toDistribMulAction.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1))))) (Algebra.toModule.{u3, u2} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6))) (Module.toDistribMulAction.{u3, u1} R B' (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B' (Semiring.toNonAssocSemiring.{u1} B' _inst_2))) (Algebra.toModule.{u3, u1} R B' _inst_3 _inst_2 _inst_7)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u2, u1, max u2 u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7 (AlgHom.{u3, u2, u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) (AlgHom.algHomClass.{u3, u2, u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7))))) g (Polynomial.X.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)))) -> (Eq.{max (succ u2) (succ u1)} (AlgHom.{u3, u2, u1} R (Polynomial.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) B' _inst_3 (Polynomial.semiring.{u2} A' (CommSemiring.toSemiring.{u2} A' _inst_1)) _inst_2 (Polynomial.algebraOfAlgebra.{u3, u2} R A' _inst_3 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_6) _inst_7) f g)
Case conversion may be inaccurate. Consider using '#align polynomial.alg_hom_ext' Polynomial.algHom_ext'ₓ'. -/
/-- Extensionality lemma for algebra maps out of `A'[X]` over a smaller base ring than `A'`
-/
@[ext]
theorem algHom_ext' [Algebra R A'] [Algebra R B'] {f g : A'[X] →ₐ[R] B'}
    (h₁ : f.comp (IsScalarTower.toAlgHom R A' A'[X]) = g.comp (IsScalarTower.toAlgHom R A' A'[X]))
    (h₂ : f X = g X) : f = g :=
  AlgHom.coe_ringHom_injective (Polynomial.ringHom_ext' (congr_arg AlgHom.toRingHom h₁) h₂)
#align polynomial.alg_hom_ext' Polynomial.algHom_ext'

variable (R)

#print Polynomial.toFinsuppIsoAlg /-
/-- Algebra isomorphism between `R[X]` and `add_monoid_algebra 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] AddMonoidAlgebra R ℕ :=
  { toFinsuppIso R with
    commutes' := fun r => by
      dsimp
      exact to_finsupp_algebra_map _ }
#align polynomial.to_finsupp_iso_alg Polynomial.toFinsuppIsoAlg
-/

variable {R}

instance [Nontrivial A] : Nontrivial (Subalgebra R A[X]) :=
  ⟨⟨⊥, ⊤, by
      rw [Ne.def, SetLike.ext_iff, not_forall]
      refine' ⟨X, _⟩
      simp only [Algebra.mem_bot, not_exists, Set.mem_range, iff_true_iff, Algebra.mem_top,
        algebra_map_apply, not_forall]
      intro x
      rw [ext_iff, not_forall]
      refine' ⟨1, _⟩
      simp [coeff_C]⟩⟩

/- warning: polynomial.alg_hom_eval₂_algebra_map -> Polynomial.algHom_eval₂_algebraMap is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} {B : Type.{u3}} [_inst_6 : CommSemiring.{u1} R] [_inst_7 : Semiring.{u2} A] [_inst_8 : Semiring.{u3} B] [_inst_9 : Algebra.{u1, u2} R A _inst_6 _inst_7] [_inst_10 : Algebra.{u1, u3} R B _inst_6 _inst_8] (p : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) (f : AlgHom.{u1, u2, u3} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) (a : A), Eq.{succ u3} B (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) (fun (_x : AlgHom.{u1, u2, u3} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) => A -> B) ([anonymous].{u1, u2, u3} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) f (Polynomial.eval₂.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_6) _inst_7 (algebraMap.{u1, u2} R A _inst_6 _inst_7 _inst_9) a p)) (Polynomial.eval₂.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_6) _inst_8 (algebraMap.{u1, u3} R B _inst_6 _inst_8 _inst_10) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) (fun (_x : AlgHom.{u1, u2, u3} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) => A -> B) ([anonymous].{u1, u2, u3} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) f a) p)
but is expected to have type
  forall {R : Type.{u3}} {A : Type.{u2}} {B : Type.{u1}} [_inst_6 : CommSemiring.{u3} R] [_inst_7 : Semiring.{u2} A] [_inst_8 : Semiring.{u1} B] [_inst_9 : Algebra.{u3, u2} R A _inst_6 _inst_7] [_inst_10 : Algebra.{u3, u1} R B _inst_6 _inst_8] (p : Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_6)) (f : AlgHom.{u3, u2, u1} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) (a : A), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) (Polynomial.eval₂.{u3, u2} R A (CommSemiring.toSemiring.{u3} R _inst_6) _inst_7 (algebraMap.{u3, u2} R A _inst_6 _inst_7 _inst_9) a p)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (AlgHom.{u3, u2, u1} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) _x) (SMulHomClass.toFunLike.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) R A B (SMulZeroClass.toSMul.{u3, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_7))))) (DistribSMul.toSMulZeroClass.{u3, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_7))))) (DistribMulAction.toDistribSMul.{u3, u2} R A (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_6))) (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_7)))) (Module.toDistribMulAction.{u3, u2} R A (CommSemiring.toSemiring.{u3} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_7))) (Algebra.toModule.{u3, u2} R A _inst_6 _inst_7 _inst_9))))) (SMulZeroClass.toSMul.{u3, u1} R B (AddMonoid.toZero.{u1} B (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_8))))) (DistribSMul.toSMulZeroClass.{u3, u1} R B (AddMonoid.toAddZeroClass.{u1} B (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_8))))) (DistribMulAction.toDistribSMul.{u3, u1} R B (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_6))) (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_8)))) (Module.toDistribMulAction.{u3, u1} R B (CommSemiring.toSemiring.{u3} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_8))) (Algebra.toModule.{u3, u1} R B _inst_6 _inst_8 _inst_10))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) R A B (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_6))) (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_7)))) (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_8)))) (Module.toDistribMulAction.{u3, u2} R A (CommSemiring.toSemiring.{u3} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_7))) (Algebra.toModule.{u3, u2} R A _inst_6 _inst_7 _inst_9)) (Module.toDistribMulAction.{u3, u1} R B (CommSemiring.toSemiring.{u3} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_8))) (Algebra.toModule.{u3, u1} R B _inst_6 _inst_8 _inst_10)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) R A B (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_6))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_7)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_8)) (Module.toDistribMulAction.{u3, u2} R A (CommSemiring.toSemiring.{u3} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_7))) (Algebra.toModule.{u3, u2} R A _inst_6 _inst_7 _inst_9)) (Module.toDistribMulAction.{u3, u1} R B (CommSemiring.toSemiring.{u3} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_8))) (Algebra.toModule.{u3, u1} R B _inst_6 _inst_8 _inst_10)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u2, u1, max u2 u1} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10 (AlgHom.{u3, u2, u1} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) (AlgHom.algHomClass.{u3, u2, u1} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10))))) f (Polynomial.eval₂.{u3, u2} R A (CommSemiring.toSemiring.{u3} R _inst_6) _inst_7 (algebraMap.{u3, u2} R A _inst_6 _inst_7 _inst_9) a p)) (Polynomial.eval₂.{u3, u1} R B (CommSemiring.toSemiring.{u3} R _inst_6) _inst_8 (algebraMap.{u3, u1} R B _inst_6 _inst_8 _inst_10) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (AlgHom.{u3, u2, u1} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) _x) (SMulHomClass.toFunLike.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) R A B (SMulZeroClass.toSMul.{u3, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_7))))) (DistribSMul.toSMulZeroClass.{u3, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_7))))) (DistribMulAction.toDistribSMul.{u3, u2} R A (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_6))) (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_7)))) (Module.toDistribMulAction.{u3, u2} R A (CommSemiring.toSemiring.{u3} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_7))) (Algebra.toModule.{u3, u2} R A _inst_6 _inst_7 _inst_9))))) (SMulZeroClass.toSMul.{u3, u1} R B (AddMonoid.toZero.{u1} B (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_8))))) (DistribSMul.toSMulZeroClass.{u3, u1} R B (AddMonoid.toAddZeroClass.{u1} B (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_8))))) (DistribMulAction.toDistribSMul.{u3, u1} R B (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_6))) (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_8)))) (Module.toDistribMulAction.{u3, u1} R B (CommSemiring.toSemiring.{u3} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_8))) (Algebra.toModule.{u3, u1} R B _inst_6 _inst_8 _inst_10))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) R A B (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_6))) (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_7)))) (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_8)))) (Module.toDistribMulAction.{u3, u2} R A (CommSemiring.toSemiring.{u3} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_7))) (Algebra.toModule.{u3, u2} R A _inst_6 _inst_7 _inst_9)) (Module.toDistribMulAction.{u3, u1} R B (CommSemiring.toSemiring.{u3} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_8))) (Algebra.toModule.{u3, u1} R B _inst_6 _inst_8 _inst_10)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) R A B (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_6))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_7)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_8)) (Module.toDistribMulAction.{u3, u2} R A (CommSemiring.toSemiring.{u3} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_7))) (Algebra.toModule.{u3, u2} R A _inst_6 _inst_7 _inst_9)) (Module.toDistribMulAction.{u3, u1} R B (CommSemiring.toSemiring.{u3} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_8))) (Algebra.toModule.{u3, u1} R B _inst_6 _inst_8 _inst_10)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u2, u1, max u2 u1} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10 (AlgHom.{u3, u2, u1} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10) (AlgHom.algHomClass.{u3, u2, u1} R A B _inst_6 _inst_7 _inst_8 _inst_9 _inst_10))))) f a) p)
Case conversion may be inaccurate. Consider using '#align polynomial.alg_hom_eval₂_algebra_map Polynomial.algHom_eval₂_algebraMapₓ'. -/
@[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 :=
  by
  dsimp [eval₂, Sum]
  simp only [f.map_sum, f.map_mul, f.map_pow, eq_intCast, map_intCast, AlgHom.commutes]
#align polynomial.alg_hom_eval₂_algebra_map Polynomial.algHom_eval₂_algebraMap

/- warning: polynomial.eval₂_algebra_map_X -> Polynomial.eval₂_algebraMap_X is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} [_inst_6 : CommSemiring.{u1} R] [_inst_7 : Semiring.{u2} A] [_inst_8 : Algebra.{u1, u2} R A _inst_6 _inst_7] (p : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) (f : AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) A _inst_6 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_6 (CommSemiring.toSemiring.{u1} R _inst_6) (Algebra.id.{u1} R _inst_6)) _inst_8), Eq.{succ u2} A (Polynomial.eval₂.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_6) _inst_7 (algebraMap.{u1, u2} R A _inst_6 _inst_7 _inst_8) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) A _inst_6 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_6 (CommSemiring.toSemiring.{u1} R _inst_6) (Algebra.id.{u1} R _inst_6)) _inst_8) (fun (_x : AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) A _inst_6 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_6 (CommSemiring.toSemiring.{u1} R _inst_6) (Algebra.id.{u1} R _inst_6)) _inst_8) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) -> A) ([anonymous].{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) A _inst_6 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_6 (CommSemiring.toSemiring.{u1} R _inst_6) (Algebra.id.{u1} R _inst_6)) _inst_8) f (Polynomial.X.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6))) p) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) A _inst_6 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_6 (CommSemiring.toSemiring.{u1} R _inst_6) (Algebra.id.{u1} R _inst_6)) _inst_8) (fun (_x : AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) A _inst_6 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_6 (CommSemiring.toSemiring.{u1} R _inst_6) (Algebra.id.{u1} R _inst_6)) _inst_8) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) -> A) ([anonymous].{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) A _inst_6 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_6 (CommSemiring.toSemiring.{u1} R _inst_6) (Algebra.id.{u1} R _inst_6)) _inst_8) f p)
but is expected to have type
  forall {R : Type.{u2}} {A : Type.{u1}} [_inst_6 : CommSemiring.{u2} R] [_inst_7 : Semiring.{u1} A] [_inst_8 : Algebra.{u2, u1} R A _inst_6 _inst_7] (p : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (f : AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)) _inst_8), Eq.{succ u1} A (Polynomial.eval₂.{u2, u1} R A (CommSemiring.toSemiring.{u2} R _inst_6) _inst_7 (algebraMap.{u2, u1} R A _inst_6 _inst_7 _inst_8) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)) _inst_8) (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (fun (_x : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) => A) _x) (SMulHomClass.toFunLike.{max u2 u1, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)) _inst_8) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A (SMulZeroClass.toSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (AddMonoid.toZero.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))))))) (DistribSMul.toSMulZeroClass.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))))))) (DistribMulAction.toDistribSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (CommSemiring.toSemiring.{u2} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6))))))) (SMulZeroClass.toSMul.{u2, u1} R A (AddMonoid.toZero.{u1} A (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_7))))) (DistribSMul.toSMulZeroClass.{u2, u1} R A (AddMonoid.toAddZeroClass.{u1} A (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_7))))) (DistribMulAction.toDistribSMul.{u2, u1} R A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))) (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_7)))) (Module.toDistribMulAction.{u2, u1} R A (CommSemiring.toSemiring.{u2} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_7))) (Algebra.toModule.{u2, u1} R A _inst_6 _inst_7 _inst_8))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)) _inst_8) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)))))) (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_7)))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (CommSemiring.toSemiring.{u2} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)))) (Module.toDistribMulAction.{u2, u1} R A (CommSemiring.toSemiring.{u2} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_7))) (Algebra.toModule.{u2, u1} R A _inst_6 _inst_7 _inst_8)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u1, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)) _inst_8) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_7)) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (CommSemiring.toSemiring.{u2} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)))) (Module.toDistribMulAction.{u2, u1} R A (CommSemiring.toSemiring.{u2} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_7))) (Algebra.toModule.{u2, u1} R A _inst_6 _inst_7 _inst_8)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u2, u2, u1, max u2 u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)) _inst_8 (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)) _inst_8) (AlgHom.algHomClass.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)) _inst_8))))) f (Polynomial.X.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))) p) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)) _inst_8) (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (fun (_x : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) => A) _x) (SMulHomClass.toFunLike.{max u2 u1, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)) _inst_8) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A (SMulZeroClass.toSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (AddMonoid.toZero.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))))))) (DistribSMul.toSMulZeroClass.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))))))) (DistribMulAction.toDistribSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (CommSemiring.toSemiring.{u2} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6))))))) (SMulZeroClass.toSMul.{u2, u1} R A (AddMonoid.toZero.{u1} A (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_7))))) (DistribSMul.toSMulZeroClass.{u2, u1} R A (AddMonoid.toAddZeroClass.{u1} A (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_7))))) (DistribMulAction.toDistribSMul.{u2, u1} R A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))) (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_7)))) (Module.toDistribMulAction.{u2, u1} R A (CommSemiring.toSemiring.{u2} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_7))) (Algebra.toModule.{u2, u1} R A _inst_6 _inst_7 _inst_8))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)) _inst_8) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)))))) (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_7)))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (CommSemiring.toSemiring.{u2} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)))) (Module.toDistribMulAction.{u2, u1} R A (CommSemiring.toSemiring.{u2} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_7))) (Algebra.toModule.{u2, u1} R A _inst_6 _inst_7 _inst_8)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u1, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)) _inst_8) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_7)) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (CommSemiring.toSemiring.{u2} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)))) (Module.toDistribMulAction.{u2, u1} R A (CommSemiring.toSemiring.{u2} R _inst_6) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_7))) (Algebra.toModule.{u2, u1} R A _inst_6 _inst_7 _inst_8)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u2, u2, u1, max u2 u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)) _inst_8 (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)) _inst_8) (AlgHom.algHomClass.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) A _inst_6 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_6)) _inst_7 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_6 (CommSemiring.toSemiring.{u2} R _inst_6) (Algebra.id.{u2} R _inst_6)) _inst_8))))) f p)
Case conversion may be inaccurate. Consider using '#align polynomial.eval₂_algebra_map_X Polynomial.eval₂_algebraMap_Xₓ'. -/
@[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 :=
  by
  conv_rhs => rw [← Polynomial.sum_C_mul_X_pow_eq p]
  dsimp [eval₂, Sum]
  simp only [f.map_sum, f.map_mul, f.map_pow, eq_intCast, map_intCast]
  simp [Polynomial.C_eq_algebraMap]
#align polynomial.eval₂_algebra_map_X Polynomial.eval₂_algebraMap_X

/- warning: polynomial.ring_hom_eval₂_cast_int_ring_hom -> Polynomial.ringHom_eval₂_cast_int_ringHom is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {S : Type.{u2}} [_inst_6 : Ring.{u1} R] [_inst_7 : Ring.{u2} S] (p : Polynomial.{0} Int Int.semiring) (f : RingHom.{u1, u2} R S (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S _inst_7))) (r : R), Eq.{succ u2} S (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R S (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S _inst_7))) (fun (_x : RingHom.{u1, u2} R S (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S _inst_7))) => R -> S) (RingHom.hasCoeToFun.{u1, u2} R S (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S _inst_7))) f (Polynomial.eval₂.{0, u1} Int R Int.semiring (Ring.toSemiring.{u1} R _inst_6) (Int.castRingHom.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6)) r p)) (Polynomial.eval₂.{0, u2} Int S Int.semiring (Ring.toSemiring.{u2} S _inst_7) (Int.castRingHom.{u2} S (Ring.toNonAssocRing.{u2} S _inst_7)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R S (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S _inst_7))) (fun (_x : RingHom.{u1, u2} R S (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S _inst_7))) => R -> S) (RingHom.hasCoeToFun.{u1, u2} R S (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S _inst_7))) f r) p)
but is expected to have type
  forall {R : Type.{u2}} {S : Type.{u1}} [_inst_6 : Ring.{u2} R] [_inst_7 : Ring.{u1} S] (p : Polynomial.{0} Int Int.instSemiringInt) (f : RingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7))) (r : R), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) (Polynomial.eval₂.{0, u2} Int R Int.instSemiringInt (Ring.toSemiring.{u2} R _inst_6) (Int.castRingHom.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)) r p)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7))) R S (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)))) (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7)))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7))) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7))) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7))) R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7)) (RingHom.instRingHomClassRingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7)))))) f (Polynomial.eval₂.{0, u2} Int R Int.instSemiringInt (Ring.toSemiring.{u2} R _inst_6) (Int.castRingHom.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)) r p)) (Polynomial.eval₂.{0, u1} Int S Int.instSemiringInt (Ring.toSemiring.{u1} S _inst_7) (Int.castRingHom.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7))) R S (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)))) (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7)))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7))) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7))) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7))) R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7)) (RingHom.instRingHomClassRingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R _inst_6)) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S _inst_7)))))) f r) p)
Case conversion may be inaccurate. Consider using '#align polynomial.ring_hom_eval₂_cast_int_ring_hom Polynomial.ringHom_eval₂_cast_int_ringHomₓ'. -/
-- these used to be about `algebra_map ℤ R`, but now the simp-normal form is `int.cast_ring_hom R`.
@[simp]
theorem ringHom_eval₂_cast_int_ringHom {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 :=
  algHom_eval₂_algebraMap p f.toIntAlgHom r
#align polynomial.ring_hom_eval₂_cast_int_ring_hom Polynomial.ringHom_eval₂_cast_int_ringHom

/- warning: polynomial.eval₂_int_cast_ring_hom_X -> Polynomial.eval₂_int_castRingHom_X is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} [_inst_6 : Ring.{u1} R] (p : Polynomial.{0} Int Int.semiring) (f : RingHom.{0, u1} (Polynomial.{0} Int Int.semiring) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.semiring) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.semiring) (Polynomial.ring.{0} Int Int.ring))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))), Eq.{succ u1} R (Polynomial.eval₂.{0, u1} Int R Int.semiring (Ring.toSemiring.{u1} R _inst_6) (Int.castRingHom.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6)) (coeFn.{succ u1, succ u1} (RingHom.{0, u1} (Polynomial.{0} Int Int.semiring) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.semiring) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.semiring) (Polynomial.ring.{0} Int Int.ring))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))) (fun (_x : RingHom.{0, u1} (Polynomial.{0} Int Int.semiring) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.semiring) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.semiring) (Polynomial.ring.{0} Int Int.ring))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))) => (Polynomial.{0} Int Int.semiring) -> R) (RingHom.hasCoeToFun.{0, u1} (Polynomial.{0} Int Int.semiring) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.semiring) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.semiring) (Polynomial.ring.{0} Int Int.ring))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))) f (Polynomial.X.{0} Int Int.semiring)) p) (coeFn.{succ u1, succ u1} (RingHom.{0, u1} (Polynomial.{0} Int Int.semiring) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.semiring) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.semiring) (Polynomial.ring.{0} Int Int.ring))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))) (fun (_x : RingHom.{0, u1} (Polynomial.{0} Int Int.semiring) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.semiring) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.semiring) (Polynomial.ring.{0} Int Int.ring))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))) => (Polynomial.{0} Int Int.semiring) -> R) (RingHom.hasCoeToFun.{0, u1} (Polynomial.{0} Int Int.semiring) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.semiring) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.semiring) (Polynomial.ring.{0} Int Int.ring))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))) f p)
but is expected to have type
  forall {R : Type.{u1}} [_inst_6 : Ring.{u1} R] (p : Polynomial.{0} Int Int.instSemiringInt) (f : RingHom.{0, u1} (Polynomial.{0} Int Int.instSemiringInt) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))), Eq.{succ u1} R (Polynomial.eval₂.{0, u1} Int R Int.instSemiringInt (Ring.toSemiring.{u1} R _inst_6) (Int.castRingHom.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6)) (FunLike.coe.{succ u1, 1, succ u1} (RingHom.{0, u1} (Polynomial.{0} Int Int.instSemiringInt) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))) (Polynomial.{0} Int Int.instSemiringInt) (fun (_x : Polynomial.{0} Int Int.instSemiringInt) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Polynomial.{0} Int Int.instSemiringInt) => R) _x) (MulHomClass.toFunLike.{u1, 0, u1} (RingHom.{0, u1} (Polynomial.{0} Int Int.instSemiringInt) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))) (Polynomial.{0} Int Int.instSemiringInt) R (NonUnitalNonAssocSemiring.toMul.{0} (Polynomial.{0} Int Int.instSemiringInt) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt))))) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6)))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u1} (RingHom.{0, u1} (Polynomial.{0} Int Int.instSemiringInt) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))) (Polynomial.{0} Int Int.instSemiringInt) R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u1} (RingHom.{0, u1} (Polynomial.{0} Int Int.instSemiringInt) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))) (Polynomial.{0} Int Int.instSemiringInt) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6)) (RingHom.instRingHomClassRingHom.{0, u1} (Polynomial.{0} Int Int.instSemiringInt) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6)))))) f (Polynomial.X.{0} Int Int.instSemiringInt)) p) (FunLike.coe.{succ u1, 1, succ u1} (RingHom.{0, u1} (Polynomial.{0} Int Int.instSemiringInt) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))) (Polynomial.{0} Int Int.instSemiringInt) (fun (_x : Polynomial.{0} Int Int.instSemiringInt) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Polynomial.{0} Int Int.instSemiringInt) => R) _x) (MulHomClass.toFunLike.{u1, 0, u1} (RingHom.{0, u1} (Polynomial.{0} Int Int.instSemiringInt) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))) (Polynomial.{0} Int Int.instSemiringInt) R (NonUnitalNonAssocSemiring.toMul.{0} (Polynomial.{0} Int Int.instSemiringInt) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt))))) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6)))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u1} (RingHom.{0, u1} (Polynomial.{0} Int Int.instSemiringInt) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))) (Polynomial.{0} Int Int.instSemiringInt) R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u1} (RingHom.{0, u1} (Polynomial.{0} Int Int.instSemiringInt) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6))) (Polynomial.{0} Int Int.instSemiringInt) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6)) (RingHom.instRingHomClassRingHom.{0, u1} (Polynomial.{0} Int Int.instSemiringInt) R (NonAssocRing.toNonAssocSemiring.{0} (Polynomial.{0} Int Int.instSemiringInt) (Ring.toNonAssocRing.{0} (Polynomial.{0} Int Int.instSemiringInt) (Polynomial.ring.{0} Int Int.instRingInt))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R _inst_6)))))) f p)
Case conversion may be inaccurate. Consider using '#align polynomial.eval₂_int_cast_ring_hom_X Polynomial.eval₂_int_castRingHom_Xₓ'. -/
@[simp]
theorem eval₂_int_castRingHom_X {R : Type _} [Ring R] (p : ℤ[X]) (f : ℤ[X] →+* R) :
    eval₂ (Int.castRingHom R) (f X) p = f p :=
  eval₂_algebraMap_X p f.toIntAlgHom
#align polynomial.eval₂_int_cast_ring_hom_X Polynomial.eval₂_int_castRingHom_X

end CommSemiring

section Aeval

variable [CommSemiring R] {p q : R[X]}

variable [Semiring A] [Algebra R A]

variable {B : Type _} [Semiring B] [Algebra R B]

variable (x : A)

#print Polynomial.aeval /-
/-- 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 :=
  { eval₂RingHom' (algebraMap R A) x fun a => Algebra.commutes _ _ with
    commutes' := fun r => eval₂_C _ _ }
#align polynomial.aeval Polynomial.aeval
-/

variable {R A}

/- warning: polynomial.adjoin_X -> Polynomial.adjoin_X is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} [_inst_3 : CommSemiring.{u1} R], Eq.{succ u1} (Subalgebra.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3))) (Algebra.adjoin.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Singleton.singleton.{u1, u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Set.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Set.hasSingleton.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Polynomial.X.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (Top.top.{u1} (Subalgebra.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3))) (CompleteLattice.toHasTop.{u1} (Subalgebra.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3))) (Algebra.Subalgebra.completeLattice.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)))))
but is expected to have type
  forall {R : Type.{u1}} [_inst_3 : CommSemiring.{u1} R], Eq.{succ u1} (Subalgebra.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3))) (Algebra.adjoin.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Singleton.singleton.{u1, u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Set.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Set.instSingletonSet.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Polynomial.X.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (Top.top.{u1} (Subalgebra.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3))) (CompleteLattice.toTop.{u1} (Subalgebra.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3))) (Algebra.instCompleteLatticeSubalgebra.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)))))
Case conversion may be inaccurate. Consider using '#align polynomial.adjoin_X Polynomial.adjoin_Xₓ'. -/
@[simp]
theorem adjoin_X : Algebra.adjoin R ({X} : Set R[X]) = ⊤ :=
  by
  refine' top_unique fun p hp => _
  set S := Algebra.adjoin R ({X} : Set R[X])
  rw [← sum_monomial_eq p]; simp only [← smul_X_eq_monomial, Sum]
  exact S.sum_mem fun n hn => S.smul_mem (S.pow_mem (Algebra.subset_adjoin rfl) _) _
#align polynomial.adjoin_X Polynomial.adjoin_X

#print Polynomial.algHom_ext /-
@[ext]
theorem algHom_ext {f g : R[X] →ₐ[R] A} (h : f X = g X) : f = g :=
  AlgHom.ext_of_adjoin_eq_top adjoin_X fun p hp => (Set.mem_singleton_iff.1 hp).symm ▸ h
#align polynomial.alg_hom_ext Polynomial.algHom_ext
-/

#print Polynomial.aeval_def /-
theorem aeval_def (p : R[X]) : aeval x p = eval₂ (algebraMap R A) x p :=
  rfl
#align polynomial.aeval_def Polynomial.aeval_def
-/

#print Polynomial.aeval_zero /-
@[simp]
theorem aeval_zero : aeval x (0 : R[X]) = 0 :=
  AlgHom.map_zero (aeval x)
#align polynomial.aeval_zero Polynomial.aeval_zero
-/

#print Polynomial.aeval_X /-
@[simp]
theorem aeval_X : aeval x (X : R[X]) = x :=
  eval₂_X _ x
#align polynomial.aeval_X Polynomial.aeval_X
-/

#print Polynomial.aeval_C /-
@[simp]
theorem aeval_C (r : R) : aeval x (C r) = algebraMap R A r :=
  eval₂_C _ x
#align polynomial.aeval_C Polynomial.aeval_C
-/

#print Polynomial.aeval_monomial /-
@[simp]
theorem aeval_monomial {n : ℕ} {r : R} : aeval x (monomial n r) = algebraMap _ _ r * x ^ n :=
  eval₂_monomial _ _
#align polynomial.aeval_monomial Polynomial.aeval_monomial
-/

#print Polynomial.aeval_X_pow /-
@[simp]
theorem aeval_X_pow {n : ℕ} : aeval x ((X : R[X]) ^ n) = x ^ n :=
  eval₂_X_pow _ _
#align polynomial.aeval_X_pow Polynomial.aeval_X_pow
-/

#print Polynomial.aeval_add /-
@[simp]
theorem aeval_add : aeval x (p + q) = aeval x p + aeval x q :=
  AlgHom.map_add _ _ _
#align polynomial.aeval_add Polynomial.aeval_add
-/

#print Polynomial.aeval_one /-
@[simp]
theorem aeval_one : aeval x (1 : R[X]) = 1 :=
  AlgHom.map_one _
#align polynomial.aeval_one Polynomial.aeval_one
-/

#print Polynomial.aeval_bit0 /-
@[simp]
theorem aeval_bit0 : aeval x (bit0 p) = bit0 (aeval x p) :=
  AlgHom.map_bit0 _ _
#align polynomial.aeval_bit0 Polynomial.aeval_bit0
-/

#print Polynomial.aeval_bit1 /-
@[simp]
theorem aeval_bit1 : aeval x (bit1 p) = bit1 (aeval x p) :=
  AlgHom.map_bit1 _ _
#align polynomial.aeval_bit1 Polynomial.aeval_bit1
-/

#print Polynomial.aeval_nat_cast /-
@[simp]
theorem aeval_nat_cast (n : ℕ) : aeval x (n : R[X]) = n :=
  map_natCast _ _
#align polynomial.aeval_nat_cast Polynomial.aeval_nat_cast
-/

#print Polynomial.aeval_mul /-
theorem aeval_mul : aeval x (p * q) = aeval x p * aeval x q :=
  AlgHom.map_mul _ _ _
#align polynomial.aeval_mul Polynomial.aeval_mul
-/

/- warning: polynomial.aeval_comp -> Polynomial.aeval_comp is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} [_inst_3 : CommSemiring.{u1} R] {p : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)} {q : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)} {A : Type.{u2}} [_inst_8 : CommSemiring.{u2} A] [_inst_9 : Algebra.{u1, u2} R A _inst_3 (CommSemiring.toSemiring.{u2} A _inst_8)] (x : A), Eq.{succ u2} A (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u2} A _inst_8) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) (fun (_x : AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u2} A _inst_8) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) -> A) ([anonymous].{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u2} A _inst_8) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) (Polynomial.aeval.{u1, u2} R A _inst_3 (CommSemiring.toSemiring.{u2} A _inst_8) _inst_9 x) (Polynomial.comp.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3) p q)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u2} A _inst_8) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) (fun (_x : AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u2} A _inst_8) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) -> A) ([anonymous].{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u2} A _inst_8) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) (Polynomial.aeval.{u1, u2} R A _inst_3 (CommSemiring.toSemiring.{u2} A _inst_8) _inst_9 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u2} A _inst_8) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) (fun (_x : AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u2} A _inst_8) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) -> A) ([anonymous].{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u2} A _inst_8) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) (Polynomial.aeval.{u1, u2} R A _inst_3 (CommSemiring.toSemiring.{u2} A _inst_8) _inst_9 x) q)) p)
but is expected to have type
  forall {R : Type.{u2}} [_inst_3 : CommSemiring.{u2} R] {p : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)} {q : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)} {A : Type.{u1}} [_inst_8 : CommSemiring.{u1} A] [_inst_9 : Algebra.{u2, u1} R A _inst_3 (CommSemiring.toSemiring.{u1} A _inst_8)] (x : A), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) (Polynomial.comp.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3) p q)) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (fun (_x : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) _x) (SMulHomClass.toFunLike.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A (SMulZeroClass.toSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toZero.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3))))))) (SMulZeroClass.toSMul.{u2, u1} R A (AddMonoid.toZero.{u1} A (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A _inst_8)))))) (DistribSMul.toSMulZeroClass.{u2, u1} R A (AddMonoid.toAddZeroClass.{u1} A (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A _inst_8)))))) (DistribMulAction.toDistribSMul.{u2, u1} R A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A _inst_8))))) (Module.toDistribMulAction.{u2, u1} R A (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A _inst_8)))) (Algebra.toModule.{u2, u1} R A _inst_3 (CommSemiring.toSemiring.{u1} A _inst_8) _inst_9))))) (DistribMulActionHomClass.toSMulHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A _inst_8))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)))) (Module.toDistribMulAction.{u2, u1} R A (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A _inst_8)))) (Algebra.toModule.{u2, u1} R A _inst_3 (CommSemiring.toSemiring.{u1} A _inst_8) _inst_9)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A _inst_8))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)))) (Module.toDistribMulAction.{u2, u1} R A (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A _inst_8)))) (Algebra.toModule.{u2, u1} R A _inst_3 (CommSemiring.toSemiring.{u1} A _inst_8) _inst_9)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u2, u2, u1, max u1 u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9 (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) (AlgHom.algHomClass.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9))))) (Polynomial.aeval.{u2, u1} R A _inst_3 (CommSemiring.toSemiring.{u1} A _inst_8) _inst_9 x) (Polynomial.comp.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3) p q)) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (fun (_x : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _x) (SMulHomClass.toFunLike.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (SMulZeroClass.toSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toZero.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3))))))) (SMulZeroClass.toSMul.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (AddMonoid.toZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8)))))) (DistribSMul.toSMulZeroClass.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (AddMonoid.toAddZeroClass.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8)))))) (DistribMulAction.toDistribSMul.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8))))) (Module.toDistribMulAction.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8)))) (Algebra.toModule.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_3 (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8) _inst_9))))) (DistribMulActionHomClass.toSMulHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)))) (Module.toDistribMulAction.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8)))) (Algebra.toModule.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_3 (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8) _inst_9)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)))) (Module.toDistribMulAction.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8)))) (Algebra.toModule.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_3 (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8) _inst_9)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u2, u2, u1, max u1 u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9 (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) (AlgHom.algHomClass.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9))))) (Polynomial.aeval.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_3 (CommSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) q) _inst_8) _inst_9 (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (fun (_x : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) _x) (SMulHomClass.toFunLike.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A (SMulZeroClass.toSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toZero.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3))))))) (SMulZeroClass.toSMul.{u2, u1} R A (AddMonoid.toZero.{u1} A (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A _inst_8)))))) (DistribSMul.toSMulZeroClass.{u2, u1} R A (AddMonoid.toAddZeroClass.{u1} A (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A _inst_8)))))) (DistribMulAction.toDistribSMul.{u2, u1} R A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A _inst_8))))) (Module.toDistribMulAction.{u2, u1} R A (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A _inst_8)))) (Algebra.toModule.{u2, u1} R A _inst_3 (CommSemiring.toSemiring.{u1} A _inst_8) _inst_9))))) (DistribMulActionHomClass.toSMulHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A _inst_8))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)))) (Module.toDistribMulAction.{u2, u1} R A (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A _inst_8)))) (Algebra.toModule.{u2, u1} R A _inst_3 (CommSemiring.toSemiring.{u1} A _inst_8) _inst_9)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A _inst_8))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)))) (Module.toDistribMulAction.{u2, u1} R A (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A _inst_8)))) (Algebra.toModule.{u2, u1} R A _inst_3 (CommSemiring.toSemiring.{u1} A _inst_8) _inst_9)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u2, u2, u1, max u1 u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9 (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) (AlgHom.algHomClass.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A _inst_8) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9))))) (Polynomial.aeval.{u2, u1} R A _inst_3 (CommSemiring.toSemiring.{u1} A _inst_8) _inst_9 x) q)) p)
Case conversion may be inaccurate. Consider using '#align polynomial.aeval_comp Polynomial.aeval_compₓ'. -/
theorem aeval_comp {A : Type _} [CommSemiring A] [Algebra R A] (x : A) :
    aeval x (p.comp q) = aeval (aeval x q) p :=
  eval₂_comp (algebraMap R A)
#align polynomial.aeval_comp Polynomial.aeval_comp

/- warning: polynomial.aeval_alg_hom -> Polynomial.aeval_algHom is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : Semiring.{u2} A] [_inst_5 : Algebra.{u1, u2} R A _inst_3 _inst_4] {B : Type.{u3}} [_inst_6 : Semiring.{u3} B] [_inst_7 : Algebra.{u1, u3} R B _inst_3 _inst_6] (f : AlgHom.{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) (x : A), Eq.{max (succ u1) (succ u3)} (AlgHom.{u1, u1, u3} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) B _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_6 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_7) (Polynomial.aeval.{u1, u3} R B _inst_3 _inst_6 _inst_7 (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) (fun (_x : AlgHom.{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) => A -> B) ([anonymous].{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) f x)) (AlgHom.comp.{u1, u1, u2, u3} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A B _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_4 _inst_6 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_5 _inst_7 f (Polynomial.aeval.{u1, u2} R A _inst_3 _inst_4 _inst_5 x))
but is expected to have type
  forall {R : Type.{u2}} {A : Type.{u3}} [_inst_3 : CommSemiring.{u2} R] [_inst_4 : Semiring.{u3} A] [_inst_5 : Algebra.{u2, u3} R A _inst_3 _inst_4] {B : Type.{u1}} [_inst_6 : Semiring.{u1} B] [_inst_7 : Algebra.{u2, u1} R B _inst_3 _inst_6] (f : AlgHom.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) (x : A), Eq.{max (succ u2) (succ u1)} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_6 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_7) (Polynomial.aeval.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_3 _inst_6 _inst_7 (FunLike.coe.{max (succ u3) (succ u1), succ u3, succ u1} (AlgHom.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) _x) (SMulHomClass.toFunLike.{max u3 u1, u2, u3, u1} (AlgHom.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) R A B (SMulZeroClass.toSMul.{u2, u3} R A (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_4))))) (DistribSMul.toSMulZeroClass.{u2, u3} R A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_4))))) (DistribMulAction.toDistribSMul.{u2, u3} R A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_4)))) (Module.toDistribMulAction.{u2, u3} R A (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_4))) (Algebra.toModule.{u2, u3} R A _inst_3 _inst_4 _inst_5))))) (SMulZeroClass.toSMul.{u2, u1} R B (AddMonoid.toZero.{u1} B (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))))) (DistribSMul.toSMulZeroClass.{u2, u1} R B (AddMonoid.toAddZeroClass.{u1} B (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))))) (DistribMulAction.toDistribSMul.{u2, u1} R B (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6)))) (Module.toDistribMulAction.{u2, u1} R B (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))) (Algebra.toModule.{u2, u1} R B _inst_3 _inst_6 _inst_7))))) (DistribMulActionHomClass.toSMulHomClass.{max u3 u1, u2, u3, u1} (AlgHom.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) R A B (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_4)))) (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6)))) (Module.toDistribMulAction.{u2, u3} R A (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_4))) (Algebra.toModule.{u2, u3} R A _inst_3 _inst_4 _inst_5)) (Module.toDistribMulAction.{u2, u1} R B (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))) (Algebra.toModule.{u2, u1} R B _inst_3 _inst_6 _inst_7)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u3 u1, u2, u3, u1} (AlgHom.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) R A B (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6)) (Module.toDistribMulAction.{u2, u3} R A (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_4))) (Algebra.toModule.{u2, u3} R A _inst_3 _inst_4 _inst_5)) (Module.toDistribMulAction.{u2, u1} R B (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))) (Algebra.toModule.{u2, u1} R B _inst_3 _inst_6 _inst_7)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u2, u3, u1, max u3 u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7 (AlgHom.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) (AlgHom.algHomClass.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7))))) f x)) (AlgHom.comp.{u2, u2, u3, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A B _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_4 _inst_6 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_5 _inst_7 f (Polynomial.aeval.{u2, u3} R A _inst_3 _inst_4 _inst_5 x))
Case conversion may be inaccurate. Consider using '#align polynomial.aeval_alg_hom Polynomial.aeval_algHomₓ'. -/
theorem aeval_algHom (f : A →ₐ[R] B) (x : A) : aeval (f x) = f.comp (aeval x) :=
  algHom_ext <| by simp only [aeval_X, AlgHom.comp_apply]
#align polynomial.aeval_alg_hom Polynomial.aeval_algHom

#print Polynomial.aeval_X_left /-
@[simp]
theorem aeval_X_left : aeval (X : R[X]) = AlgHom.id R R[X] :=
  algHom_ext <| aeval_X X
#align polynomial.aeval_X_left Polynomial.aeval_X_left
-/

#print Polynomial.aeval_X_left_apply /-
theorem aeval_X_left_apply (p : R[X]) : aeval X p = p :=
  AlgHom.congr_fun (@aeval_X_left R _) p
#align polynomial.aeval_X_left_apply Polynomial.aeval_X_left_apply
-/

#print Polynomial.eval_unique /-
theorem eval_unique (φ : R[X] →ₐ[R] A) (p) : φ p = eval₂ (algebraMap R A) (φ X) p := by
  rw [← aeval_def, aeval_alg_hom, aeval_X_left, AlgHom.comp_id]
#align polynomial.eval_unique Polynomial.eval_unique
-/

/- warning: polynomial.aeval_alg_hom_apply -> Polynomial.aeval_algHom_apply is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : Semiring.{u2} A] [_inst_5 : Algebra.{u1, u2} R A _inst_3 _inst_4] {B : Type.{u3}} [_inst_6 : Semiring.{u3} B] [_inst_7 : Algebra.{u1, u3} R B _inst_3 _inst_6] {F : Type.{u4}} [_inst_8 : AlgHomClass.{u4, u1, u2, u3} F R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7] (f : F) (x : A) (p : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)), Eq.{succ u3} B (coeFn.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (AlgHom.{u1, u1, u3} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) B _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_6 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_7) (fun (_x : AlgHom.{u1, u1, u3} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) B _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_6 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_7) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) -> B) ([anonymous].{u1, u1, u3} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) B _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_6 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_7) (Polynomial.aeval.{u1, u3} R B _inst_3 _inst_6 _inst_7 (coeFn.{succ u4, max (succ u2) (succ u3)} F (fun (_x : F) => A -> B) (FunLike.hasCoeToFun.{succ u4, succ u2, succ u3} F A (fun (_x : A) => B) (SMulHomClass.toFunLike.{u4, u1, u2, u3} F R A B (SMulZeroClass.toHasSmul.{u1, u2} R A (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4)))))) (DistribSMul.toSmulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4))))) (DistribMulAction.toDistribSMul.{u1, u2} R A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4)))) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4))) (Algebra.toModule.{u1, u2} R A _inst_3 _inst_4 _inst_5))))) (SMulZeroClass.toHasSmul.{u1, u3} R B (AddZeroClass.toHasZero.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_6)))))) (DistribSMul.toSmulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_6))))) (DistribMulAction.toDistribSMul.{u1, u3} R B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_6)))) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_6))) (Algebra.toModule.{u1, u3} R B _inst_3 _inst_6 _inst_7))))) (DistribMulActionHomClass.toSmulHomClass.{u4, u1, u2, u3} F R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4)))) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_6)))) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4))) (Algebra.toModule.{u1, u2} R A _inst_3 _inst_4 _inst_5)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_6))) (Algebra.toModule.{u1, u3} R B _inst_3 _inst_6 _inst_7)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{u4, u1, u2, u3} F R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_6)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4))) (Algebra.toModule.{u1, u2} R A _inst_3 _inst_4 _inst_5)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_6))) (Algebra.toModule.{u1, u3} R B _inst_3 _inst_6 _inst_7)) (AlgHom.nonUnitalAlgHomClass.{u1, u2, u3, u4} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7 F _inst_8))))) f x)) p) (coeFn.{succ u4, max (succ u2) (succ u3)} F (fun (_x : F) => A -> B) (FunLike.hasCoeToFun.{succ u4, succ u2, succ u3} F A (fun (_x : A) => B) (SMulHomClass.toFunLike.{u4, u1, u2, u3} F R A B (SMulZeroClass.toHasSmul.{u1, u2} R A (AddZeroClass.toHasZero.{u2} A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4)))))) (DistribSMul.toSmulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4))))) (DistribMulAction.toDistribSMul.{u1, u2} R A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4)))) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4))) (Algebra.toModule.{u1, u2} R A _inst_3 _inst_4 _inst_5))))) (SMulZeroClass.toHasSmul.{u1, u3} R B (AddZeroClass.toHasZero.{u3} B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_6)))))) (DistribSMul.toSmulZeroClass.{u1, u3} R B (AddMonoid.toAddZeroClass.{u3} B (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_6))))) (DistribMulAction.toDistribSMul.{u1, u3} R B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_6)))) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_6))) (Algebra.toModule.{u1, u3} R B _inst_3 _inst_6 _inst_7))))) (DistribMulActionHomClass.toSmulHomClass.{u4, u1, u2, u3} F R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4)))) (AddCommMonoid.toAddMonoid.{u3} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_6)))) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4))) (Algebra.toModule.{u1, u2} R A _inst_3 _inst_4 _inst_5)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_6))) (Algebra.toModule.{u1, u3} R B _inst_3 _inst_6 _inst_7)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{u4, u1, u2, u3} F R A B (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_6)) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4))) (Algebra.toModule.{u1, u2} R A _inst_3 _inst_4 _inst_5)) (Module.toDistribMulAction.{u1, u3} R B (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} B (Semiring.toNonAssocSemiring.{u3} B _inst_6))) (Algebra.toModule.{u1, u3} R B _inst_3 _inst_6 _inst_7)) (AlgHom.nonUnitalAlgHomClass.{u1, u2, u3, u4} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7 F _inst_8))))) f (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_5) (fun (_x : AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_5) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) -> A) ([anonymous].{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_5) (Polynomial.aeval.{u1, u2} R A _inst_3 _inst_4 _inst_5 x) p))
but is expected to have type
  forall {R : Type.{u3}} {A : Type.{u4}} [_inst_3 : CommSemiring.{u3} R] [_inst_4 : Semiring.{u4} A] [_inst_5 : Algebra.{u3, u4} R A _inst_3 _inst_4] {B : Type.{u1}} [_inst_6 : Semiring.{u1} B] [_inst_7 : Algebra.{u3, u1} R B _inst_3 _inst_6] {F : Type.{u2}} [_inst_8 : AlgHomClass.{u2, u3, u4, u1} F R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7] (f : F) (x : A) (p : Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) p) (FunLike.coe.{max (succ u1) (succ u3), succ u3, succ u1} (AlgHom.{u3, u3, u1} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_6 (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)) _inst_7) (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (fun (_x : Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _x) (SMulHomClass.toFunLike.{max u1 u3, u3, u3, u1} (AlgHom.{u3, u3, u1} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_6 (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)) _inst_7) R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (SMulZeroClass.toSMul.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (AddMonoid.toZero.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (AddCommMonoid.toAddMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (AddMonoid.toAddZeroClass.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (AddCommMonoid.toAddMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)))))) (Module.toDistribMulAction.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))))) (Algebra.toModule.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3))))))) (SMulZeroClass.toSMul.{u3, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (AddMonoid.toZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_6))))) (DistribSMul.toSMulZeroClass.{u3, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (AddMonoid.toAddZeroClass.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_6))))) (DistribMulAction.toDistribSMul.{u3, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_6)))) (Module.toDistribMulAction.{u3, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_6))) (Algebra.toModule.{u3, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_3 _inst_6 _inst_7))))) (DistribMulActionHomClass.toSMulHomClass.{max u1 u3, u3, u3, u1} (AlgHom.{u3, u3, u1} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_6 (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)) _inst_7) R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_6)))) (Module.toDistribMulAction.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))))) (Algebra.toModule.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)))) (Module.toDistribMulAction.{u3, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_6))) (Algebra.toModule.{u3, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_3 _inst_6 _inst_7)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u1 u3, u3, u3, u1} (AlgHom.{u3, u3, u1} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_6 (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)) _inst_7) R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_6)) (Module.toDistribMulAction.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))))) (Algebra.toModule.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)))) (Module.toDistribMulAction.{u3, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_6))) (Algebra.toModule.{u3, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_3 _inst_6 _inst_7)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u3, u1, max u1 u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_6 (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)) _inst_7 (AlgHom.{u3, u3, u1} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_6 (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)) _inst_7) (AlgHom.algHomClass.{u3, u3, u1} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_6 (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)) _inst_7))))) (Polynomial.aeval.{u3, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_3 _inst_6 _inst_7 (FunLike.coe.{succ u2, succ u4, succ u1} F A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) _x) (SMulHomClass.toFunLike.{u2, u3, u4, u1} F R A B (SMulZeroClass.toSMul.{u3, u4} R A (AddMonoid.toZero.{u4} A (AddCommMonoid.toAddMonoid.{u4} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4))))) (DistribSMul.toSMulZeroClass.{u3, u4} R A (AddMonoid.toAddZeroClass.{u4} A (AddCommMonoid.toAddMonoid.{u4} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4))))) (DistribMulAction.toDistribSMul.{u3, u4} R A (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u4} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4)))) (Module.toDistribMulAction.{u3, u4} R A (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4))) (Algebra.toModule.{u3, u4} R A _inst_3 _inst_4 _inst_5))))) (SMulZeroClass.toSMul.{u3, u1} R B (AddMonoid.toZero.{u1} B (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))))) (DistribSMul.toSMulZeroClass.{u3, u1} R B (AddMonoid.toAddZeroClass.{u1} B (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))))) (DistribMulAction.toDistribSMul.{u3, u1} R B (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6)))) (Module.toDistribMulAction.{u3, u1} R B (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))) (Algebra.toModule.{u3, u1} R B _inst_3 _inst_6 _inst_7))))) (DistribMulActionHomClass.toSMulHomClass.{u2, u3, u4, u1} F R A B (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u4} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4)))) (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6)))) (Module.toDistribMulAction.{u3, u4} R A (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4))) (Algebra.toModule.{u3, u4} R A _inst_3 _inst_4 _inst_5)) (Module.toDistribMulAction.{u3, u1} R B (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))) (Algebra.toModule.{u3, u1} R B _inst_3 _inst_6 _inst_7)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{u2, u3, u4, u1} F R A B (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6)) (Module.toDistribMulAction.{u3, u4} R A (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4))) (Algebra.toModule.{u3, u4} R A _inst_3 _inst_4 _inst_5)) (Module.toDistribMulAction.{u3, u1} R B (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))) (Algebra.toModule.{u3, u1} R B _inst_3 _inst_6 _inst_7)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u4, u1, u2} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7 F _inst_8)))) f x)) p) (FunLike.coe.{succ u2, succ u4, succ u1} F A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) _x) (SMulHomClass.toFunLike.{u2, u3, u4, u1} F R A B (SMulZeroClass.toSMul.{u3, u4} R A (AddMonoid.toZero.{u4} A (AddCommMonoid.toAddMonoid.{u4} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4))))) (DistribSMul.toSMulZeroClass.{u3, u4} R A (AddMonoid.toAddZeroClass.{u4} A (AddCommMonoid.toAddMonoid.{u4} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4))))) (DistribMulAction.toDistribSMul.{u3, u4} R A (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u4} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4)))) (Module.toDistribMulAction.{u3, u4} R A (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4))) (Algebra.toModule.{u3, u4} R A _inst_3 _inst_4 _inst_5))))) (SMulZeroClass.toSMul.{u3, u1} R B (AddMonoid.toZero.{u1} B (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))))) (DistribSMul.toSMulZeroClass.{u3, u1} R B (AddMonoid.toAddZeroClass.{u1} B (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))))) (DistribMulAction.toDistribSMul.{u3, u1} R B (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6)))) (Module.toDistribMulAction.{u3, u1} R B (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))) (Algebra.toModule.{u3, u1} R B _inst_3 _inst_6 _inst_7))))) (DistribMulActionHomClass.toSMulHomClass.{u2, u3, u4, u1} F R A B (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u4} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4)))) (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6)))) (Module.toDistribMulAction.{u3, u4} R A (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4))) (Algebra.toModule.{u3, u4} R A _inst_3 _inst_4 _inst_5)) (Module.toDistribMulAction.{u3, u1} R B (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))) (Algebra.toModule.{u3, u1} R B _inst_3 _inst_6 _inst_7)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{u2, u3, u4, u1} F R A B (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6)) (Module.toDistribMulAction.{u3, u4} R A (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4))) (Algebra.toModule.{u3, u4} R A _inst_3 _inst_4 _inst_5)) (Module.toDistribMulAction.{u3, u1} R B (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))) (Algebra.toModule.{u3, u1} R B _inst_3 _inst_6 _inst_7)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u4, u1, u2} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7 F _inst_8)))) f (FunLike.coe.{max (succ u4) (succ u3), succ u3, succ u4} (AlgHom.{u3, u3, u4} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) A _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)) _inst_5) (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (fun (_x : Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) => A) _x) (SMulHomClass.toFunLike.{max u4 u3, u3, u3, u4} (AlgHom.{u3, u3, u4} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) A _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)) _inst_5) R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) A (SMulZeroClass.toSMul.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (AddMonoid.toZero.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (AddCommMonoid.toAddMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (AddMonoid.toAddZeroClass.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (AddCommMonoid.toAddMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)))))) (Module.toDistribMulAction.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))))) (Algebra.toModule.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3))))))) (SMulZeroClass.toSMul.{u3, u4} R A (AddMonoid.toZero.{u4} A (AddCommMonoid.toAddMonoid.{u4} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4))))) (DistribSMul.toSMulZeroClass.{u3, u4} R A (AddMonoid.toAddZeroClass.{u4} A (AddCommMonoid.toAddMonoid.{u4} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4))))) (DistribMulAction.toDistribSMul.{u3, u4} R A (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u4} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4)))) (Module.toDistribMulAction.{u3, u4} R A (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4))) (Algebra.toModule.{u3, u4} R A _inst_3 _inst_4 _inst_5))))) (DistribMulActionHomClass.toSMulHomClass.{max u4 u3, u3, u3, u4} (AlgHom.{u3, u3, u4} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) A _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)) _inst_5) R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) A (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (AddCommMonoid.toAddMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{u4} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4)))) (Module.toDistribMulAction.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))))) (Algebra.toModule.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)))) (Module.toDistribMulAction.{u3, u4} R A (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4))) (Algebra.toModule.{u3, u4} R A _inst_3 _inst_4 _inst_5)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u4 u3, u3, u3, u4} (AlgHom.{u3, u3, u4} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) A _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)) _inst_5) R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) A (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4)) (Module.toDistribMulAction.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3))))) (Algebra.toModule.{u3, u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)))) (Module.toDistribMulAction.{u3, u4} R A (CommSemiring.toSemiring.{u3} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} A (Semiring.toNonAssocSemiring.{u4} A _inst_4))) (Algebra.toModule.{u3, u4} R A _inst_3 _inst_4 _inst_5)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u3, u4, max u4 u3} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) A _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)) _inst_5 (AlgHom.{u3, u3, u4} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) A _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)) _inst_5) (AlgHom.algHomClass.{u3, u3, u4} R (Polynomial.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) A _inst_3 (Polynomial.semiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u3, u3} R R _inst_3 (CommSemiring.toSemiring.{u3} R _inst_3) (Algebra.id.{u3} R _inst_3)) _inst_5))))) (Polynomial.aeval.{u3, u4} R A _inst_3 _inst_4 _inst_5 x) p))
Case conversion may be inaccurate. Consider using '#align polynomial.aeval_alg_hom_apply Polynomial.aeval_algHom_applyₓ'. -/
theorem aeval_algHom_apply {F : Type _} [AlgHomClass F R A B] (f : F) (x : A) (p : R[X]) :
    aeval (f x) p = f (aeval x p) :=
  by
  refine' Polynomial.induction_on p (by simp) (fun p q hp hq => _) (by simp)
  rw [map_add, hp, hq, ← map_add, ← map_add]
#align polynomial.aeval_alg_hom_apply Polynomial.aeval_algHom_apply

/- warning: polynomial.aeval_alg_equiv -> Polynomial.aeval_algEquiv is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : Semiring.{u2} A] [_inst_5 : Algebra.{u1, u2} R A _inst_3 _inst_4] {B : Type.{u3}} [_inst_6 : Semiring.{u3} B] [_inst_7 : Algebra.{u1, u3} R B _inst_3 _inst_6] (f : AlgEquiv.{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) (x : A), Eq.{max (succ u1) (succ u3)} (AlgHom.{u1, u1, u3} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) B _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_6 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_7) (Polynomial.aeval.{u1, u3} R B _inst_3 _inst_6 _inst_7 (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgEquiv.{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) (fun (_x : AlgEquiv.{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) => A -> B) (AlgEquiv.hasCoeToFun.{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) f x)) (AlgHom.comp.{u1, u1, u2, u3} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A B _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_4 _inst_6 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_5 _inst_7 ((fun (a : Sort.{max (succ u2) (succ u3)}) (b : Sort.{max (succ u2) (succ u3)}) [self : HasLiftT.{max (succ u2) (succ u3), max (succ u2) (succ u3)} a b] => self.0) (AlgEquiv.{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) (AlgHom.{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) (HasLiftT.mk.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgEquiv.{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) (AlgHom.{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) (CoeTCₓ.coe.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgEquiv.{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) (AlgHom.{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) (AlgHomClass.coeTC.{u1, u2, u3, max u2 u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7 (AlgEquiv.{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) (AlgEquivClass.toAlgHomClass.{max u2 u3, u1, u2, u3} (AlgEquiv.{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7 (AlgEquiv.algEquivClass.{u1, u2, u3} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7))))) f) (Polynomial.aeval.{u1, u2} R A _inst_3 _inst_4 _inst_5 x))
but is expected to have type
  forall {R : Type.{u2}} {A : Type.{u3}} [_inst_3 : CommSemiring.{u2} R] [_inst_4 : Semiring.{u3} A] [_inst_5 : Algebra.{u2, u3} R A _inst_3 _inst_4] {B : Type.{u1}} [_inst_6 : Semiring.{u1} B] [_inst_7 : Algebra.{u2, u1} R B _inst_3 _inst_6] (f : AlgEquiv.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) (x : A), Eq.{max (succ u2) (succ u1)} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_6 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_7) (Polynomial.aeval.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) x) _inst_3 _inst_6 _inst_7 (FunLike.coe.{max (succ u3) (succ u1), succ u3, succ u1} (AlgEquiv.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : A) => B) _x) (SMulHomClass.toFunLike.{max u3 u1, u2, u3, u1} (AlgEquiv.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) R A B (SMulZeroClass.toSMul.{u2, u3} R A (AddMonoid.toZero.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_4))))) (DistribSMul.toSMulZeroClass.{u2, u3} R A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_4))))) (DistribMulAction.toDistribSMul.{u2, u3} R A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_4)))) (Module.toDistribMulAction.{u2, u3} R A (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_4))) (Algebra.toModule.{u2, u3} R A _inst_3 _inst_4 _inst_5))))) (SMulZeroClass.toSMul.{u2, u1} R B (AddMonoid.toZero.{u1} B (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))))) (DistribSMul.toSMulZeroClass.{u2, u1} R B (AddMonoid.toAddZeroClass.{u1} B (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))))) (DistribMulAction.toDistribSMul.{u2, u1} R B (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6)))) (Module.toDistribMulAction.{u2, u1} R B (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))) (Algebra.toModule.{u2, u1} R B _inst_3 _inst_6 _inst_7))))) (DistribMulActionHomClass.toSMulHomClass.{max u3 u1, u2, u3, u1} (AlgEquiv.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) R A B (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_4)))) (AddCommMonoid.toAddMonoid.{u1} B (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6)))) (Module.toDistribMulAction.{u2, u3} R A (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_4))) (Algebra.toModule.{u2, u3} R A _inst_3 _inst_4 _inst_5)) (Module.toDistribMulAction.{u2, u1} R B (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))) (Algebra.toModule.{u2, u1} R B _inst_3 _inst_6 _inst_7)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u3 u1, u2, u3, u1} (AlgEquiv.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) R A B (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_4)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6)) (Module.toDistribMulAction.{u2, u3} R A (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_4))) (Algebra.toModule.{u2, u3} R A _inst_3 _inst_4 _inst_5)) (Module.toDistribMulAction.{u2, u1} R B (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} B (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} B (Semiring.toNonAssocSemiring.{u1} B _inst_6))) (Algebra.toModule.{u2, u1} R B _inst_3 _inst_6 _inst_7)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u2, u3, u1, max u3 u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7 (AlgEquiv.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) (AlgEquivClass.toAlgHomClass.{max u3 u1, u2, u3, u1} (AlgEquiv.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7 (AlgEquiv.instAlgEquivClassAlgEquiv.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7)))))) f x)) (AlgHom.comp.{u2, u2, u3, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A B _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_4 _inst_6 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_5 _inst_7 (AlgHomClass.toAlgHom.{u2, u3, u1, max u3 u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7 (AlgEquiv.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) (AlgEquivClass.toAlgHomClass.{max u3 u1, u2, u3, u1} (AlgEquiv.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7) R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7 (AlgEquiv.instAlgEquivClassAlgEquiv.{u2, u3, u1} R A B _inst_3 _inst_4 _inst_6 _inst_5 _inst_7)) f) (Polynomial.aeval.{u2, u3} R A _inst_3 _inst_4 _inst_5 x))
Case conversion may be inaccurate. Consider using '#align polynomial.aeval_alg_equiv Polynomial.aeval_algEquivₓ'. -/
theorem aeval_algEquiv (f : A ≃ₐ[R] B) (x : A) : aeval (f x) = (f : A →ₐ[R] B).comp (aeval x) :=
  aeval_algHom (f : A →ₐ[R] B) x
#align polynomial.aeval_alg_equiv Polynomial.aeval_algEquiv

#print Polynomial.aeval_algebraMap_apply_eq_algebraMap_eval /-
theorem aeval_algebraMap_apply_eq_algebraMap_eval (x : R) (p : R[X]) :
    aeval (algebraMap R A x) p = algebraMap R A (p.eval x) :=
  aeval_algHom_apply (Algebra.ofId R A) x p
#align polynomial.aeval_algebra_map_apply_eq_algebra_map_eval Polynomial.aeval_algebraMap_apply_eq_algebraMap_eval
-/

#print Polynomial.coe_aeval_eq_eval /-
@[simp]
theorem coe_aeval_eq_eval (r : R) : (aeval r : R[X] → R) = eval r :=
  rfl
#align polynomial.coe_aeval_eq_eval Polynomial.coe_aeval_eq_eval
-/

/- warning: polynomial.coe_aeval_eq_eval_ring_hom -> Polynomial.coe_aeval_eq_evalRingHom is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} [_inst_3 : CommSemiring.{u1} R] (x : R), Eq.{succ u1} (RingHom.{u1, u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (AlgHom.{u1, u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Algebra.id.{u1} R _inst_3)) (RingHom.{u1, u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (HasLiftT.mk.{succ u1, succ u1} (AlgHom.{u1, u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Algebra.id.{u1} R _inst_3)) (RingHom.{u1, u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (CoeTCₓ.coe.{succ u1, succ u1} (AlgHom.{u1, u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Algebra.id.{u1} R _inst_3)) (RingHom.{u1, u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (RingHom.hasCoeT.{u1, u1, u1} (AlgHom.{u1, u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Algebra.id.{u1} R _inst_3)) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (AlgHomClass.toRingHomClass.{u1, u1, u1, u1} (AlgHom.{u1, u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Algebra.id.{u1} R _inst_3)) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Algebra.id.{u1} R _inst_3) (AlgHom.algHomClass.{u1, u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Algebra.id.{u1} R _inst_3)))))) (Polynomial.aeval.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3) x)) (Polynomial.evalRingHom.{u1} R _inst_3 x)
but is expected to have type
  forall {R : Type.{u1}} [_inst_3 : CommSemiring.{u1} R] (x : R), Eq.{succ u1} (RingHom.{u1, u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (RingHomClass.toRingHom.{u1, u1, u1} (AlgHom.{u1, u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Algebra.id.{u1} R _inst_3)) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (AlgHomClass.toRingHomClass.{u1, u1, u1, u1} (AlgHom.{u1, u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Algebra.id.{u1} R _inst_3)) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Algebra.id.{u1} R _inst_3) (AlgHom.algHomClass.{u1, u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Algebra.id.{u1} R _inst_3))) (Polynomial.aeval.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3) x)) (Polynomial.evalRingHom.{u1} R _inst_3 x)
Case conversion may be inaccurate. Consider using '#align polynomial.coe_aeval_eq_eval_ring_hom Polynomial.coe_aeval_eq_evalRingHomₓ'. -/
@[simp]
theorem coe_aeval_eq_evalRingHom (x : R) :
    ((aeval x : R[X] →ₐ[R] R) : R[X] →+* R) = evalRingHom x :=
  rfl
#align polynomial.coe_aeval_eq_eval_ring_hom Polynomial.coe_aeval_eq_evalRingHom

/- warning: polynomial.aeval_fn_apply -> Polynomial.aeval_fn_apply is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} [_inst_3 : CommSemiring.{u1} R] {X : Type.{u2}} (g : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (f : X -> R) (x : X), Eq.{succ u1} R (coeFn.{max (succ u1) (succ (max u2 u1)), max (succ u1) (succ (max u2 u1))} (AlgHom.{u1, u1, max u2 u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (X -> R) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Pi.semiring.{u2, u1} X (fun (ᾰ : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Function.algebra.{u1, u2, u1} R X R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3))) (fun (_x : AlgHom.{u1, u1, max u2 u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (X -> R) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Pi.semiring.{u2, u1} X (fun (ᾰ : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Function.algebra.{u1, u2, u1} R X R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3))) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) -> X -> R) ([anonymous].{u1, u1, max u2 u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (X -> R) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Pi.semiring.{u2, u1} X (fun (ᾰ : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Function.algebra.{u1, u2, u1} R X R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3))) (Polynomial.aeval.{u1, max u2 u1} R (X -> R) _inst_3 (Pi.semiring.{u2, u1} X (fun (ᾰ : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u1} R _inst_3)) (Function.algebra.{u1, u2, u1} R X R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) f) g x) (coeFn.{succ u1, succ u1} (AlgHom.{u1, u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Algebra.id.{u1} R _inst_3)) (fun (_x : AlgHom.{u1, u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Algebra.id.{u1} R _inst_3)) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) -> R) ([anonymous].{u1, u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) R _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Algebra.id.{u1} R _inst_3)) (Polynomial.aeval.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3) (f x)) g)
but is expected to have type
  forall {R : Type.{u2}} [_inst_3 : CommSemiring.{u2} R] {X : Type.{u1}} (g : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (f : X -> R) (x : X), Eq.{succ u2} R (FunLike.coe.{max (succ u2) (succ u1), succ u2, max (succ u2) (succ u1)} (AlgHom.{u2, u2, max u2 u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (X -> R) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Pi.algebra.{u1, u2, u2} X R (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) _inst_3 (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3) (fun (i : X) => Algebra.id.{u2} R _inst_3))) (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (fun (_x : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => X -> R) _x) (SMulHomClass.toFunLike.{max u2 u1, u2, u2, max u2 u1} (AlgHom.{u2, u2, max u2 u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (X -> R) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Pi.algebra.{u1, u2, u2} X R (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) _inst_3 (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3) (fun (i : X) => Algebra.id.{u2} R _inst_3))) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (X -> R) (SMulZeroClass.toSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toZero.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3))))))) (SMulZeroClass.toSMul.{u2, max u2 u1} R (X -> R) (AddMonoid.toZero.{max u2 u1} (X -> R) (AddCommMonoid.toAddMonoid.{max u2 u1} (X -> R) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u2 u1} (X -> R) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u2 u1} (X -> R) (Semiring.toNonAssocSemiring.{max u2 u1} (X -> R) (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u2, max u2 u1} R (X -> R) (AddMonoid.toAddZeroClass.{max u2 u1} (X -> R) (AddCommMonoid.toAddMonoid.{max u2 u1} (X -> R) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u2 u1} (X -> R) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u2 u1} (X -> R) (Semiring.toNonAssocSemiring.{max u2 u1} (X -> R) (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u2, max u2 u1} R (X -> R) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{max u2 u1} (X -> R) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u2 u1} (X -> R) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u2 u1} (X -> R) (Semiring.toNonAssocSemiring.{max u2 u1} (X -> R) (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u2, max u2 u1} R (X -> R) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u2 u1} (X -> R) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u2 u1} (X -> R) (Semiring.toNonAssocSemiring.{max u2 u1} (X -> R) (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, max u2 u1} R (X -> R) _inst_3 (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3)) (Pi.algebra.{u1, u2, u2} X R (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) _inst_3 (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3) (fun (i : X) => Algebra.id.{u2} R _inst_3))))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u2, u2, max u2 u1} (AlgHom.{u2, u2, max u2 u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (X -> R) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Pi.algebra.{u1, u2, u2} X R (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) _inst_3 (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3) (fun (i : X) => Algebra.id.{u2} R _inst_3))) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (X -> R) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{max u2 u1} (X -> R) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u2 u1} (X -> R) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u2 u1} (X -> R) (Semiring.toNonAssocSemiring.{max u2 u1} (X -> R) (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)))) (Module.toDistribMulAction.{u2, max u2 u1} R (X -> R) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u2 u1} (X -> R) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u2 u1} (X -> R) (Semiring.toNonAssocSemiring.{max u2 u1} (X -> R) (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, max u2 u1} R (X -> R) _inst_3 (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3)) (Pi.algebra.{u1, u2, u2} X R (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) _inst_3 (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3) (fun (i : X) => Algebra.id.{u2} R _inst_3)))) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u1, u2, u2, max u2 u1} (AlgHom.{u2, u2, max u2 u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (X -> R) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Pi.algebra.{u1, u2, u2} X R (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) _inst_3 (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3) (fun (i : X) => Algebra.id.{u2} R _inst_3))) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (X -> R) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u2 u1} (X -> R) (Semiring.toNonAssocSemiring.{max u2 u1} (X -> R) (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3)))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)))) (Module.toDistribMulAction.{u2, max u2 u1} R (X -> R) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u2 u1} (X -> R) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u2 u1} (X -> R) (Semiring.toNonAssocSemiring.{max u2 u1} (X -> R) (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, max u2 u1} R (X -> R) _inst_3 (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3)) (Pi.algebra.{u1, u2, u2} X R (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) _inst_3 (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3) (fun (i : X) => Algebra.id.{u2} R _inst_3)))) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u2, u2, max u2 u1, max u2 u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (X -> R) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Pi.algebra.{u1, u2, u2} X R (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) _inst_3 (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3) (fun (i : X) => Algebra.id.{u2} R _inst_3)) (AlgHom.{u2, u2, max u2 u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (X -> R) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Pi.algebra.{u1, u2, u2} X R (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) _inst_3 (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3) (fun (i : X) => Algebra.id.{u2} R _inst_3))) (AlgHom.algHomClass.{u2, u2, max u2 u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (X -> R) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Pi.semiring.{u1, u2} X (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Pi.algebra.{u1, u2, u2} X R (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) _inst_3 (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3) (fun (i : X) => Algebra.id.{u2} R _inst_3))))))) (Polynomial.aeval.{u2, max u2 u1} R (X -> R) _inst_3 (Pi.semiring.{u1, u2} X (fun (ᾰ : X) => R) (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3)) (Pi.algebra.{u1, u2, u2} X R (fun (a._@.Mathlib.Data.Polynomial.AlgebraMap._hyg.4521 : X) => R) _inst_3 (fun (i : X) => CommSemiring.toSemiring.{u2} R _inst_3) (fun (i : X) => Algebra.id.{u2} R _inst_3)) f) g x) (FunLike.coe.{succ u2, succ u2, succ u2} (AlgHom.{u2, u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) R _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Algebra.id.{u2} R _inst_3)) (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (fun (_x : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => R) _x) (SMulHomClass.toFunLike.{u2, u2, u2, u2} (AlgHom.{u2, u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) R _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Algebra.id.{u2} R _inst_3)) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) R (SMulZeroClass.toSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toZero.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3))))))) (SMulZeroClass.toSMul.{u2, u2} R R (AddMonoid.toZero.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (DistribSMul.toSMulZeroClass.{u2, u2} R R (AddMonoid.toAddZeroClass.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (DistribMulAction.toDistribSMul.{u2, u2} R R (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Module.toDistribMulAction.{u2, u2} R R (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)))))) (DistribMulActionHomClass.toSMulHomClass.{u2, u2, u2, u2} (AlgHom.{u2, u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) R _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Algebra.id.{u2} R _inst_3)) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) R (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)))) (Module.toDistribMulAction.{u2, u2} R R (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3))) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{u2, u2, u2, u2} (AlgHom.{u2, u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) R _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Algebra.id.{u2} R _inst_3)) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) R (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)))) (Module.toDistribMulAction.{u2, u2} R R (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3))) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u2, u2, u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) R _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Algebra.id.{u2} R _inst_3) (AlgHom.{u2, u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) R _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Algebra.id.{u2} R _inst_3)) (AlgHom.algHomClass.{u2, u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) R _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Algebra.id.{u2} R _inst_3)))))) (Polynomial.aeval.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3) (f x)) g)
Case conversion may be inaccurate. Consider using '#align polynomial.aeval_fn_apply Polynomial.aeval_fn_applyₓ'. -/
@[simp]
theorem aeval_fn_apply {X : Type _} (g : R[X]) (f : X → R) (x : X) :
    ((aeval f) g) x = aeval (f x) g :=
  (aeval_algHom_apply (Pi.evalAlgHom R (fun _ => R) x) f g).symm
#align polynomial.aeval_fn_apply Polynomial.aeval_fn_apply

/- warning: polynomial.aeval_subalgebra_coe -> Polynomial.aeval_subalgebra_coe is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} [_inst_3 : CommSemiring.{u1} R] (g : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) {A : Type.{u2}} [_inst_8 : Semiring.{u2} A] [_inst_9 : Algebra.{u1, u2} R A _inst_3 _inst_8] (s : Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) (f : coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.setLike.{u1, u2} R A _inst_3 _inst_8 _inst_9)) s), Eq.{succ u2} A ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.setLike.{u1, u2} R A _inst_3 _inst_8 _inst_9)) s) A (HasLiftT.mk.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.setLike.{u1, u2} R A _inst_3 _inst_8 _inst_9)) s) A (CoeTCₓ.coe.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.setLike.{u1, u2} R A _inst_3 _inst_8 _inst_9)) s) A (coeBase.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.setLike.{u1, u2} R A _inst_3 _inst_8 _inst_9)) s) A (coeSubtype.{succ u2} A (fun (x : A) => Membership.Mem.{u2, u2} A (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) (SetLike.hasMem.{u2, u2} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.setLike.{u1, u2} R A _inst_3 _inst_8 _inst_9)) x s))))) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.setLike.{u1, u2} R A _inst_3 _inst_8 _inst_9)) s) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Subalgebra.toSemiring.{u1, u2} R A _inst_3 _inst_8 _inst_9 s) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Subalgebra.algebra.{u1, u2} R A _inst_3 _inst_8 _inst_9 s)) (fun (_x : AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.setLike.{u1, u2} R A _inst_3 _inst_8 _inst_9)) s) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Subalgebra.toSemiring.{u1, u2} R A _inst_3 _inst_8 _inst_9 s) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Subalgebra.algebra.{u1, u2} R A _inst_3 _inst_8 _inst_9 s)) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) -> (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.setLike.{u1, u2} R A _inst_3 _inst_8 _inst_9)) s)) ([anonymous].{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.setLike.{u1, u2} R A _inst_3 _inst_8 _inst_9)) s) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Subalgebra.toSemiring.{u1, u2} R A _inst_3 _inst_8 _inst_9 s) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Subalgebra.algebra.{u1, u2} R A _inst_3 _inst_8 _inst_9 s)) (Polynomial.aeval.{u1, u2} R (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.setLike.{u1, u2} R A _inst_3 _inst_8 _inst_9)) s) _inst_3 (Subalgebra.toSemiring.{u1, u2} R A _inst_3 _inst_8 _inst_9 s) (Subalgebra.algebra.{u1, u2} R A _inst_3 _inst_8 _inst_9 s) f) g)) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) (fun (_x : AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) -> A) ([anonymous].{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) (Polynomial.aeval.{u1, u2} R A _inst_3 _inst_8 _inst_9 ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.setLike.{u1, u2} R A _inst_3 _inst_8 _inst_9)) s) A (HasLiftT.mk.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.setLike.{u1, u2} R A _inst_3 _inst_8 _inst_9)) s) A (CoeTCₓ.coe.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.setLike.{u1, u2} R A _inst_3 _inst_8 _inst_9)) s) A (coeBase.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.setLike.{u1, u2} R A _inst_3 _inst_8 _inst_9)) s) A (coeSubtype.{succ u2} A (fun (x : A) => Membership.Mem.{u2, u2} A (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) (SetLike.hasMem.{u2, u2} (Subalgebra.{u1, u2} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.setLike.{u1, u2} R A _inst_3 _inst_8 _inst_9)) x s))))) f)) g)
but is expected to have type
  forall {R : Type.{u2}} [_inst_3 : CommSemiring.{u2} R] (g : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) {A : Type.{u1}} [_inst_8 : Semiring.{u1} A] [_inst_9 : Algebra.{u2, u1} R A _inst_3 _inst_8] (s : Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (f : Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)), Eq.{succ u1} A (Subtype.val.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Set.{u1} A) (Set.instMembershipSet.{u1} A) x (SetLike.coe.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) s)) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Subalgebra.instAlgebraSubtypeMemSubalgebraInstMembershipInstSetLikeSubalgebraToSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s)) (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (fun (_x : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) _x) (SMulHomClass.toFunLike.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Subalgebra.instAlgebraSubtypeMemSubalgebraInstMembershipInstSetLikeSubalgebraToSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s)) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (SMulZeroClass.toSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toZero.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3))))))) (SMulZeroClass.toSMul.{u2, u1} R (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (AddMonoid.toZero.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (AddCommMonoid.toAddMonoid.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (Semiring.toNonAssocSemiring.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s)))))) (DistribSMul.toSMulZeroClass.{u2, u1} R (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (AddMonoid.toAddZeroClass.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (AddCommMonoid.toAddMonoid.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (Semiring.toNonAssocSemiring.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s)))))) (DistribMulAction.toDistribSMul.{u2, u1} R (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (Semiring.toNonAssocSemiring.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s))))) (Module.toDistribMulAction.{u2, u1} R (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (Semiring.toNonAssocSemiring.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s)))) (Algebra.toModule.{u2, u1} R (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) _inst_3 (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s) (Subalgebra.instAlgebraSubtypeMemSubalgebraInstMembershipInstSetLikeSubalgebraToSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s)))))) (DistribMulActionHomClass.toSMulHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Subalgebra.instAlgebraSubtypeMemSubalgebraInstMembershipInstSetLikeSubalgebraToSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s)) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (Semiring.toNonAssocSemiring.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)))) (Module.toDistribMulAction.{u2, u1} R (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (Semiring.toNonAssocSemiring.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s)))) (Algebra.toModule.{u2, u1} R (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) _inst_3 (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s) (Subalgebra.instAlgebraSubtypeMemSubalgebraInstMembershipInstSetLikeSubalgebraToSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s))) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Subalgebra.instAlgebraSubtypeMemSubalgebraInstMembershipInstSetLikeSubalgebraToSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s)) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (Semiring.toNonAssocSemiring.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)))) (Module.toDistribMulAction.{u2, u1} R (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (Semiring.toNonAssocSemiring.{u1} (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s)))) (Algebra.toModule.{u2, u1} R (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) _inst_3 (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s) (Subalgebra.instAlgebraSubtypeMemSubalgebraInstMembershipInstSetLikeSubalgebraToSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s))) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u2, u2, u1, max u1 u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Subalgebra.instAlgebraSubtypeMemSubalgebraInstMembershipInstSetLikeSubalgebraToSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s) (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Subalgebra.instAlgebraSubtypeMemSubalgebraInstMembershipInstSetLikeSubalgebraToSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s)) (AlgHom.algHomClass.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Subalgebra.instAlgebraSubtypeMemSubalgebraInstMembershipInstSetLikeSubalgebraToSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s)))))) (Polynomial.aeval.{u2, u1} R (Subtype.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) (SetLike.instMembership.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9)) x s)) _inst_3 (Subalgebra.toSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s) (Subalgebra.instAlgebraSubtypeMemSubalgebraInstMembershipInstSetLikeSubalgebraToSemiring.{u2, u1} R A _inst_3 _inst_8 _inst_9 s) f) g)) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (fun (_x : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A) _x) (SMulHomClass.toFunLike.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A (SMulZeroClass.toSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toZero.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3))))))) (SMulZeroClass.toSMul.{u2, u1} R A (AddMonoid.toZero.{u1} A (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_8))))) (DistribSMul.toSMulZeroClass.{u2, u1} R A (AddMonoid.toAddZeroClass.{u1} A (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_8))))) (DistribMulAction.toDistribSMul.{u2, u1} R A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_8)))) (Module.toDistribMulAction.{u2, u1} R A (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_8))) (Algebra.toModule.{u2, u1} R A _inst_3 _inst_8 _inst_9))))) (DistribMulActionHomClass.toSMulHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{u1} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_8)))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)))) (Module.toDistribMulAction.{u2, u1} R A (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_8))) (Algebra.toModule.{u2, u1} R A _inst_3 _inst_8 _inst_9)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_8)) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)))) (Module.toDistribMulAction.{u2, u1} R A (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_8))) (Algebra.toModule.{u2, u1} R A _inst_3 _inst_8 _inst_9)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u2, u2, u1, max u1 u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9 (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9) (AlgHom.algHomClass.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) _inst_9))))) (Polynomial.aeval.{u2, u1} R A _inst_3 _inst_8 _inst_9 (Subtype.val.{succ u1} A (fun (x : A) => Membership.mem.{u1, u1} A (Set.{u1} A) (Set.instMembershipSet.{u1} A) x (SetLike.coe.{u1, u1} (Subalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) A (Subalgebra.instSetLikeSubalgebra.{u2, u1} R A _inst_3 _inst_8 _inst_9) s)) f)) g)
Case conversion may be inaccurate. Consider using '#align polynomial.aeval_subalgebra_coe Polynomial.aeval_subalgebra_coeₓ'. -/
@[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 :=
  (aeval_algHom_apply s.val f g).symm
#align polynomial.aeval_subalgebra_coe Polynomial.aeval_subalgebra_coe

#print Polynomial.coeff_zero_eq_aeval_zero /-
theorem coeff_zero_eq_aeval_zero (p : R[X]) : p.coeff 0 = aeval 0 p := by
  simp [coeff_zero_eq_eval_zero]
#align polynomial.coeff_zero_eq_aeval_zero Polynomial.coeff_zero_eq_aeval_zero
-/

/- warning: polynomial.coeff_zero_eq_aeval_zero' -> Polynomial.coeff_zero_eq_aeval_zero' is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {A : Type.{u2}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : Semiring.{u2} A] [_inst_5 : Algebra.{u1, u2} R A _inst_3 _inst_4] (p : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)), Eq.{succ u2} A (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4)) (fun (_x : RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4)) => R -> A) (RingHom.hasCoeToFun.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4)) (algebraMap.{u1, u2} R A _inst_3 _inst_4 _inst_5) (Polynomial.coeff.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3) p (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))))) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_5) (fun (_x : AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_5) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) -> A) ([anonymous].{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_5) (Polynomial.aeval.{u1, u2} R A _inst_3 _inst_4 _inst_5 (OfNat.ofNat.{u2} A 0 (OfNat.mk.{u2} A 0 (Zero.zero.{u2} A (MulZeroClass.toHasZero.{u2} A (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4)))))))) p)
but is expected to have type
  forall {R : Type.{u1}} {A : Type.{u2}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : Semiring.{u2} A] [_inst_5 : Algebra.{u1, u2} R A _inst_3 _inst_4] (p : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) (Polynomial.coeff.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3) p (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)))) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => A) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4)) R A (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4)) R A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4)) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4)) R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4) (RingHom.instRingHomClassRingHom.{u1, u2} R A (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} A _inst_4))))) (algebraMap.{u1, u2} R A _inst_3 _inst_4 _inst_5) (Polynomial.coeff.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3) p (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)))) (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_5) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (fun (_x : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) => A) _x) (SMulHomClass.toFunLike.{max u2 u1, u1, u1, u2} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_5) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A (SMulZeroClass.toSMul.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (AddMonoid.toZero.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (AddCommMonoid.toAddMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (AddMonoid.toAddZeroClass.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (AddCommMonoid.toAddMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (AddCommMonoid.toAddMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))))) (Module.toDistribMulAction.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) (Algebra.toModule.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3))))))) (SMulZeroClass.toSMul.{u1, u2} R A (AddMonoid.toZero.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4))))) (DistribSMul.toSMulZeroClass.{u1, u2} R A (AddMonoid.toAddZeroClass.{u2} A (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4))))) (DistribMulAction.toDistribSMul.{u1, u2} R A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4)))) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4))) (Algebra.toModule.{u1, u2} R A _inst_3 _inst_4 _inst_5))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u1, u1, u2} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_5) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (AddCommMonoid.toAddMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{u2} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4)))) (Module.toDistribMulAction.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) (Algebra.toModule.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)))) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4))) (Algebra.toModule.{u1, u2} R A _inst_3 _inst_4 _inst_5)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u1, u1, u1, u2} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_5) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4)) (Module.toDistribMulAction.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) (Algebra.toModule.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)))) (Module.toDistribMulAction.{u1, u2} R A (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A _inst_4))) (Algebra.toModule.{u1, u2} R A _inst_3 _inst_4 _inst_5)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u1, u1, u2, max u2 u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_5 (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_5) (AlgHom.algHomClass.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_4 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_5))))) (Polynomial.aeval.{u1, u2} R A _inst_3 _inst_4 _inst_5 (OfNat.ofNat.{u2} A 0 (Zero.toOfNat0.{u2} A (MonoidWithZero.toZero.{u2} A (Semiring.toMonoidWithZero.{u2} A _inst_4))))) p)
Case conversion may be inaccurate. Consider using '#align polynomial.coeff_zero_eq_aeval_zero' Polynomial.coeff_zero_eq_aeval_zero'ₓ'. -/
theorem coeff_zero_eq_aeval_zero' (p : R[X]) : algebraMap R A (p.coeff 0) = aeval (0 : A) p := by
  simp [aeval_def]
#align polynomial.coeff_zero_eq_aeval_zero' Polynomial.coeff_zero_eq_aeval_zero'

/- warning: polynomial.map_aeval_eq_aeval_map -> Polynomial.map_aeval_eq_aeval_map is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} [_inst_3 : CommSemiring.{u1} R] {S : Type.{u2}} {T : Type.{u3}} {U : Type.{u4}} [_inst_8 : CommSemiring.{u2} S] [_inst_9 : CommSemiring.{u3} T] [_inst_10 : Semiring.{u4} U] [_inst_11 : Algebra.{u1, u2} R S _inst_3 (CommSemiring.toSemiring.{u2} S _inst_8)] [_inst_12 : Algebra.{u3, u4} T U _inst_9 _inst_10] {φ : RingHom.{u1, u3} R T (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} T (CommSemiring.toSemiring.{u3} T _inst_9))} {ψ : RingHom.{u2, u4} S U (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_8)) (Semiring.toNonAssocSemiring.{u4} U _inst_10)}, (Eq.{max (succ u1) (succ u4)} (RingHom.{u1, u4} R U (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} U _inst_10)) (RingHom.comp.{u1, u3, u4} R T U (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} T (CommSemiring.toSemiring.{u3} T _inst_9)) (Semiring.toNonAssocSemiring.{u4} U _inst_10) (algebraMap.{u3, u4} T U _inst_9 _inst_10 _inst_12) φ) (RingHom.comp.{u1, u2, u4} R S U (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_8)) (Semiring.toNonAssocSemiring.{u4} U _inst_10) ψ (algebraMap.{u1, u2} R S _inst_3 (CommSemiring.toSemiring.{u2} S _inst_8) _inst_11))) -> (forall (p : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (a : S), Eq.{succ u4} U (coeFn.{max (succ u2) (succ u4), max (succ u2) (succ u4)} (RingHom.{u2, u4} S U (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_8)) (Semiring.toNonAssocSemiring.{u4} U _inst_10)) (fun (_x : RingHom.{u2, u4} S U (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_8)) (Semiring.toNonAssocSemiring.{u4} U _inst_10)) => S -> U) (RingHom.hasCoeToFun.{u2, u4} S U (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_8)) (Semiring.toNonAssocSemiring.{u4} U _inst_10)) ψ (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) S _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u2} S _inst_8) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_11) (fun (_x : AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) S _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u2} S _inst_8) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_11) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) -> S) ([anonymous].{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) S _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u2} S _inst_8) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_11) (Polynomial.aeval.{u1, u2} R S _inst_3 (CommSemiring.toSemiring.{u2} S _inst_8) _inst_11 a) p)) (coeFn.{max (succ u3) (succ u4), max (succ u3) (succ u4)} (AlgHom.{u3, u3, u4} T (Polynomial.{u3} T (CommSemiring.toSemiring.{u3} T _inst_9)) U _inst_9 (Polynomial.semiring.{u3} T (CommSemiring.toSemiring.{u3} T _inst_9)) _inst_10 (Polynomial.algebraOfAlgebra.{u3, u3} T T _inst_9 (CommSemiring.toSemiring.{u3} T _inst_9) (Algebra.id.{u3} T _inst_9)) _inst_12) (fun (_x : AlgHom.{u3, u3, u4} T (Polynomial.{u3} T (CommSemiring.toSemiring.{u3} T _inst_9)) U _inst_9 (Polynomial.semiring.{u3} T (CommSemiring.toSemiring.{u3} T _inst_9)) _inst_10 (Polynomial.algebraOfAlgebra.{u3, u3} T T _inst_9 (CommSemiring.toSemiring.{u3} T _inst_9) (Algebra.id.{u3} T _inst_9)) _inst_12) => (Polynomial.{u3} T (CommSemiring.toSemiring.{u3} T _inst_9)) -> U) ([anonymous].{u3, u3, u4} T (Polynomial.{u3} T (CommSemiring.toSemiring.{u3} T _inst_9)) U _inst_9 (Polynomial.semiring.{u3} T (CommSemiring.toSemiring.{u3} T _inst_9)) _inst_10 (Polynomial.algebraOfAlgebra.{u3, u3} T T _inst_9 (CommSemiring.toSemiring.{u3} T _inst_9) (Algebra.id.{u3} T _inst_9)) _inst_12) (Polynomial.aeval.{u3, u4} T U _inst_9 _inst_10 _inst_12 (coeFn.{max (succ u2) (succ u4), max (succ u2) (succ u4)} (RingHom.{u2, u4} S U (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_8)) (Semiring.toNonAssocSemiring.{u4} U _inst_10)) (fun (_x : RingHom.{u2, u4} S U (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_8)) (Semiring.toNonAssocSemiring.{u4} U _inst_10)) => S -> U) (RingHom.hasCoeToFun.{u2, u4} S U (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_8)) (Semiring.toNonAssocSemiring.{u4} U _inst_10)) ψ a)) (Polynomial.map.{u1, u3} R T (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} T _inst_9) φ p)))
but is expected to have type
  forall {R : Type.{u4}} [_inst_3 : CommSemiring.{u4} R] {S : Type.{u3}} {T : Type.{u2}} {U : Type.{u1}} [_inst_8 : CommSemiring.{u3} S] [_inst_9 : CommSemiring.{u2} T] [_inst_10 : Semiring.{u1} U] [_inst_11 : Algebra.{u4, u3} R S _inst_3 (CommSemiring.toSemiring.{u3} S _inst_8)] [_inst_12 : Algebra.{u2, u1} T U _inst_9 _inst_10] {φ : RingHom.{u4, u2} R T (Semiring.toNonAssocSemiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9))} {ψ : RingHom.{u3, u1} S U (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)) (Semiring.toNonAssocSemiring.{u1} U _inst_10)}, (Eq.{max (succ u4) (succ u1)} (RingHom.{u4, u1} R U (Semiring.toNonAssocSemiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} U _inst_10)) (RingHom.comp.{u4, u2, u1} R T U (Semiring.toNonAssocSemiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Semiring.toNonAssocSemiring.{u1} U _inst_10) (algebraMap.{u2, u1} T U _inst_9 _inst_10 _inst_12) φ) (RingHom.comp.{u4, u3, u1} R S U (Semiring.toNonAssocSemiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)) (Semiring.toNonAssocSemiring.{u1} U _inst_10) ψ (algebraMap.{u4, u3} R S _inst_3 (CommSemiring.toSemiring.{u3} S _inst_8) _inst_11))) -> (forall (p : Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (a : S), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) (FunLike.coe.{max (succ u3) (succ u4), succ u4, succ u3} (AlgHom.{u4, u4, u3} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)) _inst_11) (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (fun (a : Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) => S) a) (SMulHomClass.toFunLike.{max u3 u4, u4, u4, u3} (AlgHom.{u4, u4, u3} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)) _inst_11) R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S (SMulZeroClass.toSMul.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (AddMonoid.toZero.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (AddCommMonoid.toAddMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (AddMonoid.toAddZeroClass.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (AddCommMonoid.toAddMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (MonoidWithZero.toMonoid.{u4} R (Semiring.toMonoidWithZero.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))) (AddCommMonoid.toAddMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)))))) (Module.toDistribMulAction.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u4} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))))) (Algebra.toModule.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3))))))) (SMulZeroClass.toSMul.{u4, u3} R S (AddMonoid.toZero.{u3} S (AddCommMonoid.toAddMonoid.{u3} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)))))) (DistribSMul.toSMulZeroClass.{u4, u3} R S (AddMonoid.toAddZeroClass.{u3} S (AddCommMonoid.toAddMonoid.{u3} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)))))) (DistribMulAction.toDistribSMul.{u4, u3} R S (MonoidWithZero.toMonoid.{u4} R (Semiring.toMonoidWithZero.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))) (AddCommMonoid.toAddMonoid.{u3} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))))) (Module.toDistribMulAction.{u4, u3} R S (CommSemiring.toSemiring.{u4} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)))) (Algebra.toModule.{u4, u3} R S _inst_3 (CommSemiring.toSemiring.{u3} S _inst_8) _inst_11))))) (DistribMulActionHomClass.toSMulHomClass.{max u3 u4, u4, u4, u3} (AlgHom.{u4, u4, u3} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)) _inst_11) R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S (MonoidWithZero.toMonoid.{u4} R (Semiring.toMonoidWithZero.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))) (AddCommMonoid.toAddMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{u3} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))))) (Module.toDistribMulAction.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u4} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))))) (Algebra.toModule.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)))) (Module.toDistribMulAction.{u4, u3} R S (CommSemiring.toSemiring.{u4} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)))) (Algebra.toModule.{u4, u3} R S _inst_3 (CommSemiring.toSemiring.{u3} S _inst_8) _inst_11)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u3 u4, u4, u4, u3} (AlgHom.{u4, u4, u3} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)) _inst_11) R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S (MonoidWithZero.toMonoid.{u4} R (Semiring.toMonoidWithZero.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (Module.toDistribMulAction.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u4} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))))) (Algebra.toModule.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)))) (Module.toDistribMulAction.{u4, u3} R S (CommSemiring.toSemiring.{u4} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)))) (Algebra.toModule.{u4, u3} R S _inst_3 (CommSemiring.toSemiring.{u3} S _inst_8) _inst_11)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u4, u4, u3, max u3 u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)) _inst_11 (AlgHom.{u4, u4, u3} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)) _inst_11) (AlgHom.algHomClass.{u4, u4, u3} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)) _inst_11))))) (Polynomial.aeval.{u4, u3} R S _inst_3 (CommSemiring.toSemiring.{u3} S _inst_8) _inst_11 a) p)) (FunLike.coe.{max (succ u3) (succ u1), succ u3, succ u1} (RingHom.{u3, u1} S U (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)) (Semiring.toNonAssocSemiring.{u1} U _inst_10)) S (fun (_x : S) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) _x) (MulHomClass.toFunLike.{max u3 u1, u3, u1} (RingHom.{u3, u1} S U (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)) (Semiring.toNonAssocSemiring.{u1} U _inst_10)) S U (NonUnitalNonAssocSemiring.toMul.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)))) (NonUnitalNonAssocSemiring.toMul.{u1} U (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} U (Semiring.toNonAssocSemiring.{u1} U _inst_10))) (NonUnitalRingHomClass.toMulHomClass.{max u3 u1, u3, u1} (RingHom.{u3, u1} S U (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)) (Semiring.toNonAssocSemiring.{u1} U _inst_10)) S U (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} U (Semiring.toNonAssocSemiring.{u1} U _inst_10)) (RingHomClass.toNonUnitalRingHomClass.{max u3 u1, u3, u1} (RingHom.{u3, u1} S U (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)) (Semiring.toNonAssocSemiring.{u1} U _inst_10)) S U (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)) (Semiring.toNonAssocSemiring.{u1} U _inst_10) (RingHom.instRingHomClassRingHom.{u3, u1} S U (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)) (Semiring.toNonAssocSemiring.{u1} U _inst_10))))) ψ (FunLike.coe.{max (succ u3) (succ u4), succ u4, succ u3} (AlgHom.{u4, u4, u3} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)) _inst_11) (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (fun (_x : Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) => S) _x) (SMulHomClass.toFunLike.{max u3 u4, u4, u4, u3} (AlgHom.{u4, u4, u3} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)) _inst_11) R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S (SMulZeroClass.toSMul.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (AddMonoid.toZero.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (AddCommMonoid.toAddMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (AddMonoid.toAddZeroClass.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (AddCommMonoid.toAddMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (MonoidWithZero.toMonoid.{u4} R (Semiring.toMonoidWithZero.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))) (AddCommMonoid.toAddMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)))))) (Module.toDistribMulAction.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u4} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))))) (Algebra.toModule.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3))))))) (SMulZeroClass.toSMul.{u4, u3} R S (AddMonoid.toZero.{u3} S (AddCommMonoid.toAddMonoid.{u3} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)))))) (DistribSMul.toSMulZeroClass.{u4, u3} R S (AddMonoid.toAddZeroClass.{u3} S (AddCommMonoid.toAddMonoid.{u3} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)))))) (DistribMulAction.toDistribSMul.{u4, u3} R S (MonoidWithZero.toMonoid.{u4} R (Semiring.toMonoidWithZero.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))) (AddCommMonoid.toAddMonoid.{u3} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))))) (Module.toDistribMulAction.{u4, u3} R S (CommSemiring.toSemiring.{u4} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)))) (Algebra.toModule.{u4, u3} R S _inst_3 (CommSemiring.toSemiring.{u3} S _inst_8) _inst_11))))) (DistribMulActionHomClass.toSMulHomClass.{max u3 u4, u4, u4, u3} (AlgHom.{u4, u4, u3} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)) _inst_11) R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S (MonoidWithZero.toMonoid.{u4} R (Semiring.toMonoidWithZero.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))) (AddCommMonoid.toAddMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{u3} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))))) (Module.toDistribMulAction.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u4} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))))) (Algebra.toModule.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)))) (Module.toDistribMulAction.{u4, u3} R S (CommSemiring.toSemiring.{u4} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)))) (Algebra.toModule.{u4, u3} R S _inst_3 (CommSemiring.toSemiring.{u3} S _inst_8) _inst_11)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u3 u4, u4, u4, u3} (AlgHom.{u4, u4, u3} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)) _inst_11) R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S (MonoidWithZero.toMonoid.{u4} R (Semiring.toMonoidWithZero.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (Module.toDistribMulAction.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u4} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Semiring.toNonAssocSemiring.{u4} (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3))))) (Algebra.toModule.{u4, u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)))) (Module.toDistribMulAction.{u4, u3} R S (CommSemiring.toSemiring.{u4} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)))) (Algebra.toModule.{u4, u3} R S _inst_3 (CommSemiring.toSemiring.{u3} S _inst_8) _inst_11)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u4, u4, u3, max u3 u4} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)) _inst_11 (AlgHom.{u4, u4, u3} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)) _inst_11) (AlgHom.algHomClass.{u4, u4, u3} R (Polynomial.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) S _inst_3 (Polynomial.semiring.{u4} R (CommSemiring.toSemiring.{u4} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (Polynomial.algebraOfAlgebra.{u4, u4} R R _inst_3 (CommSemiring.toSemiring.{u4} R _inst_3) (Algebra.id.{u4} R _inst_3)) _inst_11))))) (Polynomial.aeval.{u4, u3} R S _inst_3 (CommSemiring.toSemiring.{u3} S _inst_8) _inst_11 a) p)) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (AlgHom.{u2, u2, u1} T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_9 (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) _inst_10 (Polynomial.algebraOfAlgebra.{u2, u2} T T _inst_9 (CommSemiring.toSemiring.{u2} T _inst_9) (Algebra.id.{u2} T _inst_9)) _inst_12) (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (fun (_x : Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _x) (SMulHomClass.toFunLike.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_9 (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) _inst_10 (Polynomial.algebraOfAlgebra.{u2, u2} T T _inst_9 (CommSemiring.toSemiring.{u2} T _inst_9) (Algebra.id.{u2} T _inst_9)) _inst_12) T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (SMulZeroClass.toSMul.{u2, u2} T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (AddMonoid.toZero.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9))))))) (DistribSMul.toSMulZeroClass.{u2, u2} T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9))))))) (DistribMulAction.toDistribSMul.{u2, u2} T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (MonoidWithZero.toMonoid.{u2} T (Semiring.toMonoidWithZero.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)))))) (Module.toDistribMulAction.{u2, u2} T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (CommSemiring.toSemiring.{u2} T _inst_9) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9))))) (Algebra.toModule.{u2, u2} T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) _inst_9 (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Polynomial.algebraOfAlgebra.{u2, u2} T T _inst_9 (CommSemiring.toSemiring.{u2} T _inst_9) (Algebra.id.{u2} T _inst_9))))))) (SMulZeroClass.toSMul.{u2, u1} T ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (AddMonoid.toZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_10))))) (DistribSMul.toSMulZeroClass.{u2, u1} T ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (AddMonoid.toAddZeroClass.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_10))))) (DistribMulAction.toDistribSMul.{u2, u1} T ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (MonoidWithZero.toMonoid.{u2} T (Semiring.toMonoidWithZero.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9))) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_10)))) (Module.toDistribMulAction.{u2, u1} T ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (CommSemiring.toSemiring.{u2} T _inst_9) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_10))) (Algebra.toModule.{u2, u1} T ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_9 _inst_10 _inst_12))))) (DistribMulActionHomClass.toSMulHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_9 (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) _inst_10 (Polynomial.algebraOfAlgebra.{u2, u2} T T _inst_9 (CommSemiring.toSemiring.{u2} T _inst_9) (Algebra.id.{u2} T _inst_9)) _inst_12) T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (MonoidWithZero.toMonoid.{u2} T (Semiring.toMonoidWithZero.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)))))) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_10)))) (Module.toDistribMulAction.{u2, u2} T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (CommSemiring.toSemiring.{u2} T _inst_9) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9))))) (Algebra.toModule.{u2, u2} T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) _inst_9 (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Polynomial.algebraOfAlgebra.{u2, u2} T T _inst_9 (CommSemiring.toSemiring.{u2} T _inst_9) (Algebra.id.{u2} T _inst_9)))) (Module.toDistribMulAction.{u2, u1} T ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (CommSemiring.toSemiring.{u2} T _inst_9) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_10))) (Algebra.toModule.{u2, u1} T ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_9 _inst_10 _inst_12)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_9 (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) _inst_10 (Polynomial.algebraOfAlgebra.{u2, u2} T T _inst_9 (CommSemiring.toSemiring.{u2} T _inst_9) (Algebra.id.{u2} T _inst_9)) _inst_12) T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (MonoidWithZero.toMonoid.{u2} T (Semiring.toMonoidWithZero.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_10)) (Module.toDistribMulAction.{u2, u2} T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (CommSemiring.toSemiring.{u2} T _inst_9) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9))))) (Algebra.toModule.{u2, u2} T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) _inst_9 (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) (Polynomial.algebraOfAlgebra.{u2, u2} T T _inst_9 (CommSemiring.toSemiring.{u2} T _inst_9) (Algebra.id.{u2} T _inst_9)))) (Module.toDistribMulAction.{u2, u1} T ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (CommSemiring.toSemiring.{u2} T _inst_9) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_10))) (Algebra.toModule.{u2, u1} T ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_9 _inst_10 _inst_12)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u2, u2, u1, max u1 u2} T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_9 (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) _inst_10 (Polynomial.algebraOfAlgebra.{u2, u2} T T _inst_9 (CommSemiring.toSemiring.{u2} T _inst_9) (Algebra.id.{u2} T _inst_9)) _inst_12 (AlgHom.{u2, u2, u1} T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_9 (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) _inst_10 (Polynomial.algebraOfAlgebra.{u2, u2} T T _inst_9 (CommSemiring.toSemiring.{u2} T _inst_9) (Algebra.id.{u2} T _inst_9)) _inst_12) (AlgHom.algHomClass.{u2, u2, u1} T (Polynomial.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_9 (Polynomial.semiring.{u2} T (CommSemiring.toSemiring.{u2} T _inst_9)) _inst_10 (Polynomial.algebraOfAlgebra.{u2, u2} T T _inst_9 (CommSemiring.toSemiring.{u2} T _inst_9) (Algebra.id.{u2} T _inst_9)) _inst_12))))) (Polynomial.aeval.{u2, u1} T ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) a) _inst_9 _inst_10 _inst_12 (FunLike.coe.{max (succ u3) (succ u1), succ u3, succ u1} (RingHom.{u3, u1} S U (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)) (Semiring.toNonAssocSemiring.{u1} U _inst_10)) S (fun (_x : S) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => U) _x) (MulHomClass.toFunLike.{max u3 u1, u3, u1} (RingHom.{u3, u1} S U (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)) (Semiring.toNonAssocSemiring.{u1} U _inst_10)) S U (NonUnitalNonAssocSemiring.toMul.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)))) (NonUnitalNonAssocSemiring.toMul.{u1} U (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} U (Semiring.toNonAssocSemiring.{u1} U _inst_10))) (NonUnitalRingHomClass.toMulHomClass.{max u3 u1, u3, u1} (RingHom.{u3, u1} S U (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)) (Semiring.toNonAssocSemiring.{u1} U _inst_10)) S U (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} U (Semiring.toNonAssocSemiring.{u1} U _inst_10)) (RingHomClass.toNonUnitalRingHomClass.{max u3 u1, u3, u1} (RingHom.{u3, u1} S U (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)) (Semiring.toNonAssocSemiring.{u1} U _inst_10)) S U (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)) (Semiring.toNonAssocSemiring.{u1} U _inst_10) (RingHom.instRingHomClassRingHom.{u3, u1} S U (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8)) (Semiring.toNonAssocSemiring.{u1} U _inst_10))))) ψ a)) (Polynomial.map.{u4, u2} R T (CommSemiring.toSemiring.{u4} R _inst_3) (CommSemiring.toSemiring.{u2} T _inst_9) φ p)))
Case conversion may be inaccurate. Consider using '#align polynomial.map_aeval_eq_aeval_map Polynomial.map_aeval_eq_aeval_mapₓ'. -/
theorem map_aeval_eq_aeval_map {S T U : Type _} [CommSemiring 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 φ) :=
  by
  conv_rhs => rw [aeval_def, ← eval_map]
  rw [map_map, h, ← map_map, eval_map, eval₂_at_apply, aeval_def, eval_map]
#align polynomial.map_aeval_eq_aeval_map Polynomial.map_aeval_eq_aeval_map

#print Polynomial.aeval_eq_zero_of_dvd_aeval_eq_zero /-
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 :=
  by
  rw [aeval_def, ← eval_map] at h₂⊢
  exact eval_eq_zero_of_dvd_of_eval_eq_zero (Polynomial.map_dvd (algebraMap S T) h₁) h₂
#align polynomial.aeval_eq_zero_of_dvd_aeval_eq_zero Polynomial.aeval_eq_zero_of_dvd_aeval_eq_zero
-/

variable (R)

#print Algebra.adjoin_singleton_eq_range_aeval /-
theorem Algebra.adjoin_singleton_eq_range_aeval (x : A) :
    Algebra.adjoin R {x} = (Polynomial.aeval x).range := by
  rw [← Algebra.map_top, ← adjoin_X, AlgHom.map_adjoin, Set.image_singleton, aeval_X]
#align algebra.adjoin_singleton_eq_range_aeval Algebra.adjoin_singleton_eq_range_aeval
-/

variable {R}

section Semiring

variable [Semiring S] {f : R →+* S}

#print Polynomial.aeval_eq_sum_range /-
theorem aeval_eq_sum_range [Algebra R S] {p : R[X]} (x : S) :
    aeval x p = ∑ i in Finset.range (p.natDegree + 1), p.coeff i • x ^ i :=
  by
  simp_rw [Algebra.smul_def]
  exact eval₂_eq_sum_range (algebraMap R S) x
#align polynomial.aeval_eq_sum_range Polynomial.aeval_eq_sum_range
-/

#print Polynomial.aeval_eq_sum_range' /-
theorem aeval_eq_sum_range' [Algebra R S] {p : R[X]} {n : ℕ} (hn : p.natDegree < n) (x : S) :
    aeval x p = ∑ i in Finset.range n, p.coeff i • x ^ i :=
  by
  simp_rw [Algebra.smul_def]
  exact eval₂_eq_sum_range' (algebraMap R S) hn x
#align polynomial.aeval_eq_sum_range' Polynomial.aeval_eq_sum_range'
-/

/- warning: polynomial.is_root_of_eval₂_map_eq_zero -> Polynomial.isRoot_of_eval₂_map_eq_zero is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {S : Type.{u2}} [_inst_3 : CommSemiring.{u1} R] {p : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)} [_inst_8 : Semiring.{u2} S] {f : RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)}, (Function.Injective.{succ u1, succ u2} R S (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) (fun (_x : RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) => R -> S) (RingHom.hasCoeToFun.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) f)) -> (forall {r : R}, (Eq.{succ u2} S (Polynomial.eval₂.{u1, u2} R S (CommSemiring.toSemiring.{u1} R _inst_3) _inst_8 f (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) (fun (_x : RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) => R -> S) (RingHom.hasCoeToFun.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) f r) p) (OfNat.ofNat.{u2} S 0 (OfNat.mk.{u2} S 0 (Zero.zero.{u2} S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_8)))))))) -> (Polynomial.IsRoot.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3) p r))
but is expected to have type
  forall {R : Type.{u1}} {S : Type.{u2}} [_inst_3 : CommSemiring.{u1} R] {p : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)} [_inst_8 : Semiring.{u2} S] {f : RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)}, (Function.Injective.{succ u1, succ u2} R S (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) R S (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_8))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_8)) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8) (RingHom.instRingHomClassRingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8))))) f)) -> (forall {r : R}, (Eq.{succ u2} S (Polynomial.eval₂.{u1, u2} R S (CommSemiring.toSemiring.{u1} R _inst_3) _inst_8 f (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) R S (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_8))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_8)) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8) (RingHom.instRingHomClassRingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8))))) f r) p) (OfNat.ofNat.{u2} S 0 (Zero.toOfNat0.{u2} S (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_8))))) -> (Polynomial.IsRoot.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3) p r))
Case conversion may be inaccurate. Consider using '#align polynomial.is_root_of_eval₂_map_eq_zero Polynomial.isRoot_of_eval₂_map_eq_zeroₓ'. -/
theorem isRoot_of_eval₂_map_eq_zero (hf : Function.Injective f) {r : R} :
    eval₂ f (f r) p = 0 → p.IsRoot r := by
  intro h
  apply hf
  rw [← eval₂_hom, h, f.map_zero]
#align polynomial.is_root_of_eval₂_map_eq_zero Polynomial.isRoot_of_eval₂_map_eq_zero

/- warning: polynomial.is_root_of_aeval_algebra_map_eq_zero -> Polynomial.isRoot_of_aeval_algebraMap_eq_zero is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {S : Type.{u2}} [_inst_3 : CommSemiring.{u1} R] [_inst_8 : Semiring.{u2} S] [_inst_9 : Algebra.{u1, u2} R S _inst_3 _inst_8] {p : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)}, (Function.Injective.{succ u1, succ u2} R S (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) (fun (_x : RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) => R -> S) (RingHom.hasCoeToFun.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) (algebraMap.{u1, u2} R S _inst_3 _inst_8 _inst_9))) -> (forall {r : R}, (Eq.{succ u2} S (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) S _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) (fun (_x : AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) S _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) -> S) ([anonymous].{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) S _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) (Polynomial.aeval.{u1, u2} R S _inst_3 _inst_8 _inst_9 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) (fun (_x : RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) => R -> S) (RingHom.hasCoeToFun.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) (algebraMap.{u1, u2} R S _inst_3 _inst_8 _inst_9) r)) p) (OfNat.ofNat.{u2} S 0 (OfNat.mk.{u2} S 0 (Zero.zero.{u2} S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_8)))))))) -> (Polynomial.IsRoot.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3) p r))
but is expected to have type
  forall {R : Type.{u1}} {S : Type.{u2}} [_inst_3 : CommSemiring.{u1} R] [_inst_8 : Semiring.{u2} S] [_inst_9 : Algebra.{u1, u2} R S _inst_3 _inst_8] {p : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)}, (Function.Injective.{succ u1, succ u2} R S (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) R S (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_8))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_8)) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8) (RingHom.instRingHomClassRingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8))))) (algebraMap.{u1, u2} R S _inst_3 _inst_8 _inst_9))) -> (forall {r : R}, (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) p) (FunLike.coe.{max (succ u2) (succ u1), succ u1, succ u2} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (fun (_x : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _x) (SMulHomClass.toFunLike.{max u2 u1, u1, u1, u2} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (SMulZeroClass.toSMul.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (AddMonoid.toZero.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (AddCommMonoid.toAddMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (AddMonoid.toAddZeroClass.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (AddCommMonoid.toAddMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (AddCommMonoid.toAddMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))))) (Module.toDistribMulAction.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) (Algebra.toModule.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3))))))) (SMulZeroClass.toSMul.{u1, u2} R ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (AddMonoid.toZero.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (AddCommMonoid.toAddMonoid.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_8))))) (DistribSMul.toSMulZeroClass.{u1, u2} R ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (AddMonoid.toAddZeroClass.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (AddCommMonoid.toAddMonoid.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_8))))) (DistribMulAction.toDistribSMul.{u1, u2} R ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_8)))) (Module.toDistribMulAction.{u1, u2} R ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_8))) (Algebra.toModule.{u1, u2} R ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_3 _inst_8 _inst_9))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u1, u1, u2} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (AddCommMonoid.toAddMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_8)))) (Module.toDistribMulAction.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) (Algebra.toModule.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)))) (Module.toDistribMulAction.{u1, u2} R ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_8))) (Algebra.toModule.{u1, u2} R ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_3 _inst_8 _inst_9)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u1, u1, u1, u2} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_8)) (Module.toDistribMulAction.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) (Algebra.toModule.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)))) (Module.toDistribMulAction.{u1, u2} R ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (Semiring.toNonAssocSemiring.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_8))) (Algebra.toModule.{u1, u2} R ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_3 _inst_8 _inst_9)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u1, u1, u2, max u2 u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9 (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9) (AlgHom.algHomClass.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) _inst_9))))) (Polynomial.aeval.{u1, u2} R ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_3 _inst_8 _inst_9 (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) R S (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_8))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_8)) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, u1, u2} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8)) R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8) (RingHom.instRingHomClassRingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} S _inst_8))))) (algebraMap.{u1, u2} R S _inst_3 _inst_8 _inst_9) r)) p) (OfNat.ofNat.{u2} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) p) 0 (Zero.toOfNat0.{u2} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) p) (MonoidWithZero.toZero.{u2} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) p) (Semiring.toMonoidWithZero.{u2} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) p) _inst_8))))) -> (Polynomial.IsRoot.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3) p r))
Case conversion may be inaccurate. Consider using '#align polynomial.is_root_of_aeval_algebra_map_eq_zero Polynomial.isRoot_of_aeval_algebraMap_eq_zeroₓ'. -/
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 :=
  isRoot_of_eval₂_map_eq_zero inj hr
#align polynomial.is_root_of_aeval_algebra_map_eq_zero Polynomial.isRoot_of_aeval_algebraMap_eq_zero

end Semiring

section CommSemiring

section AevalTower

variable [CommSemiring S] [Algebra S R] [Algebra S A'] [Algebra S B']

#print Polynomial.aevalTower /-
/-- 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' :=
  { eval₂RingHom (↑f) x with commutes' := fun r => by simp [algebra_map_apply] }
#align polynomial.aeval_tower Polynomial.aevalTower
-/

variable (g : R →ₐ[S] A') (y : A')

/- warning: polynomial.aeval_tower_X -> Polynomial.aevalTower_X is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {S : Type.{u2}} {A' : Type.{u3}} [_inst_1 : CommSemiring.{u3} A'] [_inst_3 : CommSemiring.{u1} R] [_inst_8 : CommSemiring.{u2} S] [_inst_9 : Algebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3)] [_inst_10 : Algebra.{u2, u3} S A' _inst_8 (CommSemiring.toSemiring.{u3} A' _inst_1)] (g : AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (y : A'), Eq.{succ u3} A' (coeFn.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) (fun (_x : AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) -> A') ([anonymous].{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) (Polynomial.aevalTower.{u1, u2, u3} R S A' _inst_1 _inst_3 _inst_8 _inst_9 _inst_10 g y) (Polynomial.X.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) y
but is expected to have type
  forall {R : Type.{u2}} {S : Type.{u3}} {A' : Type.{u1}} [_inst_1 : CommSemiring.{u1} A'] [_inst_3 : CommSemiring.{u2} R] [_inst_8 : CommSemiring.{u3} S] [_inst_9 : Algebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3)] [_inst_10 : Algebra.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1)] (g : AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) (y : A'), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A') (Polynomial.X.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (fun (_x : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A') _x) (SMulHomClass.toFunLike.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' (SMulZeroClass.toSMul.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toZero.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)))))) (SMulZeroClass.toSMul.{u3, u1} S A' (AddMonoid.toZero.{u1} A' (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))))) (DistribSMul.toSMulZeroClass.{u3, u1} S A' (AddMonoid.toAddZeroClass.{u1} A' (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))))) (DistribMulAction.toDistribSMul.{u3, u1} S A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))))) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))))) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u2, u1, max u2 u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10 (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) (AlgHom.algHomClass.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10))))) (Polynomial.aevalTower.{u2, u3, u1} R S A' _inst_1 _inst_3 _inst_8 _inst_9 _inst_10 g y) (Polynomial.X.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) y
Case conversion may be inaccurate. Consider using '#align polynomial.aeval_tower_X Polynomial.aevalTower_Xₓ'. -/
@[simp]
theorem aevalTower_X : aevalTower g y X = y :=
  eval₂_X _ _
#align polynomial.aeval_tower_X Polynomial.aevalTower_X

/- warning: polynomial.aeval_tower_C -> Polynomial.aevalTower_C is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {S : Type.{u2}} {A' : Type.{u3}} [_inst_1 : CommSemiring.{u3} A'] [_inst_3 : CommSemiring.{u1} R] [_inst_8 : CommSemiring.{u2} S] [_inst_9 : Algebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3)] [_inst_10 : Algebra.{u2, u3} S A' _inst_8 (CommSemiring.toSemiring.{u3} A' _inst_1)] (g : AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (y : A') (x : R), Eq.{succ u3} A' (coeFn.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) (fun (_x : AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) -> A') ([anonymous].{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) (Polynomial.aevalTower.{u1, u2, u3} R S A' _inst_1 _inst_3 _inst_8 _inst_9 _inst_10 g y) (coeFn.{succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (fun (_x : RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) => R -> (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (RingHom.hasCoeToFun.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (Polynomial.C.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) x)) (coeFn.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (fun (_x : AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) => R -> A') ([anonymous].{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) g x)
but is expected to have type
  forall {R : Type.{u2}} {S : Type.{u3}} {A' : Type.{u1}} [_inst_1 : CommSemiring.{u1} A'] [_inst_3 : CommSemiring.{u2} R] [_inst_8 : CommSemiring.{u3} S] [_inst_9 : Algebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3)] [_inst_10 : Algebra.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1)] (g : AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) (y : A') (x : R), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A') (FunLike.coe.{succ u2, succ u2, succ u2} (RingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) R (fun (a : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) a) (MulHomClass.toFunLike.{u2, u2, u2} (RingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (NonUnitalRingHomClass.toMulHomClass.{u2, u2, u2} (RingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (RingHomClass.toNonUnitalRingHomClass.{u2, u2, u2} (RingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (RingHom.instRingHomClassRingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (Polynomial.C.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) x)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (fun (_x : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A') _x) (SMulHomClass.toFunLike.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' (SMulZeroClass.toSMul.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toZero.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)))))) (SMulZeroClass.toSMul.{u3, u1} S A' (AddMonoid.toZero.{u1} A' (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))))) (DistribSMul.toSMulZeroClass.{u3, u1} S A' (AddMonoid.toAddZeroClass.{u1} A' (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))))) (DistribMulAction.toDistribSMul.{u3, u1} S A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))))) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))))) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u2, u1, max u2 u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10 (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) (AlgHom.algHomClass.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10))))) (Polynomial.aevalTower.{u2, u3, u1} R S A' _inst_1 _inst_3 _inst_8 _inst_9 _inst_10 g y) (FunLike.coe.{succ u2, succ u2, succ u2} (RingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _x) (MulHomClass.toFunLike.{u2, u2, u2} (RingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (NonUnitalRingHomClass.toMulHomClass.{u2, u2, u2} (RingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (RingHomClass.toNonUnitalRingHomClass.{u2, u2, u2} (RingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (RingHom.instRingHomClassRingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (Polynomial.C.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) x)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : R) => A') _x) (SMulHomClass.toFunLike.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) S R A' (SMulZeroClass.toSMul.{u3, u2} S R (AddMonoid.toZero.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (DistribSMul.toSMulZeroClass.{u3, u2} S R (AddMonoid.toAddZeroClass.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (DistribMulAction.toDistribSMul.{u3, u2} S R (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))))) (SMulZeroClass.toSMul.{u3, u1} S A' (AddMonoid.toZero.{u1} A' (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))))) (DistribSMul.toSMulZeroClass.{u3, u1} S A' (AddMonoid.toAddZeroClass.{u1} A' (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))))) (DistribMulAction.toDistribSMul.{u3, u1} S A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))))) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) S R A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) S R A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u2, u1, max u2 u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10 (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) (AlgHom.algHomClass.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10))))) g x)
Case conversion may be inaccurate. Consider using '#align polynomial.aeval_tower_C Polynomial.aevalTower_Cₓ'. -/
@[simp]
theorem aevalTower_C (x : R) : aevalTower g y (C x) = g x :=
  eval₂_C _ _
#align polynomial.aeval_tower_C Polynomial.aevalTower_C

/- warning: polynomial.aeval_tower_comp_C -> Polynomial.aevalTower_comp_C is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {S : Type.{u2}} {A' : Type.{u3}} [_inst_1 : CommSemiring.{u3} A'] [_inst_3 : CommSemiring.{u1} R] [_inst_8 : CommSemiring.{u2} S] [_inst_9 : Algebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3)] [_inst_10 : Algebra.{u2, u3} S A' _inst_8 (CommSemiring.toSemiring.{u3} A' _inst_1)] (g : AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (y : A'), Eq.{max (succ u1) (succ u3)} (RingHom.{u1, u3} R A' (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1))) (RingHom.comp.{u1, u1, u3} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1)) ((fun (a : Sort.{max (succ u1) (succ u3)}) (b : Sort.{max (succ u1) (succ u3)}) [self : HasLiftT.{max (succ u1) (succ u3), max (succ u1) (succ u3)} a b] => self.0) (AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) (RingHom.{u1, u3} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1))) (HasLiftT.mk.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) (RingHom.{u1, u3} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1))) (CoeTCₓ.coe.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) (RingHom.{u1, u3} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1))) (RingHom.hasCoeT.{max u1 u3, u1, u3} (AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1)) (AlgHomClass.toRingHomClass.{max u1 u3, u2, u1, u3} (AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10 (AlgHom.algHomClass.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10))))) (Polynomial.aevalTower.{u1, u2, u3} R S A' _inst_1 _inst_3 _inst_8 _inst_9 _inst_10 g y)) (Polynomial.C.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) ((fun (a : Sort.{max (succ u1) (succ u3)}) (b : Sort.{max (succ u1) (succ u3)}) [self : HasLiftT.{max (succ u1) (succ u3), max (succ u1) (succ u3)} a b] => self.0) (AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (RingHom.{u1, u3} R A' (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1))) (HasLiftT.mk.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (RingHom.{u1, u3} R A' (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1))) (CoeTCₓ.coe.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (RingHom.{u1, u3} R A' (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1))) (RingHom.hasCoeT.{max u1 u3, u1, u3} (AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) R A' (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1)) (AlgHomClass.toRingHomClass.{max u1 u3, u2, u1, u3} (AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10 (AlgHom.algHomClass.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10))))) g)
but is expected to have type
  forall {R : Type.{u2}} {S : Type.{u3}} {A' : Type.{u1}} [_inst_1 : CommSemiring.{u1} A'] [_inst_3 : CommSemiring.{u2} R] [_inst_8 : CommSemiring.{u3} S] [_inst_9 : Algebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3)] [_inst_10 : Algebra.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1)] (g : AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) (y : A'), Eq.{max (succ u2) (succ u1)} (RingHom.{u2, u1} R A' (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))) (RingHom.comp.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)) (RingHomClass.toRingHom.{max u2 u1, u2, u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)) (AlgHomClass.toRingHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10 (AlgHom.algHomClass.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10)) (Polynomial.aevalTower.{u2, u3, u1} R S A' _inst_1 _inst_3 _inst_8 _inst_9 _inst_10 g y)) (Polynomial.C.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (RingHomClass.toRingHom.{max u2 u1, u2, u1} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) R A' (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)) (AlgHomClass.toRingHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10 (AlgHom.algHomClass.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10)) g)
Case conversion may be inaccurate. Consider using '#align polynomial.aeval_tower_comp_C Polynomial.aevalTower_comp_Cₓ'. -/
@[simp]
theorem aevalTower_comp_C : (aevalTower g y : R[X] →+* A').comp C = g :=
  RingHom.ext <| aevalTower_C _ _
#align polynomial.aeval_tower_comp_C Polynomial.aevalTower_comp_C

/- warning: polynomial.aeval_tower_algebra_map -> Polynomial.aevalTower_algebraMap is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {S : Type.{u2}} {A' : Type.{u3}} [_inst_1 : CommSemiring.{u3} A'] [_inst_3 : CommSemiring.{u1} R] [_inst_8 : CommSemiring.{u2} S] [_inst_9 : Algebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3)] [_inst_10 : Algebra.{u2, u3} S A' _inst_8 (CommSemiring.toSemiring.{u3} A' _inst_1)] (g : AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (y : A') (x : R), Eq.{succ u3} A' (coeFn.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) (fun (_x : AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) -> A') ([anonymous].{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) (Polynomial.aevalTower.{u1, u2, u3} R S A' _inst_1 _inst_3 _inst_8 _inst_9 _inst_10 g y) (coeFn.{succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (fun (_x : RingHom.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) => R -> (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (RingHom.hasCoeToFun.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (algebraMap.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3))) x)) (coeFn.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (fun (_x : AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) => R -> A') ([anonymous].{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) g x)
but is expected to have type
  forall {R : Type.{u2}} {S : Type.{u3}} {A' : Type.{u1}} [_inst_1 : CommSemiring.{u1} A'] [_inst_3 : CommSemiring.{u2} R] [_inst_8 : CommSemiring.{u3} S] [_inst_9 : Algebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3)] [_inst_10 : Algebra.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1)] (g : AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) (y : A') (x : R), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A') (FunLike.coe.{succ u2, succ u2, succ u2} (RingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) R (fun (a : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) a) (MulHomClass.toFunLike.{u2, u2, u2} (RingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (NonUnitalRingHomClass.toMulHomClass.{u2, u2, u2} (RingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (RingHomClass.toNonUnitalRingHomClass.{u2, u2, u2} (RingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (RingHom.instRingHomClassRingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (algebraMap.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3))) x)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (fun (_x : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A') _x) (SMulHomClass.toFunLike.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' (SMulZeroClass.toSMul.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toZero.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)))))) (SMulZeroClass.toSMul.{u3, u1} S A' (AddMonoid.toZero.{u1} A' (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))))) (DistribSMul.toSMulZeroClass.{u3, u1} S A' (AddMonoid.toAddZeroClass.{u1} A' (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))))) (DistribMulAction.toDistribSMul.{u3, u1} S A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))))) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))))) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u2, u1, max u2 u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10 (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) (AlgHom.algHomClass.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10))))) (Polynomial.aevalTower.{u2, u3, u1} R S A' _inst_1 _inst_3 _inst_8 _inst_9 _inst_10 g y) (FunLike.coe.{succ u2, succ u2, succ u2} (RingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _x) (MulHomClass.toFunLike.{u2, u2, u2} (RingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (NonUnitalRingHomClass.toMulHomClass.{u2, u2, u2} (RingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (RingHomClass.toNonUnitalRingHomClass.{u2, u2, u2} (RingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (RingHom.instRingHomClassRingHom.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (algebraMap.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3))) x)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : R) => A') _x) (SMulHomClass.toFunLike.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) S R A' (SMulZeroClass.toSMul.{u3, u2} S R (AddMonoid.toZero.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (DistribSMul.toSMulZeroClass.{u3, u2} S R (AddMonoid.toAddZeroClass.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (DistribMulAction.toDistribSMul.{u3, u2} S R (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))))) (SMulZeroClass.toSMul.{u3, u1} S A' (AddMonoid.toZero.{u1} A' (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))))) (DistribSMul.toSMulZeroClass.{u3, u1} S A' (AddMonoid.toAddZeroClass.{u1} A' (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))))) (DistribMulAction.toDistribSMul.{u3, u1} S A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))))) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) S R A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) S R A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u2, u1, max u2 u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10 (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) (AlgHom.algHomClass.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10))))) g x)
Case conversion may be inaccurate. Consider using '#align polynomial.aeval_tower_algebra_map Polynomial.aevalTower_algebraMapₓ'. -/
@[simp]
theorem aevalTower_algebraMap (x : R) : aevalTower g y (algebraMap R R[X] x) = g x :=
  eval₂_C _ _
#align polynomial.aeval_tower_algebra_map Polynomial.aevalTower_algebraMap

/- warning: polynomial.aeval_tower_comp_algebra_map -> Polynomial.aevalTower_comp_algebraMap is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {S : Type.{u2}} {A' : Type.{u3}} [_inst_1 : CommSemiring.{u3} A'] [_inst_3 : CommSemiring.{u1} R] [_inst_8 : CommSemiring.{u2} S] [_inst_9 : Algebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3)] [_inst_10 : Algebra.{u2, u3} S A' _inst_8 (CommSemiring.toSemiring.{u3} A' _inst_1)] (g : AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (y : A'), Eq.{max (succ u1) (succ u3)} (RingHom.{u1, u3} R A' (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1))) (RingHom.comp.{u1, u1, u3} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1)) ((fun (a : Sort.{max (succ u1) (succ u3)}) (b : Sort.{max (succ u1) (succ u3)}) [self : HasLiftT.{max (succ u1) (succ u3), max (succ u1) (succ u3)} a b] => self.0) (AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) (RingHom.{u1, u3} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1))) (HasLiftT.mk.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) (RingHom.{u1, u3} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1))) (CoeTCₓ.coe.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) (RingHom.{u1, u3} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1))) (RingHom.hasCoeT.{max u1 u3, u1, u3} (AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1)) (AlgHomClass.toRingHomClass.{max u1 u3, u2, u1, u3} (AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10 (AlgHom.algHomClass.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10))))) (Polynomial.aevalTower.{u1, u2, u3} R S A' _inst_1 _inst_3 _inst_8 _inst_9 _inst_10 g y)) (algebraMap.{u1, u1} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)))) ((fun (a : Sort.{max (succ u1) (succ u3)}) (b : Sort.{max (succ u1) (succ u3)}) [self : HasLiftT.{max (succ u1) (succ u3), max (succ u1) (succ u3)} a b] => self.0) (AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (RingHom.{u1, u3} R A' (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1))) (HasLiftT.mk.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (RingHom.{u1, u3} R A' (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1))) (CoeTCₓ.coe.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (RingHom.{u1, u3} R A' (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1))) (RingHom.hasCoeT.{max u1 u3, u1, u3} (AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) R A' (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u3} A' (CommSemiring.toSemiring.{u3} A' _inst_1)) (AlgHomClass.toRingHomClass.{max u1 u3, u2, u1, u3} (AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10 (AlgHom.algHomClass.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10))))) g)
but is expected to have type
  forall {R : Type.{u2}} {S : Type.{u3}} {A' : Type.{u1}} [_inst_1 : CommSemiring.{u1} A'] [_inst_3 : CommSemiring.{u2} R] [_inst_8 : CommSemiring.{u3} S] [_inst_9 : Algebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3)] [_inst_10 : Algebra.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1)] (g : AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) (y : A'), Eq.{max (succ u2) (succ u1)} (RingHom.{u2, u1} R A' (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))) (RingHom.comp.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)) (RingHomClass.toRingHom.{max u2 u1, u2, u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)) (AlgHomClass.toRingHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10 (AlgHom.algHomClass.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10)) (Polynomial.aevalTower.{u2, u3, u1} R S A' _inst_1 _inst_3 _inst_8 _inst_9 _inst_10 g y)) (algebraMap.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)))) (RingHomClass.toRingHom.{max u2 u1, u2, u1} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) R A' (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)) (AlgHomClass.toRingHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10 (AlgHom.algHomClass.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10)) g)
Case conversion may be inaccurate. Consider using '#align polynomial.aeval_tower_comp_algebra_map Polynomial.aevalTower_comp_algebraMapₓ'. -/
@[simp]
theorem aevalTower_comp_algebraMap : (aevalTower g y : R[X] →+* A').comp (algebraMap R R[X]) = g :=
  aevalTower_comp_C _ _
#align polynomial.aeval_tower_comp_algebra_map Polynomial.aevalTower_comp_algebraMap

/- warning: polynomial.aeval_tower_to_alg_hom -> Polynomial.aevalTower_toAlgHom is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {S : Type.{u2}} {A' : Type.{u3}} [_inst_1 : CommSemiring.{u3} A'] [_inst_3 : CommSemiring.{u1} R] [_inst_8 : CommSemiring.{u2} S] [_inst_9 : Algebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3)] [_inst_10 : Algebra.{u2, u3} S A' _inst_8 (CommSemiring.toSemiring.{u3} A' _inst_1)] (g : AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (y : A') (x : R), Eq.{succ u3} A' (coeFn.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) (fun (_x : AlgHom.{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) -> A') ([anonymous].{u2, u1, u3} S (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10) (Polynomial.aevalTower.{u1, u2, u3} R S A' _inst_1 _inst_3 _inst_8 _inst_9 _inst_10 g y) (coeFn.{succ u1, succ u1} (AlgHom.{u2, u1, u1} S R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9)) (fun (_x : AlgHom.{u2, u1, u1} S R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9)) => R -> (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) ([anonymous].{u2, u1, u1} S R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9)) (IsScalarTower.toAlgHom.{u2, u1, u1} S R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) (Polynomial.isScalarTower.{u1, u2, u1} R (CommSemiring.toSemiring.{u1} R _inst_3) S R (SMulZeroClass.toHasSmul.{u2, u1} S R (AddZeroClass.toHasZero.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddCommMonoid.toAddMonoid.{u1} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))))) (SMulWithZero.toSmulZeroClass.{u2, u1} S R (MulZeroClass.toHasZero.{u2} S (MulZeroOneClass.toMulZeroClass.{u2} S (MonoidWithZero.toMulZeroOneClass.{u2} S (Semiring.toMonoidWithZero.{u2} S (CommSemiring.toSemiring.{u2} S _inst_8))))) (AddZeroClass.toHasZero.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddCommMonoid.toAddMonoid.{u1} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} S R (Semiring.toMonoidWithZero.{u2} S (CommSemiring.toSemiring.{u2} S _inst_8)) (AddZeroClass.toHasZero.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddCommMonoid.toAddMonoid.{u1} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))))) (Module.toMulActionWithZero.{u2, u1} S R (CommSemiring.toSemiring.{u2} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (Algebra.toModule.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9))))) (MonoidWithZero.toMonoid.{u2} S (Semiring.toMonoidWithZero.{u2} S (CommSemiring.toSemiring.{u2} S _inst_8))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Module.toDistribMulAction.{u2, u1} S R (CommSemiring.toSemiring.{u2} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (Algebra.toModule.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9)) (Module.toDistribMulAction.{u1, u1} R R (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (IsScalarTower.right.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9))) x)) (coeFn.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (fun (_x : AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) => R -> A') ([anonymous].{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) g x)
but is expected to have type
  forall {R : Type.{u2}} {S : Type.{u3}} {A' : Type.{u1}} [_inst_1 : CommSemiring.{u1} A'] [_inst_3 : CommSemiring.{u2} R] [_inst_8 : CommSemiring.{u3} S] [_inst_9 : Algebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3)] [_inst_10 : Algebra.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1)] (g : AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) (y : A') (x : R), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A') (FunLike.coe.{succ u2, succ u2, succ u2} (AlgHom.{u3, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) R (fun (a : R) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : R) => Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) a) (SMulHomClass.toFunLike.{u2, u3, u2, u2} (AlgHom.{u3, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (SMulZeroClass.toSMul.{u3, u2} S R (AddMonoid.toZero.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (DistribSMul.toSMulZeroClass.{u3, u2} S R (AddMonoid.toAddZeroClass.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (DistribMulAction.toDistribSMul.{u3, u2} S R (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))))) (SMulZeroClass.toSMul.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toZero.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)))))) (DistribMulActionHomClass.toSMulHomClass.{u2, u3, u2, u2} (AlgHom.{u3, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{u2, u3, u2, u2} (AlgHom.{u3, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u2, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) (AlgHom.{u3, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) (AlgHom.algHomClass.{u3, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)))))) (IsScalarTower.toAlgHom.{u3, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) (Polynomial.isScalarTower.{u2, u3, u2} R (CommSemiring.toSemiring.{u2} R _inst_3) S R (Algebra.toSMul.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) (Module.toDistribMulAction.{u2, u2} R R (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Semiring.toModule.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (IsScalarTower.right.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))) x)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (fun (_x : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) => A') _x) (SMulHomClass.toFunLike.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' (SMulZeroClass.toSMul.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toZero.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)))))) (SMulZeroClass.toSMul.{u3, u1} S A' (AddMonoid.toZero.{u1} A' (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))))) (DistribSMul.toSMulZeroClass.{u3, u1} S A' (AddMonoid.toAddZeroClass.{u1} A' (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))))) (DistribMulAction.toDistribSMul.{u3, u1} S A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))))) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))))) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u2, u1, max u2 u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10 (AlgHom.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10) (AlgHom.algHomClass.{u3, u2, u1} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10))))) (Polynomial.aevalTower.{u2, u3, u1} R S A' _inst_1 _inst_3 _inst_8 _inst_9 _inst_10 g y) (FunLike.coe.{succ u2, succ u2, succ u2} (AlgHom.{u3, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : R) => Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _x) (SMulHomClass.toFunLike.{u2, u3, u2, u2} (AlgHom.{u3, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (SMulZeroClass.toSMul.{u3, u2} S R (AddMonoid.toZero.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (DistribSMul.toSMulZeroClass.{u3, u2} S R (AddMonoid.toAddZeroClass.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (DistribMulAction.toDistribSMul.{u3, u2} S R (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))))) (SMulZeroClass.toSMul.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toZero.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribSMul.toSMulZeroClass.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))))) (DistribMulAction.toDistribSMul.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)))))) (DistribMulActionHomClass.toSMulHomClass.{u2, u3, u2, u2} (AlgHom.{u3, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{u2, u3, u2, u2} (AlgHom.{u3, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) (Module.toDistribMulAction.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Algebra.toModule.{u3, u2} S (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u2, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) (AlgHom.{u3, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) (AlgHom.algHomClass.{u3, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)))))) (IsScalarTower.toAlgHom.{u3, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) (Polynomial.isScalarTower.{u2, u3, u2} R (CommSemiring.toSemiring.{u2} R _inst_3) S R (Algebra.toSMul.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) (Module.toDistribMulAction.{u2, u2} R R (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Semiring.toModule.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (IsScalarTower.right.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))) x)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : R) => A') _x) (SMulHomClass.toFunLike.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) S R A' (SMulZeroClass.toSMul.{u3, u2} S R (AddMonoid.toZero.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (DistribSMul.toSMulZeroClass.{u3, u2} S R (AddMonoid.toAddZeroClass.{u2} R (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))))) (DistribMulAction.toDistribSMul.{u3, u2} S R (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9))))) (SMulZeroClass.toSMul.{u3, u1} S A' (AddMonoid.toZero.{u1} A' (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))))) (DistribSMul.toSMulZeroClass.{u3, u1} S A' (AddMonoid.toAddZeroClass.{u1} A' (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))))) (DistribMulAction.toDistribSMul.{u3, u1} S A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))))) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) S R A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (AddCommMonoid.toAddMonoid.{u2} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) (AddCommMonoid.toAddMonoid.{u1} A' (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) S R A' (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) (Module.toDistribMulAction.{u3, u1} S A' (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A' (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A' (Semiring.toNonAssocSemiring.{u1} A' (CommSemiring.toSemiring.{u1} A' _inst_1)))) (Algebra.toModule.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u3, u2, u1, max u2 u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10 (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) (AlgHom.algHomClass.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10))))) g x)
Case conversion may be inaccurate. Consider using '#align polynomial.aeval_tower_to_alg_hom Polynomial.aevalTower_toAlgHomₓ'. -/
theorem aevalTower_toAlgHom (x : R) : aevalTower g y (IsScalarTower.toAlgHom S R R[X] x) = g x :=
  aevalTower_algebraMap _ _ _
#align polynomial.aeval_tower_to_alg_hom Polynomial.aevalTower_toAlgHom

/- warning: polynomial.aeval_tower_comp_to_alg_hom -> Polynomial.aevalTower_comp_toAlgHom is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {S : Type.{u2}} {A' : Type.{u3}} [_inst_1 : CommSemiring.{u3} A'] [_inst_3 : CommSemiring.{u1} R] [_inst_8 : CommSemiring.{u2} S] [_inst_9 : Algebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3)] [_inst_10 : Algebra.{u2, u3} S A' _inst_8 (CommSemiring.toSemiring.{u3} A' _inst_1)] (g : AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (y : A'), Eq.{max (succ u1) (succ u3)} (AlgHom.{u2, u1, u3} S R A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 _inst_10) (AlgHom.comp.{u2, u1, u1, u3} S R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) A' _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) (CommSemiring.toSemiring.{u3} A' _inst_1) _inst_9 (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) _inst_10 (Polynomial.aevalTower.{u1, u2, u3} R S A' _inst_1 _inst_3 _inst_8 _inst_9 _inst_10 g y) (IsScalarTower.toAlgHom.{u2, u1, u1} S R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_8 _inst_3 (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u1, u1} R R _inst_3 (CommSemiring.toSemiring.{u1} R _inst_3) (Algebra.id.{u1} R _inst_3)) (Polynomial.algebraOfAlgebra.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9) (Polynomial.isScalarTower.{u1, u2, u1} R (CommSemiring.toSemiring.{u1} R _inst_3) S R (SMulZeroClass.toHasSmul.{u2, u1} S R (AddZeroClass.toHasZero.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddCommMonoid.toAddMonoid.{u1} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))))) (SMulWithZero.toSmulZeroClass.{u2, u1} S R (MulZeroClass.toHasZero.{u2} S (MulZeroOneClass.toMulZeroClass.{u2} S (MonoidWithZero.toMulZeroOneClass.{u2} S (Semiring.toMonoidWithZero.{u2} S (CommSemiring.toSemiring.{u2} S _inst_8))))) (AddZeroClass.toHasZero.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddCommMonoid.toAddMonoid.{u1} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))))) (MulActionWithZero.toSMulWithZero.{u2, u1} S R (Semiring.toMonoidWithZero.{u2} S (CommSemiring.toSemiring.{u2} S _inst_8)) (AddZeroClass.toHasZero.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddCommMonoid.toAddMonoid.{u1} R (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))))) (Module.toMulActionWithZero.{u2, u1} S R (CommSemiring.toSemiring.{u2} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (Algebra.toModule.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9))))) (MonoidWithZero.toMonoid.{u2} S (Semiring.toMonoidWithZero.{u2} S (CommSemiring.toSemiring.{u2} S _inst_8))) (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (Module.toDistribMulAction.{u2, u1} S R (CommSemiring.toSemiring.{u2} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (Algebra.toModule.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9)) (Module.toDistribMulAction.{u1, u1} R R (CommSemiring.toSemiring.{u1} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))) (Semiring.toModule.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))) (IsScalarTower.right.{u2, u1} S R _inst_8 (CommSemiring.toSemiring.{u1} R _inst_3) _inst_9)))) g
but is expected to have type
  forall {R : Type.{u2}} {S : Type.{u3}} {A' : Type.{u1}} [_inst_1 : CommSemiring.{u1} A'] [_inst_3 : CommSemiring.{u2} R] [_inst_8 : CommSemiring.{u3} S] [_inst_9 : Algebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3)] [_inst_10 : Algebra.{u3, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1)] (g : AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) (y : A'), Eq.{max (succ u2) (succ u1)} (AlgHom.{u3, u2, u1} S R A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 _inst_10) (AlgHom.comp.{u3, u2, u2, u1} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) A' _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_9 (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) _inst_10 (Polynomial.aevalTower.{u2, u3, u1} R S A' _inst_1 _inst_3 _inst_8 _inst_9 _inst_10 g y) (IsScalarTower.toAlgHom.{u3, u2, u2} S R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_8 _inst_3 (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)) _inst_9 (Polynomial.algebraOfAlgebra.{u2, u2} R R _inst_3 (CommSemiring.toSemiring.{u2} R _inst_3) (Algebra.id.{u2} R _inst_3)) (Polynomial.algebraOfAlgebra.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) (Polynomial.isScalarTower.{u2, u3, u2} R (CommSemiring.toSemiring.{u2} R _inst_3) S R (Algebra.toSMul.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9) (MonoidWithZero.toMonoid.{u3} S (Semiring.toMonoidWithZero.{u3} S (CommSemiring.toSemiring.{u3} S _inst_8))) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (Module.toDistribMulAction.{u3, u2} S R (CommSemiring.toSemiring.{u3} S _inst_8) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Algebra.toModule.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)) (Module.toDistribMulAction.{u2, u2} R R (CommSemiring.toSemiring.{u2} R _inst_3) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)))) (Semiring.toModule.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))) (IsScalarTower.right.{u3, u2} S R _inst_8 (CommSemiring.toSemiring.{u2} R _inst_3) _inst_9)))) g
Case conversion may be inaccurate. Consider using '#align polynomial.aeval_tower_comp_to_alg_hom Polynomial.aevalTower_comp_toAlgHomₓ'. -/
@[simp]
theorem aevalTower_comp_toAlgHom : (aevalTower g y).comp (IsScalarTower.toAlgHom S R R[X]) = g :=
  AlgHom.coe_ringHom_injective <| aevalTower_comp_algebraMap _ _
#align polynomial.aeval_tower_comp_to_alg_hom Polynomial.aevalTower_comp_toAlgHom

#print Polynomial.aevalTower_id /-
@[simp]
theorem aevalTower_id : aevalTower (AlgHom.id S S) = aeval :=
  by
  ext
  simp only [eval_X, aeval_tower_X, coe_aeval_eq_eval]
#align polynomial.aeval_tower_id Polynomial.aevalTower_id
-/

/- warning: polynomial.aeval_tower_of_id -> Polynomial.aevalTower_ofId is a dubious translation:
lean 3 declaration is
  forall {S : Type.{u1}} {A' : Type.{u2}} [_inst_1 : CommSemiring.{u2} A'] [_inst_8 : CommSemiring.{u1} S] [_inst_10 : Algebra.{u1, u2} S A' _inst_8 (CommSemiring.toSemiring.{u2} A' _inst_1)], Eq.{max (succ u1) (succ u2)} (A' -> (AlgHom.{u1, u1, u2} S (Polynomial.{u1} S (CommSemiring.toSemiring.{u1} S _inst_8)) A' _inst_8 (Polynomial.semiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_8)) (CommSemiring.toSemiring.{u2} A' _inst_1) (Polynomial.algebraOfAlgebra.{u1, u1} S S _inst_8 (CommSemiring.toSemiring.{u1} S _inst_8) (Algebra.id.{u1} S _inst_8)) _inst_10)) (Polynomial.aevalTower.{u1, u1, u2} S S A' _inst_1 _inst_8 _inst_8 (Algebra.id.{u1} S _inst_8) _inst_10 (Algebra.ofId.{u1, u2} S A' _inst_8 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_10)) (Polynomial.aeval.{u1, u2} S A' _inst_8 (CommSemiring.toSemiring.{u2} A' _inst_1) _inst_10)
but is expected to have type
  forall {S : Type.{u2}} {A' : Type.{u1}} [_inst_1 : CommSemiring.{u1} A'] [_inst_8 : CommSemiring.{u2} S] [_inst_10 : Algebra.{u2, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1)], Eq.{max (succ u2) (succ u1)} (A' -> (AlgHom.{u2, u2, u1} S (Polynomial.{u2} S (CommSemiring.toSemiring.{u2} S _inst_8)) A' _inst_8 (Polynomial.semiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_8)) (CommSemiring.toSemiring.{u1} A' _inst_1) (Polynomial.algebraOfAlgebra.{u2, u2} S S _inst_8 (CommSemiring.toSemiring.{u2} S _inst_8) (Algebra.id.{u2} S _inst_8)) _inst_10)) (Polynomial.aevalTower.{u2, u2, u1} S S A' _inst_1 _inst_8 _inst_8 (Algebra.id.{u2} S _inst_8) _inst_10 (Algebra.ofId.{u2, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10)) (Polynomial.aeval.{u2, u1} S A' _inst_8 (CommSemiring.toSemiring.{u1} A' _inst_1) _inst_10)
Case conversion may be inaccurate. Consider using '#align polynomial.aeval_tower_of_id Polynomial.aevalTower_ofIdₓ'. -/
@[simp]
theorem aevalTower_ofId : aevalTower (Algebra.ofId S A') = aeval :=
  by
  ext
  simp only [aeval_X, aeval_tower_X]
#align polynomial.aeval_tower_of_id Polynomial.aevalTower_ofId

end AevalTower

end CommSemiring

section CommRing

variable [CommRing S] {f : R →+* S}

/- warning: polynomial.dvd_term_of_dvd_eval_of_dvd_terms -> Polynomial.dvd_term_of_dvd_eval_of_dvd_terms is a dubious translation:
lean 3 declaration is
  forall {S : Type.{u1}} [_inst_8 : CommRing.{u1} S] {z : S} {p : S} {f : Polynomial.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8))} (i : Nat), (Dvd.Dvd.{u1} S (semigroupDvd.{u1} S (SemigroupWithZero.toSemigroup.{u1} S (NonUnitalSemiring.toSemigroupWithZero.{u1} S (NonUnitalRing.toNonUnitalSemiring.{u1} S (NonUnitalCommRing.toNonUnitalRing.{u1} S (CommRing.toNonUnitalCommRing.{u1} S _inst_8)))))) p (Polynomial.eval.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8)) z f)) -> (forall (j : Nat), (Ne.{1} Nat j i) -> (Dvd.Dvd.{u1} S (semigroupDvd.{u1} S (SemigroupWithZero.toSemigroup.{u1} S (NonUnitalSemiring.toSemigroupWithZero.{u1} S (NonUnitalRing.toNonUnitalSemiring.{u1} S (NonUnitalCommRing.toNonUnitalRing.{u1} S (CommRing.toNonUnitalCommRing.{u1} S _inst_8)))))) p (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (Distrib.toHasMul.{u1} S (Ring.toDistrib.{u1} S (CommRing.toRing.{u1} S _inst_8)))) (Polynomial.coeff.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8)) f j) (HPow.hPow.{u1, 0, u1} S Nat S (instHPow.{u1, 0} S Nat (Monoid.Pow.{u1} S (Ring.toMonoid.{u1} S (CommRing.toRing.{u1} S _inst_8)))) z j)))) -> (Dvd.Dvd.{u1} S (semigroupDvd.{u1} S (SemigroupWithZero.toSemigroup.{u1} S (NonUnitalSemiring.toSemigroupWithZero.{u1} S (NonUnitalRing.toNonUnitalSemiring.{u1} S (NonUnitalCommRing.toNonUnitalRing.{u1} S (CommRing.toNonUnitalCommRing.{u1} S _inst_8)))))) p (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (Distrib.toHasMul.{u1} S (Ring.toDistrib.{u1} S (CommRing.toRing.{u1} S _inst_8)))) (Polynomial.coeff.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8)) f i) (HPow.hPow.{u1, 0, u1} S Nat S (instHPow.{u1, 0} S Nat (Monoid.Pow.{u1} S (Ring.toMonoid.{u1} S (CommRing.toRing.{u1} S _inst_8)))) z i)))
but is expected to have type
  forall {S : Type.{u1}} [_inst_8 : CommRing.{u1} S] {z : S} {p : S} {f : Polynomial.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8))} (i : Nat), (Dvd.dvd.{u1} S (semigroupDvd.{u1} S (SemigroupWithZero.toSemigroup.{u1} S (NonUnitalSemiring.toSemigroupWithZero.{u1} S (NonUnitalRing.toNonUnitalSemiring.{u1} S (NonUnitalCommRing.toNonUnitalRing.{u1} S (CommRing.toNonUnitalCommRing.{u1} S _inst_8)))))) p (Polynomial.eval.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8)) z f)) -> (forall (j : Nat), (Ne.{1} Nat j i) -> (Dvd.dvd.{u1} S (semigroupDvd.{u1} S (SemigroupWithZero.toSemigroup.{u1} S (NonUnitalSemiring.toSemigroupWithZero.{u1} S (NonUnitalRing.toNonUnitalSemiring.{u1} S (NonUnitalCommRing.toNonUnitalRing.{u1} S (CommRing.toNonUnitalCommRing.{u1} S _inst_8)))))) p (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (NonUnitalNonAssocRing.toMul.{u1} S (NonAssocRing.toNonUnitalNonAssocRing.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_8))))) (Polynomial.coeff.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8)) f j) (HPow.hPow.{u1, 0, u1} S Nat S (instHPow.{u1, 0} S Nat (Monoid.Pow.{u1} S (MonoidWithZero.toMonoid.{u1} S (Semiring.toMonoidWithZero.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8)))))) z j)))) -> (Dvd.dvd.{u1} S (semigroupDvd.{u1} S (SemigroupWithZero.toSemigroup.{u1} S (NonUnitalSemiring.toSemigroupWithZero.{u1} S (NonUnitalRing.toNonUnitalSemiring.{u1} S (NonUnitalCommRing.toNonUnitalRing.{u1} S (CommRing.toNonUnitalCommRing.{u1} S _inst_8)))))) p (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (NonUnitalNonAssocRing.toMul.{u1} S (NonAssocRing.toNonUnitalNonAssocRing.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_8))))) (Polynomial.coeff.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8)) f i) (HPow.hPow.{u1, 0, u1} S Nat S (instHPow.{u1, 0} S Nat (Monoid.Pow.{u1} S (MonoidWithZero.toMonoid.{u1} S (Semiring.toMonoidWithZero.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8)))))) z i)))
Case conversion may be inaccurate. Consider using '#align polynomial.dvd_term_of_dvd_eval_of_dvd_terms Polynomial.dvd_term_of_dvd_eval_of_dvd_termsₓ'. -/
/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
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) (_ : j ≠ i), p ∣ f.coeff j * z ^ j) : p ∣ f.coeff i * z ^ i :=
  by
  by_cases hi : i ∈ f.support
  · rw [eval, eval₂, Sum] at dvd_eval
    rw [← Finset.insert_erase hi, Finset.sum_insert (Finset.not_mem_erase _ _)] at dvd_eval
    refine' (dvd_add_left _).mp dvd_eval
    apply Finset.dvd_sum
    intro j hj
    exact dvd_terms j (Finset.ne_of_mem_erase hj)
  · convert dvd_zero p
    rw [not_mem_support_iff] at hi
    simp [hi]
#align polynomial.dvd_term_of_dvd_eval_of_dvd_terms Polynomial.dvd_term_of_dvd_eval_of_dvd_terms

/- warning: polynomial.dvd_term_of_is_root_of_dvd_terms -> Polynomial.dvd_term_of_isRoot_of_dvd_terms is a dubious translation:
lean 3 declaration is
  forall {S : Type.{u1}} [_inst_8 : CommRing.{u1} S] {r : S} {p : S} {f : Polynomial.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8))} (i : Nat), (Polynomial.IsRoot.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8)) f r) -> (forall (j : Nat), (Ne.{1} Nat j i) -> (Dvd.Dvd.{u1} S (semigroupDvd.{u1} S (SemigroupWithZero.toSemigroup.{u1} S (NonUnitalSemiring.toSemigroupWithZero.{u1} S (NonUnitalRing.toNonUnitalSemiring.{u1} S (NonUnitalCommRing.toNonUnitalRing.{u1} S (CommRing.toNonUnitalCommRing.{u1} S _inst_8)))))) p (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (Distrib.toHasMul.{u1} S (Ring.toDistrib.{u1} S (CommRing.toRing.{u1} S _inst_8)))) (Polynomial.coeff.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8)) f j) (HPow.hPow.{u1, 0, u1} S Nat S (instHPow.{u1, 0} S Nat (Monoid.Pow.{u1} S (Ring.toMonoid.{u1} S (CommRing.toRing.{u1} S _inst_8)))) r j)))) -> (Dvd.Dvd.{u1} S (semigroupDvd.{u1} S (SemigroupWithZero.toSemigroup.{u1} S (NonUnitalSemiring.toSemigroupWithZero.{u1} S (NonUnitalRing.toNonUnitalSemiring.{u1} S (NonUnitalCommRing.toNonUnitalRing.{u1} S (CommRing.toNonUnitalCommRing.{u1} S _inst_8)))))) p (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (Distrib.toHasMul.{u1} S (Ring.toDistrib.{u1} S (CommRing.toRing.{u1} S _inst_8)))) (Polynomial.coeff.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8)) f i) (HPow.hPow.{u1, 0, u1} S Nat S (instHPow.{u1, 0} S Nat (Monoid.Pow.{u1} S (Ring.toMonoid.{u1} S (CommRing.toRing.{u1} S _inst_8)))) r i)))
but is expected to have type
  forall {S : Type.{u1}} [_inst_8 : CommRing.{u1} S] {r : S} {p : S} {f : Polynomial.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8))} (i : Nat), (Polynomial.IsRoot.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8)) f r) -> (forall (j : Nat), (Ne.{1} Nat j i) -> (Dvd.dvd.{u1} S (semigroupDvd.{u1} S (SemigroupWithZero.toSemigroup.{u1} S (NonUnitalSemiring.toSemigroupWithZero.{u1} S (NonUnitalRing.toNonUnitalSemiring.{u1} S (NonUnitalCommRing.toNonUnitalRing.{u1} S (CommRing.toNonUnitalCommRing.{u1} S _inst_8)))))) p (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (NonUnitalNonAssocRing.toMul.{u1} S (NonAssocRing.toNonUnitalNonAssocRing.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_8))))) (Polynomial.coeff.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8)) f j) (HPow.hPow.{u1, 0, u1} S Nat S (instHPow.{u1, 0} S Nat (Monoid.Pow.{u1} S (MonoidWithZero.toMonoid.{u1} S (Semiring.toMonoidWithZero.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8)))))) r j)))) -> (Dvd.dvd.{u1} S (semigroupDvd.{u1} S (SemigroupWithZero.toSemigroup.{u1} S (NonUnitalSemiring.toSemigroupWithZero.{u1} S (NonUnitalRing.toNonUnitalSemiring.{u1} S (NonUnitalCommRing.toNonUnitalRing.{u1} S (CommRing.toNonUnitalCommRing.{u1} S _inst_8)))))) p (HMul.hMul.{u1, u1, u1} S S S (instHMul.{u1} S (NonUnitalNonAssocRing.toMul.{u1} S (NonAssocRing.toNonUnitalNonAssocRing.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_8))))) (Polynomial.coeff.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8)) f i) (HPow.hPow.{u1, 0, u1} S Nat S (instHPow.{u1, 0} S Nat (Monoid.Pow.{u1} S (MonoidWithZero.toMonoid.{u1} S (Semiring.toMonoidWithZero.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_8)))))) r i)))
Case conversion may be inaccurate. Consider using '#align polynomial.dvd_term_of_is_root_of_dvd_terms Polynomial.dvd_term_of_isRoot_of_dvd_termsₓ'. -/
/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (j «expr ≠ » i) -/
theorem dvd_term_of_isRoot_of_dvd_terms {r p : S} {f : S[X]} (i : ℕ) (hr : f.IsRoot r)
    (h : ∀ (j) (_ : j ≠ i), p ∣ f.coeff j * r ^ j) : p ∣ f.coeff i * r ^ i :=
  dvd_term_of_dvd_eval_of_dvd_terms i (Eq.symm hr ▸ dvd_zero p) h
#align polynomial.dvd_term_of_is_root_of_dvd_terms Polynomial.dvd_term_of_isRoot_of_dvd_terms

end CommRing

end Aeval

section Ring

variable [Ring R]

/- warning: polynomial.eval_mul_X_sub_C -> Polynomial.eval_mul_X_sub_C is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} [_inst_3 : Ring.{u1} R] {p : Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)} (r : R), Eq.{succ u1} R (Polynomial.eval.{u1} R (Ring.toSemiring.{u1} R _inst_3) r (HMul.hMul.{u1, u1, u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (instHMul.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.mul'.{u1} R (Ring.toSemiring.{u1} R _inst_3))) p (HSub.hSub.{u1, u1, u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (instHSub.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.sub.{u1} R _inst_3)) (Polynomial.X.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (coeFn.{succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) (fun (_x : RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) => R -> (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3))) (RingHom.hasCoeToFun.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) (Polynomial.C.{u1} R (Ring.toSemiring.{u1} R _inst_3)) r)))) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R _inst_3))))))))
but is expected to have type
  forall {R : Type.{u1}} [_inst_3 : Ring.{u1} R] {p : Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)} (r : R), Eq.{succ u1} R (Polynomial.eval.{u1} R (Ring.toSemiring.{u1} R _inst_3) r (HMul.hMul.{u1, u1, u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (instHMul.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.mul'.{u1} R (Ring.toSemiring.{u1} R _inst_3))) p (HSub.hSub.{u1, u1, u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) r) (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (instHSub.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.sub.{u1} R _inst_3)) (Polynomial.X.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3))) (RingHom.instRingHomClassRingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3))))))) (Polynomial.C.{u1} R (Ring.toSemiring.{u1} R _inst_3)) r)))) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R _inst_3)))))
Case conversion may be inaccurate. Consider using '#align polynomial.eval_mul_X_sub_C Polynomial.eval_mul_X_sub_Cₓ'. -/
/-- 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 :=
  by
  simp only [eval, eval₂, RingHom.id_apply]
  have bound :=
    calc
      (p * (X - C r)).natDegree ≤ p.nat_degree + (X - C r).natDegree := nat_degree_mul_le
      _ ≤ p.nat_degree + 1 := (add_le_add_left (nat_degree_X_sub_C_le _) _)
      _ < p.nat_degree + 2 := lt_add_one _

  rw [sum_over_range' _ _ (p.nat_degree + 2) bound]
  swap
  · simp
  rw [sum_range_succ']
  conv_lhs =>
    congr
    apply_congr
    skip
    rw [coeff_mul_X_sub_C, sub_mul, mul_assoc, ← pow_succ]
  simp [sum_range_sub', coeff_monomial]
#align polynomial.eval_mul_X_sub_C Polynomial.eval_mul_X_sub_C

/- warning: polynomial.not_is_unit_X_sub_C -> Polynomial.not_isUnit_X_sub_C is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} [_inst_3 : Ring.{u1} R] [_inst_4 : Nontrivial.{u1} R] (r : R), Not (IsUnit.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Ring.toMonoid.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.ring.{u1} R _inst_3)) (HSub.hSub.{u1, u1, u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (instHSub.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.sub.{u1} R _inst_3)) (Polynomial.X.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (coeFn.{succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) (fun (_x : RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) => R -> (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3))) (RingHom.hasCoeToFun.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) (Polynomial.C.{u1} R (Ring.toSemiring.{u1} R _inst_3)) r)))
but is expected to have type
  forall {R : Type.{u1}} [_inst_3 : Ring.{u1} R] [_inst_4 : Nontrivial.{u1} R] (r : R), Not (IsUnit.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (MonoidWithZero.toMonoid.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toMonoidWithZero.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) (HSub.hSub.{u1, u1, u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) r) (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (instHSub.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.sub.{u1} R _inst_3)) (Polynomial.X.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (FunLike.coe.{succ u1, succ u1, succ u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) _x) (MulHomClass.toFunLike.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, u1} (RingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)))) R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3))) (RingHom.instRingHomClassRingHom.{u1, u1} R (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R _inst_3)) (Polynomial.semiring.{u1} R (Ring.toSemiring.{u1} R _inst_3))))))) (Polynomial.C.{u1} R (Ring.toSemiring.{u1} R _inst_3)) r)))
Case conversion may be inaccurate. Consider using '#align polynomial.not_is_unit_X_sub_C Polynomial.not_isUnit_X_sub_Cₓ'. -/
theorem not_isUnit_X_sub_C [Nontrivial R] (r : R) : ¬IsUnit (X - C r) :=
  fun ⟨⟨_, g, hfg, hgf⟩, rfl⟩ => zero_ne_one' R <| by erw [← eval_mul_X_sub_C, hgf, eval_one]
#align polynomial.not_is_unit_X_sub_C Polynomial.not_isUnit_X_sub_C

end Ring

/- warning: polynomial.aeval_endomorphism -> Polynomial.aeval_endomorphism is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {M : Type.{u2}} [_inst_3 : CommRing.{u1} R] [_inst_4 : AddCommGroup.{u2} M] [_inst_5 : Module.{u1, u2} R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4)] (f : LinearMap.{u1, u1, u2, u2} R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5 _inst_5) (v : M) (p : Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3))), Eq.{succ u2} M (coeFn.{succ u2, succ u2} (LinearMap.{u1, u1, u2, u2} R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5 _inst_5) (fun (_x : LinearMap.{u1, u1, u2, u2} R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5 _inst_5) => M -> M) (LinearMap.hasCoeToFun.{u1, u1, u2, u2} R R M M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5 _inst_5 (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3))))) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (LinearMap.{u1, u1, u2, u2} R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5 _inst_5) (CommRing.toCommSemiring.{u1} R _inst_3) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Module.End.semiring.{u1, u2} R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Module.End.algebra.{u1, u2} R M (CommRing.toCommSemiring.{u1} R _inst_3) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5)) (fun (_x : AlgHom.{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (LinearMap.{u1, u1, u2, u2} R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5 _inst_5) (CommRing.toCommSemiring.{u1} R _inst_3) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Module.End.semiring.{u1, u2} R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Module.End.algebra.{u1, u2} R M (CommRing.toCommSemiring.{u1} R _inst_3) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5)) => (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) -> (LinearMap.{u1, u1, u2, u2} R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5 _inst_5)) ([anonymous].{u1, u1, u2} R (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (LinearMap.{u1, u1, u2, u2} R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5 _inst_5) (CommRing.toCommSemiring.{u1} R _inst_3) (Polynomial.semiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Module.End.semiring.{u1, u2} R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5) (Polynomial.algebraOfAlgebra.{u1, u1} R R (CommRing.toCommSemiring.{u1} R _inst_3) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3)) (Algebra.id.{u1} R (CommRing.toCommSemiring.{u1} R _inst_3))) (Module.End.algebra.{u1, u2} R M (CommRing.toCommSemiring.{u1} R _inst_3) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5)) (Polynomial.aeval.{u1, u2} R (LinearMap.{u1, u1, u2, u2} R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5 _inst_5) (CommRing.toCommSemiring.{u1} R _inst_3) (Module.End.semiring.{u1, u2} R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5) (Module.End.algebra.{u1, u2} R M (CommRing.toCommSemiring.{u1} R _inst_3) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5) f) p) v) (Polynomial.sum.{u1, u2} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) p (fun (n : Nat) (b : R) => SMul.smul.{u1, u2} R M (SMulZeroClass.toHasSmul.{u1, u2} R M (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4)))) (SMulWithZero.toSmulZeroClass.{u1, u2} R M (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))))) (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4)))) (MulActionWithZero.toSMulWithZero.{u1, u2} R M (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3))) (AddZeroClass.toHasZero.{u2} M (AddMonoid.toAddZeroClass.{u2} M (AddCommMonoid.toAddMonoid.{u2} M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4)))) (Module.toMulActionWithZero.{u1, u2} R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5)))) b (coeFn.{succ u2, succ u2} (LinearMap.{u1, u1, u2, u2} R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5 _inst_5) (fun (_x : LinearMap.{u1, u1, u2, u2} R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5 _inst_5) => M -> M) (LinearMap.hasCoeToFun.{u1, u1, u2, u2} R R M M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5 _inst_5 (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3))))) (HPow.hPow.{u2, 0, u2} (LinearMap.{u1, u1, u2, u2} R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5 _inst_5) Nat (LinearMap.{u1, u1, u2, u2} R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5 _inst_5) (instHPow.{u2, 0} (LinearMap.{u1, u1, u2, u2} R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5 _inst_5) Nat (Monoid.Pow.{u2} (LinearMap.{u1, u1, u2, u2} R R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5 _inst_5) (Module.End.monoid.{u1, u2} R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_4) _inst_5))) f n) v)))
but is expected to have type
  forall {R : Type.{u2}} {M : Type.{u1}} [_inst_3 : CommRing.{u2} R] [_inst_4 : AddCommGroup.{u1} M] [_inst_5 : Module.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4)] (f : LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (v : M) (p : Polynomial.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3))), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (FunLike.coe.{succ u1, succ u1, succ u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) => LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) p) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) _x) (LinearMap.instFunLikeLinearMap.{u2, u2, u1, u1} R R M M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5 (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3))))) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (CommRing.toCommSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5) (Polynomial.algebraOfAlgebra.{u2, u2} R R (CommRing.toCommSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) (Algebra.id.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Module.instAlgebraEndToSemiringSemiring.{u2, u1} R M (CommRing.toCommSemiring.{u2} R _inst_3) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5)) (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (fun (_x : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) => LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) _x) (SMulHomClass.toFunLike.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (CommRing.toCommSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5) (Polynomial.algebraOfAlgebra.{u2, u2} R R (CommRing.toCommSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) (Algebra.id.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Module.instAlgebraEndToSemiringSemiring.{u2, u1} R M (CommRing.toCommSemiring.{u2} R _inst_3) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5)) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (SMulZeroClass.toSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (AddMonoid.toZero.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)))))))) (DistribSMul.toSMulZeroClass.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)))))))) (DistribMulAction.toDistribSMul.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (CommRing.toCommSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} R R (CommRing.toCommSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) (Algebra.id.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)))))))) (SMulZeroClass.toSMul.{u2, u1} R (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (AddMonoid.toZero.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (AddCommMonoid.toAddMonoid.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Semiring.toNonAssocSemiring.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5)))))) (DistribSMul.toSMulZeroClass.{u2, u1} R (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (AddMonoid.toAddZeroClass.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (AddCommMonoid.toAddMonoid.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Semiring.toNonAssocSemiring.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5)))))) (DistribMulAction.toDistribSMul.{u2, u1} R (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)))) (AddCommMonoid.toAddMonoid.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Semiring.toNonAssocSemiring.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5))))) (Module.toDistribMulAction.{u2, u1} R (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Semiring.toNonAssocSemiring.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5)))) (Algebra.toModule.{u2, u1} R (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (CommRing.toCommSemiring.{u2} R _inst_3) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5) (Module.instAlgebraEndToSemiringSemiring.{u2, u1} R M (CommRing.toCommSemiring.{u2} R _inst_3) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5)))))) (DistribMulActionHomClass.toSMulHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (CommRing.toCommSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5) (Polynomial.algebraOfAlgebra.{u2, u2} R R (CommRing.toCommSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) (Algebra.id.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Module.instAlgebraEndToSemiringSemiring.{u2, u1} R M (CommRing.toCommSemiring.{u2} R _inst_3) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5)) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))))))) (AddCommMonoid.toAddMonoid.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Semiring.toNonAssocSemiring.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5))))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (CommRing.toCommSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} R R (CommRing.toCommSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) (Algebra.id.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))))) (Module.toDistribMulAction.{u2, u1} R (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Semiring.toNonAssocSemiring.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5)))) (Algebra.toModule.{u2, u1} R (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (CommRing.toCommSemiring.{u2} R _inst_3) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5) (Module.instAlgebraEndToSemiringSemiring.{u2, u1} R M (CommRing.toCommSemiring.{u2} R _inst_3) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5))) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (CommRing.toCommSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5) (Polynomial.algebraOfAlgebra.{u2, u2} R R (CommRing.toCommSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) (Algebra.id.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Module.instAlgebraEndToSemiringSemiring.{u2, u1} R M (CommRing.toCommSemiring.{u2} R _inst_3) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5)) R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Semiring.toNonAssocSemiring.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5))) (Module.toDistribMulAction.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)))))) (Algebra.toModule.{u2, u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (CommRing.toCommSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} R R (CommRing.toCommSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) (Algebra.id.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))))) (Module.toDistribMulAction.{u2, u1} R (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Semiring.toNonAssocSemiring.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5)))) (Algebra.toModule.{u2, u1} R (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (CommRing.toCommSemiring.{u2} R _inst_3) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5) (Module.instAlgebraEndToSemiringSemiring.{u2, u1} R M (CommRing.toCommSemiring.{u2} R _inst_3) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5))) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u2, u2, u1, max u1 u2} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (CommRing.toCommSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5) (Polynomial.algebraOfAlgebra.{u2, u2} R R (CommRing.toCommSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) (Algebra.id.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Module.instAlgebraEndToSemiringSemiring.{u2, u1} R M (CommRing.toCommSemiring.{u2} R _inst_3) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5) (AlgHom.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (CommRing.toCommSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5) (Polynomial.algebraOfAlgebra.{u2, u2} R R (CommRing.toCommSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) (Algebra.id.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Module.instAlgebraEndToSemiringSemiring.{u2, u1} R M (CommRing.toCommSemiring.{u2} R _inst_3) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5)) (AlgHom.algHomClass.{u2, u2, u1} R (Polynomial.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (CommRing.toCommSemiring.{u2} R _inst_3) (Polynomial.semiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5) (Polynomial.algebraOfAlgebra.{u2, u2} R R (CommRing.toCommSemiring.{u2} R _inst_3) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3)) (Algebra.id.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (Module.instAlgebraEndToSemiringSemiring.{u2, u1} R M (CommRing.toCommSemiring.{u2} R _inst_3) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5)))))) (Polynomial.aeval.{u2, u1} R (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (CommRing.toCommSemiring.{u2} R _inst_3) (Module.End.semiring.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5) (Module.instAlgebraEndToSemiringSemiring.{u2, u1} R M (CommRing.toCommSemiring.{u2} R _inst_3) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5) f) p) v) (Polynomial.sum.{u2, u1} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (AddCommGroup.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) _inst_4) p (fun (n : Nat) (b : R) => HSMul.hSMul.{u2, u1, u1} R ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (instHSMul.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (SMulZeroClass.toSMul.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (NegZeroClass.toZero.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (SubNegZeroMonoid.toNegZeroClass.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (SubtractionMonoid.toSubNegZeroMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (SubtractionCommMonoid.toSubtractionMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (AddCommGroup.toDivisionAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) _inst_4))))) (SMulWithZero.toSMulZeroClass.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (CommMonoidWithZero.toZero.{u2} R (CommSemiring.toCommMonoidWithZero.{u2} R (CommRing.toCommSemiring.{u2} R _inst_3))) (NegZeroClass.toZero.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (SubNegZeroMonoid.toNegZeroClass.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (SubtractionMonoid.toSubNegZeroMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (SubtractionCommMonoid.toSubtractionMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (AddCommGroup.toDivisionAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) _inst_4))))) (MulActionWithZero.toSMulWithZero.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (Semiring.toMonoidWithZero.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3))) (NegZeroClass.toZero.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (SubNegZeroMonoid.toNegZeroClass.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (SubtractionMonoid.toSubNegZeroMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (SubtractionCommMonoid.toSubtractionMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (AddCommGroup.toDivisionAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) _inst_4))))) (Module.toMulActionWithZero.{u2, u1} R ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) v) _inst_4) _inst_5))))) b (FunLike.coe.{succ u1, succ u1, succ u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) M (fun (_x : M) => (fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : M) => M) _x) (LinearMap.instFunLikeLinearMap.{u2, u2, u1, u1} R R M M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5 (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3))))) (HPow.hPow.{u1, 0, u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) Nat (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (instHPow.{u1, 0} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) Nat (Monoid.Pow.{u1} (LinearMap.{u2, u2, u1, u1} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)))) M M (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5 _inst_5) (Module.End.monoid.{u2, u1} R M (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_3)) (AddCommGroup.toAddCommMonoid.{u1} M _inst_4) _inst_5))) f n) v)))
Case conversion may be inaccurate. Consider using '#align polynomial.aeval_endomorphism Polynomial.aeval_endomorphismₓ'. -/
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 :=
  by
  rw [aeval_def, eval₂]
  exact (LinearMap.applyₗ v).map_sum
#align polynomial.aeval_endomorphism Polynomial.aeval_endomorphism

end Polynomial