Documentation

LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.RealRoots

Real-Rootedness, IVT Root Counting, Rolle's Theorem, Alternating Signs #

This file establishes that polynomials with enough real roots are fully real-rooted, applies the IVT to count roots from alternating signs, proves Rolle's theorem for polynomials, and constructs roots from sign conditions.

Main theorems #

Sub-goals for real-rootedness preservation (Theorem 4.4) #

The proof of Theorem 4.4 (real-rootedness preservation under ⊞_n) proceeds by strong induction on n. The three main sub-goals are:

  1. Rolle: rPoly n p = p'/n is real-rooted when p is (derivative roots lie between consecutive roots of p).
  2. IVT root counting: A monic polynomial whose values alternate in sign at n-1 ordered points has n real roots.
  3. Alternating sign: At the zeros μ_i of r = r_p ⊞_{n-1} r_q, the values (p ⊞_n q)(μ_i) alternate in sign (via transport identity + positive w-vectors).

The set {z : ℂ | z.im = 0} is convex.

theorem Problem4.derivative_preserves_real_roots (p : Polynomial ) (hp_deg : 0 < p.natDegree) (hp_real : ∀ (z : ), (Polynomial.map (algebraMap ) p).IsRoot zz.im = 0) (z : ) :

If p is a real polynomial of positive degree with all complex roots real, then p.derivative has the same property. Proof: Gauss-Lucas says roots of the derivative lie in the convex hull of roots of p. Since all roots of p are real and the real line is convex, the conclusion follows.

theorem Problem4.rPoly_preserves_real_roots (n : ) (hn : 2 n) (p : Polynomial ) (_hp_monic : p.Monic) (hp_deg : p.natDegree = n) (hp_real : ∀ (z : ), (Polynomial.map (algebraMap ) p).IsRoot zz.im = 0) (z : ) :

If all complex roots of p are real, then all complex roots of rPoly n p are also real.

Helper lemmas for IVT root counting (Sub-goal 2) #

theorem Problem4.all_roots_real_of_enough_real_roots (f : Polynomial ) (n : ) (hf_deg : f.natDegree = n) (hf_ne : f 0) (realRoots : Fin n) (hroots_inj : Function.Injective realRoots) (hroots : ∀ (i : Fin n), f.IsRoot (realRoots i)) (z : ) :

If a real polynomial of degree n has n distinct real roots, then every complex root of the mapped polynomial is real. Proof by counting: the roots multiset has card ≤ n (by card_roots'), and we exhibit n distinct real elements in it via injectivity of algebraMap ℝ ℂ, so every root must be one of them.

theorem Problem4.poly_ivt_opp_sign (f : Polynomial ) (a b : ) (hab : a < b) (hopp : Polynomial.eval a f * Polynomial.eval b f < 0) :
∃ (c : ), a < c c < b f.IsRoot c

IVT for polynomials: if f(a) * f(b) < 0 with a < b, there exists a root strictly between a and b. Uses intermediate_value_Icc from Mathlib.

theorem Problem4.poly_root_above (f : Polynomial ) (b : ) (hf_monic : f.Monic) (hdeg : 0 < f.natDegree) (hfb : Polynomial.eval b f < 0) :
∃ (c : ), b < c f.IsRoot c

For a monic polynomial with positive degree, eval → +∞ at +∞. If f(b) < 0, there exists c > b with f.IsRoot c.

theorem Problem4.poly_root_below_of_sign (f : Polynomial ) (a : ) (n : ) (hf_monic : f.Monic) (hn : f.natDegree = n) (hdeg : 0 < n) (hfa_sign : 0 < (-1) ^ (n - 1) * Polynomial.eval a f) :
c < a, f.IsRoot c

Root below a point using monic polynomial behavior at -∞. If f is monic of degree n > 0 and (-1)^{n-1} · f(a) > 0, then f has a root below a. The key idea: f(a-x) has leading coefficient (-1)^n, which has opposite sign from (-1)^{n-1} (the sign of f(a)), so by IVT there is a root of f(a-·) at some t > 0, giving a root of f at a - t < a.

theorem Problem4.sign_condition_opposite (n : ) (f : Polynomial ) (μ : Fin (n - 1)) (hSign : ∀ (i : Fin (n - 1)), 0 < (-1) ^ (n - 1 - i) * Polynomial.eval (μ i) f) (i j : Fin (n - 1)) (hij : i + 1 = j) :
Polynomial.eval (μ i) f * Polynomial.eval (μ j) f < 0

The alternating sign condition implies consecutive evaluation points have opposite sign. From (-1)^{n-1-i} · f(μᵢ) > 0 and (-1)^{n-1-(i+1)} · f(μᵢ₊₁) > 0, since the exponents differ by 1, the signs of f(μᵢ) and f(μᵢ₊₁) are opposite.

theorem Problem4.μ_mono {n : } (μ : Fin (n - 1)) ( : StrictMono μ) {a b : } (ha : a < n - 1) (hb : b < n - 1) (hab : a b) :
μ a, ha μ b, hb

Monotonicity of μ for natural number indices: if a ≤ b then μ(a) ≤ μ(b).

theorem Problem4.monic_alternating_roots_exist (n : ) (hn : 2 n) (f : Polynomial ) (hf_monic : f.Monic) (hf_deg : f.natDegree = n) (μ : Fin (n - 1)) (hμ_strict : StrictMono μ) (hSign : ∀ (i : Fin (n - 1)), 0 < (-1) ^ (n - 1 - i) * Polynomial.eval (μ i) f) :
∃ (rootFn : Fin n), StrictMono rootFn ∀ (i : Fin n), f.IsRoot (rootFn i)

From the alternating sign condition, construct n strictly ordered real roots of f via IVT: one below μ₀, one between each consecutive pair, one above μ_{n-2}. Shared by monic_alternating_has_real_roots and monic_alternating_squarefree.

theorem Problem4.monic_alternating_has_real_roots (n : ) (hn : 2 n) (f : Polynomial ) (hf_monic : f.Monic) (hf_deg : f.natDegree = n) (μ : Fin (n - 1)) (hμ_strict : StrictMono μ) (hSign : ∀ (i : Fin (n - 1)), 0 < (-1) ^ (n - 1 - i) * Polynomial.eval (μ i) f) (z : ) :

Sub-goal 2 (IVT root counting): A monic polynomial of degree n ≥ 2 whose values at n-1 strictly ordered points alternate in sign has all roots real.

Helper lemmas for alternating sign at critical points #

theorem Problem4.derivative_sign_at_ordered_root (m : ) (q : Polynomial ) (μ : Fin m) (hq_monic : q.Monic) (hq_deg : q.natDegree = m) (hq_roots : ∀ (i : Fin m), q.IsRoot (μ i)) (hμ_strict : StrictMono μ) (i : Fin m) :
0 < (-1) ^ (m - 1 - i) * Polynomial.eval (μ i) (Polynomial.derivative q)

The sign of the derivative of a monic polynomial at its i-th strictly ordered root: For a monic poly of degree m with m simple ordered roots μ₀ < ... < μ_{m-1}, sign(q'(μ_i)) = (-1)^{m-1-i}. Concretely: 0 < (-1)^{m-1-i} * q'(μ_i).

Proof: q'(μ_i) = ∏_{j≠i} (μ_i - μ_j). Among the m-1 factors:

  • The i factors with j < i satisfy μ_i - μ_j > 0 (positive)
  • The (m-1-i) factors with j > i satisfy μ_i - μ_j < 0 (negative) So the product has sign (-1)^{m-1-i}, i.e. (-1)^{m-1-i} * q'(μ_i) > 0.

At a root μ of rPoly n f (where μ is a zero of (1/n)·f'), we have f.eval μ = -criticalValue f n μ * (rPoly n f).derivative.eval μ. This is the algebraic unfolding of the definition of criticalValue.

theorem Problem4.poly_rolle (p : Polynomial ) (a b : ) (hab : a < b) (ha : p.IsRoot a) (hb : p.IsRoot b) :
∃ (c : ), a < c c < b (Polynomial.derivative p).IsRoot c

Rolle's theorem for polynomials: between two distinct roots a < b of a polynomial p, the derivative p.derivative has at least one root c ∈ (a, b).

theorem Problem4.derivative_zeros_between_roots (n : ) (p : Polynomial ) (n✝ : ) (hn : 2 n✝) (α : Fin n✝) (hα_strict : StrictMono α) (hα_roots : ∀ (i : Fin n✝), p.IsRoot (α i)) :
∃ (ν : Fin (n✝ - 1)), StrictMono ν (∀ (i : Fin (n✝ - 1)), (Polynomial.derivative p).IsRoot (ν i)) ∀ (i : Fin (n✝ - 1)), α i, < ν i ν i < α i + 1,

For a polynomial with n distinct ordered real roots, the derivative has at least n-1 zeros, one between each consecutive pair of roots.