Theorem: MvPolynomial.prod_X_add_C_coeff
File: Mathlib/RingTheory/Polynomial/Vieta.lean

tactic: let s := Finset.univ.val.map fun i => (MvPolynomial.X i : MvPolynomial σ R)
state_before: R : Type u_1
σ : Type u_2
inst✝¹ : CommSemiring R
inst✝ : Fintype σ
k : ℕ
h : k ≤ Fintype.card σ
⊢ (∏ i : σ, (Polynomial.X + Polynomial.C (X i))).coeff k = esymm σ R (Fintype.card σ - k)
state_after: R : Type u_1
σ : Type u_2
inst✝¹ : CommSemiring R
inst✝ : Fintype σ
k : ℕ
h : k ≤ Fintype.card σ
s : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val
⊢ (∏ i : σ, (Polynomial.X + Polynomial.C (X i))).coeff k = esymm σ R (Fintype.card σ - k)

tactic: have : Fintype.card σ = Multiset.card s := by
  rw [Multiset.card_map, ← Finset.card_univ, Finset.card_def]
state_before: R : Type u_1
σ : Type u_2
inst✝¹ : CommSemiring R
inst✝ : Fintype σ
k : ℕ
h : k ≤ Fintype.card σ
s : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val
⊢ (∏ i : σ, (Polynomial.X + Polynomial.C (X i))).coeff k = esymm σ R (Fintype.card σ - k)
state_after: R : Type u_1
σ : Type u_2
inst✝¹ : CommSemiring R
inst✝ : Fintype σ
k : ℕ
h : k ≤ Fintype.card σ
s : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val
this : Fintype.card σ = Multiset.card s
⊢ (∏ i : σ, (Polynomial.X + Polynomial.C (X i))).coeff k = esymm σ R (Fintype.card σ - k)

tactic: rw [this] at h ⊢
state_before: R : Type u_1
σ : Type u_2
inst✝¹ : CommSemiring R
inst✝ : Fintype σ
k : ℕ
h : k ≤ Fintype.card σ
s : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val
this : Fintype.card σ = Multiset.card s
⊢ (∏ i : σ, (Polynomial.X + Polynomial.C (X i))).coeff k = esymm σ R (Fintype.card σ - k)
state_after: R : Type u_1
σ : Type u_2
inst✝¹ : CommSemiring R
inst✝ : Fintype σ
k : ℕ
s : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val
h : k ≤ Multiset.card s
this : Fintype.card σ = Multiset.card s
⊢ (∏ i : σ, (Polynomial.X + Polynomial.C (X i))).coeff k = esymm σ R (Multiset.card s - k)

tactic: rw [MvPolynomial.esymm_eq_multiset_esymm σ R, Finset.prod_eq_multiset_prod]
state_before: R : Type u_1
σ : Type u_2
inst✝¹ : CommSemiring R
inst✝ : Fintype σ
k : ℕ
s : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val
h : k ≤ Multiset.card s
this : Fintype.card σ = Multiset.card s
⊢ (∏ i : σ, (Polynomial.X + Polynomial.C (X i))).coeff k = esymm σ R (Multiset.card s - k)
state_after: R : Type u_1
σ : Type u_2
inst✝¹ : CommSemiring R
inst✝ : Fintype σ
k : ℕ
s : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val
h : k ≤ Multiset.card s
this : Fintype.card σ = Multiset.card s
⊢ (Multiset.map (fun i => Polynomial.X + Polynomial.C (X i)) univ.val).prod.coeff k =
    (Multiset.map X univ.val).esymm (Multiset.card s - k)

tactic: convert Multiset.prod_X_add_C_coeff s h
state_before: R : Type u_1
σ : Type u_2
inst✝¹ : CommSemiring R
inst✝ : Fintype σ
k : ℕ
s : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val
h : k ≤ Multiset.card s
this : Fintype.card σ = Multiset.card s
⊢ (Multiset.map (fun i => Polynomial.X + Polynomial.C (X i)) univ.val).prod.coeff k =
    (Multiset.map X univ.val).esymm (Multiset.card s - k)
state_after: case h.e'_2.h.e'_3.h.e'_3
R : Type u_1
σ : Type u_2
inst✝¹ : CommSemiring R
inst✝ : Fintype σ
k : ℕ
s : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val
h : k ≤ Multiset.card s
this : Fintype.card σ = Multiset.card s
⊢ Multiset.map (fun i => Polynomial.X + Polynomial.C (X i)) univ.val =
    Multiset.map (fun r => Polynomial.X + Polynomial.C r) s

tactic: simp_rw [s, Multiset.map_map, Function.comp_apply]
state_before: case h.e'_2.h.e'_3.h.e'_3
R : Type u_1
σ : Type u_2
inst✝¹ : CommSemiring R
inst✝ : Fintype σ
k : ℕ
s : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val
h : k ≤ Multiset.card s
this : Fintype.card σ = Multiset.card s
⊢ Multiset.map (fun i => Polynomial.X + Polynomial.C (X i)) univ.val =
    Multiset.map (fun r => Polynomial.X + Polynomial.C r) s
state_after: no goals

tactic: rw [Multiset.card_map, ← Finset.card_univ, Finset.card_def]
state_before: R : Type u_1
σ : Type u_2
inst✝¹ : CommSemiring R
inst✝ : Fintype σ
k : ℕ
h : k ≤ Fintype.card σ
s : Multiset (MvPolynomial σ R) := Multiset.map (fun i => X i) univ.val
⊢ Fintype.card σ = Multiset.card s
state_after: no goals