Sturm's theorem for real polynomials #
This file proves Sturm's theorem over ℝ[X] on top of Mathlib's Polynomial.sturmSeq and
List.signVariations (see [BPR06]).
For any nonzero real polynomial p with g = EuclideanDomain.gcd p (derivative p), dividing out
g yields the coprime pair (p / g, derivative p / g), whose Sturm sign-variation count
Polynomial.sturmReducedVariations p x agrees with Polynomial.sturmVariations p x at every point
where g.eval x ≠ 0 (while sturmVariations p x = 0 at roots of g). Across any point x,
sturmReducedVariations p is locally constant away from roots of p, constant on a right
neighborhood (x, x + δ), and increases by 1 on a left neighborhood (x - δ, x) precisely when
x is a root of p (of any multiplicity). Consequently,
sturmReducedVariations p x + #{r ∈ p.roots.toFinset | r ≤ x} is locally constant on ℝ, hence
constant, yielding Sturm's root-counting identity on (a, b] both for general nonzero polynomials
(away from multiple-root endpoints) and unconditionally for separable (squarefree) polynomials.
Main definitions #
Polynomial.sturmVariations: sign variations ofsturmSeq p (derivative p)evaluated atx.Polynomial.sturmReducedVariations: sign variations ofsturmSeq (p / gcd p p') (p' / gcd p p')evaluated atx.
Main results #
Polynomial.sturmSeq_map:Polynomial.sturmSeqcommutes withPolynomial.mapalong any ring homomorphism between fields.Polynomial.sturmVariations_eq_sturmReducedVariations,Polynomial.sturmVariations_eq_zero_of_gcd_eval_eq_zero: relation betweensturmVariationsandsturmReducedVariationson general nonzero polynomials.Polynomial.sturmReducedVariations_sub_eq_card_roots_Ioc,Polynomial.sturmReducedVariations_antitone,Polynomial.sturmVariations_sub_eq_card_roots_Ioc_of_gcd_eval_ne_zero: general Sturm's theorem counting distinct real roots in(a, b]without multiplicity.Polynomial.sturmVariations_sub_eq_card_roots_Ioc,Polynomial.sturmVariations_sub_eq_card_roots_Ioc_of_squarefree,Polynomial.sturmVariations_sub_eq_card_roots_Ioo,Polynomial.sturmVariations_sub_eq_card_roots_Icc,Polynomial.sturmVariations_antitone: unconditional specializations for separable (squarefree) polynomials.
References #
- S. Basu, R. Pollack, and M.-F. Roy, Algorithms in Real Algebraic Geometry,
Theorem 2.50, p. 52 (counts distinct roots in an open interval over a real closed field; the
reduced-variation theorem here uses finite real endpoints and counts roots in
(a, b]overℝvia local constancy ofsturmReducedVariations p x + #{r ≤ x}on top of Mathlib'sPolynomial.sturmSeq).
Polynomial.sturmSeq commutes with Polynomial.map along any ring homomorphism between
fields.
The number of sign variations of the canonical Sturm sequence sturmSeq p (derivative p)
evaluated at x : ℝ.
Sign variations of the reduced coprime Sturm sequence
sturmSeq (p / gcd p (derivative p)) (derivative p / gcd p (derivative p)) at x : ℝ.
At any point x where gcd p (derivative p) vanishes, sturmVariations p x = 0.
Wherever gcd p (derivative p) does not vanish at x, sturmVariations p x equals
sturmReducedVariations p x.
For separable p, sturmVariations p x = sturmReducedVariations p x everywhere.
General Sturm's theorem via reduced coprime Sturm variations: for any nonzero p : ℝ[X]
and a ≤ b, sturmReducedVariations p a - sturmReducedVariations p b equals the number of
distinct real roots of p in (a, b] (counted without multiplicity).
sturmReducedVariations p is antitone on ℝ for every nonzero p : ℝ[X].
General Sturm's theorem on (a, b] for any nonzero p : ℝ[X] whose multiple-root divisor
gcd p (derivative p) does not vanish at a or b (after [BPR06], Theorem 2.50,
p. 52, adapted to finite real endpoints on (a, b]).
Sturm's theorem on half-open intervals (a, b] for separable p : ℝ[X]
(after [BPR06], Theorem 2.50, p. 52, adapted to finite real endpoints on (a, b]):
the drop sturmVariations p a - sturmVariations p b equals the number of distinct real roots of
p in (a, b], with no nonvanishing assumption on the endpoints.
sturmVariations p is antitone on ℝ for separable p : ℝ[X].
Squarefree version of Sturm's theorem on (a, b] over ℝ[X].
Open-interval form of Sturm's theorem when b is not a root.
Closed-interval form of Sturm's theorem when the left endpoint is not a root.