Documentation

HexRealRoots.SimpleRealRoot

An isolation refined to separation precision: its interval has width at most 2^{−sepPrec p}. At width below sep(p)/4, two refined isolations isolate the same root exactly when their intervals overlap.

Equations
Instances For
    def Hex.Overlaps {p : ZPoly} (i₁ i₂ : RefinedRealIsolation p) :

    The half-open intervals of two refined isolations intersect: max lower₁ lower₂ < min upper₁ upper₂. Core Dyadic has no Min/Max instance, so the max and min are written with explicit ifs; the whole test is a single dyadic comparison at runtime.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[instance_reducible]
      instance Hex.instDecidableOverlaps {p : ZPoly} (i₁ i₂ : RefinedRealIsolation p) :
      Decidable (Overlaps i₁ i₂)
      Equations

      The identity of a real root, independent of which isolation witnessed it: the quotient of refined isolations by interval overlap.

      Equations
      Instances For

        Package a refined isolation as a root identity.

        Equations
        Instances For

          Boolean form of Overlaps, used for equality tests on data containing roots. The companion proves it decides equality in SimpleRealRoot p.

          Equations
          Instances For

            Refine an isolation to separation precision and package it as a RefinedRealIsolation. Refinement runs refineTo (sepPrec p); the width test that follows is some on any honest isolation of a squarefree p (the companion's refine1_isolates_same shows refineTo actually shrinks below 2^{−sepPrec p}, so the none branch is unreachable there). It is Option only because on junk data violating the isolation semantics refineTo can return its input unshrunk. This is the obvious producer the threading pattern needs: call it once, then thread the refined value forward.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For