Documentation

LeanPool.ArchonFirstProofResults.FirstProof4.Auxiliary.SignSquarefree

Translation Invariance, Sign Between Roots, Squarefree Lemmas #

This file proves that rPoly commutes with translation, establishes sign patterns between ordered roots, and proves squarefree criteria for polynomials with distinct real roots.

Main theorems #

Sign evaluation and squarefree properties #

rPoly commutes with translation: rPoly n (p.comp(X - C a)) = (rPoly n p).comp(X - C a). This follows from the chain rule for polynomial derivatives: (p.comp g)' = p'.comp(g) * g', and (X - C a)' = 1.

theorem Problem4.criticalValue_comp_X_sub_C_at_root (f : Polynomial ) (n : ) (c μ : ) (hroot : (rPoly n f).IsRoot μ) :

criticalValue is translation-invariant at roots: criticalValue(f.comp(X - C c), n, μ + c) = criticalValue(f, n, μ) when μ is a root of rPoly n f.

Proof: At a root μ of rPoly n f, the RPoly n evaluations agree: (RPoly n (f.comp(X-Cc))).eval(μ+c) = f.eval(μ) = (RPoly n f).eval(μ) And the rPoly derivatives agree by the chain rule: (rPoly n (f.comp(X-Cc)))'.eval(μ+c) = (rPoly n f)'.eval(μ)

theorem Problem4.eval_sign_between_ordered_roots (n : ) (hn : 2 n) (f : Polynomial ) (hf_monic : f.Monic) (hf_deg : f.natDegree = n) (α : Fin n) (hα_strict : StrictMono α) (hα_roots : ∀ (k : Fin n), f.IsRoot (α k)) (x : ) (j : Fin (n - 1)) (hx_above : α j, < x) (hx_below : x < α j + 1, ) :
0 < (-1) ^ (n - 1 - j) * Polynomial.eval x f

Sign of a monic polynomial between consecutive ordered roots. If f is monic of degree n with strictly ordered roots λ₀ < ... < λ_{n-1}, and x is strictly between λⱼ and λⱼ₊₁, then 0 < (-1)^{n-1-j} * f.eval x.

Proof sketch (product representation): f(x) = ∏ₖ(x - λₖ) since f is monic with n roots and degree n.

  • For k = 0,...,j: x > αⱼ >= αₖ, so (x - αₖ) > 0 (j+1 positive factors)
  • For k = j+1,...,n-1: x < αⱼ₊₁ <= αₖ, so (x - αₖ) < 0 (n-1-j negative factors) Product sign = (-1)^{n-1-j}, hence (-1)^{n-1-j} * f(x) > 0.
theorem Problem4.criticalValue_pos_with_interlacing (n : ) (hn : 2 n) (f : Polynomial ) (hf_monic : f.Monic) (hf_deg : f.natDegree = n) (α : Fin n) (hα_strict : StrictMono α) (hα_roots : ∀ (k : Fin n), f.IsRoot (α k)) (ν : Fin (n - 1)) (hν_strict : StrictMono ν) (hν_roots : ∀ (j : Fin (n - 1)), (rPoly n f).IsRoot (ν j)) (hν_above : ∀ (j : Fin (n - 1)), α j, < ν j) (hν_below : ∀ (j : Fin (n - 1)), ν j < α j + 1, ) (j : Fin (n - 1)) :
0 < criticalValue f n (ν j)

Critical values are positive when polynomial roots interlace with derivative roots.

Given: f monic of degree n with ordered roots λ₀ < ... < λ_{n-1}, ν₀ < ... < ν_{n-2} are roots of rPoly n f with interlacing (λⱼ < νⱼ < λⱼ₊₁). Then: criticalValue f n (νⱼ) > 0.

Proof: At νⱼ (root of rPoly n f), criticalValue = -f(ν)/r'(ν). • sign(f(νⱼ)) = (-1)^{n-1-j} — from eval_sign_between_ordered_roots • sign(r'(νⱼ)) = (-1)^{n-2-j} — from derivative_sign_at_ordered_root Since n-1-j = (n-2-j)+1, f and r' have opposite signs, so -f/r' > 0.

theorem Problem4.rPoly_squarefree_of_distinct_real_roots (n : ) (hn : 2 n) (p : Polynomial ) (hp_monic : p.Monic) (hp_deg : p.natDegree = n) (roots : Fin n) (hSorted : StrictMono roots) (hRoots : p = i : Fin n, (Polynomial.X - Polynomial.C (roots i))) :

rPoly n p is squarefree when p is monic of degree n and has n distinct real roots. Proof: By Rolle's theorem, rPoly n p = p'/n has a zero between each consecutive pair of roots of p, giving n-1 zeros in disjoint intervals (hence distinct). Since rPoly n p has degree n-1, these account for all roots, so rPoly is separable, hence squarefree.

theorem Problem4.squarefree_of_prod_distinct_linear (m : ) (roots : Fin m) (hInj : Function.Injective roots) :
Squarefree (∏ i : Fin m, (Polynomial.X - Polynomial.C (roots i)))

A product of distinct linear factors is squarefree. If roots is injective (all roots are distinct), then ∏ᵢ (X - C(roots i)) has no repeated factors.

theorem Problem4.squarefree_of_card_roots_eq_deg (f : Polynomial ) (m : ) (hf_monic : f.Monic) (hf_deg : f.natDegree = m) (hf_real : ∀ (z : ), (Polynomial.map (algebraMap ) f).IsRoot zz.im = 0) (roots : Fin m) (hroots_strict : StrictMono roots) (hroots : ∀ (i : Fin m), f.IsRoot (roots i)) :

A monic real-rooted polynomial with exactly deg(f) distinct roots is squarefree. Proof: f splits over ℝ (from real-rootedness), has n distinct roots → Nodup → separable.

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

If a monic polynomial of degree n ≥ 2 has alternating signs at n-1 strictly ordered points and all complex roots are real, then it is squarefree. The alternating signs produce n distinct real roots via IVT (same construction as monic_alternating_has_real_roots), and squarefree_of_card_roots_eq_deg gives squarefree from n distinct roots.

theorem Problem4.extract_ordered_real_roots (f : Polynomial ) (m : ) (hf_monic : f.Monic) (hf_deg : f.natDegree = m) (hf_real : ∀ (z : ), (Polynomial.map (algebraMap ) f).IsRoot zz.im = 0) (hf_sep : Squarefree f) :
∃ (μ : Fin m), StrictMono μ ∀ (i : Fin m), f.IsRoot (μ i)

Extraction of ordered real roots: If a monic separable polynomial of degree m has all complex roots with zero imaginary part, then it has m distinct ordered real roots. Proof: separability gives card(roots) = m, all roots are real, sorting gives strict order.

Squarefree is preserved under composition with (X - C a). If p is squarefree, then p.comp(X - C a) is squarefree. Proof: if d² ∣ p.comp(X-Ca), compose with (X+Ca) to get (d.comp(X+Ca))² ∣ p, hence d.comp(X+Ca) is a unit, hence d is a unit.