File: Mathlib/Algebra/MvPolynomial/Basic.lean

full_name: MvPolynomial
code: /-- Multivariate polynomial, where `σ` is the index set of the variables and
  `R` is the coefficient ring -/
def MvPolynomial (σ : Type*) (R : Type*) [CommSemiring R] 
goal: Type (max u_1 u_2)

full_name: MvPolynomial.decidableEqMvPolynomial
code: instance decidableEqMvPolynomial [CommSemiring R] [DecidableEq σ] [DecidableEq R] :
    DecidableEq (MvPolynomial σ R) 
goal: DecidableEq (MvPolynomial σ R)

full_name: MvPolynomial.commSemiring
code: instance commSemiring [CommSemiring R] : CommSemiring (MvPolynomial σ R) 
goal: CommSemiring (MvPolynomial σ R)

full_name: MvPolynomial.inhabited
code: instance inhabited [CommSemiring R] : Inhabited (MvPolynomial σ R) 
goal: Inhabited (MvPolynomial σ R)

full_name: MvPolynomial.distribuMulAction
code: instance distribuMulAction [Monoid R] [CommSemiring S₁] [DistribMulAction R S₁] :
    DistribMulAction R (MvPolynomial σ S₁) 
goal: DistribMulAction R (MvPolynomial σ S₁)

full_name: MvPolynomial.smulZeroClass
code: instance smulZeroClass [CommSemiring S₁] [SMulZeroClass R S₁] :
    SMulZeroClass R (MvPolynomial σ S₁) 
goal: SMulZeroClass R (MvPolynomial σ S₁)

full_name: MvPolynomial.faithfulSMul
code: instance faithfulSMul [CommSemiring S₁] [SMulZeroClass R S₁] [FaithfulSMul R S₁] :
    FaithfulSMul R (MvPolynomial σ S₁) 
goal: FaithfulSMul R (MvPolynomial σ S₁)

full_name: MvPolynomial.module
code: instance module [Semiring R] [CommSemiring S₁] [Module R S₁] : Module R (MvPolynomial σ S₁) 
goal: Module R (MvPolynomial σ S₁)

full_name: MvPolynomial.isScalarTower
code: instance isScalarTower [CommSemiring S₂] [SMul R S₁] [SMulZeroClass R S₂] [SMulZeroClass S₁ S₂]
    [IsScalarTower R S₁ S₂] : IsScalarTower R S₁ (MvPolynomial σ S₂) 
goal: IsScalarTower R S₁ (MvPolynomial σ S₂)

full_name: MvPolynomial.smulCommClass
code: instance smulCommClass [CommSemiring S₂] [SMulZeroClass R S₂] [SMulZeroClass S₁ S₂]
    [SMulCommClass R S₁ S₂] : SMulCommClass R S₁ (MvPolynomial σ S₂) 
goal: SMulCommClass R S₁ (MvPolynomial σ S₂)

full_name: MvPolynomial.isCentralScalar
code: instance isCentralScalar [CommSemiring S₁] [SMulZeroClass R S₁] [SMulZeroClass Rᵐᵒᵖ S₁]
    [IsCentralScalar R S₁] : IsCentralScalar R (MvPolynomial σ S₁) 
goal: IsCentralScalar R (MvPolynomial σ S₁)

full_name: MvPolynomial.algebra
code: instance algebra [CommSemiring R] [CommSemiring S₁] [Algebra R S₁] :
    Algebra R (MvPolynomial σ S₁) 
goal: Algebra R (MvPolynomial σ S₁)

full_name: MvPolynomial.isScalarTower_right
code: instance isScalarTower_right [CommSemiring S₁] [DistribSMul R S₁] [IsScalarTower R S₁ S₁] :
    IsScalarTower R (MvPolynomial σ S₁) (MvPolynomial σ S₁) 
goal: IsScalarTower R (MvPolynomial σ S₁) (MvPolynomial σ S₁)

full_name: MvPolynomial.smulCommClass_right
code: instance smulCommClass_right [CommSemiring S₁] [DistribSMul R S₁] [SMulCommClass R S₁ S₁] :
    SMulCommClass R (MvPolynomial σ S₁) (MvPolynomial σ S₁) 
goal: SMulCommClass R (MvPolynomial σ S₁) (MvPolynomial σ S₁)

full_name: MvPolynomial.unique
code: /-- If `R` is a subsingleton, then `MvPolynomial σ R` has a unique element -/
instance unique [CommSemiring R] [Subsingleton R] : Unique (MvPolynomial σ R) 
goal: Unique (MvPolynomial σ R)

full_name: MvPolynomial.monomial
code: /-- `monomial s a` is the monomial with coefficient `a` and exponents given by `s`  -/
def monomial (s : σ →₀ ℕ) : R →ₗ[R] MvPolynomial σ R 
goal: R →ₗ[R] MvPolynomial σ R

full_name: MvPolynomial.single_eq_monomial
code: theorem single_eq_monomial (s : σ →₀ ℕ) (a : R) : Finsupp.single s a = monomial s a 
goal: Finsupp.single s a = (MvPolynomial.monomial s) a

full_name: MvPolynomial.mul_def
code: theorem mul_def : p * q = p.sum fun m a => q.sum fun n b => monomial (m + n) (a * b) 
goal: p * q = Finsupp.sum p fun m a => Finsupp.sum q fun n b => (MvPolynomial.monomial (m + n)) (a * b)

full_name: MvPolynomial.C
code: /-- `C a` is the constant polynomial with value `a` -/
def C : R →+* MvPolynomial σ R 
goal: R →+* MvPolynomial σ R

full_name: MvPolynomial.algebraMap_eq
code: @[simp]
theorem algebraMap_eq : algebraMap R (MvPolynomial σ R) = C 
goal: algebraMap R (MvPolynomial σ R) = MvPolynomial.C

full_name: MvPolynomial.X
code: /-- `X n` is the degree `1` monomial $X_n$. -/
def X (n : σ) : MvPolynomial σ R 
goal: MvPolynomial σ R

full_name: MvPolynomial.monomial_left_injective
code: theorem monomial_left_injective {r : R} (hr : r ≠ 0) :
    Function.Injective fun s : σ →₀ ℕ => monomial s r 
goal: Function.Injective fun s => (MvPolynomial.monomial s) r

full_name: MvPolynomial.monomial_left_inj
code: @[simp]
theorem monomial_left_inj {s t : σ →₀ ℕ} {r : R} (hr : r ≠ 0) :
    monomial s r = monomial t r ↔ s = t 
goal: (MvPolynomial.monomial s) r = (MvPolynomial.monomial t) r ↔ s = t

full_name: MvPolynomial.C_apply
code: theorem C_apply : (C a : MvPolynomial σ R) = monomial 0 a 
goal: MvPolynomial.C a = (MvPolynomial.monomial 0) a

full_name: MvPolynomial.C_0
code: theorem C_0 : C 0 = (0 : MvPolynomial σ R) 
goal: MvPolynomial.C 0 = 0

full_name: MvPolynomial.C_1
code: theorem C_1 : C 1 = (1 : MvPolynomial σ R) 
goal: MvPolynomial.C 1 = 1

full_name: MvPolynomial.C_mul_monomial
code: theorem C_mul_monomial : C a * monomial s a' = monomial s (a * a') 
goal: MvPolynomial.C a * (MvPolynomial.monomial s) a' = (MvPolynomial.monomial s) (a * a')

full_name: MvPolynomial.C_add
code: theorem C_add : (C (a + a') : MvPolynomial σ R) = C a + C a' 
goal: MvPolynomial.C (a + a') = MvPolynomial.C a + MvPolynomial.C a'

full_name: MvPolynomial.C_mul
code: theorem C_mul : (C (a * a') : MvPolynomial σ R) = C a * C a' 
goal: MvPolynomial.C (a * a') = MvPolynomial.C a * MvPolynomial.C a'

full_name: MvPolynomial.C_pow
code: theorem C_pow (a : R) (n : ℕ) : (C (a ^ n) : MvPolynomial σ R) = C a ^ n 
goal: MvPolynomial.C (a ^ n) = MvPolynomial.C a ^ n

full_name: MvPolynomial.C_injective
code: theorem C_injective (σ : Type*) (R : Type*) [CommSemiring R] :
    Function.Injective (C : R → MvPolynomial σ R) 
goal: Function.Injective ⇑MvPolynomial.C

full_name: MvPolynomial.C_surjective
code: theorem C_surjective {R : Type*} [CommSemiring R] (σ : Type*) [IsEmpty σ] :
    Function.Surjective (C : R → MvPolynomial σ R) 
goal: Function.Surjective ⇑MvPolynomial.C

full_name: MvPolynomial.C_inj
code: @[simp]
theorem C_inj {σ : Type*} (R : Type*) [CommSemiring R] (r s : R) :
    (C r : MvPolynomial σ R) = C s ↔ r = s 
goal: MvPolynomial.C r = MvPolynomial.C s ↔ r = s

full_name: MvPolynomial.nontrivial_of_nontrivial
code: instance nontrivial_of_nontrivial (σ : Type*) (R : Type*) [CommSemiring R] [Nontrivial R] :
    Nontrivial (MvPolynomial σ R) 
goal: Nontrivial (MvPolynomial σ R)

full_name: MvPolynomial.infinite_of_infinite
code: instance infinite_of_infinite (σ : Type*) (R : Type*) [CommSemiring R] [Infinite R] :
    Infinite (MvPolynomial σ R) 
goal: Infinite (MvPolynomial σ R)

full_name: MvPolynomial.infinite_of_nonempty
code: instance infinite_of_nonempty (σ : Type*) (R : Type*) [Nonempty σ] [CommSemiring R]
    [Nontrivial R] : Infinite (MvPolynomial σ R) 
goal: Infinite (MvPolynomial σ R)

full_name: MvPolynomial.C_eq_coe_nat
code: theorem C_eq_coe_nat (n : ℕ) : (C ↑n : MvPolynomial σ R) = n 
goal: MvPolynomial.C ↑n = ↑n

full_name: MvPolynomial.C_mul'
code: theorem C_mul' : MvPolynomial.C a * p = a • p 
goal: MvPolynomial.C a * p = a • p

full_name: MvPolynomial.smul_eq_C_mul
code: theorem smul_eq_C_mul (p : MvPolynomial σ R) (a : R) : a • p = C a * p 
goal: a • p = MvPolynomial.C a * p

full_name: MvPolynomial.C_eq_smul_one
code: theorem C_eq_smul_one : (C a : MvPolynomial σ R) = a • (1 : MvPolynomial σ R) 
goal: MvPolynomial.C a = a • 1

full_name: MvPolynomial.smul_monomial
code: theorem smul_monomial {S₁ : Type*} [SMulZeroClass S₁ R] (r : S₁) :
    r • monomial s a = monomial s (r • a) 
goal: r • (MvPolynomial.monomial s) a = (MvPolynomial.monomial s) (r • a)

full_name: MvPolynomial.X_injective
code: theorem X_injective [Nontrivial R] : Function.Injective (X : σ → MvPolynomial σ R) 
goal: Function.Injective MvPolynomial.X

full_name: MvPolynomial.X_inj
code: @[simp]
theorem X_inj [Nontrivial R] (m n : σ) : X m = (X n : MvPolynomial σ R) ↔ m = n 
goal: MvPolynomial.X m = MvPolynomial.X n ↔ m = n

full_name: MvPolynomial.monomial_pow
code: theorem monomial_pow : monomial s a ^ e = monomial (e • s) (a ^ e) 
goal: (MvPolynomial.monomial s) a ^ e = (MvPolynomial.monomial (e • s)) (a ^ e)

full_name: MvPolynomial.monomial_mul
code: @[simp]
theorem monomial_mul {s s' : σ →₀ ℕ} {a b : R} :
    monomial s a * monomial s' b = monomial (s + s') (a * b) 
goal: (MvPolynomial.monomial s) a * (MvPolynomial.monomial s') b = (MvPolynomial.monomial (s + s')) (a * b)

full_name: MvPolynomial.monomialOneHom
code: /-- `fun s ↦ monomial s 1` as a homomorphism. -/
def monomialOneHom : Multiplicative (σ →₀ ℕ) →* MvPolynomial σ R 
goal: Multiplicative (σ →₀ ℕ) →* MvPolynomial σ R

full_name: MvPolynomial.monomialOneHom_apply
code: @[simp]
theorem monomialOneHom_apply : monomialOneHom R σ s = (monomial s 1 : MvPolynomial σ R) 
goal: (MvPolynomial.monomialOneHom R σ) s = (MvPolynomial.monomial s) 1

full_name: MvPolynomial.X_pow_eq_monomial
code: theorem X_pow_eq_monomial : X n ^ e = monomial (Finsupp.single n e) (1 : R) 
goal: MvPolynomial.X n ^ e = (MvPolynomial.monomial (Finsupp.single n e)) 1

full_name: MvPolynomial.monomial_add_single
code: theorem monomial_add_single : monomial (s + Finsupp.single n e) a = monomial s a * X n ^ e 
goal: (MvPolynomial.monomial (s + Finsupp.single n e)) a = (MvPolynomial.monomial s) a * MvPolynomial.X n ^ e

full_name: MvPolynomial.monomial_single_add
code: theorem monomial_single_add : monomial (Finsupp.single n e + s) a = X n ^ e * monomial s a 
goal: (MvPolynomial.monomial (Finsupp.single n e + s)) a = MvPolynomial.X n ^ e * (MvPolynomial.monomial s) a

full_name: MvPolynomial.C_mul_X_pow_eq_monomial
code: theorem C_mul_X_pow_eq_monomial {s : σ} {a : R} {n : ℕ} :
    C a * X s ^ n = monomial (Finsupp.single s n) a 
goal: MvPolynomial.C a * MvPolynomial.X s ^ n = (MvPolynomial.monomial (Finsupp.single s n)) a

full_name: MvPolynomial.C_mul_X_eq_monomial
code: theorem C_mul_X_eq_monomial {s : σ} {a : R} : C a * X s = monomial (Finsupp.single s 1) a 
goal: MvPolynomial.C a * MvPolynomial.X s = (MvPolynomial.monomial (Finsupp.single s 1)) a

full_name: MvPolynomial.monomial_zero
code: theorem monomial_zero {s : σ →₀ ℕ} : monomial s (0 : R) = 0 
goal: (MvPolynomial.monomial s) 0 = 0

full_name: MvPolynomial.monomial_zero'
code: @[simp]
theorem monomial_zero' : (monomial (0 : σ →₀ ℕ) : R → MvPolynomial σ R) = C 
goal: ⇑(MvPolynomial.monomial 0) = ⇑MvPolynomial.C

full_name: MvPolynomial.monomial_eq_zero
code: @[simp]
theorem monomial_eq_zero {s : σ →₀ ℕ} {b : R} : monomial s b = 0 ↔ b = 0 
goal: (MvPolynomial.monomial s) b = 0 ↔ b = 0

full_name: MvPolynomial.sum_monomial_eq
code: @[simp]
theorem sum_monomial_eq {A : Type*} [AddCommMonoid A] {u : σ →₀ ℕ} {r : R} {b : (σ →₀ ℕ) → R → A}
    (w : b u 0 = 0) : sum (monomial u r) b = b u r 
goal: Finsupp.sum ((MvPolynomial.monomial u) r) b = b u r

full_name: MvPolynomial.sum_C
code: @[simp]
theorem sum_C {A : Type*} [AddCommMonoid A] {b : (σ →₀ ℕ) → R → A} (w : b 0 0 = 0) :
    sum (C a) b = b 0 a 
goal: Finsupp.sum (MvPolynomial.C a) b = b 0 a

full_name: MvPolynomial.monomial_sum_one
code: theorem monomial_sum_one {α : Type*} (s : Finset α) (f : α → σ →₀ ℕ) :
    (monomial (∑ i ∈ s, f i) 1 : MvPolynomial σ R) = ∏ i ∈ s, monomial (f i) 1 
goal: (MvPolynomial.monomial (∑ i ∈ s, f i)) 1 = ∏ i ∈ s, (MvPolynomial.monomial (f i)) 1

full_name: MvPolynomial.monomial_sum_index
code: theorem monomial_sum_index {α : Type*} (s : Finset α) (f : α → σ →₀ ℕ) (a : R) :
    monomial (∑ i ∈ s, f i) a = C a * ∏ i ∈ s, monomial (f i) 1 
goal: (MvPolynomial.monomial (∑ i ∈ s, f i)) a = MvPolynomial.C a * ∏ i ∈ s, (MvPolynomial.monomial (f i)) 1

full_name: MvPolynomial.monomial_finsupp_sum_index
code: theorem monomial_finsupp_sum_index {α β : Type*} [Zero β] (f : α →₀ β) (g : α → β → σ →₀ ℕ)
    (a : R) : monomial (f.sum g) a = C a * f.prod fun a b => monomial (g a b) 1 
goal: (MvPolynomial.monomial (f.sum g)) a = MvPolynomial.C a * f.prod fun a b => (MvPolynomial.monomial (g a b)) 1

full_name: MvPolynomial.monomial_eq_monomial_iff
code: theorem monomial_eq_monomial_iff {α : Type*} (a₁ a₂ : α →₀ ℕ) (b₁ b₂ : R) :
    monomial a₁ b₁ = monomial a₂ b₂ ↔ a₁ = a₂ ∧ b₁ = b₂ ∨ b₁ = 0 ∧ b₂ = 0 
goal: (MvPolynomial.monomial a₁) b₁ = (MvPolynomial.monomial a₂) b₂ ↔ a₁ = a₂ ∧ b₁ = b₂ ∨ b₁ = 0 ∧ b₂ = 0

full_name: MvPolynomial.monomial_eq
code: theorem monomial_eq : monomial s a = C a * (s.prod fun n e => X n ^ e : MvPolynomial σ R) 
goal: (MvPolynomial.monomial s) a = MvPolynomial.C a * s.prod fun n e => MvPolynomial.X n ^ e

full_name: MvPolynomial.prod_X_pow_eq_monomial
code: @[simp]
lemma prod_X_pow_eq_monomial : ∏ x ∈ s.support, X x ^ s x = monomial s (1 : R) 
goal: ∏ x ∈ s.support, MvPolynomial.X x ^ s x = (MvPolynomial.monomial s) 1

full_name: MvPolynomial.induction_on_monomial
code: theorem induction_on_monomial {M : MvPolynomial σ R → Prop} (h_C : ∀ a, M (C a))
    (h_X : ∀ p n, M p → M (p * X n)) : ∀ s a, M (monomial s a) 
goal: M ((MvPolynomial.monomial s) a)

full_name: MvPolynomial.induction_on'
code: /-- Analog of `Polynomial.induction_on'`.
To prove something about mv_polynomials,
it suffices to show the condition is closed under taking sums,
and it holds for monomials. -/
@[elab_as_elim]
theorem induction_on' {P : MvPolynomial σ R → Prop} (p : MvPolynomial σ R)
    (h1 : ∀ (u : σ →₀ ℕ) (a : R), P (monomial u a))
    (h2 : ∀ p q : MvPolynomial σ R, P p → P q → P (p + q)) : P p 
goal: P p

full_name: MvPolynomial.induction_on'''
code: /-- Similar to `MvPolynomial.induction_on` but only a weak form of `h_add` is required. -/
theorem induction_on''' {M : MvPolynomial σ R → Prop} (p : MvPolynomial σ R) (h_C : ∀ a, M (C a))
    (h_add_weak :
      ∀ (a : σ →₀ ℕ) (b : R) (f : (σ →₀ ℕ) →₀ R),
        a ∉ f.support → b ≠ 0 → M f → M ((show (σ →₀ ℕ) →₀ R from monomial a b) + f)) :
    M p 
goal: M p

full_name: MvPolynomial.induction_on''
code: /-- Similar to `MvPolynomial.induction_on` but only a yet weaker form of `h_add` is required. -/
theorem induction_on'' {M : MvPolynomial σ R → Prop} (p : MvPolynomial σ R) (h_C : ∀ a, M (C a))
    (h_add_weak :
      ∀ (a : σ →₀ ℕ) (b : R) (f : (σ →₀ ℕ) →₀ R),
        a ∉ f.support → b ≠ 0 → M f → M (monomial a b) →
          M ((show (σ →₀ ℕ) →₀ R from monomial a b) + f))
    (h_X : ∀ (p : MvPolynomial σ R) (n : σ), M p → M (p * MvPolynomial.X n)) : M p 
goal: M p

full_name: MvPolynomial.induction_on
code: /-- Analog of `Polynomial.induction_on`. -/
@[recursor 5]
theorem induction_on {M : MvPolynomial σ R → Prop} (p : MvPolynomial σ R) (h_C : ∀ a, M (C a))
    (h_add : ∀ p q, M p → M q → M (p + q)) (h_X : ∀ p n, M p → M (p * X n)) : M p 
goal: M p

full_name: MvPolynomial.ringHom_ext
code: theorem ringHom_ext {A : Type*} [Semiring A] {f g : MvPolynomial σ R →+* A}
    (hC : ∀ r, f (C r) = g (C r)) (hX : ∀ i, f (X i) = g (X i)) : f = g 
goal: f = g

full_name: MvPolynomial.ringHom_ext'
code: /-- See note [partially-applied ext lemmas]. -/
@[ext 1100]
theorem ringHom_ext' {A : Type*} [Semiring A] {f g : MvPolynomial σ R →+* A}
    (hC : f.comp C = g.comp C) (hX : ∀ i, f (X i) = g (X i)) : f = g 
goal: f = g

full_name: MvPolynomial.hom_eq_hom
code: theorem hom_eq_hom [Semiring S₂] (f g : MvPolynomial σ R →+* S₂) (hC : f.comp C = g.comp C)
    (hX : ∀ n : σ, f (X n) = g (X n)) (p : MvPolynomial σ R) : f p = g p 
goal: f p = g p

full_name: MvPolynomial.is_id
code: theorem is_id (f : MvPolynomial σ R →+* MvPolynomial σ R) (hC : f.comp C = C)
    (hX : ∀ n : σ, f (X n) = X n) (p : MvPolynomial σ R) : f p = p 
goal: f p = p

full_name: MvPolynomial.algHom_ext'
code: @[ext 1100]
theorem algHom_ext' {A B : Type*} [CommSemiring A] [CommSemiring B] [Algebra R A] [Algebra R B]
    {f g : MvPolynomial σ A →ₐ[R] B}
    (h₁ :
      f.comp (IsScalarTower.toAlgHom R A (MvPolynomial σ A)) =
        g.comp (IsScalarTower.toAlgHom R A (MvPolynomial σ A)))
    (h₂ : ∀ i, f (X i) = g (X i)) : f = g 
goal: f = g

full_name: MvPolynomial.algHom_ext
code: @[ext 1200]
theorem algHom_ext {A : Type*} [Semiring A] [Algebra R A] {f g : MvPolynomial σ R →ₐ[R] A}
    (hf : ∀ i : σ, f (X i) = g (X i)) : f = g 
goal: f = g

full_name: MvPolynomial.algHom_C
code: @[simp]
theorem algHom_C {A : Type*} [Semiring A] [Algebra R A] (f : MvPolynomial σ R →ₐ[R] A) (r : R) :
    f (C r) = algebraMap R A r 
goal: f (MvPolynomial.C r) = (algebraMap R A) r

full_name: MvPolynomial.adjoin_range_X
code: @[simp]
theorem adjoin_range_X : Algebra.adjoin R (range (X : σ → MvPolynomial σ R)) = ⊤ 
goal: Algebra.adjoin R (Set.range MvPolynomial.X) = ⊤

full_name: MvPolynomial.linearMap_ext
code: @[ext]
theorem linearMap_ext {M : Type*} [AddCommMonoid M] [Module R M] {f g : MvPolynomial σ R →ₗ[R] M}
    (h : ∀ s, f ∘ₗ monomial s = g ∘ₗ monomial s) : f = g 
goal: f = g

full_name: MvPolynomial.support
code: /-- The finite set of all `m : σ →₀ ℕ` such that `X^m` has a non-zero coefficient.  -/
def support (p : MvPolynomial σ R) : Finset (σ →₀ ℕ) 
goal: Finset (σ →₀ ℕ)

full_name: MvPolynomial.finsupp_support_eq_support
code: theorem finsupp_support_eq_support (p : MvPolynomial σ R) : Finsupp.support p = p.support 
goal: p.support = p.support

full_name: MvPolynomial.support_monomial
code: theorem support_monomial [h : Decidable (a = 0)] :
    (monomial s a).support = if a = 0 then ∅ else {s} 
goal: ((MvPolynomial.monomial s) a).support = if a = 0 then ∅ else {s}

full_name: MvPolynomial.support_monomial_subset
code: theorem support_monomial_subset : (monomial s a).support ⊆ {s} 
goal: ((MvPolynomial.monomial s) a).support ⊆ {s}

full_name: MvPolynomial.support_add
code: theorem support_add [DecidableEq σ] : (p + q).support ⊆ p.support ∪ q.support 
goal: (p + q).support ⊆ p.support ∪ q.support

full_name: MvPolynomial.support_X
code: theorem support_X [Nontrivial R] : (X n : MvPolynomial σ R).support = {Finsupp.single n 1} 
goal: (MvPolynomial.X n).support = {Finsupp.single n 1}

full_name: MvPolynomial.support_X_pow
code: theorem support_X_pow [Nontrivial R] (s : σ) (n : ℕ) :
    (X s ^ n : MvPolynomial σ R).support = {Finsupp.single s n} 
goal: (MvPolynomial.X s ^ n).support = {Finsupp.single s n}

full_name: MvPolynomial.support_zero
code: @[simp]
theorem support_zero : (0 : MvPolynomial σ R).support = ∅ 
goal: MvPolynomial.support 0 = ∅

full_name: MvPolynomial.support_smul
code: theorem support_smul {S₁ : Type*} [SMulZeroClass S₁ R] {a : S₁} {f : MvPolynomial σ R} :
    (a • f).support ⊆ f.support 
goal: (a • f).support ⊆ f.support

full_name: MvPolynomial.support_sum
code: theorem support_sum {α : Type*} [DecidableEq σ] {s : Finset α} {f : α → MvPolynomial σ R} :
    (∑ x ∈ s, f x).support ⊆ s.biUnion fun x => (f x).support 
goal: (∑ x ∈ s, f x).support ⊆ s.biUnion fun x => (f x).support

full_name: MvPolynomial.coeff
code: /-- The coefficient of the monomial `m` in the multi-variable polynomial `p`. -/
def coeff (m : σ →₀ ℕ) (p : MvPolynomial σ R) : R 
goal: R

full_name: MvPolynomial.mem_support_iff
code: @[simp]
theorem mem_support_iff {p : MvPolynomial σ R} {m : σ →₀ ℕ} : m ∈ p.support ↔ p.coeff m ≠ 0 
goal: m ∈ p.support ↔ MvPolynomial.coeff m p ≠ 0

full_name: MvPolynomial.not_mem_support_iff
code: theorem not_mem_support_iff {p : MvPolynomial σ R} {m : σ →₀ ℕ} : m ∉ p.support ↔ p.coeff m = 0 
goal: m ∉ p.support ↔ MvPolynomial.coeff m p = 0

full_name: MvPolynomial.sum_def
code: theorem sum_def {A} [AddCommMonoid A] {p : MvPolynomial σ R} {b : (σ →₀ ℕ) → R → A} :
    p.sum b = ∑ m ∈ p.support, b m (p.coeff m) 
goal: Finsupp.sum p b = ∑ m ∈ p.support, b m (MvPolynomial.coeff m p)

full_name: MvPolynomial.support_mul
code: theorem support_mul [DecidableEq σ] (p q : MvPolynomial σ R) :
    (p * q).support ⊆ p.support + q.support 
goal: (p * q).support ⊆ p.support + q.support

full_name: MvPolynomial.ext
code: @[ext]
theorem ext (p q : MvPolynomial σ R) : (∀ m, coeff m p = coeff m q) → p = q 
goal: (∀ (m : σ →₀ ℕ), MvPolynomial.coeff m p = MvPolynomial.coeff m q) → p = q

full_name: MvPolynomial.ext_iff
code: protected theorem ext_iff (p q : MvPolynomial σ R) : p = q ↔ ∀ m, coeff m p = coeff m q 
goal: p = q ↔ ∀ (m : σ →₀ ℕ), MvPolynomial.coeff m p = MvPolynomial.coeff m q

full_name: MvPolynomial.coeff_add
code: @[simp]
theorem coeff_add (m : σ →₀ ℕ) (p q : MvPolynomial σ R) : coeff m (p + q) = coeff m p + coeff m q 
goal: MvPolynomial.coeff m (p + q) = MvPolynomial.coeff m p + MvPolynomial.coeff m q

full_name: MvPolynomial.coeff_smul
code: @[simp]
theorem coeff_smul {S₁ : Type*} [SMulZeroClass S₁ R] (m : σ →₀ ℕ) (C : S₁) (p : MvPolynomial σ R) :
    coeff m (C • p) = C • coeff m p 
goal: MvPolynomial.coeff m (C • p) = C • MvPolynomial.coeff m p

full_name: MvPolynomial.coeff_zero
code: @[simp]
theorem coeff_zero (m : σ →₀ ℕ) : coeff m (0 : MvPolynomial σ R) = 0 
goal: MvPolynomial.coeff m 0 = 0

full_name: MvPolynomial.coeff_zero_X
code: @[simp]
theorem coeff_zero_X (i : σ) : coeff 0 (X i : MvPolynomial σ R) = 0 
goal: MvPolynomial.coeff 0 (MvPolynomial.X i) = 0

full_name: MvPolynomial.coeffAddMonoidHom
code: /-- `MvPolynomial.coeff m` but promoted to an `AddMonoidHom`. -/
@[simps]
def coeffAddMonoidHom (m : σ →₀ ℕ) : MvPolynomial σ R →+ R 
goal: MvPolynomial σ R →+ R

full_name: MvPolynomial.coeffAddMonoidHom_apply
code: /-- `MvPolynomial.coeff m` but promoted to an `AddMonoidHom`. -/
@[simps]
def coeffAddMonoidHom (m : σ →₀ ℕ) : MvPolynomial σ R →+ R 
goal: (MvPolynomial.coeffAddMonoidHom m) p = MvPolynomial.coeff m p

full_name: MvPolynomial.lcoeff
code: /-- `MvPolynomial.coeff m` but promoted to a `LinearMap`. -/
@[simps]
def lcoeff (m : σ →₀ ℕ) : MvPolynomial σ R →ₗ[R] R 
goal: MvPolynomial σ R →ₗ[R] R

full_name: MvPolynomial.lcoeff_apply
code: /-- `MvPolynomial.coeff m` but promoted to a `LinearMap`. -/
@[simps]
def lcoeff (m : σ →₀ ℕ) : MvPolynomial σ R →ₗ[R] R 
goal: (MvPolynomial.lcoeff R m) p = MvPolynomial.coeff m p

full_name: MvPolynomial.coeff_sum
code: theorem coeff_sum {X : Type*} (s : Finset X) (f : X → MvPolynomial σ R) (m : σ →₀ ℕ) :
    coeff m (∑ x ∈ s, f x) = ∑ x ∈ s, coeff m (f x) 
goal: MvPolynomial.coeff m (∑ x ∈ s, f x) = ∑ x ∈ s, MvPolynomial.coeff m (f x)

full_name: MvPolynomial.monic_monomial_eq
code: theorem monic_monomial_eq (m) :
    monomial m (1 : R) = (m.prod fun n e => X n ^ e : MvPolynomial σ R) 
goal: (MvPolynomial.monomial m) 1 = m.prod fun n e => MvPolynomial.X n ^ e

full_name: MvPolynomial.coeff_monomial
code: @[simp]
theorem coeff_monomial [DecidableEq σ] (m n) (a) :
    coeff m (monomial n a : MvPolynomial σ R) = if n = m then a else 0 
goal: MvPolynomial.coeff m ((MvPolynomial.monomial n) a) = if n = m then a else 0

full_name: MvPolynomial.coeff_C
code: @[simp]
theorem coeff_C [DecidableEq σ] (m) (a) :
    coeff m (C a : MvPolynomial σ R) = if 0 = m then a else 0 
goal: MvPolynomial.coeff m (MvPolynomial.C a) = if 0 = m then a else 0

full_name: MvPolynomial.eq_C_of_isEmpty
code: lemma eq_C_of_isEmpty [IsEmpty σ] (p : MvPolynomial σ R) :
    p = C (p.coeff 0) 
goal: p = MvPolynomial.C (MvPolynomial.coeff 0 p)

full_name: MvPolynomial.coeff_one
code: theorem coeff_one [DecidableEq σ] (m) : coeff m (1 : MvPolynomial σ R) = if 0 = m then 1 else 0 
goal: MvPolynomial.coeff m 1 = if 0 = m then 1 else 0

full_name: MvPolynomial.coeff_zero_C
code: @[simp]
theorem coeff_zero_C (a) : coeff 0 (C a : MvPolynomial σ R) = a 
goal: MvPolynomial.coeff 0 (MvPolynomial.C a) = a

full_name: MvPolynomial.coeff_zero_one
code: @[simp]
theorem coeff_zero_one : coeff 0 (1 : MvPolynomial σ R) = 1 
goal: MvPolynomial.coeff 0 1 = 1

full_name: MvPolynomial.coeff_X_pow
code: theorem coeff_X_pow [DecidableEq σ] (i : σ) (m) (k : ℕ) :
    coeff m (X i ^ k : MvPolynomial σ R) = if Finsupp.single i k = m then 1 else 0 
goal: MvPolynomial.coeff m (MvPolynomial.X i ^ k) = if Finsupp.single i k = m then 1 else 0

full_name: MvPolynomial.coeff_X'
code: theorem coeff_X' [DecidableEq σ] (i : σ) (m) :
    coeff m (X i : MvPolynomial σ R) = if Finsupp.single i 1 = m then 1 else 0 
goal: MvPolynomial.coeff m (MvPolynomial.X i) = if Finsupp.single i 1 = m then 1 else 0

full_name: MvPolynomial.coeff_X
code: @[simp]
theorem coeff_X (i : σ) : coeff (Finsupp.single i 1) (X i : MvPolynomial σ R) = 1 
goal: MvPolynomial.coeff (Finsupp.single i 1) (MvPolynomial.X i) = 1

full_name: MvPolynomial.coeff_C_mul
code: @[simp]
theorem coeff_C_mul (m) (a : R) (p : MvPolynomial σ R) : coeff m (C a * p) = a * coeff m p 
goal: MvPolynomial.coeff m (MvPolynomial.C a * p) = a * MvPolynomial.coeff m p

full_name: MvPolynomial.coeff_mul
code: theorem coeff_mul [DecidableEq σ] (p q : MvPolynomial σ R) (n : σ →₀ ℕ) :
    coeff n (p * q) = ∑ x ∈ Finset.antidiagonal n, coeff x.1 p * coeff x.2 q 
goal: MvPolynomial.coeff n (p * q) = ∑ x ∈ Finset.antidiagonal n, MvPolynomial.coeff x.1 p * MvPolynomial.coeff x.2 q

full_name: MvPolynomial.coeff_mul_monomial
code: @[simp]
theorem coeff_mul_monomial (m) (s : σ →₀ ℕ) (r : R) (p : MvPolynomial σ R) :
    coeff (m + s) (p * monomial s r) = coeff m p * r 
goal: MvPolynomial.coeff (m + s) (p * (MvPolynomial.monomial s) r) = MvPolynomial.coeff m p * r

full_name: MvPolynomial.coeff_monomial_mul
code: @[simp]
theorem coeff_monomial_mul (m) (s : σ →₀ ℕ) (r : R) (p : MvPolynomial σ R) :
    coeff (s + m) (monomial s r * p) = r * coeff m p 
goal: MvPolynomial.coeff (s + m) ((MvPolynomial.monomial s) r * p) = r * MvPolynomial.coeff m p

full_name: MvPolynomial.coeff_mul_X
code: @[simp]
theorem coeff_mul_X (m) (s : σ) (p : MvPolynomial σ R) :
    coeff (m + Finsupp.single s 1) (p * X s) = coeff m p 
goal: MvPolynomial.coeff (m + Finsupp.single s 1) (p * MvPolynomial.X s) = MvPolynomial.coeff m p

full_name: MvPolynomial.coeff_X_mul
code: @[simp]
theorem coeff_X_mul (m) (s : σ) (p : MvPolynomial σ R) :
    coeff (Finsupp.single s 1 + m) (X s * p) = coeff m p 
goal: MvPolynomial.coeff (Finsupp.single s 1 + m) (MvPolynomial.X s * p) = MvPolynomial.coeff m p

full_name: MvPolynomial.coeff_single_X_pow
code: lemma coeff_single_X_pow [DecidableEq σ] (s s' : σ) (n n' : ℕ) :
    (X (R := R) s ^ n).coeff (Finsupp.single s' n')
    = if s = s' ∧ n = n' ∨ n = 0 ∧ n' = 0 then 1 else 0 
goal: MvPolynomial.coeff (Finsupp.single s' n') (MvPolynomial.X s ^ n) = if s = s' ∧ n = n' ∨ n = 0 ∧ n' = 0 then 1 else 0

full_name: MvPolynomial.coeff_single_X
code: @[simp]
lemma coeff_single_X [DecidableEq σ] (s s' : σ) (n : ℕ) :
    (X s).coeff (R := R) (Finsupp.single s' n) = if n = 1 ∧ s = s' then 1 else 0 
goal: MvPolynomial.coeff (Finsupp.single s' n) (MvPolynomial.X s) = if n = 1 ∧ s = s' then 1 else 0

full_name: MvPolynomial.support_mul_X
code: @[simp]
theorem support_mul_X (s : σ) (p : MvPolynomial σ R) :
    (p * X s).support = p.support.map (addRightEmbedding (Finsupp.single s 1)) 
goal: (p * MvPolynomial.X s).support = Finset.map (addRightEmbedding (Finsupp.single s 1)) p.support

full_name: MvPolynomial.support_X_mul
code: @[simp]
theorem support_X_mul (s : σ) (p : MvPolynomial σ R) :
    (X s * p).support = p.support.map (addLeftEmbedding (Finsupp.single s 1)) 
goal: (MvPolynomial.X s * p).support = Finset.map (addLeftEmbedding (Finsupp.single s 1)) p.support

full_name: MvPolynomial.support_smul_eq
code: @[simp]
theorem support_smul_eq {S₁ : Type*} [Semiring S₁] [Module S₁ R] [NoZeroSMulDivisors S₁ R] {a : S₁}
    (h : a ≠ 0) (p : MvPolynomial σ R) : (a • p).support = p.support 
goal: (a • p).support = p.support

full_name: MvPolynomial.support_sdiff_support_subset_support_add
code: theorem support_sdiff_support_subset_support_add [DecidableEq σ] (p q : MvPolynomial σ R) :
    p.support \ q.support ⊆ (p + q).support 
goal: p.support \ q.support ⊆ (p + q).support

full_name: MvPolynomial.support_symmDiff_support_subset_support_add
code: theorem support_symmDiff_support_subset_support_add [DecidableEq σ] (p q : MvPolynomial σ R) :
    p.support ∆ q.support ⊆ (p + q).support 
goal: symmDiff p.support q.support ⊆ (p + q).support

full_name: MvPolynomial.coeff_mul_monomial'
code: theorem coeff_mul_monomial' (m) (s : σ →₀ ℕ) (r : R) (p : MvPolynomial σ R) :
    coeff m (p * monomial s r) = if s ≤ m then coeff (m - s) p * r else 0 
goal: MvPolynomial.coeff m (p * (MvPolynomial.monomial s) r) = if s ≤ m then MvPolynomial.coeff (m - s) p * r else 0

full_name: MvPolynomial.coeff_monomial_mul'
code: theorem coeff_monomial_mul' (m) (s : σ →₀ ℕ) (r : R) (p : MvPolynomial σ R) :
    coeff m (monomial s r * p) = if s ≤ m then r * coeff (m - s) p else 0 
goal: MvPolynomial.coeff m ((MvPolynomial.monomial s) r * p) = if s ≤ m then r * MvPolynomial.coeff (m - s) p else 0

full_name: MvPolynomial.coeff_mul_X'
code: theorem coeff_mul_X' [DecidableEq σ] (m) (s : σ) (p : MvPolynomial σ R) :
    coeff m (p * X s) = if s ∈ m.support then coeff (m - Finsupp.single s 1) p else 0 
goal: MvPolynomial.coeff m (p * MvPolynomial.X s) = if s ∈ m.support then MvPolynomial.coeff (m - Finsupp.single s 1) p else 0

full_name: MvPolynomial.coeff_X_mul'
code: theorem coeff_X_mul' [DecidableEq σ] (m) (s : σ) (p : MvPolynomial σ R) :
    coeff m (X s * p) = if s ∈ m.support then coeff (m - Finsupp.single s 1) p else 0 
goal: MvPolynomial.coeff m (MvPolynomial.X s * p) = if s ∈ m.support then MvPolynomial.coeff (m - Finsupp.single s 1) p else 0

full_name: MvPolynomial.eq_zero_iff
code: theorem eq_zero_iff {p : MvPolynomial σ R} : p = 0 ↔ ∀ d, coeff d p = 0 
goal: p = 0 ↔ ∀ (d : σ →₀ ℕ), MvPolynomial.coeff d p = 0

full_name: MvPolynomial.ne_zero_iff
code: theorem ne_zero_iff {p : MvPolynomial σ R} : p ≠ 0 ↔ ∃ d, coeff d p ≠ 0 
goal: p ≠ 0 ↔ ∃ d, MvPolynomial.coeff d p ≠ 0

full_name: MvPolynomial.X_ne_zero
code: @[simp]
theorem X_ne_zero [Nontrivial R] (s : σ) :
    X (R := R) s ≠ 0 
goal: MvPolynomial.X s ≠ 0

full_name: MvPolynomial.support_eq_empty
code: @[simp]
theorem support_eq_empty {p : MvPolynomial σ R} : p.support = ∅ ↔ p = 0 
goal: p.support = ∅ ↔ p = 0

full_name: MvPolynomial.support_nonempty
code: @[simp]
lemma support_nonempty {p : MvPolynomial σ R} : p.support.Nonempty ↔ p ≠ 0 
goal: p.support.Nonempty ↔ p ≠ 0

full_name: MvPolynomial.exists_coeff_ne_zero
code: theorem exists_coeff_ne_zero {p : MvPolynomial σ R} (h : p ≠ 0) : ∃ d, coeff d p ≠ 0 
goal: ∃ d, MvPolynomial.coeff d p ≠ 0

full_name: MvPolynomial.C_dvd_iff_dvd_coeff
code: theorem C_dvd_iff_dvd_coeff (r : R) (φ : MvPolynomial σ R) : C r ∣ φ ↔ ∀ i, r ∣ φ.coeff i 
goal: MvPolynomial.C r ∣ φ ↔ ∀ (i : σ →₀ ℕ), r ∣ MvPolynomial.coeff i φ

full_name: MvPolynomial.isRegular_X
code: @[simp] lemma isRegular_X : IsRegular (X n : MvPolynomial σ R) 
goal: IsRegular (MvPolynomial.X n)

full_name: MvPolynomial.isRegular_X_pow
code: @[simp] lemma isRegular_X_pow (k : ℕ) : IsRegular (X n ^ k : MvPolynomial σ R) 
goal: IsRegular (MvPolynomial.X n ^ k)

full_name: MvPolynomial.isRegular_prod_X
code: @[simp] lemma isRegular_prod_X (s : Finset σ) :
    IsRegular (∏ n ∈ s, X n : MvPolynomial σ R) 
goal: IsRegular (∏ n ∈ s, MvPolynomial.X n)

full_name: MvPolynomial.coeffs
code: /-- The finset of nonzero coefficients of a multivariate polynomial. -/
def coeffs (p : MvPolynomial σ R) : Finset R 
goal: Finset R

full_name: MvPolynomial.coeffs_zero
code: @[simp]
lemma coeffs_zero : coeffs (0 : MvPolynomial σ R) = ∅ 
goal: MvPolynomial.coeffs 0 = ∅

full_name: MvPolynomial.coeffs_one
code: lemma coeffs_one : coeffs (1 : MvPolynomial σ R) ⊆ {1} 
goal: MvPolynomial.coeffs 1 ⊆ {1}

full_name: MvPolynomial.coeffs_eq_empty_of_subsingleton
code: @[nontriviality]
lemma coeffs_eq_empty_of_subsingleton [Subsingleton R] (p : MvPolynomial σ R) : p.coeffs = ∅ 
goal: p.coeffs = ∅

full_name: MvPolynomial.coeffs_one_of_nontrivial
code: @[simp]
lemma coeffs_one_of_nontrivial [Nontrivial R] : coeffs (1 : MvPolynomial σ R) = {1} 
goal: MvPolynomial.coeffs 1 = {1}

full_name: MvPolynomial.mem_coeffs_iff
code: lemma mem_coeffs_iff {p : MvPolynomial σ R} {c : R} :
    c ∈ p.coeffs ↔ ∃ n ∈ p.support, c = p.coeff n 
goal: c ∈ p.coeffs ↔ ∃ n ∈ p.support, c = MvPolynomial.coeff n p

full_name: MvPolynomial.coeff_mem_coeffs
code: lemma coeff_mem_coeffs {p : MvPolynomial σ R} (m : σ →₀ ℕ)
    (h : p.coeff m ≠ 0) : p.coeff m ∈ p.coeffs 
goal: MvPolynomial.coeff m p ∈ p.coeffs

full_name: MvPolynomial.zero_not_mem_coeffs
code: lemma zero_not_mem_coeffs (p : MvPolynomial σ R) : 0 ∉ p.coeffs 
goal: 0 ∉ p.coeffs

full_name: MvPolynomial.constantCoeff
code: /-- `constantCoeff p` returns the constant term of the polynomial `p`, defined as `coeff 0 p`.
This is a ring homomorphism.
-/
def constantCoeff : MvPolynomial σ R →+* R 
goal: MvPolynomial σ R →+* R

full_name: MvPolynomial.constantCoeff_eq
code: theorem constantCoeff_eq : (constantCoeff : MvPolynomial σ R → R) = coeff 0 
goal: ⇑MvPolynomial.constantCoeff = MvPolynomial.coeff 0

full_name: MvPolynomial.constantCoeff_C
code: @[simp]
theorem constantCoeff_C (r : R) : constantCoeff (C r : MvPolynomial σ R) = r 
goal: MvPolynomial.constantCoeff (MvPolynomial.C r) = r

full_name: MvPolynomial.constantCoeff_X
code: @[simp]
theorem constantCoeff_X (i : σ) : constantCoeff (X i : MvPolynomial σ R) = 0 
goal: MvPolynomial.constantCoeff (MvPolynomial.X i) = 0

full_name: MvPolynomial.constantCoeff_smul
code: @[simp 1001]
theorem constantCoeff_smul {R : Type*} [SMulZeroClass R S₁] (a : R) (f : MvPolynomial σ S₁) :
    constantCoeff (a • f) = a • constantCoeff f 
goal: MvPolynomial.constantCoeff (a • f) = a • MvPolynomial.constantCoeff f

full_name: MvPolynomial.constantCoeff_monomial
code: theorem constantCoeff_monomial [DecidableEq σ] (d : σ →₀ ℕ) (r : R) :
    constantCoeff (monomial d r) = if d = 0 then r else 0 
goal: MvPolynomial.constantCoeff ((MvPolynomial.monomial d) r) = if d = 0 then r else 0

full_name: MvPolynomial.constantCoeff_comp_C
code: @[simp]
theorem constantCoeff_comp_C : constantCoeff.comp (C : R →+* MvPolynomial σ R) = RingHom.id R 
goal: MvPolynomial.constantCoeff.comp MvPolynomial.C = RingHom.id R

full_name: MvPolynomial.constantCoeff_comp_algebraMap
code: theorem constantCoeff_comp_algebraMap :
    constantCoeff.comp (algebraMap R (MvPolynomial σ R)) = RingHom.id R 
goal: MvPolynomial.constantCoeff.comp (algebraMap R (MvPolynomial σ R)) = RingHom.id R

full_name: MvPolynomial.support_sum_monomial_coeff
code: @[simp]
theorem support_sum_monomial_coeff (p : MvPolynomial σ R) :
    (∑ v ∈ p.support, monomial v (coeff v p)) = p 
goal: ∑ v ∈ p.support, (MvPolynomial.monomial v) (MvPolynomial.coeff v p) = p

full_name: MvPolynomial.as_sum
code: theorem as_sum (p : MvPolynomial σ R) : p = ∑ v ∈ p.support, monomial v (coeff v p) 
goal: p = ∑ v ∈ p.support, (MvPolynomial.monomial v) (MvPolynomial.coeff v p)

full_name: MvPolynomial.eval₂
code: /-- Evaluate a polynomial `p` given a valuation `g` of all the variables
  and a ring hom `f` from the scalar ring to the target -/
def eval₂ (p : MvPolynomial σ R) : S₁ 
goal: S₁

full_name: MvPolynomial.eval₂_eq
code: theorem eval₂_eq (g : R →+* S₁) (X : σ → S₁) (f : MvPolynomial σ R) :
    f.eval₂ g X = ∑ d ∈ f.support, g (f.coeff d) * ∏ i ∈ d.support, X i ^ d i 
goal: MvPolynomial.eval₂ g X f = ∑ d ∈ f.support, g (MvPolynomial.coeff d f) * ∏ i ∈ d.support, X i ^ d i

full_name: MvPolynomial.eval₂_eq'
code: theorem eval₂_eq' [Fintype σ] (g : R →+* S₁) (X : σ → S₁) (f : MvPolynomial σ R) :
    f.eval₂ g X = ∑ d ∈ f.support, g (f.coeff d) * ∏ i, X i ^ d i 
goal: MvPolynomial.eval₂ g X f = ∑ d ∈ f.support, g (MvPolynomial.coeff d f) * ∏ i : σ, X i ^ d i

full_name: MvPolynomial.eval₂_zero
code: @[simp]
theorem eval₂_zero : (0 : MvPolynomial σ R).eval₂ f g = 0 
goal: MvPolynomial.eval₂ f g 0 = 0

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

full_name: MvPolynomial.eval₂_monomial
code: @[simp]
theorem eval₂_monomial : (monomial s a).eval₂ f g = f a * s.prod fun n e => g n ^ e 
goal: MvPolynomial.eval₂ f g ((MvPolynomial.monomial s) a) = f a * s.prod fun n e => g n ^ e

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

full_name: MvPolynomial.eval₂_one
code: @[simp]
theorem eval₂_one : (1 : MvPolynomial σ R).eval₂ f g = 1 
goal: MvPolynomial.eval₂ f g 1 = 1

full_name: MvPolynomial.eval₂_X
code: @[simp]
theorem eval₂_X (n) : (X n).eval₂ f g = g n 
goal: MvPolynomial.eval₂ f g (MvPolynomial.X n) = g n

full_name: MvPolynomial.eval₂_mul_monomial
code: theorem eval₂_mul_monomial :
    ∀ {s a}, (p * monomial s a).eval₂ f g = p.eval₂ f g * f a * s.prod fun n e => g n ^ e 
goal: MvPolynomial.eval₂ f g (p * (MvPolynomial.monomial s) a) = MvPolynomial.eval₂ f g p * f a * s.prod fun n e => g n ^ e

full_name: MvPolynomial.eval₂_mul_C
code: theorem eval₂_mul_C : (p * C a).eval₂ f g = p.eval₂ f g * f a 
goal: MvPolynomial.eval₂ f g (p * MvPolynomial.C a) = MvPolynomial.eval₂ f g p * f a

full_name: MvPolynomial.eval₂_mul
code: @[simp]
theorem eval₂_mul : ∀ {p}, (p * q).eval₂ f g = p.eval₂ f g * q.eval₂ f g 
goal: MvPolynomial.eval₂ f g (p * q) = MvPolynomial.eval₂ f g p * MvPolynomial.eval₂ f g q

full_name: MvPolynomial.eval₂_pow
code: @[simp]
theorem eval₂_pow {p : MvPolynomial σ R} : ∀ {n : ℕ}, (p ^ n).eval₂ f g = p.eval₂ f g ^ n
  
goal: MvPolynomial.eval₂ f g (p ^ n) = MvPolynomial.eval₂ f g p ^ n

full_name: MvPolynomial.eval₂Hom
code: /-- `MvPolynomial.eval₂` as a `RingHom`. -/
def eval₂Hom (f : R →+* S₁) (g : σ → S₁) : MvPolynomial σ R →+* S₁ 
goal: MvPolynomial σ R →+* S₁

full_name: MvPolynomial.coe_eval₂Hom
code: @[simp]
theorem coe_eval₂Hom (f : R →+* S₁) (g : σ → S₁) : ⇑(eval₂Hom f g) = eval₂ f g 
goal: ⇑(MvPolynomial.eval₂Hom f g) = MvPolynomial.eval₂ f g

full_name: MvPolynomial.eval₂Hom_congr
code: theorem eval₂Hom_congr {f₁ f₂ : R →+* S₁} {g₁ g₂ : σ → S₁} {p₁ p₂ : MvPolynomial σ R} :
    f₁ = f₂ → g₁ = g₂ → p₁ = p₂ → eval₂Hom f₁ g₁ p₁ = eval₂Hom f₂ g₂ p₂ 
goal: f₁ = f₂ → g₁ = g₂ → p₁ = p₂ → (MvPolynomial.eval₂Hom f₁ g₁) p₁ = (MvPolynomial.eval₂Hom f₂ g₂) p₂

full_name: MvPolynomial.eval₂Hom_C
code: @[simp]
theorem eval₂Hom_C (f : R →+* S₁) (g : σ → S₁) (r : R) : eval₂Hom f g (C r) = f r 
goal: (MvPolynomial.eval₂Hom f g) (MvPolynomial.C r) = f r

full_name: MvPolynomial.eval₂Hom_X'
code: @[simp]
theorem eval₂Hom_X' (f : R →+* S₁) (g : σ → S₁) (i : σ) : eval₂Hom f g (X i) = g i 
goal: (MvPolynomial.eval₂Hom f g) (MvPolynomial.X i) = g i

full_name: MvPolynomial.comp_eval₂Hom
code: @[simp]
theorem comp_eval₂Hom [CommSemiring S₂] (f : R →+* S₁) (g : σ → S₁) (φ : S₁ →+* S₂) :
    φ.comp (eval₂Hom f g) = eval₂Hom (φ.comp f) fun i => φ (g i) 
goal: φ.comp (MvPolynomial.eval₂Hom f g) = MvPolynomial.eval₂Hom (φ.comp f) fun i => φ (g i)

full_name: MvPolynomial.map_eval₂Hom
code: theorem map_eval₂Hom [CommSemiring S₂] (f : R →+* S₁) (g : σ → S₁) (φ : S₁ →+* S₂)
    (p : MvPolynomial σ R) : φ (eval₂Hom f g p) = eval₂Hom (φ.comp f) (fun i => φ (g i)) p 
goal: φ ((MvPolynomial.eval₂Hom f g) p) = (MvPolynomial.eval₂Hom (φ.comp f) fun i => φ (g i)) p

full_name: MvPolynomial.eval₂Hom_monomial
code: theorem eval₂Hom_monomial (f : R →+* S₁) (g : σ → S₁) (d : σ →₀ ℕ) (r : R) :
    eval₂Hom f g (monomial d r) = f r * d.prod fun i k => g i ^ k 
goal: (MvPolynomial.eval₂Hom f g) ((MvPolynomial.monomial d) r) = f r * d.prod fun i k => g i ^ k

full_name: MvPolynomial.eval₂_comp_left
code: theorem eval₂_comp_left {S₂} [CommSemiring S₂] (k : S₁ →+* S₂) (f : R →+* S₁) (g : σ → S₁) (p) :
    k (eval₂ f g p) = eval₂ (k.comp f) (k ∘ g) p 
goal: k (MvPolynomial.eval₂ f g p) = MvPolynomial.eval₂ (k.comp f) (⇑k ∘ g) p

full_name: MvPolynomial.eval₂_eta
code: @[simp]
theorem eval₂_eta (p : MvPolynomial σ R) : eval₂ C X p = p 
goal: MvPolynomial.eval₂ MvPolynomial.C MvPolynomial.X p = p

full_name: MvPolynomial.eval₂_congr
code: theorem eval₂_congr (g₁ g₂ : σ → S₁)
    (h : ∀ {i : σ} {c : σ →₀ ℕ}, i ∈ c.support → coeff c p ≠ 0 → g₁ i = g₂ i) :
    p.eval₂ f g₁ = p.eval₂ f g₂ 
goal: MvPolynomial.eval₂ f g₁ p = MvPolynomial.eval₂ f g₂ p

full_name: MvPolynomial.eval₂_sum
code: theorem eval₂_sum (s : Finset S₂) (p : S₂ → MvPolynomial σ R) :
    eval₂ f g (∑ x ∈ s, p x) = ∑ x ∈ s, eval₂ f g (p x) 
goal: MvPolynomial.eval₂ f g (∑ x ∈ s, p x) = ∑ x ∈ s, MvPolynomial.eval₂ f g (p x)

full_name: MvPolynomial.eval₂_prod
code: @[to_additive existing (attr := simp)]
theorem eval₂_prod (s : Finset S₂) (p : S₂ → MvPolynomial σ R) :
    eval₂ f g (∏ x ∈ s, p x) = ∏ x ∈ s, eval₂ f g (p x) 
goal: MvPolynomial.eval₂ f g (∏ x ∈ s, p x) = ∏ x ∈ s, MvPolynomial.eval₂ f g (p x)

full_name: MvPolynomial.eval₂_assoc
code: theorem eval₂_assoc (q : S₂ → MvPolynomial σ R) (p : MvPolynomial S₂ R) :
    eval₂ f (fun t => eval₂ f g (q t)) p = eval₂ f g (eval₂ C q p) 
goal: MvPolynomial.eval₂ f (fun t => MvPolynomial.eval₂ f g (q t)) p =
  MvPolynomial.eval₂ f g (MvPolynomial.eval₂ MvPolynomial.C q p)

full_name: MvPolynomial.eval
code: /-- Evaluate a polynomial `p` given a valuation `f` of all the variables -/
def eval (f : σ → R) : MvPolynomial σ R →+* R 
goal: MvPolynomial σ R →+* R

full_name: MvPolynomial.eval_eq
code: theorem eval_eq (X : σ → R) (f : MvPolynomial σ R) :
    eval X f = ∑ d ∈ f.support, f.coeff d * ∏ i ∈ d.support, X i ^ d i 
goal: (MvPolynomial.eval X) f = ∑ d ∈ f.support, MvPolynomial.coeff d f * ∏ i ∈ d.support, X i ^ d i

full_name: MvPolynomial.eval_eq'
code: theorem eval_eq' [Fintype σ] (X : σ → R) (f : MvPolynomial σ R) :
    eval X f = ∑ d ∈ f.support, f.coeff d * ∏ i, X i ^ d i 
goal: (MvPolynomial.eval X) f = ∑ d ∈ f.support, MvPolynomial.coeff d f * ∏ i : σ, X i ^ d i

full_name: MvPolynomial.eval_monomial
code: theorem eval_monomial : eval f (monomial s a) = a * s.prod fun n e => f n ^ e 
goal: (MvPolynomial.eval f) ((MvPolynomial.monomial s) a) = a * s.prod fun n e => f n ^ e

full_name: MvPolynomial.eval_C
code: @[simp]
theorem eval_C : ∀ a, eval f (C a) = a 
goal: (MvPolynomial.eval f) (MvPolynomial.C a) = a

full_name: MvPolynomial.eval_X
code: @[simp]
theorem eval_X : ∀ n, eval f (X n) = f n 
goal: (MvPolynomial.eval f) (MvPolynomial.X n) = f n

full_name: MvPolynomial.smul_eval
code: @[simp]
theorem smul_eval (x) (p : MvPolynomial σ R) (s) : eval x (s • p) = s * eval x p 
goal: (MvPolynomial.eval x) (s • p) = s * (MvPolynomial.eval x) p

full_name: MvPolynomial.eval_add
code: theorem eval_add : eval f (p + q) = eval f p + eval f q 
goal: (MvPolynomial.eval f) (p + q) = (MvPolynomial.eval f) p + (MvPolynomial.eval f) q

full_name: MvPolynomial.eval_mul
code: theorem eval_mul : eval f (p * q) = eval f p * eval f q 
goal: (MvPolynomial.eval f) (p * q) = (MvPolynomial.eval f) p * (MvPolynomial.eval f) q

full_name: MvPolynomial.eval_pow
code: theorem eval_pow : ∀ n, eval f (p ^ n) = eval f p ^ n 
goal: (MvPolynomial.eval f) (p ^ n) = (MvPolynomial.eval f) p ^ n

full_name: MvPolynomial.eval_sum
code: theorem eval_sum {ι : Type*} (s : Finset ι) (f : ι → MvPolynomial σ R) (g : σ → R) :
    eval g (∑ i ∈ s, f i) = ∑ i ∈ s, eval g (f i) 
goal: (MvPolynomial.eval g) (∑ i ∈ s, f i) = ∑ i ∈ s, (MvPolynomial.eval g) (f i)

full_name: MvPolynomial.eval_prod
code: @[to_additive existing]
theorem eval_prod {ι : Type*} (s : Finset ι) (f : ι → MvPolynomial σ R) (g : σ → R) :
    eval g (∏ i ∈ s, f i) = ∏ i ∈ s, eval g (f i) 
goal: (MvPolynomial.eval g) (∏ i ∈ s, f i) = ∏ i ∈ s, (MvPolynomial.eval g) (f i)

full_name: MvPolynomial.eval_assoc
code: theorem eval_assoc {τ} (f : σ → MvPolynomial τ R) (g : τ → R) (p : MvPolynomial σ R) :
    eval (eval g ∘ f) p = eval g (eval₂ C f p) 
goal: (MvPolynomial.eval (⇑(MvPolynomial.eval g) ∘ f)) p = (MvPolynomial.eval g) (MvPolynomial.eval₂ MvPolynomial.C f p)

full_name: MvPolynomial.eval₂_id
code: @[simp]
theorem eval₂_id {g : σ → R} (p : MvPolynomial σ R) : eval₂ (RingHom.id _) g p = eval g p 
goal: MvPolynomial.eval₂ (RingHom.id R) g p = (MvPolynomial.eval g) p

full_name: MvPolynomial.eval_eval₂
code: theorem eval_eval₂ {S τ : Type*} {x : τ → S} [CommSemiring R] [CommSemiring S]
    (f : R →+* MvPolynomial τ S) (g : σ → MvPolynomial τ S) (p : MvPolynomial σ R) :
    eval x (eval₂ f g p) = eval₂ ((eval x).comp f) (fun s => eval x (g s)) p 
goal: (MvPolynomial.eval x) (MvPolynomial.eval₂ f g p) =
  MvPolynomial.eval₂ ((MvPolynomial.eval x).comp f) (fun s => (MvPolynomial.eval x) (g s)) p

full_name: MvPolynomial.map
code: /-- `map f p` maps a polynomial `p` across a ring hom `f` -/
def map : MvPolynomial σ R →+* MvPolynomial σ S₁ 
goal: MvPolynomial σ R →+* MvPolynomial σ S₁

full_name: MvPolynomial.map_monomial
code: @[simp]
theorem map_monomial (s : σ →₀ ℕ) (a : R) : map f (monomial s a) = monomial s (f a) 
goal: (MvPolynomial.map f) ((MvPolynomial.monomial s) a) = (MvPolynomial.monomial s) (f a)

full_name: MvPolynomial.map_C
code: @[simp]
theorem map_C : ∀ a : R, map f (C a : MvPolynomial σ R) = C (f a) 
goal: (MvPolynomial.map f) (MvPolynomial.C a) = MvPolynomial.C (f a)

full_name: MvPolynomial.map_X
code: @[simp]
theorem map_X : ∀ n : σ, map f (X n : MvPolynomial σ R) = X n 
goal: (MvPolynomial.map f) (MvPolynomial.X n) = MvPolynomial.X n

full_name: MvPolynomial.map_id
code: theorem map_id : ∀ p : MvPolynomial σ R, map (RingHom.id R) p = p 
goal: (MvPolynomial.map (RingHom.id R)) p = p

full_name: MvPolynomial.map_map
code: theorem map_map [CommSemiring S₂] (g : S₁ →+* S₂) (p : MvPolynomial σ R) :
    map g (map f p) = map (g.comp f) p 
goal: (MvPolynomial.map g) ((MvPolynomial.map f) p) = (MvPolynomial.map (g.comp f)) p

full_name: MvPolynomial.eval₂_eq_eval_map
code: theorem eval₂_eq_eval_map (g : σ → S₁) (p : MvPolynomial σ R) : p.eval₂ f g = eval g (map f p) 
goal: MvPolynomial.eval₂ f g p = (MvPolynomial.eval g) ((MvPolynomial.map f) p)

full_name: MvPolynomial.eval₂_comp_right
code: theorem eval₂_comp_right {S₂} [CommSemiring S₂] (k : S₁ →+* S₂) (f : R →+* S₁) (g : σ → S₁) (p) :
    k (eval₂ f g p) = eval₂ k (k ∘ g) (map f p) 
goal: k (MvPolynomial.eval₂ f g p) = MvPolynomial.eval₂ k (⇑k ∘ g) ((MvPolynomial.map f) p)

full_name: MvPolynomial.map_eval₂
code: theorem map_eval₂ (f : R →+* S₁) (g : S₂ → MvPolynomial S₃ R) (p : MvPolynomial S₂ R) :
    map f (eval₂ C g p) = eval₂ C (map f ∘ g) (map f p) 
goal: (MvPolynomial.map f) (MvPolynomial.eval₂ MvPolynomial.C g p) =
  MvPolynomial.eval₂ MvPolynomial.C (⇑(MvPolynomial.map f) ∘ g) ((MvPolynomial.map f) p)

full_name: MvPolynomial.coeff_map
code: theorem coeff_map (p : MvPolynomial σ R) : ∀ m : σ →₀ ℕ, coeff m (map f p) = f (coeff m p) 
goal: MvPolynomial.coeff m ((MvPolynomial.map f) p) = f (MvPolynomial.coeff m p)

full_name: MvPolynomial.map_injective
code: theorem map_injective (hf : Function.Injective f) :
    Function.Injective (map f : MvPolynomial σ R → MvPolynomial σ S₁) 
goal: Function.Injective ⇑(MvPolynomial.map f)

full_name: MvPolynomial.map_surjective
code: theorem map_surjective (hf : Function.Surjective f) :
    Function.Surjective (map f : MvPolynomial σ R → MvPolynomial σ S₁) 
goal: Function.Surjective ⇑(MvPolynomial.map f)

full_name: MvPolynomial.map_leftInverse
code: /-- If `f` is a left-inverse of `g` then `map f` is a left-inverse of `map g`. -/
theorem map_leftInverse {f : R →+* S₁} {g : S₁ →+* R} (hf : Function.LeftInverse f g) :
    Function.LeftInverse (map f : MvPolynomial σ R → MvPolynomial σ S₁) (map g) 
goal: Function.LeftInverse ⇑(MvPolynomial.map f) ⇑(MvPolynomial.map g)

full_name: MvPolynomial.map_rightInverse
code: /-- If `f` is a right-inverse of `g` then `map f` is a right-inverse of `map g`. -/
theorem map_rightInverse {f : R →+* S₁} {g : S₁ →+* R} (hf : Function.RightInverse f g) :
    Function.RightInverse (map f : MvPolynomial σ R → MvPolynomial σ S₁) (map g) 
goal: Function.RightInverse ⇑(MvPolynomial.map f) ⇑(MvPolynomial.map g)

full_name: MvPolynomial.eval_map
code: @[simp]
theorem eval_map (f : R →+* S₁) (g : σ → S₁) (p : MvPolynomial σ R) :
    eval g (map f p) = eval₂ f g p 
goal: (MvPolynomial.eval g) ((MvPolynomial.map f) p) = MvPolynomial.eval₂ f g p

full_name: MvPolynomial.eval₂_map
code: @[simp]
theorem eval₂_map [CommSemiring S₂] (f : R →+* S₁) (g : σ → S₂) (φ : S₁ →+* S₂)
    (p : MvPolynomial σ R) : eval₂ φ g (map f p) = eval₂ (φ.comp f) g p 
goal: MvPolynomial.eval₂ φ g ((MvPolynomial.map f) p) = MvPolynomial.eval₂ (φ.comp f) g p

full_name: MvPolynomial.eval₂Hom_map_hom
code: @[simp]
theorem eval₂Hom_map_hom [CommSemiring S₂] (f : R →+* S₁) (g : σ → S₂) (φ : S₁ →+* S₂)
    (p : MvPolynomial σ R) : eval₂Hom φ g (map f p) = eval₂Hom (φ.comp f) g p 
goal: (MvPolynomial.eval₂Hom φ g) ((MvPolynomial.map f) p) = (MvPolynomial.eval₂Hom (φ.comp f) g) p

full_name: MvPolynomial.constantCoeff_map
code: @[simp]
theorem constantCoeff_map (f : R →+* S₁) (φ : MvPolynomial σ R) :
    constantCoeff (MvPolynomial.map f φ) = f (constantCoeff φ) 
goal: MvPolynomial.constantCoeff ((MvPolynomial.map f) φ) = f (MvPolynomial.constantCoeff φ)

full_name: MvPolynomial.constantCoeff_comp_map
code: theorem constantCoeff_comp_map (f : R →+* S₁) :
    (constantCoeff : MvPolynomial σ S₁ →+* S₁).comp (MvPolynomial.map f) = f.comp constantCoeff 
goal: MvPolynomial.constantCoeff.comp (MvPolynomial.map f) = f.comp MvPolynomial.constantCoeff

full_name: MvPolynomial.support_map_subset
code: theorem support_map_subset (p : MvPolynomial σ R) : (map f p).support ⊆ p.support 
goal: ((MvPolynomial.map f) p).support ⊆ p.support

full_name: MvPolynomial.support_map_of_injective
code: theorem support_map_of_injective (p : MvPolynomial σ R) {f : R →+* S₁} (hf : Injective f) :
    (map f p).support = p.support 
goal: ((MvPolynomial.map f) p).support = p.support

full_name: MvPolynomial.C_dvd_iff_map_hom_eq_zero
code: theorem C_dvd_iff_map_hom_eq_zero (q : R →+* S₁) (r : R) (hr : ∀ r' : R, q r' = 0 ↔ r ∣ r')
    (φ : MvPolynomial σ R) : C r ∣ φ ↔ map q φ = 0 
goal: MvPolynomial.C r ∣ φ ↔ (MvPolynomial.map q) φ = 0

full_name: MvPolynomial.map_mapRange_eq_iff
code: theorem map_mapRange_eq_iff (f : R →+* S₁) (g : S₁ → R) (hg : g 0 = 0) (φ : MvPolynomial σ S₁) :
    map f (Finsupp.mapRange g hg φ) = φ ↔ ∀ d, f (g (coeff d φ)) = coeff d φ 
goal: (MvPolynomial.map f) (Finsupp.mapRange g hg φ) = φ ↔
  ∀ (d : σ →₀ ℕ), f (g (MvPolynomial.coeff d φ)) = MvPolynomial.coeff d φ

full_name: MvPolynomial.mapAlgHom_apply
code: /-- If `f : S₁ →ₐ[R] S₂` is a morphism of `R`-algebras, then so is `MvPolynomial.map f`. -/
@[simps!]
def mapAlgHom [CommSemiring S₂] [Algebra R S₁] [Algebra R S₂] (f : S₁ →ₐ[R] S₂) :
    MvPolynomial σ S₁ →ₐ[R] MvPolynomial σ S₂ 
goal: (MvPolynomial.mapAlgHom f) p = MvPolynomial.eval₂ (MvPolynomial.C.comp ↑f) MvPolynomial.X p

full_name: MvPolynomial.mapAlgHom
code: /-- If `f : S₁ →ₐ[R] S₂` is a morphism of `R`-algebras, then so is `MvPolynomial.map f`. -/
@[simps!]
def mapAlgHom [CommSemiring S₂] [Algebra R S₁] [Algebra R S₂] (f : S₁ →ₐ[R] S₂) :
    MvPolynomial σ S₁ →ₐ[R] MvPolynomial σ S₂ 
goal: MvPolynomial σ S₁ →ₐ[R] MvPolynomial σ S₂

full_name: MvPolynomial.mapAlgHom_id
code: @[simp]
theorem mapAlgHom_id [Algebra R S₁] :
    mapAlgHom (AlgHom.id R S₁) = AlgHom.id R (MvPolynomial σ S₁) 
goal: MvPolynomial.mapAlgHom (AlgHom.id R S₁) = AlgHom.id R (MvPolynomial σ S₁)

full_name: MvPolynomial.mapAlgHom_coe_ringHom
code: @[simp]
theorem mapAlgHom_coe_ringHom [CommSemiring S₂] [Algebra R S₁] [Algebra R S₂] (f : S₁ →ₐ[R] S₂) :
    ↑(mapAlgHom f : _ →ₐ[R] MvPolynomial σ S₂) =
      (map ↑f : MvPolynomial σ S₁ →+* MvPolynomial σ S₂) 
goal: ↑(MvPolynomial.mapAlgHom f) = MvPolynomial.map ↑f

full_name: MvPolynomial.algebraMap_apply
code: @[simp]
theorem algebraMap_apply (r : R) : algebraMap R (MvPolynomial σ S₁) r = C (algebraMap R S₁ r) 
goal: (algebraMap R (MvPolynomial σ S₁)) r = MvPolynomial.C ((algebraMap R S₁) r)

full_name: MvPolynomial.aeval
code: /-- A map `σ → S₁` where `S₁` is an algebra over `R` generates an `R`-algebra homomorphism
from multivariate polynomials over `σ` to `S₁`. -/
def aeval : MvPolynomial σ R →ₐ[R] S₁ 
goal: MvPolynomial σ R →ₐ[R] S₁

full_name: MvPolynomial.aeval_def
code: theorem aeval_def (p : MvPolynomial σ R) : aeval f p = eval₂ (algebraMap R S₁) f p 
goal: (MvPolynomial.aeval f) p = MvPolynomial.eval₂ (algebraMap R S₁) f p

full_name: MvPolynomial.aeval_eq_eval₂Hom
code: theorem aeval_eq_eval₂Hom (p : MvPolynomial σ R) : aeval f p = eval₂Hom (algebraMap R S₁) f p 
goal: (MvPolynomial.aeval f) p = (MvPolynomial.eval₂Hom (algebraMap R S₁) f) p

full_name: MvPolynomial.coe_aeval_eq_eval
code: @[simp]
lemma coe_aeval_eq_eval : RingHomClass.toRingHom (MvPolynomial.aeval f) = MvPolynomial.eval f 
goal: ↑(MvPolynomial.aeval f) = MvPolynomial.eval f

full_name: MvPolynomial.aeval_X
code: @[simp]
theorem aeval_X (s : σ) : aeval f (X s : MvPolynomial _ R) = f s 
goal: (MvPolynomial.aeval f) (MvPolynomial.X s) = f s

full_name: MvPolynomial.aeval_C
code: theorem aeval_C (r : R) : aeval f (C r) = algebraMap R S₁ r 
goal: (MvPolynomial.aeval f) (MvPolynomial.C r) = (algebraMap R S₁) r

full_name: MvPolynomial.aeval_unique
code: theorem aeval_unique (φ : MvPolynomial σ R →ₐ[R] S₁) : φ = aeval (φ ∘ X) 
goal: φ = MvPolynomial.aeval (⇑φ ∘ MvPolynomial.X)

full_name: MvPolynomial.aeval_X_left
code: theorem aeval_X_left : aeval X = AlgHom.id R (MvPolynomial σ R) 
goal: MvPolynomial.aeval MvPolynomial.X = AlgHom.id R (MvPolynomial σ R)

full_name: MvPolynomial.aeval_X_left_apply
code: theorem aeval_X_left_apply (p : MvPolynomial σ R) : aeval X p = p 
goal: (MvPolynomial.aeval MvPolynomial.X) p = p

full_name: MvPolynomial.comp_aeval
code: theorem comp_aeval {B : Type*} [CommSemiring B] [Algebra R B] (φ : S₁ →ₐ[R] B) :
    φ.comp (aeval f) = aeval fun i => φ (f i) 
goal: φ.comp (MvPolynomial.aeval f) = MvPolynomial.aeval fun i => φ (f i)

full_name: MvPolynomial.map_aeval
code: @[simp]
theorem map_aeval {B : Type*} [CommSemiring B] (g : σ → S₁) (φ : S₁ →+* B) (p : MvPolynomial σ R) :
    φ (aeval g p) = eval₂Hom (φ.comp (algebraMap R S₁)) (fun i => φ (g i)) p 
goal: φ ((MvPolynomial.aeval g) p) = (MvPolynomial.eval₂Hom (φ.comp (algebraMap R S₁)) fun i => φ (g i)) p

full_name: MvPolynomial.eval₂Hom_zero
code: @[simp]
theorem eval₂Hom_zero (f : R →+* S₂) : eval₂Hom f (0 : σ → S₂) = f.comp constantCoeff 
goal: MvPolynomial.eval₂Hom f 0 = f.comp MvPolynomial.constantCoeff

full_name: MvPolynomial.eval₂Hom_zero'
code: @[simp]
theorem eval₂Hom_zero' (f : R →+* S₂) : eval₂Hom f (fun _ => 0 : σ → S₂) = f.comp constantCoeff 
goal: (MvPolynomial.eval₂Hom f fun x => 0) = f.comp MvPolynomial.constantCoeff

full_name: MvPolynomial.eval₂Hom_zero_apply
code: theorem eval₂Hom_zero_apply (f : R →+* S₂) (p : MvPolynomial σ R) :
    eval₂Hom f (0 : σ → S₂) p = f (constantCoeff p) 
goal: (MvPolynomial.eval₂Hom f 0) p = f (MvPolynomial.constantCoeff p)

full_name: MvPolynomial.eval₂Hom_zero'_apply
code: theorem eval₂Hom_zero'_apply (f : R →+* S₂) (p : MvPolynomial σ R) :
    eval₂Hom f (fun _ => 0 : σ → S₂) p = f (constantCoeff p) 
goal: (MvPolynomial.eval₂Hom f fun x => 0) p = f (MvPolynomial.constantCoeff p)

full_name: MvPolynomial.eval₂_zero_apply
code: @[simp]
theorem eval₂_zero_apply (f : R →+* S₂) (p : MvPolynomial σ R) :
    eval₂ f (0 : σ → S₂) p = f (constantCoeff p) 
goal: MvPolynomial.eval₂ f 0 p = f (MvPolynomial.constantCoeff p)

full_name: MvPolynomial.eval₂_zero'_apply
code: @[simp]
theorem eval₂_zero'_apply (f : R →+* S₂) (p : MvPolynomial σ R) :
    eval₂ f (fun _ => 0 : σ → S₂) p = f (constantCoeff p) 
goal: MvPolynomial.eval₂ f (fun x => 0) p = f (MvPolynomial.constantCoeff p)

full_name: MvPolynomial.aeval_zero
code: @[simp]
theorem aeval_zero (p : MvPolynomial σ R) :
    aeval (0 : σ → S₁) p = algebraMap _ _ (constantCoeff p) 
goal: (MvPolynomial.aeval 0) p = (algebraMap R S₁) (MvPolynomial.constantCoeff p)

full_name: MvPolynomial.aeval_zero'
code: @[simp]
theorem aeval_zero' (p : MvPolynomial σ R) :
    aeval (fun _ => 0 : σ → S₁) p = algebraMap _ _ (constantCoeff p) 
goal: (MvPolynomial.aeval fun x => 0) p = (algebraMap R S₁) (MvPolynomial.constantCoeff p)

full_name: MvPolynomial.eval_zero
code: @[simp]
theorem eval_zero : eval (0 : σ → R) = constantCoeff 
goal: MvPolynomial.eval 0 = MvPolynomial.constantCoeff

full_name: MvPolynomial.eval_zero'
code: @[simp]
theorem eval_zero' : eval (fun _ => 0 : σ → R) = constantCoeff 
goal: (MvPolynomial.eval fun x => 0) = MvPolynomial.constantCoeff

full_name: MvPolynomial.aeval_monomial
code: theorem aeval_monomial (g : σ → S₁) (d : σ →₀ ℕ) (r : R) :
    aeval g (monomial d r) = algebraMap _ _ r * d.prod fun i k => g i ^ k 
goal: (MvPolynomial.aeval g) ((MvPolynomial.monomial d) r) = (algebraMap R S₁) r * d.prod fun i k => g i ^ k

full_name: MvPolynomial.eval₂Hom_eq_zero
code: theorem eval₂Hom_eq_zero (f : R →+* S₂) (g : σ → S₂) (φ : MvPolynomial σ R)
    (h : ∀ d, φ.coeff d ≠ 0 → ∃ i ∈ d.support, g i = 0) : eval₂Hom f g φ = 0 
goal: (MvPolynomial.eval₂Hom f g) φ = 0

full_name: MvPolynomial.aeval_eq_zero
code: theorem aeval_eq_zero [Algebra R S₂] (f : σ → S₂) (φ : MvPolynomial σ R)
    (h : ∀ d, φ.coeff d ≠ 0 → ∃ i ∈ d.support, f i = 0) : aeval f φ = 0 
goal: (MvPolynomial.aeval f) φ = 0

full_name: MvPolynomial.aeval_sum
code: theorem aeval_sum {ι : Type*} (s : Finset ι) (φ : ι → MvPolynomial σ R) :
    aeval f (∑ i ∈ s, φ i) = ∑ i ∈ s, aeval f (φ i) 
goal: (MvPolynomial.aeval f) (∑ i ∈ s, φ i) = ∑ i ∈ s, (MvPolynomial.aeval f) (φ i)

full_name: MvPolynomial.aeval_prod
code: @[to_additive existing]
theorem aeval_prod {ι : Type*} (s : Finset ι) (φ : ι → MvPolynomial σ R) :
    aeval f (∏ i ∈ s, φ i) = ∏ i ∈ s, aeval f (φ i) 
goal: (MvPolynomial.aeval f) (∏ i ∈ s, φ i) = ∏ i ∈ s, (MvPolynomial.aeval f) (φ i)

full_name: Algebra.adjoin_range_eq_range_aeval
code: theorem _root_.Algebra.adjoin_range_eq_range_aeval :
    Algebra.adjoin R (Set.range f) = (MvPolynomial.aeval f).range 
goal: Algebra.adjoin R (Set.range f) = (MvPolynomial.aeval f).range

full_name: Algebra.adjoin_eq_range
code: theorem _root_.Algebra.adjoin_eq_range (s : Set S₁) :
    Algebra.adjoin R s = (MvPolynomial.aeval ((↑) : s → S₁)).range 
goal: Algebra.adjoin R s = (MvPolynomial.aeval Subtype.val).range

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

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

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

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

full_name: MvPolynomial.aevalTower_algebraMap
code: theorem aevalTower_algebraMap (x : R) : aevalTower g y (algebraMap R (MvPolynomial σ R) x) = g x 
goal: (MvPolynomial.aevalTower g y) ((algebraMap R (MvPolynomial σ R)) x) = g x

full_name: MvPolynomial.aevalTower_comp_algebraMap
code: theorem aevalTower_comp_algebraMap :
    (aevalTower g y : MvPolynomial σ R →+* A).comp (algebraMap R (MvPolynomial σ R)) = g 
goal: (↑(MvPolynomial.aevalTower g y)).comp (algebraMap R (MvPolynomial σ R)) = ↑g

full_name: MvPolynomial.aevalTower_toAlgHom
code: theorem aevalTower_toAlgHom (x : R) :
    aevalTower g y (IsScalarTower.toAlgHom S R (MvPolynomial σ R) x) = g x 
goal: (MvPolynomial.aevalTower g y) ((IsScalarTower.toAlgHom S R (MvPolynomial σ R)) x) = g x

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

full_name: MvPolynomial.aevalTower_id
code: @[simp]
theorem aevalTower_id :
    aevalTower (AlgHom.id S S) = (aeval : (σ → S) → MvPolynomial σ S →ₐ[S] S) 
goal: MvPolynomial.aevalTower (AlgHom.id S S) = MvPolynomial.aeval

full_name: MvPolynomial.aevalTower_ofId
code: @[simp]
theorem aevalTower_ofId :
    aevalTower (Algebra.ofId S A) = (aeval : (σ → A) → MvPolynomial σ S →ₐ[S] A) 
goal: MvPolynomial.aevalTower (Algebra.ofId S A) = MvPolynomial.aeval

full_name: MvPolynomial.eval₂_mem
code: theorem eval₂_mem {f : R →+* S} {p : MvPolynomial σ R} {s : subS}
    (hs : ∀ i ∈ p.support, f (p.coeff i) ∈ s) {v : σ → S} (hv : ∀ i, v i ∈ s) :
    MvPolynomial.eval₂ f v p ∈ s 
goal: MvPolynomial.eval₂ f v p ∈ s

full_name: MvPolynomial.eval_mem
code: theorem eval_mem {p : MvPolynomial σ S} {s : subS} (hs : ∀ i ∈ p.support, p.coeff i ∈ s) {v : σ → S}
    (hv : ∀ i, v i ∈ s) : MvPolynomial.eval v p ∈ s 
goal: (MvPolynomial.eval v) p ∈ s