-- Mathlib/RingTheory/Polynomial/Quotient.lean
theorem eval₂_C_mk_eq_zero {I : Ideal R} {a : MvPolynomial σ R}
    (ha : a ∈ (Ideal.map (C : R →+* MvPolynomial σ R) I : Ideal (MvPolynomial σ R))) :
    eval₂Hom (C.comp (Ideal.Quotient.mk I)) X a = 0

Proof state:
R : Type u_1
σ : Type u_2
inst✝ : CommRing R
I : Ideal R
a : MvPolynomial σ R
ha : a ∈ Ideal.map C I
n : σ →₀ ℕ
x✝ : n ∈ a.support
⊢ (C ((Ideal.Quotient.mk I) (coeff n a)) * n.prod fun n e => X n ^ e) = 0

Tactic:
refine mul_eq_zero_of_left ?_ _

Result:
R : Type u_1
σ : Type u_2
inst✝ : CommRing R
I : Ideal R
a : MvPolynomial σ R
ha : a ∈ Ideal.map C I
n : σ →₀ ℕ
x✝ : n ∈ a.support
⊢ C ((Ideal.Quotient.mk I) (coeff n a)) = 0

Proof state:
R : Type u_1
σ : Type u_2
inst✝ : CommRing R
I : Ideal R
a : MvPolynomial σ R
ha : a ∈ Ideal.map C I
n : σ →₀ ℕ
x✝ : n ∈ a.support
⊢ coeff n a ∈ I

Tactic:
exact mem_map_C_iff.1 ha n

Result:
no goals

Proof state:
R : Type u_1
σ : Type u_2
inst✝ : CommRing R
I : Ideal R
a : MvPolynomial σ R
ha : a ∈ Ideal.map C I
⊢ (eval₂Hom (C.comp (Ideal.Quotient.mk I)) X) a = 0

Tactic:
rw [as_sum a]

Result:
R : Type u_1
σ : Type u_2
inst✝ : CommRing R
I : Ideal R
a : MvPolynomial σ R
ha : a ∈ Ideal.map C I
⊢ (eval₂Hom (C.comp (Ideal.Quotient.mk I)) X) (∑ v ∈ a.support, (monomial v) (coeff v a)) = 0

Proof state:
R : Type u_1
σ : Type u_2
inst✝ : CommRing R
I : Ideal R
a : MvPolynomial σ R
ha : a ∈ Ideal.map C I
n : σ →₀ ℕ
x✝ : n ∈ a.support
this : (Ideal.Quotient.mk I) (coeff n a) = 0
⊢ C ((Ideal.Quotient.mk I) (coeff n a)) = 0

Tactic:
simp only [this, C_0]

Result:
no goals

Proof state:
R : Type u_1
σ : Type u_2
inst✝ : CommRing R
I : Ideal R
a : MvPolynomial σ R
ha : a ∈ Ideal.map C I
n : σ →₀ ℕ
x✝ : n ∈ a.support
⊢ eval₂ (C.comp (Ideal.Quotient.mk I)) X ((monomial n) (coeff n a)) = 0

Tactic:
simp only [eval₂_monomial, Function.comp_apply, RingHom.coe_comp]

Result:
R : Type u_1
σ : Type u_2
inst✝ : CommRing R
I : Ideal R
a : MvPolynomial σ R
ha : a ∈ Ideal.map C I
n : σ →₀ ℕ
x✝ : n ∈ a.support
⊢ (C ((Ideal.Quotient.mk I) (coeff n a)) * n.prod fun n e => X n ^ e) = 0

Proof state:
R : Type u_1
σ : Type u_2
inst✝ : CommRing R
I : Ideal R
a : MvPolynomial σ R
ha : a ∈ Ideal.map C I
n : σ →₀ ℕ
x✝ : n ∈ a.support
this : coeff n a ∈ I
⊢ C ((Ideal.Quotient.mk I) (coeff n a)) = 0

Tactic:
rw [← @Ideal.mk_ker R _ I, RingHom.mem_ker] at this

Result:
R : Type u_1
σ : Type u_2
inst✝ : CommRing R
I : Ideal R
a : MvPolynomial σ R
ha : a ∈ Ideal.map C I
n : σ →₀ ℕ
x✝ : n ∈ a.support
this : (Ideal.Quotient.mk I) (coeff n a) = 0
⊢ C ((Ideal.Quotient.mk I) (coeff n a)) = 0

Proof state:
R : Type u_1
σ : Type u_2
inst✝ : CommRing R
I : Ideal R
a : MvPolynomial σ R
ha : a ∈ Ideal.map C I
⊢ (eval₂Hom (C.comp (Ideal.Quotient.mk I)) X) (∑ v ∈ a.support, (monomial v) (coeff v a)) = 0

Tactic:
rw [coe_eval₂Hom, eval₂_sum]

Result:
R : Type u_1
σ : Type u_2
inst✝ : CommRing R
I : Ideal R
a : MvPolynomial σ R
ha : a ∈ Ideal.map C I
⊢ ∑ x ∈ a.support, eval₂ (C.comp (Ideal.Quotient.mk I)) X ((monomial x) (coeff x a)) = 0

Proof state:
R : Type u_1
σ : Type u_2
inst✝ : CommRing R
I : Ideal R
a : MvPolynomial σ R
ha : a ∈ Ideal.map C I
⊢ ∑ x ∈ a.support, eval₂ (C.comp (Ideal.Quotient.mk I)) X ((monomial x) (coeff x a)) = 0

Tactic:
refine Finset.sum_eq_zero fun n _ => ?_

Result:
R : Type u_1
σ : Type u_2
inst✝ : CommRing R
I : Ideal R
a : MvPolynomial σ R
ha : a ∈ Ideal.map C I
n : σ →₀ ℕ
x✝ : n ∈ a.support
⊢ eval₂ (C.comp (Ideal.Quotient.mk I)) X ((monomial n) (coeff n a)) = 0

Proof state:
R : Type u_1
σ : Type u_2
inst✝ : CommRing R
I : Ideal R
a : MvPolynomial σ R
ha : a ∈ Ideal.map C I
n : σ →₀ ℕ
x✝ : n ∈ a.support
⊢ C ((Ideal.Quotient.mk I) (coeff n a)) = 0

Tactic:
suffices coeff n a ∈ I by
  rw [← @Ideal.mk_ker R _ I, RingHom.mem_ker] at this
  simp only [this, C_0]

Result:
R : Type u_1
σ : Type u_2
inst✝ : CommRing R
I : Ideal R
a : MvPolynomial σ R
ha : a ∈ Ideal.map C I
n : σ →₀ ℕ
x✝ : n ∈ a.support
⊢ coeff n a ∈ I