Scaled Polynomial Constant Term Formula

StatusFully Proven
TypeTheorem
ModuleChebyshevCircles.Proofs.MainTheoremSupport

Statement

Theorem Scaled Polynomial Constant Term Formula

For $N \geq 1$, the constant term of $S_N(x;\theta)$ is given by $[x^0]\, S_N(x;\theta) = 2^{N-1} \cdot (-1)^N \cdot \prod_{k=0}^{N-1}\cos(\theta + 2\pi k/N)$. This follows from Vieta's formula: the constant term of $\prod(X - r_i)$ is $(-1)^N \prod r_i$, scaled by $2^{N-1}$.

theorem scaledPolynomial_constantTerm_formula (N : ) (θ : ) (hN : 0 < N) :
    (scaledPolynomial N θ).coeff 0 = constantTermFormula N θ := by
Proof


  unfold scaledPolynomial constantTermFormula unscaledPolynomial
  rw [coeff_C_mul]
  -- Convert polynomialFromRealRoots to multiset form using list_foldr_eq_multiset_prod
  have h_eq : polynomialFromRealRoots (realProjectionsList N θ) =
      ((realProjectionsList N θ : Multiset ).map (fun r => X - C r)).prod := by
    unfold polynomialFromRealRoots
    rw [list_foldr_eq_multiset_prod (realProjectionsList N θ)]
  -- Apply Vieta's formula: coefficient 0 is (-1)^N * esymm N
  have h_card : (realProjectionsList N θ : Multiset ).card = N := by
    rw [Multiset.coe_card, card_realProjectionsList]
  rw [h_eq]
  rw [Multiset.prod_X_sub_C_coeff (realProjectionsList N θ : Multiset ) (by rw [h_card]; omega : 0  (realProjectionsList N θ : Multiset ).card)]
  -- Simplify card - 0 to card, then use h_card to get N
  simp only [Nat.sub_zero, h_card]
  -- esymm N of N elements is the product (when selecting all N elements, only one subset exists)
  have h_esymm : ((realProjectionsList N θ : Multiset ).esymm N) = (realProjectionsList N θ).prod := by
    unfold Multiset.esymm
    let s := (realProjectionsList N θ : Multiset )
    -- powersetCard N s when card s = N has exactly one element
    have h_card_powerset : (s.powersetCard N).card = 1 := by
      rw [Multiset.card_powersetCard, h_card, Nat.choose_self]
    -- That one element is s itself
    have h_mem : s  s.powersetCard N := by
      rw [Multiset.mem_powersetCard]
      exact le_refl _, h_card
    -- A multiset with one element containing s must equal {s}
    have h_eq : s.powersetCard N = {s} := by
      rw [Multiset.card_eq_one] at h_card_powerset
      obtain t, ht := h_card_powerset
      rw [ht] at h_mem
      rw [Multiset.mem_singleton] at h_mem
      rw [ht, h_mem]
    rw [h_eq, Multiset.map_singleton, Multiset.sum_singleton]
    rfl
  rw [h_esymm]
  ring

Neighborhood

Legend
Not Ready
Work in Progress
Sorry (theorems only)
Proven/Defined
Fully Proven (theorems only)
Axiom
Mathlib Ready
Theorems/Lemmas
Definitions
Axioms