Documentation

HexRealRootsMathlib.IsolateRootsElab

Radical root-equivalence from a divisibility certificate. Given reified integer polynomials orig, core, a, b, a nonzero integer scalar t, and an exponent k, the two pointwise identities

  • orig = core * a (so every root of core is a root of orig), and

  • t · core ^ (k+1) = a * b (so every root of a is a root of core, since t ≠ 0 and has no zero divisors),

pin the real roots of orig and core to the same set. Used by the elaborator to transport a square-free-core isolation onto the original non-squarefree polynomial without ever reducing Hex.ZPoly.squareFreeCore.

Reconcile two closed reified polynomial evaluations aeval x (…) = aeval x (…) by expanding every aeval-of-ofCoeffs into its explicit coefficient sum and pushing aeval through the user polynomial's X / C / + / − / * / ^ / neg structure, then closing with ring. Deliberately avoids mul_eq_zero, so a factored user polynomial (e.g. Wilkinson) does not collapse into a root disjunction.

Equations
Instances For

    Prove ∀ x, aeval x P = 0 ↔ aeval x Q = 0 for reified/closed literal polynomials by reducing to the underlying evaluation equality.

    Equations
    Instances For

      Bridge tactic for the reified product identities aevalIff_radical consumes.

      Equations
      Instances For

        Evaluate a closed Hex.ZPoly expression to its runtime value at elaboration time (compiled evaluation, not kernel reduction).

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

          Evaluate a closed Rat-typed (or ) expression to a Rat at elaboration time (hoisted to HexPolyZMathlib.PolyParse).

          Equations
          Instances For

            Recursive interpreter from a Polynomial R expression to a Hex.ZPoly value (hoisted to HexPolyZMathlib.PolyParse). isRat selects the -style non-integer rejection.

            Equations
            Instances For

              base ^ k for Hex.ZPoly, via the executable Mul (csimp to mulImpl).

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

                Exact long division of integer coefficient arrays (ascending degree), returning the quotient coefficients when the division is exact, else none.

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

                  The certified isolation data extracted at elaboration time: a reified polynomial (the square-free core, when a swap happened), its Sturm chain, and the per-root dyadic endpoints.

                  • poly : Hex.ZPoly

                    The reified polynomial whose roots are isolated.

                  • The executable Sturm chain used to certify the result.

                  • endpoints : Array (Dyadic × Dyadic)

                    One dyadic interval for each distinct real root.

                  Instances For

                    Run the compiled isolator on f (assumed square-free with a nonzero constant Sturm tail), optionally refining every root to width 2 ^ (-widthK) through the cached-chain refineToWithChain.

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

                      Term syntax for an Int literal.

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

                        Term syntax for a reified Hex.ZPoly as Hex.DensePoly.ofCoeffs #[…].

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

                          Term syntax for a Dyadic endpoint as Dyadic.ofInt m or Dyadic.ofInt m >>> (s : Int) (the denominator is a power of two).

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

                            Emit the replay term IsolatedRealRoots.ofCert for d.poly (a square-free polynomial), stated over HexPolyZMathlib.toPolynomial d.poly. Every field is a decide on literals against the reified chain.

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

                              Convert a positive rational width q to the bit target k = max 0 ⌈log₂ q⁻¹⌉ in exact integer arithmetic: the least k ≥ 0 with 2 ^ (-k) ≤ q. Widths above 1 give k = 0 (they never coarsen the natural intervals).

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

                                Compute the divisibility certificate (a, b, t, k) witnessing that orig and core share their real roots: orig = core * a and t · core ^ (k+1) = a * b with t ≠ 0, all as integer-polynomial identities. Throws the internal certificate-mismatch error if the executable decomposition does not reassemble (a bug).

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

                                  Emit coreTerm : IsolatedRealRoots (toPolynomial fLit) n for the reflected integer polynomial f (the reflection of the user's input), classifying it as zero / nonzero constant / square-free / non-squarefree and routing accordingly.

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

                                    Shared driver for the isolate_roots term elaborator.

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

                                      isolate_roots p / isolate_roots (width := x) p. The atomic lookahead on "(" "width" ":=" lets a parenthesised polynomial argument (e.g. (X^4 - 2 : Polynomial ℝ)) parse as the polynomial rather than the width group.

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

                                        Elaborate isolate_roots, run the compiled search, and emit a replay term whose certificate obligations are checked by Lean.

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