Kernel-checked sign conditions for rational polynomials on intervals #
For a rational coefficient list cs and a closed rational interval [a, b], or a half-line
[a, ∞) (hi = none), two Boolean checks decide sign conditions of the real polynomial
p = (ofCoeffList cs).map (algebraMap ℚ ℝ) on the whole interval from finitely many rational
evaluations of p, p' and the Sturm sequence Cslib.RealRoot.sturmSeqList cs.
Cslib.RealRoot.rootFreeOn cs a hi:phas no root on the interval. It checksp a ≠ 0,p b ≠ 0and that the Sturm sign variations agree ataandb, so that no root lies in(a, b].Cslib.RealRoot.nonnegOn cs a hi:0 ≤ pon the interval. It checksp a ≥ 0,p b ≥ 0, that neither endpoint is a multiple root (p ≠ 0orp' ≠ 0there), that the Sturm count on(a, b]is1ifp b = 0and0otherwise, so that no root lies in the open interval, and thatpis positive at the midpoint. A root of odd multiplicity strictly inside the interval changes the sign, so nothing is lost by excluding interior roots; a root of even multiplicity inside the interval (a tangency) is rejected, and so is a multiple root at an endpoint.
The Sturm count is the general form of Sturm's theorem,
Polynomial.sturmVariations_sub_eq_card_roots_Ioc_of_gcd_eval_ne_zero, which needs no
squarefree hypothesis: it applies because the multiple-root divisor gcd p p' does not vanish at
an endpoint where p or p' does not.
For the half-line, the right endpoint is b = max (a + 1) B (or max a B for rootFreeOn) with
the Cauchy bound B = Cslib.RealRoot.cauchyBoundNat cs, beyond which p has no root
(Cslib.RealRoot.abs_lt_cauchyBoundNat_of_isRoot), and the sign at b decides the sign on
[b, ∞).
Main definitions #
Cslib.RealRoot.rootFreeOn,Cslib.RealRoot.nonnegOn: the checks.
Main results #
Cslib.RealRoot.eval_ne_zero_of_rootFreeOn,Cslib.RealRoot.eval_nonneg_of_nonnegOn: their soundness overℝ.
The check of rootFreeOn on a closed interval [a, b].
Soundness #
Soundness of rootFreeOn. An accepted check proves that the real polynomial has no root
on [a, b], or on [a, ∞) when hi = none.