File: Mathlib/Algebra/Polynomial/Eval.lean

full_name: Polynomial.eval₂
code: /-- Evaluate a polynomial `p` given a ring hom `f` from the scalar ring
  to the target and a value `x` for the variable in the target -/
irreducible_def eval₂ (p : R[X]) : S 
goal: S

full_name: Polynomial.wrapped._@.Mathlib.Algebra.Polynomial.Eval._hyg.134
code: /-- Evaluate a polynomial `p` given a ring hom `f` from the scalar ring
  to the target and a value `x` for the variable in the target -/
irreducible_def eval₂ (p : R[X]) : S 
goal: Subtype (Eq @Polynomial.definition✝)

full_name: Polynomial.eval₂_def
code: /-- Evaluate a polynomial `p` given a ring hom `f` from the scalar ring
  to the target and a value `x` for the variable in the target -/
irreducible_def eval₂ (p : R[X]) : S 
goal: Polynomial.eval₂ f x p = p.sum fun e a => f a * x ^ e

full_name: Polynomial.definition._@.Mathlib.Algebra.Polynomial.Eval._hyg.134
code: /-- Evaluate a polynomial `p` given a ring hom `f` from the scalar ring
  to the target and a value `x` for the variable in the target -/
irreducible_def eval₂ (p : R[X]) : S 
goal: S

full_name: Polynomial.eval₂_eq_sum
code: theorem eval₂_eq_sum {f : R →+* S} {x : S} : p.eval₂ f x = p.sum fun e a => f a * x ^ e 
goal: Polynomial.eval₂ f x p = p.sum fun e a => f a * x ^ e

full_name: Polynomial.eval₂_congr
code: theorem eval₂_congr {R S : Type*} [Semiring R] [Semiring S] {f g : R →+* S} {s t : S}
    {φ ψ : R[X]} : f = g → s = t → φ = ψ → eval₂ f s φ = eval₂ g t ψ 
goal: f = g → s = t → φ = ψ → Polynomial.eval₂ f s φ = Polynomial.eval₂ g t ψ

full_name: Polynomial.eval₂_at_zero
code: @[simp]
theorem eval₂_at_zero : p.eval₂ f 0 = f (coeff p 0) 
goal: Polynomial.eval₂ f 0 p = f (p.coeff 0)

full_name: Polynomial.eval₂_zero
code: @[simp]
theorem eval₂_zero : (0 : R[X]).eval₂ f x = 0 
goal: Polynomial.eval₂ f x 0 = 0

full_name: Polynomial.eval₂_C
code: @[simp]
theorem eval₂_C : (C a).eval₂ f x = f a 
goal: Polynomial.eval₂ f x (Polynomial.C a) = f a

full_name: Polynomial.eval₂_X
code: @[simp]
theorem eval₂_X : X.eval₂ f x = x 
goal: Polynomial.eval₂ f x Polynomial.X = x

full_name: Polynomial.eval₂_monomial
code: @[simp]
theorem eval₂_monomial {n : ℕ} {r : R} : (monomial n r).eval₂ f x = f r * x ^ n 
goal: Polynomial.eval₂ f x ((Polynomial.monomial n) r) = f r * x ^ n

full_name: Polynomial.eval₂_X_pow
code: @[simp]
theorem eval₂_X_pow {n : ℕ} : (X ^ n).eval₂ f x = x ^ n 
goal: Polynomial.eval₂ f x (Polynomial.X ^ n) = x ^ n

full_name: Polynomial.eval₂_add
code: @[simp]
theorem eval₂_add : (p + q).eval₂ f x = p.eval₂ f x + q.eval₂ f x 
goal: Polynomial.eval₂ f x (p + q) = Polynomial.eval₂ f x p + Polynomial.eval₂ f x q

full_name: Polynomial.eval₂_one
code: @[simp]
theorem eval₂_one : (1 : R[X]).eval₂ f x = 1 
goal: Polynomial.eval₂ f x 1 = 1

full_name: Polynomial.eval₂_smul
code: @[simp]
theorem eval₂_smul (g : R →+* S) (p : R[X]) (x : S) {s : R} :
    eval₂ g x (s • p) = g s * eval₂ g x p 
goal: Polynomial.eval₂ g x (s • p) = g s * Polynomial.eval₂ g x p

full_name: Polynomial.eval₂_C_X
code: @[simp]
theorem eval₂_C_X : eval₂ C X p = p 
goal: Polynomial.eval₂ Polynomial.C Polynomial.X p = p

full_name: Polynomial.eval₂AddMonoidHom
code: /-- `eval₂AddMonoidHom (f : R →+* S) (x : S)` is the `AddMonoidHom` from
`R[X]` to `S` obtained by evaluating the pushforward of `p` along `f` at `x`. -/
@[simps]
def eval₂AddMonoidHom : R[X] →+ S 
goal: R[X] →+ S

full_name: Polynomial.eval₂AddMonoidHom_apply
code: /-- `eval₂AddMonoidHom (f : R →+* S) (x : S)` is the `AddMonoidHom` from
`R[X]` to `S` obtained by evaluating the pushforward of `p` along `f` at `x`. -/
@[simps]
def eval₂AddMonoidHom : R[X] →+ S 
goal: (Polynomial.eval₂AddMonoidHom f x) p = Polynomial.eval₂ f x p

full_name: Polynomial.eval₂_natCast
code: @[simp]
theorem eval₂_natCast (n : ℕ) : (n : R[X]).eval₂ f x = n 
goal: Polynomial.eval₂ f x ↑n = ↑n

full_name: Polynomial.eval₂_ofNat
code: @[simp]
lemma eval₂_ofNat {S : Type*} [Semiring S] (n : ℕ) [n.AtLeastTwo] (f : R →+* S) (a : S) :
    (no_index (OfNat.ofNat n : R[X])).eval₂ f a = OfNat.ofNat n 
goal: Polynomial.eval₂ f a (OfNat.ofNat n) = OfNat.ofNat n

full_name: Polynomial.eval₂_sum
code: theorem eval₂_sum (p : T[X]) (g : ℕ → T → R[X]) (x : S) :
    (p.sum g).eval₂ f x = p.sum fun n a => (g n a).eval₂ f x 
goal: Polynomial.eval₂ f x (p.sum g) = p.sum fun n a => Polynomial.eval₂ f x (g n a)

full_name: Polynomial.eval₂_list_sum
code: theorem eval₂_list_sum (l : List R[X]) (x : S) : eval₂ f x l.sum = (l.map (eval₂ f x)).sum 
goal: Polynomial.eval₂ f x l.sum = (List.map (Polynomial.eval₂ f x) l).sum

full_name: Polynomial.eval₂_multiset_sum
code: theorem eval₂_multiset_sum (s : Multiset R[X]) (x : S) :
    eval₂ f x s.sum = (s.map (eval₂ f x)).sum 
goal: Polynomial.eval₂ f x s.sum = (Multiset.map (Polynomial.eval₂ f x) s).sum

full_name: Polynomial.eval₂_finset_sum
code: theorem eval₂_finset_sum (s : Finset ι) (g : ι → R[X]) (x : S) :
    (∑ i ∈ s, g i).eval₂ f x = ∑ i ∈ s, (g i).eval₂ f x 
goal: Polynomial.eval₂ f x (∑ i ∈ s, g i) = ∑ i ∈ s, Polynomial.eval₂ f x (g i)

full_name: Polynomial.eval₂_ofFinsupp
code: theorem eval₂_ofFinsupp {f : R →+* S} {x : S} {p : R[ℕ]} :
    eval₂ f x (⟨p⟩ : R[X]) = liftNC (↑f) (powersHom S x) p 
goal: Polynomial.eval₂ f x { toFinsupp := p } = (AddMonoidAlgebra.liftNC ↑f ⇑((powersHom S) x)) p

full_name: Polynomial.eval₂_mul_noncomm
code: theorem eval₂_mul_noncomm (hf : ∀ k, Commute (f <| q.coeff k) x) :
    eval₂ f x (p * q) = eval₂ f x p * eval₂ f x q 
goal: Polynomial.eval₂ f x (p * q) = Polynomial.eval₂ f x p * Polynomial.eval₂ f x q

full_name: Polynomial.eval₂_mul_X
code: @[simp]
theorem eval₂_mul_X : eval₂ f x (p * X) = eval₂ f x p * x 
goal: Polynomial.eval₂ f x (p * Polynomial.X) = Polynomial.eval₂ f x p * x

full_name: Polynomial.eval₂_X_mul
code: @[simp]
theorem eval₂_X_mul : eval₂ f x (X * p) = eval₂ f x p * x 
goal: Polynomial.eval₂ f x (Polynomial.X * p) = Polynomial.eval₂ f x p * x

full_name: Polynomial.eval₂_mul_C'
code: theorem eval₂_mul_C' (h : Commute (f a) x) : eval₂ f x (p * C a) = eval₂ f x p * f a 
goal: Polynomial.eval₂ f x (p * Polynomial.C a) = Polynomial.eval₂ f x p * f a

full_name: Polynomial.eval₂_list_prod_noncomm
code: theorem eval₂_list_prod_noncomm (ps : List R[X])
    (hf : ∀ p ∈ ps, ∀ (k), Commute (f <| coeff p k) x) :
    eval₂ f x ps.prod = (ps.map (Polynomial.eval₂ f x)).prod 
goal: Polynomial.eval₂ f x ps.prod = (List.map (Polynomial.eval₂ f x) ps).prod

full_name: Polynomial.eval₂RingHom'_apply
code: /-- `eval₂` as a `RingHom` for noncommutative rings -/
@[simps]
def eval₂RingHom' (f : R →+* S) (x : S) (hf : ∀ a, Commute (f a) x) : R[X] →+* S 
goal: (Polynomial.eval₂RingHom' f x hf) p = Polynomial.eval₂ f x p

full_name: Polynomial.eval₂RingHom'
code: /-- `eval₂` as a `RingHom` for noncommutative rings -/
@[simps]
def eval₂RingHom' (f : R →+* S) (x : S) (hf : ∀ a, Commute (f a) x) : R[X] →+* S 
goal: R[X] →+* S

full_name: Polynomial.eval₂_eq_sum_range
code: theorem eval₂_eq_sum_range :
    p.eval₂ f x = ∑ i ∈ Finset.range (p.natDegree + 1), f (p.coeff i) * x ^ i 
goal: Polynomial.eval₂ f x p = ∑ i ∈ Finset.range (p.natDegree + 1), f (p.coeff i) * x ^ i

full_name: Polynomial.eval₂_eq_sum_range'
code: theorem eval₂_eq_sum_range' (f : R →+* S) {p : R[X]} {n : ℕ} (hn : p.natDegree < n) (x : S) :
    eval₂ f x p = ∑ i ∈ Finset.range n, f (p.coeff i) * x ^ i 
goal: Polynomial.eval₂ f x p = ∑ i ∈ Finset.range n, f (p.coeff i) * x ^ i

full_name: Polynomial.eval₂_mul
code: @[simp]
theorem eval₂_mul : (p * q).eval₂ f x = p.eval₂ f x * q.eval₂ f x 
goal: Polynomial.eval₂ f x (p * q) = Polynomial.eval₂ f x p * Polynomial.eval₂ f x q

full_name: Polynomial.eval₂_mul_eq_zero_of_left
code: theorem eval₂_mul_eq_zero_of_left (q : R[X]) (hp : p.eval₂ f x = 0) : (p * q).eval₂ f x = 0 
goal: Polynomial.eval₂ f x (p * q) = 0

full_name: Polynomial.eval₂_mul_eq_zero_of_right
code: theorem eval₂_mul_eq_zero_of_right (p : R[X]) (hq : q.eval₂ f x = 0) : (p * q).eval₂ f x = 0 
goal: Polynomial.eval₂ f x (p * q) = 0

full_name: Polynomial.eval₂RingHom
code: /-- `eval₂` as a `RingHom` -/
def eval₂RingHom (f : R →+* S) (x : S) : R[X] →+* S 
goal: R[X] →+* S

full_name: Polynomial.coe_eval₂RingHom
code: @[simp]
theorem coe_eval₂RingHom (f : R →+* S) (x) : ⇑(eval₂RingHom f x) = eval₂ f x 
goal: ⇑(Polynomial.eval₂RingHom f x) = Polynomial.eval₂ f x

full_name: Polynomial.eval₂_pow
code: theorem eval₂_pow (n : ℕ) : (p ^ n).eval₂ f x = p.eval₂ f x ^ n 
goal: Polynomial.eval₂ f x (p ^ n) = Polynomial.eval₂ f x p ^ n

full_name: Polynomial.eval₂_dvd
code: theorem eval₂_dvd : p ∣ q → eval₂ f x p ∣ eval₂ f x q 
goal: p ∣ q → Polynomial.eval₂ f x p ∣ Polynomial.eval₂ f x q

full_name: Polynomial.eval₂_eq_zero_of_dvd_of_eval₂_eq_zero
code: theorem eval₂_eq_zero_of_dvd_of_eval₂_eq_zero (h : p ∣ q) (h0 : eval₂ f x p = 0) :
    eval₂ f x q = 0 
goal: Polynomial.eval₂ f x q = 0

full_name: Polynomial.eval₂_list_prod
code: theorem eval₂_list_prod (l : List R[X]) (x : S) : eval₂ f x l.prod = (l.map (eval₂ f x)).prod 
goal: Polynomial.eval₂ f x l.prod = (List.map (Polynomial.eval₂ f x) l).prod

full_name: Polynomial.eval
code: /-- `eval x p` is the evaluation of the polynomial `p` at `x` -/
def eval : R → R[X] → R 
goal: R → R[X] → R

full_name: Polynomial.eval_eq_sum
code: theorem eval_eq_sum : p.eval x = p.sum fun e a => a * x ^ e 
goal: Polynomial.eval x p = p.sum fun e a => a * x ^ e

full_name: Polynomial.eval_eq_sum_range
code: theorem eval_eq_sum_range {p : R[X]} (x : R) :
    p.eval x = ∑ i ∈ Finset.range (p.natDegree + 1), p.coeff i * x ^ i 
goal: Polynomial.eval x p = ∑ i ∈ Finset.range (p.natDegree + 1), p.coeff i * x ^ i

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

full_name: Polynomial.eval₂_at_apply
code: @[simp]
theorem eval₂_at_apply {S : Type*} [Semiring S] (f : R →+* S) (r : R) :
    p.eval₂ f (f r) = f (p.eval r) 
goal: Polynomial.eval₂ f (f r) p = f (Polynomial.eval r p)

full_name: Polynomial.eval₂_at_one
code: @[simp]
theorem eval₂_at_one {S : Type*} [Semiring S] (f : R →+* S) : p.eval₂ f 1 = f (p.eval 1) 
goal: Polynomial.eval₂ f 1 p = f (Polynomial.eval 1 p)

full_name: Polynomial.eval₂_at_natCast
code: @[simp]
theorem eval₂_at_natCast {S : Type*} [Semiring S] (f : R →+* S) (n : ℕ) :
    p.eval₂ f n = f (p.eval n) 
goal: Polynomial.eval₂ f (↑n) p = f (Polynomial.eval (↑n) p)

full_name: Polynomial.eval₂_at_ofNat
code: @[simp]
theorem eval₂_at_ofNat {S : Type*} [Semiring S] (f : R →+* S) (n : ℕ) [n.AtLeastTwo] :
    p.eval₂ f (no_index (OfNat.ofNat n)) = f (p.eval (OfNat.ofNat n)) 
goal: Polynomial.eval₂ f (OfNat.ofNat n) p = f (Polynomial.eval (OfNat.ofNat n) p)

full_name: Polynomial.eval_C
code: @[simp]
theorem eval_C : (C a).eval x = a 
goal: Polynomial.eval x (Polynomial.C a) = a

full_name: Polynomial.eval_natCast
code: @[simp]
theorem eval_natCast {n : ℕ} : (n : R[X]).eval x = n 
goal: Polynomial.eval x ↑n = ↑n

full_name: Polynomial.eval_ofNat
code: @[simp]
lemma eval_ofNat (n : ℕ) [n.AtLeastTwo] (a : R) :
    (no_index (OfNat.ofNat n : R[X])).eval a = OfNat.ofNat n 
goal: Polynomial.eval a (OfNat.ofNat n) = OfNat.ofNat n

full_name: Polynomial.eval_X
code: @[simp]
theorem eval_X : X.eval x = x 
goal: Polynomial.eval x Polynomial.X = x

full_name: Polynomial.eval_monomial
code: @[simp]
theorem eval_monomial {n a} : (monomial n a).eval x = a * x ^ n 
goal: Polynomial.eval x ((Polynomial.monomial n) a) = a * x ^ n

full_name: Polynomial.eval_zero
code: @[simp]
theorem eval_zero : (0 : R[X]).eval x = 0 
goal: Polynomial.eval x 0 = 0

full_name: Polynomial.eval_add
code: @[simp]
theorem eval_add : (p + q).eval x = p.eval x + q.eval x 
goal: Polynomial.eval x (p + q) = Polynomial.eval x p + Polynomial.eval x q

full_name: Polynomial.eval_one
code: @[simp]
theorem eval_one : (1 : R[X]).eval x = 1 
goal: Polynomial.eval x 1 = 1

full_name: Polynomial.eval_smul
code: @[simp]
theorem eval_smul [Monoid S] [DistribMulAction S R] [IsScalarTower S R R] (s : S) (p : R[X])
    (x : R) : (s • p).eval x = s • p.eval x 
goal: Polynomial.eval x (s • p) = s • Polynomial.eval x p

full_name: Polynomial.eval_C_mul
code: @[simp]
theorem eval_C_mul : (C a * p).eval x = a * p.eval x 
goal: Polynomial.eval x (Polynomial.C a * p) = a * Polynomial.eval x p

full_name: Polynomial.eval_monomial_one_add_sub
code: /-- A reformulation of the expansion of (1 + y)^d:
$$(d + 1) (1 + y)^d - (d + 1)y^d = \sum_{i = 0}^d {d + 1 \choose i} \cdot i \cdot y^{i - 1}.$$
-/
theorem eval_monomial_one_add_sub [CommRing S] (d : ℕ) (y : S) :
    eval (1 + y) (monomial d (d + 1 : S)) - eval y (monomial d (d + 1 : S)) =
      ∑ x_1 ∈ range (d + 1), ↑((d + 1).choose x_1) * (↑x_1 * y ^ (x_1 - 1)) 
goal: Polynomial.eval (1 + y) ((Polynomial.monomial d) (↑d + 1)) - Polynomial.eval y ((Polynomial.monomial d) (↑d + 1)) =
  ∑ x_1 ∈ Finset.range (d + 1), ↑((d + 1).choose x_1) * (↑x_1 * y ^ (x_1 - 1))

full_name: Polynomial.leval
code: /-- `Polynomial.eval` as linear map -/
@[simps]
def leval {R : Type*} [Semiring R] (r : R) : R[X] →ₗ[R] R 
goal: R[X] →ₗ[R] R

full_name: Polynomial.leval_apply
code: /-- `Polynomial.eval` as linear map -/
@[simps]
def leval {R : Type*} [Semiring R] (r : R) : R[X] →ₗ[R] R 
goal: (Polynomial.leval r) f = Polynomial.eval r f

full_name: Polynomial.eval_natCast_mul
code: @[simp]
theorem eval_natCast_mul {n : ℕ} : ((n : R[X]) * p).eval x = n * p.eval x 
goal: Polynomial.eval x (↑n * p) = ↑n * Polynomial.eval x p

full_name: Polynomial.eval_mul_X
code: @[simp]
theorem eval_mul_X : (p * X).eval x = p.eval x * x 
goal: Polynomial.eval x (p * Polynomial.X) = Polynomial.eval x p * x

full_name: Polynomial.eval_mul_X_pow
code: @[simp]
theorem eval_mul_X_pow {k : ℕ} : (p * X ^ k).eval x = p.eval x * x ^ k 
goal: Polynomial.eval x (p * Polynomial.X ^ k) = Polynomial.eval x p * x ^ k

full_name: Polynomial.eval_sum
code: theorem eval_sum (p : R[X]) (f : ℕ → R → R[X]) (x : R) :
    (p.sum f).eval x = p.sum fun n a => (f n a).eval x 
goal: Polynomial.eval x (p.sum f) = p.sum fun n a => Polynomial.eval x (f n a)

full_name: Polynomial.eval_finset_sum
code: theorem eval_finset_sum (s : Finset ι) (g : ι → R[X]) (x : R) :
    (∑ i ∈ s, g i).eval x = ∑ i ∈ s, (g i).eval x 
goal: Polynomial.eval x (∑ i ∈ s, g i) = ∑ i ∈ s, Polynomial.eval x (g i)

full_name: Polynomial.IsRoot
code: /-- `IsRoot p x` implies `x` is a root of `p`. The evaluation of `p` at `x` is zero -/
def IsRoot (p : R[X]) (a : R) : Prop 
goal: Prop

full_name: Polynomial.IsRoot.decidable
code: instance IsRoot.decidable [DecidableEq R] : Decidable (IsRoot p a) 
goal: Decidable (p.IsRoot a)

full_name: Polynomial.IsRoot.def
code: @[simp]
theorem IsRoot.def : IsRoot p a ↔ p.eval a = 0 
goal: p.IsRoot a ↔ Polynomial.eval a p = 0

full_name: Polynomial.IsRoot.eq_zero
code: theorem IsRoot.eq_zero (h : IsRoot p x) : eval x p = 0 
goal: Polynomial.eval x p = 0

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

full_name: Polynomial.zero_isRoot_of_coeff_zero_eq_zero
code: theorem zero_isRoot_of_coeff_zero_eq_zero {p : R[X]} (hp : p.coeff 0 = 0) : IsRoot p 0 
goal: p.IsRoot 0

full_name: Polynomial.IsRoot.dvd
code: theorem IsRoot.dvd {R : Type*} [CommSemiring R] {p q : R[X]} {x : R} (h : p.IsRoot x)
    (hpq : p ∣ q) : q.IsRoot x 
goal: q.IsRoot x

full_name: Polynomial.not_isRoot_C
code: theorem not_isRoot_C (r a : R) (hr : r ≠ 0) : ¬IsRoot (C r) a 
goal: ¬(Polynomial.C r).IsRoot a

full_name: Polynomial.eval_surjective
code: theorem eval_surjective (x : R) : Function.Surjective <| eval x 
goal: Function.Surjective (Polynomial.eval x)

full_name: Polynomial.comp
code: /-- The composition of polynomials as a polynomial. -/
def comp (p q : R[X]) : R[X] 
goal: R[X]

full_name: Polynomial.comp_eq_sum_left
code: theorem comp_eq_sum_left : p.comp q = p.sum fun e a => C a * q ^ e 
goal: p.comp q = p.sum fun e a => Polynomial.C a * q ^ e

full_name: Polynomial.comp_X
code: @[simp]
theorem comp_X : p.comp X = p 
goal: p.comp Polynomial.X = p

full_name: Polynomial.X_comp
code: @[simp]
theorem X_comp : X.comp p = p 
goal: Polynomial.X.comp p = p

full_name: Polynomial.comp_C
code: @[simp]
theorem comp_C : p.comp (C a) = C (p.eval a) 
goal: p.comp (Polynomial.C a) = Polynomial.C (Polynomial.eval a p)

full_name: Polynomial.C_comp
code: @[simp]
theorem C_comp : (C a).comp p = C a 
goal: (Polynomial.C a).comp p = Polynomial.C a

full_name: Polynomial.natCast_comp
code: @[simp]
theorem natCast_comp {n : ℕ} : (n : R[X]).comp p = n 
goal: (↑n).comp p = ↑n

full_name: Polynomial.ofNat_comp
code: @[simp]
theorem ofNat_comp (n : ℕ) [n.AtLeastTwo] : (no_index (OfNat.ofNat n) : R[X]).comp p = n 
goal: (OfNat.ofNat n).comp p = ↑n

full_name: Polynomial.comp_zero
code: @[simp]
theorem comp_zero : p.comp (0 : R[X]) = C (p.eval 0) 
goal: p.comp 0 = Polynomial.C (Polynomial.eval 0 p)

full_name: Polynomial.zero_comp
code: @[simp]
theorem zero_comp : comp (0 : R[X]) p = 0 
goal: Polynomial.comp 0 p = 0

full_name: Polynomial.comp_one
code: @[simp]
theorem comp_one : p.comp 1 = C (p.eval 1) 
goal: p.comp 1 = Polynomial.C (Polynomial.eval 1 p)

full_name: Polynomial.one_comp
code: @[simp]
theorem one_comp : comp (1 : R[X]) p = 1 
goal: Polynomial.comp 1 p = 1

full_name: Polynomial.add_comp
code: @[simp]
theorem add_comp : (p + q).comp r = p.comp r + q.comp r 
goal: (p + q).comp r = p.comp r + q.comp r

full_name: Polynomial.monomial_comp
code: @[simp]
theorem monomial_comp (n : ℕ) : (monomial n a).comp p = C a * p ^ n 
goal: ((Polynomial.monomial n) a).comp p = Polynomial.C a * p ^ n

full_name: Polynomial.mul_X_comp
code: @[simp]
theorem mul_X_comp : (p * X).comp r = p.comp r * r 
goal: (p * Polynomial.X).comp r = p.comp r * r

full_name: Polynomial.X_pow_comp
code: @[simp]
theorem X_pow_comp {k : ℕ} : (X ^ k).comp p = p ^ k 
goal: (Polynomial.X ^ k).comp p = p ^ k

full_name: Polynomial.mul_X_pow_comp
code: @[simp]
theorem mul_X_pow_comp {k : ℕ} : (p * X ^ k).comp r = p.comp r * r ^ k 
goal: (p * Polynomial.X ^ k).comp r = p.comp r * r ^ k

full_name: Polynomial.C_mul_comp
code: @[simp]
theorem C_mul_comp : (C a * p).comp r = C a * p.comp r 
goal: (Polynomial.C a * p).comp r = Polynomial.C a * p.comp r

full_name: Polynomial.natCast_mul_comp
code: @[simp]
theorem natCast_mul_comp {n : ℕ} : ((n : R[X]) * p).comp r = n * p.comp r 
goal: (↑n * p).comp r = ↑n * p.comp r

full_name: Polynomial.mul_X_add_natCast_comp
code: theorem mul_X_add_natCast_comp {n : ℕ} :
    (p * (X + (n : R[X]))).comp q = p.comp q * (q + n) 
goal: (p * (Polynomial.X + ↑n)).comp q = p.comp q * (q + ↑n)

full_name: Polynomial.mul_comp
code: @[simp]
theorem mul_comp {R : Type*} [CommSemiring R] (p q r : R[X]) :
    (p * q).comp r = p.comp r * q.comp r 
goal: (p * q).comp r = p.comp r * q.comp r

full_name: Polynomial.pow_comp
code: @[simp]
theorem pow_comp {R : Type*} [CommSemiring R] (p q : R[X]) (n : ℕ) :
    (p ^ n).comp q = p.comp q ^ n 
goal: (p ^ n).comp q = p.comp q ^ n

full_name: Polynomial.smul_comp
code: @[simp]
theorem smul_comp [Monoid S] [DistribMulAction S R] [IsScalarTower S R R] (s : S) (p q : R[X]) :
    (s • p).comp q = s • p.comp q 
goal: (s • p).comp q = s • p.comp q

full_name: Polynomial.comp_assoc
code: theorem comp_assoc {R : Type*} [CommSemiring R] (φ ψ χ : R[X]) :
    (φ.comp ψ).comp χ = φ.comp (ψ.comp χ) 
goal: (φ.comp ψ).comp χ = φ.comp (ψ.comp χ)

full_name: Polynomial.coeff_comp_degree_mul_degree
code: theorem coeff_comp_degree_mul_degree (hqd0 : natDegree q ≠ 0) :
    coeff (p.comp q) (natDegree p * natDegree q) =
    leadingCoeff p * leadingCoeff q ^ natDegree p 
goal: (p.comp q).coeff (p.natDegree * q.natDegree) = p.leadingCoeff * q.leadingCoeff ^ p.natDegree

full_name: Polynomial.sum_comp
code: @[simp] lemma sum_comp (s : Finset ι) (p : ι → R[X]) (q : R[X]) :
    (∑ i ∈ s, p i).comp q = ∑ i ∈ s, (p i).comp q 
goal: (∑ i ∈ s, p i).comp q = ∑ i ∈ s, (p i).comp q

full_name: Polynomial.map
code: /-- `map f p` maps a polynomial `p` across a ring hom `f` -/
def map : R[X] → S[X] 
goal: R[X] → S[X]

full_name: Polynomial.map_C
code: @[simp]
theorem map_C : (C a).map f = C (f a) 
goal: Polynomial.map f (Polynomial.C a) = Polynomial.C (f a)

full_name: Polynomial.map_X
code: @[simp]
theorem map_X : X.map f = X 
goal: Polynomial.map f Polynomial.X = Polynomial.X

full_name: Polynomial.map_monomial
code: @[simp]
theorem map_monomial {n a} : (monomial n a).map f = monomial n (f a) 
goal: Polynomial.map f ((Polynomial.monomial n) a) = (Polynomial.monomial n) (f a)

full_name: Polynomial.map_zero
code: @[simp]
protected theorem map_zero : (0 : R[X]).map f = 0 
goal: Polynomial.map f 0 = 0

full_name: Polynomial.map_add
code: @[simp]
protected theorem map_add : (p + q).map f = p.map f + q.map f 
goal: Polynomial.map f (p + q) = Polynomial.map f p + Polynomial.map f q

full_name: Polynomial.map_one
code: @[simp]
protected theorem map_one : (1 : R[X]).map f = 1 
goal: Polynomial.map f 1 = 1

full_name: Polynomial.map_mul
code: @[simp]
protected theorem map_mul : (p * q).map f = p.map f * q.map f 
goal: Polynomial.map f (p * q) = Polynomial.map f p * Polynomial.map f q

full_name: Polynomial.map_smul
code: @[simp]
protected theorem map_smul (r : R) : (r • p).map f = f r • p.map f 
goal: Polynomial.map f (r • p) = f r • Polynomial.map f p

full_name: Polynomial.mapRingHom
code: /-- `Polynomial.map` as a `RingHom`. -/
def mapRingHom (f : R →+* S) : R[X] →+* S[X] 
goal: R[X] →+* S[X]

full_name: Polynomial.coe_mapRingHom
code: @[simp]
theorem coe_mapRingHom (f : R →+* S) : ⇑(mapRingHom f) = map f 
goal: ⇑(Polynomial.mapRingHom f) = Polynomial.map f

full_name: Polynomial.map_natCast
code: @[simp]
protected theorem map_natCast (n : ℕ) : (n : R[X]).map f = n 
goal: Polynomial.map f ↑n = ↑n

full_name: Polynomial.map_ofNat
code: @[simp]
protected theorem map_ofNat (n : ℕ) [n.AtLeastTwo] :
    (no_index (OfNat.ofNat n) : R[X]).map f = OfNat.ofNat n 
goal: Polynomial.map f (OfNat.ofNat n) = OfNat.ofNat n

full_name: Polynomial.map_dvd
code: theorem map_dvd (f : R →+* S) {x y : R[X]} : x ∣ y → x.map f ∣ y.map f 
goal: x ∣ y → Polynomial.map f x ∣ Polynomial.map f y

full_name: Polynomial.coeff_map
code: @[simp]
theorem coeff_map (n : ℕ) : coeff (p.map f) n = f (coeff p n) 
goal: (Polynomial.map f p).coeff n = f (p.coeff n)

full_name: Polynomial.mapEquiv_symm_apply
code: /-- If `R` and `S` are isomorphic, then so are their polynomial rings. -/
@[simps!]
def mapEquiv (e : R ≃+* S) : R[X] ≃+* S[X] 
goal: (Polynomial.mapEquiv e).symm a = Polynomial.map (↑e.symm) a

full_name: Polynomial.mapEquiv
code: /-- If `R` and `S` are isomorphic, then so are their polynomial rings. -/
@[simps!]
def mapEquiv (e : R ≃+* S) : R[X] ≃+* S[X] 
goal: R[X] ≃+* S[X]

full_name: Polynomial.mapEquiv_apply
code: /-- If `R` and `S` are isomorphic, then so are their polynomial rings. -/
@[simps!]
def mapEquiv (e : R ≃+* S) : R[X] ≃+* S[X] 
goal: (Polynomial.mapEquiv e) a = Polynomial.map (↑e) a

full_name: Polynomial.map_map
code: theorem map_map [Semiring T] (g : S →+* T) (p : R[X]) : (p.map f).map g = p.map (g.comp f) 
goal: Polynomial.map g (Polynomial.map f p) = Polynomial.map (g.comp f) p

full_name: Polynomial.map_id
code: @[simp]
theorem map_id : p.map (RingHom.id _) = p 
goal: Polynomial.map (RingHom.id R) p = p

full_name: Polynomial.piEquiv
code: /-- The polynomial ring over a finite product of rings is isomorphic to
the product of polynomial rings over individual rings. -/
def piEquiv {ι} [Finite ι] (R : ι → Type*) [∀ i, Semiring (R i)] :
    (∀ i, R i)[X] ≃+* ∀ i, (R i)[X] 
goal: ((i : ι) → R i)[X] ≃+* ((i : ι) → (R i)[X])

full_name: Polynomial.eval₂_eq_eval_map
code: theorem eval₂_eq_eval_map {x : S} : p.eval₂ f x = (p.map f).eval x 
goal: Polynomial.eval₂ f x p = Polynomial.eval x (Polynomial.map f p)

full_name: Polynomial.map_injective
code: theorem map_injective (hf : Function.Injective f) : Function.Injective (map f) 
goal: Function.Injective (Polynomial.map f)

full_name: Polynomial.map_surjective
code: theorem map_surjective (hf : Function.Surjective f) : Function.Surjective (map f) 
goal: Function.Surjective (Polynomial.map f)

full_name: Polynomial.degree_map_le
code: theorem degree_map_le (p : R[X]) : degree (p.map f) ≤ degree p 
goal: (Polynomial.map f p).degree ≤ p.degree

full_name: Polynomial.natDegree_map_le
code: theorem natDegree_map_le (p : R[X]) : natDegree (p.map f) ≤ natDegree p 
goal: (Polynomial.map f p).natDegree ≤ p.natDegree

full_name: Polynomial.map_eq_zero_iff
code: protected theorem map_eq_zero_iff (hf : Function.Injective f) : p.map f = 0 ↔ p = 0 
goal: Polynomial.map f p = 0 ↔ p = 0

full_name: Polynomial.map_ne_zero_iff
code: protected theorem map_ne_zero_iff (hf : Function.Injective f) : p.map f ≠ 0 ↔ p ≠ 0 
goal: Polynomial.map f p ≠ 0 ↔ p ≠ 0

full_name: Polynomial.map_monic_eq_zero_iff
code: theorem map_monic_eq_zero_iff (hp : p.Monic) : p.map f = 0 ↔ ∀ x, f x = 0 
goal: Polynomial.map f p = 0 ↔ ∀ (x : R), f x = 0

full_name: Polynomial.map_monic_ne_zero
code: theorem map_monic_ne_zero (hp : p.Monic) [Nontrivial S] : p.map f ≠ 0 
goal: Polynomial.map f p ≠ 0

full_name: Polynomial.degree_map_eq_of_leadingCoeff_ne_zero
code: theorem degree_map_eq_of_leadingCoeff_ne_zero (f : R →+* S) (hf : f (leadingCoeff p) ≠ 0) :
    degree (p.map f) = degree p 
goal: (Polynomial.map f p).degree = p.degree

full_name: Polynomial.natDegree_map_of_leadingCoeff_ne_zero
code: theorem natDegree_map_of_leadingCoeff_ne_zero (f : R →+* S) (hf : f (leadingCoeff p) ≠ 0) :
    natDegree (p.map f) = natDegree p 
goal: (Polynomial.map f p).natDegree = p.natDegree

full_name: Polynomial.leadingCoeff_map_of_leadingCoeff_ne_zero
code: theorem leadingCoeff_map_of_leadingCoeff_ne_zero (f : R →+* S) (hf : f (leadingCoeff p) ≠ 0) :
    leadingCoeff (p.map f) = f (leadingCoeff p) 
goal: (Polynomial.map f p).leadingCoeff = f p.leadingCoeff

full_name: Polynomial.mapRingHom_id
code: @[simp]
theorem mapRingHom_id : mapRingHom (RingHom.id R) = RingHom.id R[X] 
goal: Polynomial.mapRingHom (RingHom.id R) = RingHom.id R[X]

full_name: Polynomial.mapRingHom_comp
code: @[simp]
theorem mapRingHom_comp [Semiring T] (f : S →+* T) (g : R →+* S) :
    (mapRingHom f).comp (mapRingHom g) = mapRingHom (f.comp g) 
goal: (Polynomial.mapRingHom f).comp (Polynomial.mapRingHom g) = Polynomial.mapRingHom (f.comp g)

full_name: Polynomial.map_list_prod
code: protected theorem map_list_prod (L : List R[X]) : L.prod.map f = (L.map <| map f).prod 
goal: Polynomial.map f L.prod = (List.map (Polynomial.map f) L).prod

full_name: Polynomial.map_pow
code: @[simp]
protected theorem map_pow (n : ℕ) : (p ^ n).map f = p.map f ^ n 
goal: Polynomial.map f (p ^ n) = Polynomial.map f p ^ n

full_name: Polynomial.mem_map_rangeS
code: theorem mem_map_rangeS {p : S[X]} : p ∈ (mapRingHom f).rangeS ↔ ∀ n, p.coeff n ∈ f.rangeS 
goal: p ∈ (Polynomial.mapRingHom f).rangeS ↔ ∀ (n : ℕ), p.coeff n ∈ f.rangeS

full_name: Polynomial.mem_map_range
code: theorem mem_map_range {R S : Type*} [Ring R] [Ring S] (f : R →+* S) {p : S[X]} :
    p ∈ (mapRingHom f).range ↔ ∀ n, p.coeff n ∈ f.range 
goal: p ∈ (Polynomial.mapRingHom f).range ↔ ∀ (n : ℕ), p.coeff n ∈ f.range

full_name: Polynomial.eval₂_map
code: theorem eval₂_map [Semiring T] (g : S →+* T) (x : T) :
    (p.map f).eval₂ g x = p.eval₂ (g.comp f) x 
goal: Polynomial.eval₂ g x (Polynomial.map f p) = Polynomial.eval₂ (g.comp f) x p

full_name: Polynomial.eval_map
code: theorem eval_map (x : S) : (p.map f).eval x = p.eval₂ f x 
goal: Polynomial.eval x (Polynomial.map f p) = Polynomial.eval₂ f x p

full_name: Polynomial.map_sum
code: protected theorem map_sum {ι : Type*} (g : ι → R[X]) (s : Finset ι) :
    (∑ i ∈ s, g i).map f = ∑ i ∈ s, (g i).map f 
goal: Polynomial.map f (∑ i ∈ s, g i) = ∑ i ∈ s, Polynomial.map f (g i)

full_name: Polynomial.map_comp
code: theorem map_comp (p q : R[X]) : map f (p.comp q) = (map f p).comp (map f q) 
goal: Polynomial.map f (p.comp q) = (Polynomial.map f p).comp (Polynomial.map f q)

full_name: Polynomial.eval_zero_map
code: @[simp]
theorem eval_zero_map (f : R →+* S) (p : R[X]) : (p.map f).eval 0 = f (p.eval 0) 
goal: Polynomial.eval 0 (Polynomial.map f p) = f (Polynomial.eval 0 p)

full_name: Polynomial.eval_one_map
code: @[simp]
theorem eval_one_map (f : R →+* S) (p : R[X]) : (p.map f).eval 1 = f (p.eval 1) 
goal: Polynomial.eval 1 (Polynomial.map f p) = f (Polynomial.eval 1 p)

full_name: Polynomial.eval_natCast_map
code: @[simp]
theorem eval_natCast_map (f : R →+* S) (p : R[X]) (n : ℕ) :
    (p.map f).eval (n : S) = f (p.eval n) 
goal: Polynomial.eval (↑n) (Polynomial.map f p) = f (Polynomial.eval (↑n) p)

full_name: Polynomial.eval_intCast_map
code: @[simp]
theorem eval_intCast_map {R S : Type*} [Ring R] [Ring S] (f : R →+* S) (p : R[X]) (i : ℤ) :
    (p.map f).eval (i : S) = f (p.eval i) 
goal: Polynomial.eval (↑i) (Polynomial.map f p) = f (Polynomial.eval (↑i) p)

full_name: Polynomial.hom_eval₂
code: theorem hom_eval₂ (x : S) : g (p.eval₂ f x) = p.eval₂ (g.comp f) (g x) 
goal: g (Polynomial.eval₂ f x p) = Polynomial.eval₂ (g.comp f) (g x) p

full_name: Polynomial.eval₂_hom
code: theorem eval₂_hom (x : R) : p.eval₂ f (f x) = f (p.eval x) 
goal: Polynomial.eval₂ f (f x) p = f (Polynomial.eval x p)

full_name: Polynomial.eval₂_comp
code: theorem eval₂_comp {x : S} : eval₂ f x (p.comp q) = eval₂ f (eval₂ f x q) p 
goal: Polynomial.eval₂ f x (p.comp q) = Polynomial.eval₂ f (Polynomial.eval₂ f x q) p

full_name: Polynomial.iterate_comp_eval₂
code: @[simp]
theorem iterate_comp_eval₂ (k : ℕ) (t : S) :
    eval₂ f t (p.comp^[k] q) = (fun x => eval₂ f x p)^[k] (eval₂ f t q) 
goal: Polynomial.eval₂ f t (p.comp^[k] q) = (fun x => Polynomial.eval₂ f x p)^[k] (Polynomial.eval₂ f t q)

full_name: Polynomial.eval₂_mul'
code: @[simp]
theorem eval₂_mul' :
    (p * q).eval₂ (algebraMap R S) x = p.eval₂ (algebraMap R S) x * q.eval₂ (algebraMap R S) x 
goal: Polynomial.eval₂ (algebraMap R S) x (p * q) =
  Polynomial.eval₂ (algebraMap R S) x p * Polynomial.eval₂ (algebraMap R S) x q

full_name: Polynomial.eval₂_pow'
code: @[simp]
theorem eval₂_pow' (n : ℕ) :
    (p ^ n).eval₂ (algebraMap R S) x = (p.eval₂ (algebraMap R S) x) ^ n 
goal: Polynomial.eval₂ (algebraMap R S) x (p ^ n) = Polynomial.eval₂ (algebraMap R S) x p ^ n

full_name: Polynomial.eval₂_comp'
code: @[simp]
theorem eval₂_comp' : eval₂ (algebraMap R S) x (p.comp q) =
    eval₂ (algebraMap R S) (eval₂ (algebraMap R S) x q) p 
goal: Polynomial.eval₂ (algebraMap R S) x (p.comp q) =
  Polynomial.eval₂ (algebraMap R S) (Polynomial.eval₂ (algebraMap R S) x q) p

full_name: Polynomial.eval_mul
code: @[simp]
theorem eval_mul : (p * q).eval x = p.eval x * q.eval x 
goal: Polynomial.eval x (p * q) = Polynomial.eval x p * Polynomial.eval x q

full_name: Polynomial.evalRingHom
code: /-- `eval r`, regarded as a ring homomorphism from `R[X]` to `R`. -/
def evalRingHom : R → R[X] →+* R 
goal: R → R[X] →+* R

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

full_name: Polynomial.evalRingHom_zero
code: theorem evalRingHom_zero : evalRingHom 0 = constantCoeff 
goal: Polynomial.evalRingHom 0 = Polynomial.constantCoeff

full_name: Polynomial.eval_pow
code: @[simp]
theorem eval_pow (n : ℕ) : (p ^ n).eval x = p.eval x ^ n 
goal: Polynomial.eval x (p ^ n) = Polynomial.eval x p ^ n

full_name: Polynomial.eval_comp
code: @[simp]
theorem eval_comp : (p.comp q).eval x = p.eval (q.eval x) 
goal: Polynomial.eval x (p.comp q) = Polynomial.eval (Polynomial.eval x q) p

full_name: Polynomial.iterate_comp_eval
code: @[simp]
theorem iterate_comp_eval :
    ∀ (k : ℕ) (t : R), (p.comp^[k] q).eval t = (fun x => p.eval x)^[k] (q.eval t) 
goal: Polynomial.eval t (p.comp^[k] q) = (fun x => Polynomial.eval x p)^[k] (Polynomial.eval t q)

full_name: Polynomial.isRoot_comp
code: lemma isRoot_comp {R} [CommSemiring R] {p q : R[X]} {r : R} :
    (p.comp q).IsRoot r ↔ p.IsRoot (q.eval r) 
goal: (p.comp q).IsRoot r ↔ p.IsRoot (Polynomial.eval r q)

full_name: Polynomial.compRingHom
code: /-- `comp p`, regarded as a ring homomorphism from `R[X]` to itself. -/
def compRingHom : R[X] → R[X] →+* R[X] 
goal: R[X] → R[X] →+* R[X]

full_name: Polynomial.coe_compRingHom
code: @[simp]
theorem coe_compRingHom (q : R[X]) : (compRingHom q : R[X] → R[X]) = fun p => comp p q 
goal: ⇑q.compRingHom = fun p => p.comp q

full_name: Polynomial.coe_compRingHom_apply
code: theorem coe_compRingHom_apply (p q : R[X]) : (compRingHom q : R[X] → R[X]) p = comp p q 
goal: q.compRingHom p = p.comp q

full_name: Polynomial.root_mul_left_of_isRoot
code: theorem root_mul_left_of_isRoot (p : R[X]) {q : R[X]} : IsRoot q a → IsRoot (p * q) a 
goal: q.IsRoot a → (p * q).IsRoot a

full_name: Polynomial.root_mul_right_of_isRoot
code: theorem root_mul_right_of_isRoot {p : R[X]} (q : R[X]) : IsRoot p a → IsRoot (p * q) a 
goal: p.IsRoot a → (p * q).IsRoot a

full_name: Polynomial.eval₂_multiset_prod
code: theorem eval₂_multiset_prod (s : Multiset R[X]) (x : S) :
    eval₂ f x s.prod = (s.map (eval₂ f x)).prod 
goal: Polynomial.eval₂ f x s.prod = (Multiset.map (Polynomial.eval₂ f x) s).prod

full_name: Polynomial.eval₂_finset_prod
code: theorem eval₂_finset_prod (s : Finset ι) (g : ι → R[X]) (x : S) :
    (∏ i ∈ s, g i).eval₂ f x = ∏ i ∈ s, (g i).eval₂ f x 
goal: Polynomial.eval₂ f x (∏ i ∈ s, g i) = ∏ i ∈ s, Polynomial.eval₂ f x (g i)

full_name: Polynomial.eval_list_prod
code: /-- Polynomial evaluation commutes with `List.prod`
-/
theorem eval_list_prod (l : List R[X]) (x : R) : eval x l.prod = (l.map (eval x)).prod 
goal: Polynomial.eval x l.prod = (List.map (Polynomial.eval x) l).prod

full_name: Polynomial.eval_multiset_prod
code: /-- Polynomial evaluation commutes with `Multiset.prod`
-/
theorem eval_multiset_prod (s : Multiset R[X]) (x : R) : eval x s.prod = (s.map (eval x)).prod 
goal: Polynomial.eval x s.prod = (Multiset.map (Polynomial.eval x) s).prod

full_name: Polynomial.eval_prod
code: /-- Polynomial evaluation commutes with `Finset.prod`
-/
theorem eval_prod {ι : Type*} (s : Finset ι) (p : ι → R[X]) (x : R) :
    eval x (∏ j ∈ s, p j) = ∏ j ∈ s, eval x (p j) 
goal: Polynomial.eval x (∏ j ∈ s, p j) = ∏ j ∈ s, Polynomial.eval x (p j)

full_name: Polynomial.list_prod_comp
code: theorem list_prod_comp (l : List R[X]) (q : R[X]) :
    l.prod.comp q = (l.map fun p : R[X] => p.comp q).prod 
goal: l.prod.comp q = (List.map (fun p => p.comp q) l).prod

full_name: Polynomial.multiset_prod_comp
code: theorem multiset_prod_comp (s : Multiset R[X]) (q : R[X]) :
    s.prod.comp q = (s.map fun p : R[X] => p.comp q).prod 
goal: s.prod.comp q = (Multiset.map (fun p => p.comp q) s).prod

full_name: Polynomial.prod_comp
code: theorem prod_comp {ι : Type*} (s : Finset ι) (p : ι → R[X]) (q : R[X]) :
    (∏ j ∈ s, p j).comp q = ∏ j ∈ s, (p j).comp q 
goal: (∏ j ∈ s, p j).comp q = ∏ j ∈ s, (p j).comp q

full_name: Polynomial.isRoot_prod
code: theorem isRoot_prod {R} [CommRing R] [IsDomain R] {ι : Type*} (s : Finset ι) (p : ι → R[X])
    (x : R) : IsRoot (∏ j ∈ s, p j) x ↔ ∃ i ∈ s, IsRoot (p i) x 
goal: (∏ j ∈ s, p j).IsRoot x ↔ ∃ i ∈ s, (p i).IsRoot x

full_name: Polynomial.eval_dvd
code: theorem eval_dvd : p ∣ q → eval x p ∣ eval x q 
goal: p ∣ q → Polynomial.eval x p ∣ Polynomial.eval x q

full_name: Polynomial.eval_eq_zero_of_dvd_of_eval_eq_zero
code: theorem eval_eq_zero_of_dvd_of_eval_eq_zero : p ∣ q → eval x p = 0 → eval x q = 0 
goal: p ∣ q → Polynomial.eval x p = 0 → Polynomial.eval x q = 0

full_name: Polynomial.eval_geom_sum
code: @[simp]
theorem eval_geom_sum {R} [CommSemiring R] {n : ℕ} {x : R} :
    eval x (∑ i ∈ range n, X ^ i) = ∑ i ∈ range n, x ^ i 
goal: Polynomial.eval x (∑ i ∈ Finset.range n, Polynomial.X ^ i) = ∑ i ∈ Finset.range n, x ^ i

full_name: Polynomial.support_map_subset
code: theorem support_map_subset [Semiring R] [Semiring S] (f : R →+* S) (p : R[X]) :
    (map f p).support ⊆ p.support 
goal: (Polynomial.map f p).support ⊆ p.support

full_name: Polynomial.support_map_of_injective
code: theorem support_map_of_injective [Semiring R] [Semiring S] (p : R[X]) {f : R →+* S}
    (hf : Function.Injective f) : (map f p).support = p.support 
goal: (Polynomial.map f p).support = p.support

full_name: Polynomial.map_multiset_prod
code: protected theorem map_multiset_prod (m : Multiset R[X]) : m.prod.map f = (m.map <| map f).prod 
goal: Polynomial.map f m.prod = (Multiset.map (Polynomial.map f) m).prod

full_name: Polynomial.map_prod
code: protected theorem map_prod {ι : Type*} (g : ι → R[X]) (s : Finset ι) :
    (∏ i ∈ s, g i).map f = ∏ i ∈ s, (g i).map f 
goal: Polynomial.map f (∏ i ∈ s, g i) = ∏ i ∈ s, Polynomial.map f (g i)

full_name: Polynomial.IsRoot.map
code: theorem IsRoot.map {f : R →+* S} {x : R} {p : R[X]} (h : IsRoot p x) : IsRoot (p.map f) (f x) 
goal: (Polynomial.map f p).IsRoot (f x)

full_name: Polynomial.IsRoot.of_map
code: theorem IsRoot.of_map {R} [CommRing R] {f : R →+* S} {x : R} {p : R[X]} (h : IsRoot (p.map f) (f x))
    (hf : Function.Injective f) : IsRoot p x 
goal: p.IsRoot x

full_name: Polynomial.isRoot_map_iff
code: theorem isRoot_map_iff {R : Type*} [CommRing R] {f : R →+* S} {x : R} {p : R[X]}
    (hf : Function.Injective f) : IsRoot (p.map f) (f x) ↔ IsRoot p x 
goal: (Polynomial.map f p).IsRoot (f x) ↔ p.IsRoot x

full_name: Polynomial.map_sub
code: @[simp]
protected theorem map_sub {S} [Ring S] (f : R →+* S) : (p - q).map f = p.map f - q.map f 
goal: Polynomial.map f (p - q) = Polynomial.map f p - Polynomial.map f q

full_name: Polynomial.map_neg
code: @[simp]
protected theorem map_neg {S} [Ring S] (f : R →+* S) : (-p).map f = -p.map f 
goal: Polynomial.map f (-p) = -Polynomial.map f p

full_name: Polynomial.map_intCast
code: @[simp] protected lemma map_intCast {S} [Ring S] (f : R →+* S) (n : ℤ) : map f ↑n = ↑n 
goal: Polynomial.map f ↑n = ↑n

full_name: Polynomial.eval_intCast
code: @[simp]
theorem eval_intCast {n : ℤ} {x : R} : (n : R[X]).eval x = n 
goal: Polynomial.eval x ↑n = ↑n

full_name: Polynomial.eval₂_neg
code: @[simp]
theorem eval₂_neg {S} [Ring S] (f : R →+* S) {x : S} : (-p).eval₂ f x = -p.eval₂ f x 
goal: Polynomial.eval₂ f x (-p) = -Polynomial.eval₂ f x p

full_name: Polynomial.eval₂_sub
code: @[simp]
theorem eval₂_sub {S} [Ring S] (f : R →+* S) {x : S} :
    (p - q).eval₂ f x = p.eval₂ f x - q.eval₂ f x 
goal: Polynomial.eval₂ f x (p - q) = Polynomial.eval₂ f x p - Polynomial.eval₂ f x q

full_name: Polynomial.eval_neg
code: @[simp]
theorem eval_neg (p : R[X]) (x : R) : (-p).eval x = -p.eval x 
goal: Polynomial.eval x (-p) = -Polynomial.eval x p

full_name: Polynomial.eval_sub
code: @[simp]
theorem eval_sub (p q : R[X]) (x : R) : (p - q).eval x = p.eval x - q.eval x 
goal: Polynomial.eval x (p - q) = Polynomial.eval x p - Polynomial.eval x q

full_name: Polynomial.root_X_sub_C
code: theorem root_X_sub_C : IsRoot (X - C a) b ↔ a = b 
goal: (Polynomial.X - Polynomial.C a).IsRoot b ↔ a = b

full_name: Polynomial.neg_comp
code: @[simp]
theorem neg_comp : (-p).comp q = -p.comp q 
goal: (-p).comp q = -p.comp q

full_name: Polynomial.sub_comp
code: @[simp]
theorem sub_comp : (p - q).comp r = p.comp r - q.comp r 
goal: (p - q).comp r = p.comp r - q.comp r

full_name: Polynomial.intCast_comp
code: @[simp]
theorem intCast_comp (i : ℤ) : comp (i : R[X]) p = i 
goal: (↑i).comp p = ↑i

full_name: Polynomial.eval₂_at_intCast
code: @[simp]
theorem eval₂_at_intCast {S : Type*} [Ring S] (f : R →+* S) (n : ℤ) :
    p.eval₂ f n = f (p.eval n) 
goal: Polynomial.eval₂ f (↑n) p = f (Polynomial.eval (↑n) p)

full_name: Polynomial.mul_X_sub_intCast_comp
code: theorem mul_X_sub_intCast_comp {n : ℕ} :
    (p * (X - (n : R[X]))).comp q = p.comp q * (q - n) 
goal: (p * (Polynomial.X - ↑n)).comp q = p.comp q * (q - ↑n)