File: Mathlib/RingTheory/Polynomial/Vieta.lean

full_name: Multiset.prod_X_add_C_eq_sum_esymm
code: /-- A sum version of **Vieta's formula** for `Multiset`: the product of the linear terms `X + λ`
where `λ` runs through a multiset `s` is equal to a linear combination of the symmetric functions
`esymm s` of the `λ`'s . -/
theorem prod_X_add_C_eq_sum_esymm (s : Multiset R) :
    (s.map fun r => X + C r).prod =
      ∑ j ∈ Finset.range (Multiset.card s + 1), (C (s.esymm j) * X ^ (Multiset.card s - j)) 
goal: (Multiset.map (fun r => Polynomial.X + Polynomial.C r) s).prod =
  ∑ j ∈ Finset.range (Multiset.card s + 1), Polynomial.C (s.esymm j) * Polynomial.X ^ (Multiset.card s - j)

full_name: Multiset.prod_X_add_C_coeff
code: /-- Vieta's formula for the coefficients of the product of linear terms `X + λ` where `λ` runs
through a multiset `s` : the `k`th coefficient is the symmetric function `esymm (card s - k) s`. -/
theorem prod_X_add_C_coeff (s : Multiset R) {k : ℕ} (h : k ≤ Multiset.card s) :
    (s.map fun r => X + C r).prod.coeff k = s.esymm (Multiset.card s - k) 
goal: (Multiset.map (fun r => Polynomial.X + Polynomial.C r) s).prod.coeff k = s.esymm (Multiset.card s - k)

full_name: Multiset.prod_X_add_C_coeff'
code: theorem prod_X_add_C_coeff' {σ} (s : Multiset σ) (r : σ → R) {k : ℕ} (h : k ≤ Multiset.card s) :
    (s.map fun i => X + C (r i)).prod.coeff k = (s.map r).esymm (Multiset.card s - k) 
goal: (Multiset.map (fun i => Polynomial.X + Polynomial.C (r i)) s).prod.coeff k =
  (Multiset.map r s).esymm (Multiset.card s - k)

full_name: Finset.prod_X_add_C_coeff
code: theorem _root_.Finset.prod_X_add_C_coeff {σ} (s : Finset σ) (r : σ → R) {k : ℕ} (h : k ≤ s.card) :
    (∏ i ∈ s, (X + C (r i))).coeff k = ∑ t ∈ s.powersetCard (s.card - k), ∏ i ∈ t, r i 
goal: (∏ i ∈ s, (Polynomial.X + Polynomial.C (r i))).coeff k = ∑ t ∈ Finset.powersetCard (s.card - k) s, ∏ i ∈ t, r i

full_name: Multiset.esymm_neg
code: theorem esymm_neg (s : Multiset R) (k : ℕ) : (map Neg.neg s).esymm k = (-1) ^ k * esymm s k 
goal: (Multiset.map Neg.neg s).esymm k = (-1) ^ k * s.esymm k

full_name: Multiset.prod_X_sub_X_eq_sum_esymm
code: theorem prod_X_sub_X_eq_sum_esymm (s : Multiset R) :
    (s.map fun t => X - C t).prod =
      ∑ j ∈ Finset.range (Multiset.card s + 1),
        (-1) ^ j * (C (s.esymm j) * X ^ (Multiset.card s - j)) 
goal: (Multiset.map (fun t => Polynomial.X - Polynomial.C t) s).prod =
  ∑ j ∈ Finset.range (Multiset.card s + 1), (-1) ^ j * (Polynomial.C (s.esymm j) * Polynomial.X ^ (Multiset.card s - j))

full_name: Multiset.prod_X_sub_C_coeff
code: theorem prod_X_sub_C_coeff (s : Multiset R) {k : ℕ} (h : k ≤ Multiset.card s) :
    (s.map fun t => X - C t).prod.coeff k =
    (-1) ^ (Multiset.card s - k) * s.esymm (Multiset.card s - k) 
goal: (Multiset.map (fun t => Polynomial.X - Polynomial.C t) s).prod.coeff k =
  (-1) ^ (Multiset.card s - k) * s.esymm (Multiset.card s - k)

full_name: Polynomial.coeff_eq_esymm_roots_of_card
code: /-- Vieta's formula for the coefficients and the roots of a polynomial over an integral domain
  with as many roots as its degree. -/
theorem _root_.Polynomial.coeff_eq_esymm_roots_of_card [IsDomain R] {p : R[X]}
    (hroots : Multiset.card p.roots = p.natDegree) {k : ℕ} (h : k ≤ p.natDegree) :
    p.coeff k = p.leadingCoeff * (-1) ^ (p.natDegree - k) * p.roots.esymm (p.natDegree - k) 
goal: p.coeff k = p.leadingCoeff * (-1) ^ (p.natDegree - k) * p.roots.esymm (p.natDegree - k)

full_name: Polynomial.coeff_eq_esymm_roots_of_splits
code: /-- Vieta's formula for split polynomials over a field. -/
theorem _root_.Polynomial.coeff_eq_esymm_roots_of_splits {F} [Field F] {p : F[X]}
    (hsplit : p.Splits (RingHom.id F)) {k : ℕ} (h : k ≤ p.natDegree) :
    p.coeff k = p.leadingCoeff * (-1) ^ (p.natDegree - k) * p.roots.esymm (p.natDegree - k) 
goal: p.coeff k = p.leadingCoeff * (-1) ^ (p.natDegree - k) * p.roots.esymm (p.natDegree - k)

full_name: MvPolynomial.prod_C_add_X_eq_sum_esymm
code: /-- A sum version of Vieta's formula for `MvPolynomial`: viewing `X i` as variables,
the product of linear terms `λ + X i` is equal to a linear combination of
the symmetric polynomials `esymm σ R j`. -/
theorem MvPolynomial.prod_C_add_X_eq_sum_esymm :
    (∏ i : σ, (Polynomial.X + Polynomial.C (MvPolynomial.X i))) =
      ∑ j ∈ range (card σ + 1), Polynomial.C
        (MvPolynomial.esymm σ R j) * Polynomial.X ^ (card σ - j) 
goal: ∏ i : σ, (Polynomial.X + Polynomial.C (MvPolynomial.X i)) =
  ∑ j ∈ Finset.range (Fintype.card σ + 1), Polynomial.C (MvPolynomial.esymm σ R j) * Polynomial.X ^ (Fintype.card σ - j)

full_name: MvPolynomial.prod_X_add_C_coeff
code: theorem MvPolynomial.prod_X_add_C_coeff (k : ℕ) (h : k ≤ card σ) :
    (∏ i : σ, (Polynomial.X + Polynomial.C (MvPolynomial.X i)) : Polynomial _).coeff k =
    MvPolynomial.esymm σ R (card σ - k) 
goal: (∏ i : σ, (Polynomial.X + Polynomial.C (MvPolynomial.X i))).coeff k = MvPolynomial.esymm σ R (Fintype.card σ - k)