/-
Copyright (c) 2020 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen, Devon Tuma

! This file was ported from Lean 3 source module ring_theory.polynomial.scale_roots
! 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.RingTheory.NonZeroDivisors
import Mathbin.Data.Polynomial.AlgebraMap

/-!
# Scaling the roots of a polynomial

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

This file defines `scale_roots p s` for a polynomial `p` in one variable and a ring element `s` to
be the polynomial with root `r * s` for each root `r` of `p` and proves some basic results about it.
-/

variable {A K R S : Type _} [CommRing A] [IsDomain A] [Field K] [CommRing R] [CommRing S]

variable {M : Submonoid A}

namespace Polynomial

open BigOperators Polynomial

#print Polynomial.scaleRoots /-
/-- `scale_roots p s` is a polynomial with root `r * s` for each root `r` of `p`. -/
noncomputable def scaleRoots (p : R[X]) (s : R) : R[X] :=
  ∑ i in p.support, monomial i (p.coeff i * s ^ (p.natDegree - i))
#align polynomial.scale_roots Polynomial.scaleRoots
-/

/- warning: polynomial.coeff_scale_roots -> Polynomial.coeff_scaleRoots is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} [_inst_4 : CommRing.{u1} R] (p : Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4))) (s : R) (i : Nat), Eq.{succ u1} R (Polynomial.coeff.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) (Polynomial.scaleRoots.{u1} R _inst_4 p s) i) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Distrib.toHasMul.{u1} R (Ring.toDistrib.{u1} R (CommRing.toRing.{u1} R _inst_4)))) (Polynomial.coeff.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) p i) (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_4)))) s (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Polynomial.natDegree.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) p) i)))
but is expected to have type
  forall {R : Type.{u1}} [_inst_4 : CommRing.{u1} R] (p : Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4))) (s : R) (i : Nat), Eq.{succ u1} R (Polynomial.coeff.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) (Polynomial.scaleRoots.{u1} R _inst_4 p s) i) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (NonUnitalNonAssocRing.toMul.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4))))) (Polynomial.coeff.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) p i) (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)))))) s (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Polynomial.natDegree.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) p) i)))
Case conversion may be inaccurate. Consider using '#align polynomial.coeff_scale_roots Polynomial.coeff_scaleRootsₓ'. -/
@[simp]
theorem coeff_scaleRoots (p : R[X]) (s : R) (i : ℕ) :
    (scaleRoots p s).coeff i = coeff p i * s ^ (p.natDegree - i) := by
  simp (config := { contextual := true }) [scale_roots, coeff_monomial]
#align polynomial.coeff_scale_roots Polynomial.coeff_scaleRoots

#print Polynomial.coeff_scaleRoots_natDegree /-
theorem coeff_scaleRoots_natDegree (p : R[X]) (s : R) :
    (scaleRoots p s).coeff p.natDegree = p.leadingCoeff := by
  rw [leading_coeff, coeff_scale_roots, tsub_self, pow_zero, mul_one]
#align polynomial.coeff_scale_roots_nat_degree Polynomial.coeff_scaleRoots_natDegree
-/

#print Polynomial.zero_scaleRoots /-
@[simp]
theorem zero_scaleRoots (s : R) : scaleRoots 0 s = 0 :=
  by
  ext
  simp
#align polynomial.zero_scale_roots Polynomial.zero_scaleRoots
-/

#print Polynomial.scaleRoots_ne_zero /-
theorem scaleRoots_ne_zero {p : R[X]} (hp : p ≠ 0) (s : R) : scaleRoots p s ≠ 0 :=
  by
  intro h
  have : p.coeff p.nat_degree ≠ 0 := mt leading_coeff_eq_zero.mp hp
  have : (scale_roots p s).coeff p.nat_degree = 0 :=
    congr_fun (congr_arg (coeff : R[X] → ℕ → R) h) p.nat_degree
  rw [coeff_scale_roots_nat_degree] at this
  contradiction
#align polynomial.scale_roots_ne_zero Polynomial.scaleRoots_ne_zero
-/

#print Polynomial.support_scaleRoots_le /-
theorem support_scaleRoots_le (p : R[X]) (s : R) : (scaleRoots p s).support ≤ p.support :=
  by
  intro
  simpa using left_ne_zero_of_mul
#align polynomial.support_scale_roots_le Polynomial.support_scaleRoots_le
-/

/- warning: polynomial.support_scale_roots_eq -> Polynomial.support_scaleRoots_eq is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} [_inst_4 : CommRing.{u1} R] (p : Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4))) {s : R}, (Membership.Mem.{u1, u1} R (Submonoid.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)))))) (SetLike.hasMem.{u1, u1} (Submonoid.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)))))) R (Submonoid.setLike.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4))))))) s (nonZeroDivisors.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4))))) -> (Eq.{1} (Finset.{0} Nat) (Polynomial.support.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) (Polynomial.scaleRoots.{u1} R _inst_4 p s)) (Polynomial.support.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) p))
but is expected to have type
  forall {R : Type.{u1}} [_inst_4 : CommRing.{u1} R] (p : Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4))) {s : R}, (Membership.mem.{u1, u1} R (Submonoid.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)))))) (SetLike.instMembership.{u1, u1} (Submonoid.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)))))) R (Submonoid.instSetLikeSubmonoid.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4))))))) s (nonZeroDivisors.{u1} R (Semiring.toMonoidWithZero.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4))))) -> (Eq.{1} (Finset.{0} Nat) (Polynomial.support.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) (Polynomial.scaleRoots.{u1} R _inst_4 p s)) (Polynomial.support.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) p))
Case conversion may be inaccurate. Consider using '#align polynomial.support_scale_roots_eq Polynomial.support_scaleRoots_eqₓ'. -/
theorem support_scaleRoots_eq (p : R[X]) {s : R} (hs : s ∈ nonZeroDivisors R) :
    (scaleRoots p s).support = p.support :=
  le_antisymm (support_scaleRoots_le p s)
    (by
      intro i
      simp only [coeff_scale_roots, Polynomial.mem_support_iff]
      intro p_ne_zero ps_zero
      have := pow_mem hs (p.nat_degree - i) _ ps_zero
      contradiction)
#align polynomial.support_scale_roots_eq Polynomial.support_scaleRoots_eq

#print Polynomial.degree_scaleRoots /-
@[simp]
theorem degree_scaleRoots (p : R[X]) {s : R} : degree (scaleRoots p s) = degree p :=
  by
  haveI := Classical.propDecidable
  by_cases hp : p = 0
  · rw [hp, zero_scale_roots]
  have := scale_roots_ne_zero hp s
  refine' le_antisymm (Finset.sup_mono (support_scale_roots_le p s)) (degree_le_degree _)
  rw [coeff_scale_roots_nat_degree]
  intro h
  have := leading_coeff_eq_zero.mp h
  contradiction
#align polynomial.degree_scale_roots Polynomial.degree_scaleRoots
-/

#print Polynomial.natDegree_scaleRoots /-
@[simp]
theorem natDegree_scaleRoots (p : R[X]) (s : R) : natDegree (scaleRoots p s) = natDegree p := by
  simp only [nat_degree, degree_scale_roots]
#align polynomial.nat_degree_scale_roots Polynomial.natDegree_scaleRoots
-/

#print Polynomial.monic_scaleRoots_iff /-
theorem monic_scaleRoots_iff {p : R[X]} (s : R) : Monic (scaleRoots p s) ↔ Monic p := by
  simp only [monic, leading_coeff, nat_degree_scale_roots, coeff_scale_roots_nat_degree]
#align polynomial.monic_scale_roots_iff Polynomial.monic_scaleRoots_iff
-/

/- warning: polynomial.scale_roots_eval₂_mul -> Polynomial.scaleRoots_eval₂_mul is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {S : Type.{u2}} [_inst_4 : CommRing.{u1} R] [_inst_5 : CommRing.{u2} S] {p : Polynomial.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5))} (f : RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) (r : R) (s : S), Eq.{succ u1} R (Polynomial.eval₂.{u2, u1} S R (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) f (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Distrib.toHasMul.{u1} R (Ring.toDistrib.{u1} R (CommRing.toRing.{u1} R _inst_4)))) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) (fun (_x : RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) => S -> R) (RingHom.hasCoeToFun.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) f s) r) (Polynomial.scaleRoots.{u2} S _inst_5 p s)) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Distrib.toHasMul.{u1} R (Ring.toDistrib.{u1} R (CommRing.toRing.{u1} R _inst_4)))) (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_4)))) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) (fun (_x : RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) => S -> R) (RingHom.hasCoeToFun.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) f s) (Polynomial.natDegree.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5)) p)) (Polynomial.eval₂.{u2, u1} S R (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) f r p))
but is expected to have type
  forall {R : Type.{u1}} {S : Type.{u2}} [_inst_4 : CommRing.{u1} R] [_inst_5 : CommRing.{u2} S] {p : Polynomial.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5))} (f : RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) (r : R) (s : S), Eq.{succ u1} R (Polynomial.eval₂.{u2, u1} S R (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) f (HMul.hMul.{u1, u1, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) R ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (instHMul.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (NonUnitalNonAssocRing.toMul.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (NonAssocRing.toNonUnitalNonAssocRing.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (Ring.toNonAssocRing.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (CommRing.toRing.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) _inst_4))))) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) S (fun (_x : S) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) _x) (MulHomClass.toFunLike.{max u1 u2, u2, u1} (RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) S R (NonUnitalNonAssocSemiring.toMul.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))))) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4))))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, u2, u1} (RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) S R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, u2, u1} (RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4))) (RingHom.instRingHomClassRingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4))))))) f s) r) (Polynomial.scaleRoots.{u2} S _inst_5 p s)) (HMul.hMul.{u1, u1, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) R ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (instHMul.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (NonUnitalNonAssocRing.toMul.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (NonAssocRing.toNonUnitalNonAssocRing.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (Ring.toNonAssocRing.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (CommRing.toRing.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) _inst_4))))) (HPow.hPow.{u1, 0, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) Nat ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (instHPow.{u1, 0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) Nat (Monoid.Pow.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (MonoidWithZero.toMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (Semiring.toMonoidWithZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (Ring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (CommRing.toRing.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) _inst_4)))))) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) S (fun (_x : S) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) _x) (MulHomClass.toFunLike.{max u1 u2, u2, u1} (RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) S R (NonUnitalNonAssocSemiring.toMul.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))))) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4))))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, u2, u1} (RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) S R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, u2, u1} (RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4))) (RingHom.instRingHomClassRingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4))))))) f s) (Polynomial.natDegree.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5)) p)) (Polynomial.eval₂.{u2, u1} S R (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) f r p))
Case conversion may be inaccurate. Consider using '#align polynomial.scale_roots_eval₂_mul Polynomial.scaleRoots_eval₂_mulₓ'. -/
theorem scaleRoots_eval₂_mul {p : S[X]} (f : S →+* R) (r : R) (s : S) :
    eval₂ f (f s * r) (scaleRoots p s) = f s ^ p.natDegree * eval₂ f r p :=
  calc
    eval₂ f (f s * r) (scaleRoots p s) =
        (scaleRoots p s).support.Sum fun i =>
          f (coeff p i * s ^ (p.natDegree - i)) * (f s * r) ^ i :=
      by simp [eval₂_eq_sum, sum_def]
    _ = p.support.Sum fun i => f (coeff p i * s ^ (p.natDegree - i)) * (f s * r) ^ i :=
      (Finset.sum_subset (support_scaleRoots_le p s) fun i hi hi' =>
        by
        let this : coeff p i * s ^ (p.natDegree - i) = 0 := by simpa using hi'
        simp [this])
    _ = p.support.Sum fun i : ℕ => f (p.coeff i) * f s ^ (p.natDegree - i + i) * r ^ i :=
      (Finset.sum_congr rfl fun i hi => by
        simp_rw [f.map_mul, f.map_pow, pow_add, mul_pow, mul_assoc])
    _ = p.support.Sum fun i : ℕ => f s ^ p.natDegree * (f (p.coeff i) * r ^ i) :=
      (Finset.sum_congr rfl fun i hi =>
        by
        rw [mul_assoc, mul_left_comm, tsub_add_cancel_of_le]
        exact le_nat_degree_of_ne_zero (polynomial.mem_support_iff.mp hi))
    _ = f s ^ p.natDegree * p.support.Sum fun i : ℕ => f (p.coeff i) * r ^ i := Finset.mul_sum.symm
    _ = f s ^ p.natDegree * eval₂ f r p := by simp [eval₂_eq_sum, sum_def]

#align polynomial.scale_roots_eval₂_mul Polynomial.scaleRoots_eval₂_mul

/- warning: polynomial.scale_roots_eval₂_eq_zero -> Polynomial.scaleRoots_eval₂_eq_zero is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {S : Type.{u2}} [_inst_4 : CommRing.{u1} R] [_inst_5 : CommRing.{u2} S] {p : Polynomial.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5))} (f : RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) {r : R} {s : S}, (Eq.{succ u1} R (Polynomial.eval₂.{u2, u1} S R (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) f r p) (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 (CommRing.toRing.{u1} R _inst_4)))))))))) -> (Eq.{succ u1} R (Polynomial.eval₂.{u2, u1} S R (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) f (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Distrib.toHasMul.{u1} R (Ring.toDistrib.{u1} R (CommRing.toRing.{u1} R _inst_4)))) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) (fun (_x : RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) => S -> R) (RingHom.hasCoeToFun.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) f s) r) (Polynomial.scaleRoots.{u2} S _inst_5 p s)) (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 (CommRing.toRing.{u1} R _inst_4))))))))))
but is expected to have type
  forall {R : Type.{u1}} {S : Type.{u2}} [_inst_4 : CommRing.{u1} R] [_inst_5 : CommRing.{u2} S] {p : Polynomial.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5))} (f : RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) {r : R} {s : S}, (Eq.{succ u1} R (Polynomial.eval₂.{u2, u1} S R (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) f r p) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_4)))))) -> (Eq.{succ u1} R (Polynomial.eval₂.{u2, u1} S R (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5)) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) f (HMul.hMul.{u1, u1, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) R ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (instHMul.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (NonUnitalNonAssocRing.toMul.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (NonAssocRing.toNonUnitalNonAssocRing.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (Ring.toNonAssocRing.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) (CommRing.toRing.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) s) _inst_4))))) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) S (fun (_x : S) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => R) _x) (MulHomClass.toFunLike.{max u1 u2, u2, u1} (RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) S R (NonUnitalNonAssocSemiring.toMul.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))))) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4))))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u2, u2, u1} (RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) S R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) (RingHomClass.toNonUnitalRingHomClass.{max u1 u2, u2, u1} (RingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4)))) S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4))) (RingHom.instRingHomClassRingHom.{u2, u1} S R (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5))) (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4))))))) f s) r) (Polynomial.scaleRoots.{u2} S _inst_5 p s)) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (CommMonoidWithZero.toZero.{u1} R (CommSemiring.toCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_4))))))
Case conversion may be inaccurate. Consider using '#align polynomial.scale_roots_eval₂_eq_zero Polynomial.scaleRoots_eval₂_eq_zeroₓ'. -/
theorem scaleRoots_eval₂_eq_zero {p : S[X]} (f : S →+* R) {r : R} {s : S} (hr : eval₂ f r p = 0) :
    eval₂ f (f s * r) (scaleRoots p s) = 0 := by rw [scale_roots_eval₂_mul, hr, _root_.mul_zero]
#align polynomial.scale_roots_eval₂_eq_zero Polynomial.scaleRoots_eval₂_eq_zero

#print Polynomial.scaleRoots_aeval_eq_zero /-
theorem scaleRoots_aeval_eq_zero [Algebra S R] {p : S[X]} {r : R} {s : S} (hr : aeval r p = 0) :
    aeval (algebraMap S R s * r) (scaleRoots p s) = 0 :=
  scaleRoots_eval₂_eq_zero (algebraMap S R) hr
#align polynomial.scale_roots_aeval_eq_zero Polynomial.scaleRoots_aeval_eq_zero
-/

/- warning: polynomial.scale_roots_eval₂_eq_zero_of_eval₂_div_eq_zero -> Polynomial.scaleRoots_eval₂_eq_zero_of_eval₂_div_eq_zero is a dubious translation:
lean 3 declaration is
  forall {A : Type.{u1}} {K : Type.{u2}} [_inst_1 : CommRing.{u1} A] [_inst_2 : IsDomain.{u1} A (Ring.toSemiring.{u1} A (CommRing.toRing.{u1} A _inst_1))] [_inst_3 : Field.{u2} K] {p : Polynomial.{u1} A (Ring.toSemiring.{u1} A (CommRing.toRing.{u1} A _inst_1))} {f : RingHom.{u1, u2} A K (NonAssocRing.toNonAssocSemiring.{u1} A (Ring.toNonAssocRing.{u1} A (CommRing.toRing.{u1} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))}, (Function.Injective.{succ u1, succ u2} A K (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} A K (NonAssocRing.toNonAssocSemiring.{u1} A (Ring.toNonAssocRing.{u1} A (CommRing.toRing.{u1} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) (fun (_x : RingHom.{u1, u2} A K (NonAssocRing.toNonAssocSemiring.{u1} A (Ring.toNonAssocRing.{u1} A (CommRing.toRing.{u1} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) => A -> K) (RingHom.hasCoeToFun.{u1, u2} A K (NonAssocRing.toNonAssocSemiring.{u1} A (Ring.toNonAssocRing.{u1} A (CommRing.toRing.{u1} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) f)) -> (forall {r : A} {s : A}, (Eq.{succ u2} K (Polynomial.eval₂.{u1, u2} A K (Ring.toSemiring.{u1} A (CommRing.toRing.{u1} A _inst_1)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) f (HDiv.hDiv.{u2, u2, u2} K K K (instHDiv.{u2} K (DivInvMonoid.toHasDiv.{u2} K (DivisionRing.toDivInvMonoid.{u2} K (Field.toDivisionRing.{u2} K _inst_3)))) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} A K (NonAssocRing.toNonAssocSemiring.{u1} A (Ring.toNonAssocRing.{u1} A (CommRing.toRing.{u1} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) (fun (_x : RingHom.{u1, u2} A K (NonAssocRing.toNonAssocSemiring.{u1} A (Ring.toNonAssocRing.{u1} A (CommRing.toRing.{u1} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) => A -> K) (RingHom.hasCoeToFun.{u1, u2} A K (NonAssocRing.toNonAssocSemiring.{u1} A (Ring.toNonAssocRing.{u1} A (CommRing.toRing.{u1} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) f r) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} A K (NonAssocRing.toNonAssocSemiring.{u1} A (Ring.toNonAssocRing.{u1} A (CommRing.toRing.{u1} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) (fun (_x : RingHom.{u1, u2} A K (NonAssocRing.toNonAssocSemiring.{u1} A (Ring.toNonAssocRing.{u1} A (CommRing.toRing.{u1} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) => A -> K) (RingHom.hasCoeToFun.{u1, u2} A K (NonAssocRing.toNonAssocSemiring.{u1} A (Ring.toNonAssocRing.{u1} A (CommRing.toRing.{u1} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) f s)) p) (OfNat.ofNat.{u2} K 0 (OfNat.mk.{u2} K 0 (Zero.zero.{u2} K (MulZeroClass.toHasZero.{u2} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} K (NonAssocRing.toNonUnitalNonAssocRing.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))))))))) -> (Membership.Mem.{u1, u1} A (Submonoid.{u1} A (MulZeroOneClass.toMulOneClass.{u1} A (MonoidWithZero.toMulZeroOneClass.{u1} A (Semiring.toMonoidWithZero.{u1} A (Ring.toSemiring.{u1} A (CommRing.toRing.{u1} A _inst_1)))))) (SetLike.hasMem.{u1, u1} (Submonoid.{u1} A (MulZeroOneClass.toMulOneClass.{u1} A (MonoidWithZero.toMulZeroOneClass.{u1} A (Semiring.toMonoidWithZero.{u1} A (Ring.toSemiring.{u1} A (CommRing.toRing.{u1} A _inst_1)))))) A (Submonoid.setLike.{u1} A (MulZeroOneClass.toMulOneClass.{u1} A (MonoidWithZero.toMulZeroOneClass.{u1} A (Semiring.toMonoidWithZero.{u1} A (Ring.toSemiring.{u1} A (CommRing.toRing.{u1} A _inst_1))))))) s (nonZeroDivisors.{u1} A (Semiring.toMonoidWithZero.{u1} A (Ring.toSemiring.{u1} A (CommRing.toRing.{u1} A _inst_1))))) -> (Eq.{succ u2} K (Polynomial.eval₂.{u1, u2} A K (Ring.toSemiring.{u1} A (CommRing.toRing.{u1} A _inst_1)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) f (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} A K (NonAssocRing.toNonAssocSemiring.{u1} A (Ring.toNonAssocRing.{u1} A (CommRing.toRing.{u1} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) (fun (_x : RingHom.{u1, u2} A K (NonAssocRing.toNonAssocSemiring.{u1} A (Ring.toNonAssocRing.{u1} A (CommRing.toRing.{u1} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) => A -> K) (RingHom.hasCoeToFun.{u1, u2} A K (NonAssocRing.toNonAssocSemiring.{u1} A (Ring.toNonAssocRing.{u1} A (CommRing.toRing.{u1} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) f r) (Polynomial.scaleRoots.{u1} A _inst_1 p s)) (OfNat.ofNat.{u2} K 0 (OfNat.mk.{u2} K 0 (Zero.zero.{u2} K (MulZeroClass.toHasZero.{u2} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} K (NonAssocRing.toNonUnitalNonAssocRing.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))))))))))
but is expected to have type
  forall {A : Type.{u2}} {K : Type.{u1}} [_inst_1 : CommRing.{u2} A] [_inst_2 : IsDomain.{u2} A (Ring.toSemiring.{u2} A (CommRing.toRing.{u2} A _inst_1))] [_inst_3 : Field.{u1} K] {p : Polynomial.{u2} A (Ring.toSemiring.{u2} A (CommRing.toRing.{u2} A _inst_1))} {f : RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))}, (Function.Injective.{succ u2, succ u1} A K (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) A K (NonUnitalNonAssocSemiring.toMul.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3)))))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) A K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3)))) (RingHom.instRingHomClassRingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3)))))))) f)) -> (forall {r : A} {s : A}, (Eq.{succ u1} K (Polynomial.eval₂.{u2, u1} A K (Ring.toSemiring.{u2} A (CommRing.toRing.{u2} A _inst_1)) (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))) f (HDiv.hDiv.{u1, u1, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) s) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (instHDiv.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toDiv.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) A K (NonUnitalNonAssocSemiring.toMul.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3)))))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) A K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3)))) (RingHom.instRingHomClassRingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3)))))))) f r) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) A K (NonUnitalNonAssocSemiring.toMul.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3)))))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) A K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3)))) (RingHom.instRingHomClassRingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3)))))))) f s)) p) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (Field.toSemifield.{u1} K _inst_3))))))) -> (Membership.mem.{u2, u2} A (Submonoid.{u2} A (MulZeroOneClass.toMulOneClass.{u2} A (MonoidWithZero.toMulZeroOneClass.{u2} A (Semiring.toMonoidWithZero.{u2} A (Ring.toSemiring.{u2} A (CommRing.toRing.{u2} A _inst_1)))))) (SetLike.instMembership.{u2, u2} (Submonoid.{u2} A (MulZeroOneClass.toMulOneClass.{u2} A (MonoidWithZero.toMulZeroOneClass.{u2} A (Semiring.toMonoidWithZero.{u2} A (Ring.toSemiring.{u2} A (CommRing.toRing.{u2} A _inst_1)))))) A (Submonoid.instSetLikeSubmonoid.{u2} A (MulZeroOneClass.toMulOneClass.{u2} A (MonoidWithZero.toMulZeroOneClass.{u2} A (Semiring.toMonoidWithZero.{u2} A (Ring.toSemiring.{u2} A (CommRing.toRing.{u2} A _inst_1))))))) s (nonZeroDivisors.{u2} A (Semiring.toMonoidWithZero.{u2} A (Ring.toSemiring.{u2} A (CommRing.toRing.{u2} A _inst_1))))) -> (Eq.{succ u1} K (Polynomial.eval₂.{u2, u1} A K (Ring.toSemiring.{u2} A (CommRing.toRing.{u2} A _inst_1)) (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))) f (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) A K (NonUnitalNonAssocSemiring.toMul.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3)))))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) A K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3))))) A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3)))) (RingHom.instRingHomClassRingHom.{u2, u1} A K (NonAssocRing.toNonAssocSemiring.{u2} A (Ring.toNonAssocRing.{u2} A (CommRing.toRing.{u2} A _inst_1))) (NonAssocRing.toNonAssocSemiring.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_3)))))))) f r) (Polynomial.scaleRoots.{u2} A _inst_1 p s)) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (Field.toSemifield.{u1} K _inst_3))))))))
Case conversion may be inaccurate. Consider using '#align polynomial.scale_roots_eval₂_eq_zero_of_eval₂_div_eq_zero Polynomial.scaleRoots_eval₂_eq_zero_of_eval₂_div_eq_zeroₓ'. -/
theorem scaleRoots_eval₂_eq_zero_of_eval₂_div_eq_zero {p : A[X]} {f : A →+* K}
    (hf : Function.Injective f) {r s : A} (hr : eval₂ f (f r / f s) p = 0)
    (hs : s ∈ nonZeroDivisors A) : eval₂ f (f r) (scaleRoots p s) = 0 :=
  by
  convert scale_roots_eval₂_eq_zero f hr
  rw [← mul_div_assoc, mul_comm, mul_div_cancel]
  exact map_ne_zero_of_mem_nonZeroDivisors _ hf hs
#align polynomial.scale_roots_eval₂_eq_zero_of_eval₂_div_eq_zero Polynomial.scaleRoots_eval₂_eq_zero_of_eval₂_div_eq_zero

/- warning: polynomial.scale_roots_aeval_eq_zero_of_aeval_div_eq_zero -> Polynomial.scaleRoots_aeval_eq_zero_of_aeval_div_eq_zero is a dubious translation:
lean 3 declaration is
  forall {A : Type.{u1}} {K : Type.{u2}} [_inst_1 : CommRing.{u1} A] [_inst_2 : IsDomain.{u1} A (Ring.toSemiring.{u1} A (CommRing.toRing.{u1} A _inst_1))] [_inst_3 : Field.{u2} K] [_inst_6 : Algebra.{u1, u2} A K (CommRing.toCommSemiring.{u1} A _inst_1) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3)))], (Function.Injective.{succ u1, succ u2} A K (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} A K (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) (fun (_x : RingHom.{u1, u2} A K (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) => A -> K) (RingHom.hasCoeToFun.{u1, u2} A K (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) (algebraMap.{u1, u2} A K (CommRing.toCommSemiring.{u1} A _inst_1) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_6))) -> (forall {p : Polynomial.{u1} A (Ring.toSemiring.{u1} A (CommRing.toRing.{u1} A _inst_1))} {r : A} {s : A}, (Eq.{succ u2} K (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgHom.{u1, u1, u2} A (Polynomial.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) K (CommRing.toCommSemiring.{u1} A _inst_1) (Polynomial.semiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) (Polynomial.algebraOfAlgebra.{u1, u1} A A (CommRing.toCommSemiring.{u1} A _inst_1) (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1)) (Algebra.id.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) _inst_6) (fun (_x : AlgHom.{u1, u1, u2} A (Polynomial.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) K (CommRing.toCommSemiring.{u1} A _inst_1) (Polynomial.semiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) (Polynomial.algebraOfAlgebra.{u1, u1} A A (CommRing.toCommSemiring.{u1} A _inst_1) (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1)) (Algebra.id.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) _inst_6) => (Polynomial.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) -> K) ([anonymous].{u1, u1, u2} A (Polynomial.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) K (CommRing.toCommSemiring.{u1} A _inst_1) (Polynomial.semiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) (Polynomial.algebraOfAlgebra.{u1, u1} A A (CommRing.toCommSemiring.{u1} A _inst_1) (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1)) (Algebra.id.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) _inst_6) (Polynomial.aeval.{u1, u2} A K (CommRing.toCommSemiring.{u1} A _inst_1) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_6 (HDiv.hDiv.{u2, u2, u2} K K K (instHDiv.{u2} K (DivInvMonoid.toHasDiv.{u2} K (DivisionRing.toDivInvMonoid.{u2} K (Field.toDivisionRing.{u2} K _inst_3)))) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} A K (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) (fun (_x : RingHom.{u1, u2} A K (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) => A -> K) (RingHom.hasCoeToFun.{u1, u2} A K (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) (algebraMap.{u1, u2} A K (CommRing.toCommSemiring.{u1} A _inst_1) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_6) r) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} A K (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) (fun (_x : RingHom.{u1, u2} A K (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) => A -> K) (RingHom.hasCoeToFun.{u1, u2} A K (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) (algebraMap.{u1, u2} A K (CommRing.toCommSemiring.{u1} A _inst_1) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_6) s))) p) (OfNat.ofNat.{u2} K 0 (OfNat.mk.{u2} K 0 (Zero.zero.{u2} K (MulZeroClass.toHasZero.{u2} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} K (NonAssocRing.toNonUnitalNonAssocRing.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))))))))) -> (Membership.Mem.{u1, u1} A (Submonoid.{u1} A (MulZeroOneClass.toMulOneClass.{u1} A (MonoidWithZero.toMulZeroOneClass.{u1} A (Semiring.toMonoidWithZero.{u1} A (Ring.toSemiring.{u1} A (CommRing.toRing.{u1} A _inst_1)))))) (SetLike.hasMem.{u1, u1} (Submonoid.{u1} A (MulZeroOneClass.toMulOneClass.{u1} A (MonoidWithZero.toMulZeroOneClass.{u1} A (Semiring.toMonoidWithZero.{u1} A (Ring.toSemiring.{u1} A (CommRing.toRing.{u1} A _inst_1)))))) A (Submonoid.setLike.{u1} A (MulZeroOneClass.toMulOneClass.{u1} A (MonoidWithZero.toMulZeroOneClass.{u1} A (Semiring.toMonoidWithZero.{u1} A (Ring.toSemiring.{u1} A (CommRing.toRing.{u1} A _inst_1))))))) s (nonZeroDivisors.{u1} A (Semiring.toMonoidWithZero.{u1} A (Ring.toSemiring.{u1} A (CommRing.toRing.{u1} A _inst_1))))) -> (Eq.{succ u2} K (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (AlgHom.{u1, u1, u2} A (Polynomial.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) K (CommRing.toCommSemiring.{u1} A _inst_1) (Polynomial.semiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) (Polynomial.algebraOfAlgebra.{u1, u1} A A (CommRing.toCommSemiring.{u1} A _inst_1) (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1)) (Algebra.id.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) _inst_6) (fun (_x : AlgHom.{u1, u1, u2} A (Polynomial.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) K (CommRing.toCommSemiring.{u1} A _inst_1) (Polynomial.semiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) (Polynomial.algebraOfAlgebra.{u1, u1} A A (CommRing.toCommSemiring.{u1} A _inst_1) (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1)) (Algebra.id.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) _inst_6) => (Polynomial.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) -> K) ([anonymous].{u1, u1, u2} A (Polynomial.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) K (CommRing.toCommSemiring.{u1} A _inst_1) (Polynomial.semiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) (Polynomial.algebraOfAlgebra.{u1, u1} A A (CommRing.toCommSemiring.{u1} A _inst_1) (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1)) (Algebra.id.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) _inst_6) (Polynomial.aeval.{u1, u2} A K (CommRing.toCommSemiring.{u1} A _inst_1) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_6 (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} A K (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) (fun (_x : RingHom.{u1, u2} A K (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) => A -> K) (RingHom.hasCoeToFun.{u1, u2} A K (Semiring.toNonAssocSemiring.{u1} A (CommSemiring.toSemiring.{u1} A (CommRing.toCommSemiring.{u1} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} K (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))) (algebraMap.{u1, u2} A K (CommRing.toCommSemiring.{u1} A _inst_1) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_6) r)) (Polynomial.scaleRoots.{u1} A _inst_1 p s)) (OfNat.ofNat.{u2} K 0 (OfNat.mk.{u2} K 0 (Zero.zero.{u2} K (MulZeroClass.toHasZero.{u2} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} K (NonAssocRing.toNonUnitalNonAssocRing.{u2} K (Ring.toNonAssocRing.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))))))))))))
but is expected to have type
  forall {A : Type.{u2}} {K : Type.{u1}} [_inst_1 : CommRing.{u2} A] [_inst_2 : IsDomain.{u2} A (Ring.toSemiring.{u2} A (CommRing.toRing.{u2} A _inst_1))] [_inst_3 : Field.{u1} K] [_inst_6 : Algebra.{u2, u1} A K (CommRing.toCommSemiring.{u2} A _inst_1) (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3)))], (Function.Injective.{succ u2, succ u1} A K (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) A K (NonUnitalNonAssocSemiring.toMul.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} K (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3)))))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) A K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} K (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3)))) (RingHom.instRingHomClassRingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3)))))))) (algebraMap.{u2, u1} A K (CommRing.toCommSemiring.{u2} A _inst_1) (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))) _inst_6))) -> (forall {p : Polynomial.{u2} A (Ring.toSemiring.{u2} A (CommRing.toRing.{u2} A _inst_1))} {r : A} {s : A}, (Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) p) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (AlgHom.{u2, u2, u1} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) _inst_6) (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (fun (_x : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _x) (SMulHomClass.toFunLike.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) _inst_6) A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (SMulZeroClass.toSMul.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (AddMonoid.toZero.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))))))) (DistribSMul.toSMulZeroClass.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))))))) (DistribMulAction.toDistribSMul.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (MonoidWithZero.toMonoid.{u2} A (Semiring.toMonoidWithZero.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))))))) (Module.toDistribMulAction.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))))) (Algebra.toModule.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))))))) (SMulZeroClass.toSMul.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (AddMonoid.toZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3)))))))) (DistribSMul.toSMulZeroClass.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (AddMonoid.toAddZeroClass.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3)))))))) (DistribMulAction.toDistribSMul.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (MonoidWithZero.toMonoid.{u2} A (Semiring.toMonoidWithZero.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))))))) (Module.toDistribMulAction.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3)))))) (Algebra.toModule.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) _inst_6))))) (DistribMulActionHomClass.toSMulHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) _inst_6) A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (MonoidWithZero.toMonoid.{u2} A (Semiring.toMonoidWithZero.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))))))) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))))))) (Module.toDistribMulAction.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))))) (Algebra.toModule.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))))) (Module.toDistribMulAction.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3)))))) (Algebra.toModule.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) _inst_6)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) _inst_6) A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (MonoidWithZero.toMonoid.{u2} A (Semiring.toMonoidWithZero.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))))) (Module.toDistribMulAction.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))))) (Algebra.toModule.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))))) (Module.toDistribMulAction.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3)))))) (Algebra.toModule.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) _inst_6)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u2, u2, u1, max u1 u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) _inst_6 (AlgHom.{u2, u2, u1} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) _inst_6) (AlgHom.algHomClass.{u2, u2, u1} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) _inst_6))))) (Polynomial.aeval.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) _inst_6 (HDiv.hDiv.{u1, u1, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) s) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (instHDiv.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toDiv.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) A K (NonUnitalNonAssocSemiring.toMul.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} K (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3)))))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) A K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} K (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3)))) (RingHom.instRingHomClassRingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3)))))))) (algebraMap.{u2, u1} A K (CommRing.toCommSemiring.{u2} A _inst_1) (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))) _inst_6) r) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) A K (NonUnitalNonAssocSemiring.toMul.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} K (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3)))))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) A K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} K (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3)))) (RingHom.instRingHomClassRingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3)))))))) (algebraMap.{u2, u1} A K (CommRing.toCommSemiring.{u2} A _inst_1) (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))) _inst_6) s))) p) (OfNat.ofNat.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) p) 0 (Zero.toOfNat0.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) p) (CommMonoidWithZero.toZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) p) (CommGroupWithZero.toCommMonoidWithZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) p) (Semifield.toCommGroupWithZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) p) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) p) _inst_3))))))) -> (Membership.mem.{u2, u2} A (Submonoid.{u2} A (MulZeroOneClass.toMulOneClass.{u2} A (MonoidWithZero.toMulZeroOneClass.{u2} A (Semiring.toMonoidWithZero.{u2} A (Ring.toSemiring.{u2} A (CommRing.toRing.{u2} A _inst_1)))))) (SetLike.instMembership.{u2, u2} (Submonoid.{u2} A (MulZeroOneClass.toMulOneClass.{u2} A (MonoidWithZero.toMulZeroOneClass.{u2} A (Semiring.toMonoidWithZero.{u2} A (Ring.toSemiring.{u2} A (CommRing.toRing.{u2} A _inst_1)))))) A (Submonoid.instSetLikeSubmonoid.{u2} A (MulZeroOneClass.toMulOneClass.{u2} A (MonoidWithZero.toMulZeroOneClass.{u2} A (Semiring.toMonoidWithZero.{u2} A (Ring.toSemiring.{u2} A (CommRing.toRing.{u2} A _inst_1))))))) s (nonZeroDivisors.{u2} A (Semiring.toMonoidWithZero.{u2} A (Ring.toSemiring.{u2} A (CommRing.toRing.{u2} A _inst_1))))) -> (Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Polynomial.scaleRoots.{u2} A _inst_1 p s)) (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (AlgHom.{u2, u2, u1} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) _inst_6) (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (fun (_x : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _x) (SMulHomClass.toFunLike.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) _inst_6) A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (SMulZeroClass.toSMul.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (AddMonoid.toZero.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))))))) (DistribSMul.toSMulZeroClass.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (AddMonoid.toAddZeroClass.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))))))) (DistribMulAction.toDistribSMul.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (MonoidWithZero.toMonoid.{u2} A (Semiring.toMonoidWithZero.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))))))) (Module.toDistribMulAction.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))))) (Algebra.toModule.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))))))) (SMulZeroClass.toSMul.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (AddMonoid.toZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3)))))))) (DistribSMul.toSMulZeroClass.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (AddMonoid.toAddZeroClass.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3)))))))) (DistribMulAction.toDistribSMul.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (MonoidWithZero.toMonoid.{u2} A (Semiring.toMonoidWithZero.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))))))) (Module.toDistribMulAction.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3)))))) (Algebra.toModule.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) _inst_6))))) (DistribMulActionHomClass.toSMulHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) _inst_6) A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (MonoidWithZero.toMonoid.{u2} A (Semiring.toMonoidWithZero.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))) (AddCommMonoid.toAddMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))))))) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))))))) (Module.toDistribMulAction.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))))) (Algebra.toModule.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))))) (Module.toDistribMulAction.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3)))))) (Algebra.toModule.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) _inst_6)) (NonUnitalAlgHomClass.toDistribMulActionHomClass.{max u1 u2, u2, u2, u1} (AlgHom.{u2, u2, u1} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) _inst_6) A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (MonoidWithZero.toMonoid.{u2} A (Semiring.toMonoidWithZero.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))))) (Module.toDistribMulAction.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u2} (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))))) (Algebra.toModule.{u2, u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))))) (Module.toDistribMulAction.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3)))))) (Algebra.toModule.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) _inst_6)) (AlgHom.instNonUnitalAlgHomClassToMonoidToMonoidWithZeroToSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToNonUnitalNonAssocSemiringToNonAssocSemiringToDistribMulActionToAddCommMonoidToModuleToDistribMulActionToAddCommMonoidToModule.{u2, u2, u1, max u1 u2} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) _inst_6 (AlgHom.{u2, u2, u1} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) _inst_6) (AlgHom.algHomClass.{u2, u2, u1} A (Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (Polynomial.semiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) (Polynomial.algebraOfAlgebra.{u2, u2} A A (CommRing.toCommSemiring.{u2} A _inst_1) (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)) (Algebra.id.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) _inst_6))))) (Polynomial.aeval.{u2, u1} A ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (CommRing.toCommSemiring.{u2} A _inst_1) (DivisionSemiring.toSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Semifield.toDivisionSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) _inst_3))) _inst_6 (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) A (fun (_x : A) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) A K (NonUnitalNonAssocSemiring.toMul.{u2} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} K (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3)))))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) A K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} A (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} K (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))))) A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3)))) (RingHom.instRingHomClassRingHom.{u2, u1} A K (Semiring.toNonAssocSemiring.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) (Semiring.toNonAssocSemiring.{u1} K (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3)))))))) (algebraMap.{u2, u1} A K (CommRing.toCommSemiring.{u2} A _inst_1) (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_3))) _inst_6) r)) (Polynomial.scaleRoots.{u2} A _inst_1 p s)) (OfNat.ofNat.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Polynomial.scaleRoots.{u2} A _inst_1 p s)) 0 (Zero.toOfNat0.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Polynomial.scaleRoots.{u2} A _inst_1 p s)) (CommMonoidWithZero.toZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Polynomial.scaleRoots.{u2} A _inst_1 p s)) (CommGroupWithZero.toCommMonoidWithZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Polynomial.scaleRoots.{u2} A _inst_1 p s)) (Semifield.toCommGroupWithZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Polynomial.scaleRoots.{u2} A _inst_1 p s)) (Field.toSemifield.{u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : Polynomial.{u2} A (CommSemiring.toSemiring.{u2} A (CommRing.toCommSemiring.{u2} A _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : A) => K) r) (Polynomial.scaleRoots.{u2} A _inst_1 p s)) _inst_3))))))))
Case conversion may be inaccurate. Consider using '#align polynomial.scale_roots_aeval_eq_zero_of_aeval_div_eq_zero Polynomial.scaleRoots_aeval_eq_zero_of_aeval_div_eq_zeroₓ'. -/
theorem scaleRoots_aeval_eq_zero_of_aeval_div_eq_zero [Algebra A K]
    (inj : Function.Injective (algebraMap A K)) {p : A[X]} {r s : A}
    (hr : aeval (algebraMap A K r / algebraMap A K s) p = 0) (hs : s ∈ nonZeroDivisors A) :
    aeval (algebraMap A K r) (scaleRoots p s) = 0 :=
  scaleRoots_eval₂_eq_zero_of_eval₂_div_eq_zero inj hr hs
#align polynomial.scale_roots_aeval_eq_zero_of_aeval_div_eq_zero Polynomial.scaleRoots_aeval_eq_zero_of_aeval_div_eq_zero

/- warning: polynomial.map_scale_roots -> Polynomial.map_scaleRoots is a dubious translation:
lean 3 declaration is
  forall {R : Type.{u1}} {S : Type.{u2}} [_inst_4 : CommRing.{u1} R] [_inst_5 : CommRing.{u2} S] (p : Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4))) (x : R) (f : RingHom.{u1, u2} R S (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5)))), (Ne.{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 (CommRing.toRing.{u1} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5)))) (fun (_x : RingHom.{u1, u2} R S (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5)))) => R -> S) (RingHom.hasCoeToFun.{u1, u2} R S (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5)))) f (Polynomial.leadingCoeff.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) p)) (OfNat.ofNat.{u2} S 0 (OfNat.mk.{u2} S 0 (Zero.zero.{u2} S (MulZeroClass.toHasZero.{u2} S (NonUnitalNonAssocSemiring.toMulZeroClass.{u2} S (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} S (NonAssocRing.toNonUnitalNonAssocRing.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5)))))))))) -> (Eq.{succ u2} (Polynomial.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5))) (Polynomial.map.{u1, u2} R S (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5)) f (Polynomial.scaleRoots.{u1} R _inst_4 p x)) (Polynomial.scaleRoots.{u2} S _inst_5 (Polynomial.map.{u1, u2} R S (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_4)) (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_5)) f p) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R S (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5)))) (fun (_x : RingHom.{u1, u2} R S (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5)))) => R -> S) (RingHom.hasCoeToFun.{u1, u2} R S (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_5)))) f x)))
but is expected to have type
  forall {R : Type.{u2}} {S : Type.{u1}} [_inst_4 : CommRing.{u2} R] [_inst_5 : CommRing.{u1} S] (p : Polynomial.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_4))) (x : R) (f : RingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5)))), (Ne.{succ u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) (Polynomial.leadingCoeff.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_4)) 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 (CommRing.toRing.{u2} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5)))) 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 (CommRing.toRing.{u2} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5)))) R S (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_4))))) (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5))))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5)))) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_4)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5)))) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5)))) R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5))) (RingHom.instRingHomClassRingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5))))))) f (Polynomial.leadingCoeff.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_4)) p)) (OfNat.ofNat.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) (Polynomial.leadingCoeff.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_4)) p)) 0 (Zero.toOfNat0.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) (Polynomial.leadingCoeff.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_4)) p)) (CommMonoidWithZero.toZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) (Polynomial.leadingCoeff.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_4)) p)) (CommSemiring.toCommMonoidWithZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) (Polynomial.leadingCoeff.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_4)) p)) (CommRing.toCommSemiring.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) (Polynomial.leadingCoeff.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_4)) p)) _inst_5)))))) -> (Eq.{succ u1} (Polynomial.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_5))) (Polynomial.map.{u2, u1} R S (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_4)) (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_5)) f (Polynomial.scaleRoots.{u2} R _inst_4 p x)) (Polynomial.scaleRoots.{u1} S _inst_5 (Polynomial.map.{u2, u1} R S (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_4)) (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_5)) f 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 (CommRing.toRing.{u2} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5)))) 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 (CommRing.toRing.{u2} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5)))) R S (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_4))))) (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5))))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5)))) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_4)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5)))) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5)))) R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5))) (RingHom.instRingHomClassRingHom.{u2, u1} R S (NonAssocRing.toNonAssocSemiring.{u2} R (Ring.toNonAssocRing.{u2} R (CommRing.toRing.{u2} R _inst_4))) (NonAssocRing.toNonAssocSemiring.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_5))))))) f x)))
Case conversion may be inaccurate. Consider using '#align polynomial.map_scale_roots Polynomial.map_scaleRootsₓ'. -/
theorem map_scaleRoots (p : R[X]) (x : R) (f : R →+* S) (h : f p.leadingCoeff ≠ 0) :
    (p.scaleRoots x).map f = (p.map f).scaleRoots (f x) :=
  by
  ext
  simp [Polynomial.natDegree_map_of_leadingCoeff_ne_zero _ h]
#align polynomial.map_scale_roots Polynomial.map_scaleRoots

end Polynomial