Documentation

Formalizations.Reusable.Polynomial

Reusable layer: real polynomials and their real roots #

Stable names for results on real-rooted real polynomials and on counting real roots. Every statement uses Mathlib concepts only: real-rootedness is Polynomial.Splits (the archive predicate MSS.RealRooted is that by definition, realRooted_iff_splits), Sturm's chain is Mathlib's Polynomial.sturmSeq, and sign variations are Mathlib's List.signVariations. Each theorem is proved by the archive theorem it re-exposes (no proof is copied); where the archive uses its own sign-variation counter, the re-exposition only rewrites it into Mathlib's by the archive's bridge lemmas.

This module imports no paper of the archive: only the four general modules of Formalizations.Analysis.Polynomial.RealRoots it re-exposes.

Main results #

The archive predicate MSS.RealRooted is Mathlib's Polynomial.Splits over ℝ, by definition. This is the bridge that lets the results of this module be stated with Mathlib concepts only.

theorem Formalizations.Reusable.splits_of_alternating_sign (h : Polynomial ℝ) (hh : h ≠ 0) (n : ℕ) (hdeg : h.natDegree ≤ n) (x : Fin (n + 1) → ℝ) (hmono : StrictMono x) (halt : ∀ (i : Fin n), Polynomial.eval (x i.castSucc) h * Polynomial.eval (x i.succ) h < 0) :

Real-rootedness from sign alternation. A nonzero real polynomial h of degree at most n that alternates sign at n + 1 strictly increasing points x 0 < x 1 < ⋯ < x n (h (x i) · h (x (i+1)) < 0) splits over ℝ: the intermediate value theorem gives a root in each of the n gaps, and the degree bound leaves no room for non-real roots. This is the step in which the method of interlacing polynomials (Marcus–Spielman–Srivastava) concludes real-rootedness.

theorem Formalizations.Reusable.card_roots_toFinset_ge_of_alternating_sign (h : Polynomial ℝ) (hh : h ≠ 0) (n : ℕ) (x : Fin (n + 1) → ℝ) (hmono : StrictMono x) (halt : ∀ (i : Fin n), Polynomial.eval (x i.castSucc) h * Polynomial.eval (x i.succ) h < 0) :

Counting real roots by sign alternation. If a nonzero real polynomial h takes strictly alternating signs at n + 1 strictly increasing points (h (x i) · h (x (i+1)) < 0), it has at least n distinct real roots: the intermediate value theorem puts one in each open gap, and the gaps are disjoint. No degree hypothesis is needed.

theorem Formalizations.Reusable.splits_of_isRoot_mem_Ioo_of_gaps (f : Polynomial ℝ) (hf : f ≠ 0) (n : ℕ) (hdeg : f.natDegree ≤ n) (x : Fin (n + 1) → ℝ) (hmono : StrictMono x) (hroot : ∀ (i : Fin n), ∃ (r : ℝ), x i.castSucc < r ∧ r < x i.succ ∧ f.IsRoot r) :

Real-rootedness from one root per gap. If a nonzero real polynomial f of degree at most n has a root in each of the n open gaps (x i, x (i+1)) between n + 1 strictly increasing points, then f splits over ℝ. This is the closing step of the interlacing proofs of real-rootedness (orthogonal polynomials through their three-term recurrence; Cauchy interlacing of characteristic polynomials).

Sturm's theorem. For a squarefree real polynomial p and a < b with p a ≠ 0 and p b ≠ 0, the number of sign variations of Mathlib's Sturm chain Polynomial.sturmSeq p (derivative p) evaluated at a, minus the number at b, is the number of distinct real roots of p in (a, b]. Sign variations are Mathlib's List.signVariations (zeros are skipped).

The Budan–Fourier theorem. For a nonzero real polynomial p and a < b with p a ≠ 0 and p b ≠ 0, let V x be the number of sign variations (Mathlib's List.signVariations, zeros skipped) of the derivative tower p, p', p'', …, p^{(deg p)} evaluated at x. Then the number of real roots of p in (a, b], counted with multiplicity, is at most V a − V b, and the difference is even. Descartes' rule of signs is the case (0, ∞).

theorem Formalizations.Reusable.newton_inequality_esymm_roots {p : Polynomial ℝ} (hp : p.Splits) (hmonic : p.Monic) {k : ℕ} (hk : 1 ≤ k) (hk2 : k + 1 ≤ p.natDegree) :
p.roots.esymm k ^ 2 * (↑(p.natDegree.choose (k - 1)) * ↑(p.natDegree.choose (k + 1))) ≥ p.roots.esymm (k - 1) * p.roots.esymm (k + 1) * ↑(p.natDegree.choose k) ^ 2

Newton's inequalities. Let p be a monic real polynomial of degree n that splits over ℝ, with roots (with multiplicity) p.roots, and let e_j = p.roots.esymm j be their elementary symmetric functions. For 1 ≤ k ≤ n − 1, e_k² · C(n, k−1) · C(n, k+1) ≥ e_{k−1} · e_{k+1} · C(n, k)²; that is, the normalized E_k = e_k / C(n, k) satisfy E_k² ≥ E_{k−1} E_{k+1}. The proof differentiates and reverses the polynomial down to a real-rooted quadratic.

Real-rootedness is stable under differentiation. If a real polynomial p splits over ℝ, so does its derivative: Rolle's theorem puts a root of p' between consecutive roots of p, and a multiple root of p stays a root of p', which accounts for all deg p − 1 roots of p'. Mathlib has the counting step (Polynomial.card_roots_le_derivative) but no Splits statement.

Real-rootedness is stable under reversal. If a real polynomial p splits over ℝ, so does its reverse p.reverse = Xᵈᵉᵍ ᵖ · p(1/X) (Mathlib's Polynomial.reverse): the nonzero roots are inverted, and a vanishing constant term only lowers the degree. With splits_derivative, it reduces statements about the middle coefficients of a real-rooted polynomial to a real-rooted quadratic.

d'Ocagne's identity for the Vieta–Fibonacci polynomials. For Mathlib's Polynomial.Chebyshev.S (the rescaled Chebyshev polynomials of the second kind, indexed by ℤ) over a commutative ring R, and all p q : ℤ, S p · S (q − 1) − S q · S (p − 1) = − S (p − q − 1). The case q = p + 1 is the Cassini-type identity Polynomial.Chebyshev.S_sq_add_S_sq; at X = 1 it is d'Ocagne's identity for Fibonacci numbers.

  • Archive: Orbit.S_docagne (Formalizations.RingTheory.Polynomial.Chebyshev.Docagne); the module cites no paper DOI of ours.
  • Classical reference: d'Ocagne's identity for Fibonacci numbers, named after M. d'Ocagne; stated, e.g., in E. W. Weisstein, d'Ocagne's Identity, MathWorld.
  • Example: at p = 2, q = 1: S 2 · S 0 − S 1 · S 1 = −S 0, that is X² − 1 − X² = −1.