Documentation

CslibFrontier.Foundations.Algebra.Polynomial.RealRoot.Isolation

Certified Real-Root Isolation via Sturm Bisection #

This module implements executable Sturm-count bisection over ℚ[X] (isolateRoots), returning sorted rational isolating intervals RootInterval. It proves soundness, completeness, Cauchy enclosure, root ordering, and an exact strictly monotone bijection with the real roots of any separable (equivalently squarefree) rational polynomial.

Main definitions #

Main results #

References #

The List ℚ Sturm-bisection isolator isolateRoots (which can return touching intervals I₁.upper ≤ I₂.lower) and left-endpoint root refinement are this library's own construction, built on the Sturm counting and root-separation ingredients below; [BPR06], §10.2, Algorithm 10.4 (pp. 373–374, over integer coefficients using Bernstein coefficient variation and returning open rational intervals and singleton rational roots) is related work.

Closed rational interval [lower, upper] representing an isolated real root.

  • lower : ℚ

    Left rational endpoint of the isolating interval.

  • upper : ℚ

    Right rational endpoint of the isolating interval.

Instances For

    Closed-interval root isolation predicate: I.lower ≤ I.upper and [I.lower, I.upper] contains a unique real root of p.

    Half-open-interval root isolation predicate: I.lower < I.upper and (I.lower, I.upper] contains a unique real root of p.

    Inner loop shrinking (u, v] away from a root at u when (u, v] contains a unique root of t.

    def Cslib.RealRoot.refineLeftRoot (t : List ℚ) (seq : List (List ℚ)) (fuel : ℕ) (u v : ℚ) (vu : ℕ) :

    Convert a half-open isolating interval (u, v] (u < v, V(u) - V(v) = 1) into a closed isolating interval [a, b] ⊆ [u, v], strictly separating u when t vanishes at u.

    def Cslib.RealRoot.isolateIoc (t : List ℚ) (seq : List (List ℚ)) (depthBound : ℕ) :
    ℕ → ℚ → ℚ → ℕ → ℕ → List RootInterval

    Recursive Sturm-count bisection on (u, v] with cached endpoint variation counts vu and vv.

    Executable Sturm-count real-root isolator returning sorted isolating rational intervals for ofCoeffList cs.

    theorem Cslib.RealRoot.not_two_roots_of_width_le {cs : List ℚ} (hsep : (Polynomial.ofCoeffList cs).Separable) {α β : ℝ} (hα : (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.ofCoeffList cs)).IsRoot α) (hβ : (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.ofCoeffList cs)).IsRoot β) (hαβ : α < β) {a b : ℚ} (haα : ↑a ≤ α) (hβb : β ≤ ↑b) {depth : ℕ} (hdepth : depth = mignotteBisectionDepth cs) (hwidth : ↑b - ↑a ≤ 2 * ↑(cauchyBoundNat cs) / 2 ^ depth) :

    At the Mignotte bisection depth, an interval [a, b] of the dyadic width 2 * cauchyBoundNat cs / 2 ^ depth contains no two distinct real roots of a separable ofCoeffList cs.

    Separation invariant between consecutive isolating intervals: either I₁.upper < I₂.lower, or I₁.upper = I₂.lower and that shared rational boundary point is not a root of p.

    Soundness: every rational interval returned by isolateRoots cs isolates a unique real root of (ofCoeffList cs).map (algebraMap ℚ ℝ).

    Cauchy enclosure: every interval returned by isolateRoots cs lies within [-cauchyBoundNat cs, cauchyBoundNat cs].

    Ordering: consecutive intervals returned by isolateRoots cs satisfy I₁.upper ≤ I₂.lower.

    Completeness: every real root of (ofCoeffList cs).map (algebraMap ℚ ℝ) belongs to at least one isolating interval in isolateRoots cs, and that interval is unique in the list.

    The number of isolating intervals returned by isolateRoots cs equals the number of real roots of (ofCoeffList cs).map (algebraMap ℚ ℝ).

    The unique real root inside the i-th isolating interval of isolateRoots cs.

    theorem Cslib.RealRoot.isolatedRoot_mem {cs : List ℚ} (hsep : (Polynomial.ofCoeffList cs).Separable) (i : Fin (isolateRoots cs).length) :
    have I := (isolateRoots cs)[i]; have r := ↑(isolatedRoot hsep i); ↑I.lower ≤ r ∧ r ≤ ↑I.upper

    Membership of isolatedRoot hsep i in the i-th isolating interval of isolateRoots cs.

    The isolated real roots are strictly increasing across Fin (isolateRoots cs).length.

    Exact bijection between isolating interval indices Fin (isolateRoots cs).length and the set of real roots {r : ℝ // ((ofCoeffList cs).map (algebraMap ℚ ℝ)).IsRoot r}.

    Soundness for squarefree ofCoeffList cs: every interval in isolateRoots cs isolates a unique real root.

    Bijection onto real roots for squarefree ofCoeffList cs.

    Real-root isolation for an arbitrary polynomial p : ℚ[X] via Polynomial.coeffsBelow.

    Ordering: consecutive intervals in isolatePolyRoots p satisfy I₁.upper ≤ I₂.lower.

    The unique real root of p.map (algebraMap ℚ ℝ) inside the i-th isolating interval of isolatePolyRoots p.

    theorem Cslib.RealRoot.polyIsolatedRoot_mem {p : Polynomial ℚ} (hsq : Squarefree p) (i : Fin (isolatePolyRoots p).length) :
    have I := (isolatePolyRoots p)[i]; have r := ↑(polyIsolatedRoot hsq i); ↑I.lower ≤ r ∧ r ≤ ↑I.upper

    Membership of polyIsolatedRoot hsq i in the i-th isolating interval of isolatePolyRoots p.

    The isolated real roots of p.map (algebraMap ℚ ℝ) are strictly increasing across Fin (isolatePolyRoots p).length.

    For any squarefree p : ℚ[X], polyIsolatedRoot hsq is a bijection from Fin (isolatePolyRoots p).length onto the real roots of p.map (algebraMap ℚ ℝ).