Documentation

HexNumberField.Lazy

Regard an integer polynomial in y as a polynomial in y whose coefficients are constant polynomials in a second variable t.

Equations
Instances For
    @[simp]

    Coefficients of the outer lift are the corresponding constant polynomials.

    The eliminant whose roots are pairwise sums of roots of p and q.

    Equations
    Instances For

      The polynomial y^degree(q) q(t/y), viewed as a polynomial in y with coefficients in Int[t].

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

        The eliminant whose roots are pairwise products of roots of p and q.

        Equations
        Instances For

          Remove the largest power of X dividing an integer polynomial.

          Equations
          Instances For

            Reverse coefficients, automatically trimming the degree drop caused by an original zero constant coefficient.

            Equations
            Instances For

              Negating roots preserves primitive normalization.

              Negating roots preserves positive leading normalization.

              Negating roots preserves positive degree.

              Negating roots preserves squarefreeness.

              The Mahler precision is invariant under reflection and unit normalization.

              Reflection of a complex ball.

              Equations
              Instances For

                Minkowski difference of complex balls.

                Equations
                Instances For

                  Checked reciprocal enclosure. The centre reciprocal is rounded downward coordinatewise; three ulps cover both coordinate errors and the downward rounding of the radial distortion bound.

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

                    Reflect a refined isolation while preserving its root certificate and separation precision.

                    Equations
                    Instances For

                      Certify the enclosed root using a rounded centre and checked containment. Linear polynomials retain global isolation and canonical parent reuse. Failure leaves the global isolation route available.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        def Hex.AlgebraicRoot.withEliminant? {α : Type} (raw : ZPoly) (ballAt : Int → Option DyadicComplexBall) (finish : (a : AlgebraicRoot) → (isolations : Array (DyadicRootIsolation a.p)) → (refined : Array (RefinedIsolation a.p)) → a.p.isolateComplexRoots? ⋯ ↑(separationDepth a.p) = some isolations → Array.mapM DyadicRootIsolation.toRefined? isolations = some refined → Option α) (localFinish : AlgebraicRoot → Option α) :

                        Select the enclosed root directly when possible. Otherwise run the consumer while the global producer's certified isolations are available. Callers prove the consumers agree using withEliminant?_eq.

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

                          Normalize an eliminant and certify the root enclosed by the supplied operation ball. If direct certification fails, isolate all distinct roots and retain the unique root meeting that ball.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            theorem Hex.AlgebraicRoot.ofEliminant?_eq (raw : ZPoly) (ballAt : Int → Option DyadicComplexBall) :
                            ofEliminant? raw ballAt = have p := raw.squareFreeCore; if hprim : p.content = 1 then if hpos : 0 < DensePoly.leadingCoeff p then if hdegree : 0 < DensePoly.natDegree p then if hsimple : HasOnlySimpleRoots p then have prec := ↑(separationDepth p); do let ball ← ballAt prec match isolateAt? p ball prec with | some matching => some { p := p, prim := hprim, pos_lc := hpos, pos_degree := hdegree, squarefree := hsimple, x := SimpleRoot.mk matching, rep := matching, rep_mk := ⋯ } | none => do let isolations ← p.isolateComplexRoots? hsimple prec let refined ← Array.mapM DyadicRootIsolation.toRefined? isolations match List.filter (fun (r : RefinedIsolation p) => r.val.square.meetsBall ball) refined.toList with | [matching] => some { p := p, prim := hprim, pos_lc := hpos, pos_degree := hdegree, squarefree := hsimple, x := SimpleRoot.mk matching, rep := matching, rep_mk := ⋯ } | x => none else none else none else none else none

                            Expose direct selection and its global fallback without consumer callbacks.

                            theorem Hex.AlgebraicRoot.withEliminant?_eq {α : Type} (raw : ZPoly) (ballAt : Int → Option DyadicComplexBall) (finish : (a : AlgebraicRoot) → (isolations : Array (DyadicRootIsolation a.p)) → (refined : Array (RefinedIsolation a.p)) → a.p.isolateComplexRoots? ⋯ ↑(separationDepth a.p) = some isolations → Array.mapM DyadicRootIsolation.toRefined? isolations = some refined → Option α) (f : AlgebraicRoot → Option α) (hfinish : ∀ (a : AlgebraicRoot) (isolations : Array (DyadicRootIsolation a.p)) (refined : Array (RefinedIsolation a.p)) (hisolate : a.p.isolateComplexRoots? ⋯ ↑(separationDepth a.p) = some isolations) (hrefine : Array.mapM DyadicRootIsolation.toRefined? isolations = some refined), finish a isolations refined hisolate hrefine = f a) :
                            withEliminant? raw ballAt finish f = (ofEliminant? raw ballAt).bind f

                            A consumer using the certified producer run returns exactly the result of selecting the lazy root first and then applying its ordinary consumer.

                            Canonicalize a selected eliminant root, reusing its producer run for a factor equal to the whole enclosing polynomial.

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

                              Fusing selection and exactification preserves the complete checked result.

                              Total canonical consumption of an eliminant, retaining the original lazy-operation fallback and exactification fallback separately. The producer fallback is thunked so successful selection never evaluates its panic branch.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                theorem Hex.AlgebraicRoot.exactEliminant_eq (raw : ZPoly) (ballAt : Int → Option DyadicComplexBall) (fallback : Unit → AlgebraicRoot) :
                                exactEliminant raw ballAt fallback = ((ofEliminant? raw ballAt).getD (fallback ())).exact

                                Reuse preserves the total pipeline and both original fallback branches.

                                Certified operation ball shared by lazy and canonical addition.

                                Equations
                                Instances For

                                  Checked canonical sum, consuming the producer's isolation before its transient certificates go out of scope.

                                  Equations
                                  Instances For

                                    Certificate-free negation by reflection.

                                    Equations
                                    Instances For

                                      Checked lazy sum through the addition eliminant.

                                      Equations
                                      Instances For

                                        Fused canonical addition preserves the original lazy-then-exact pipeline.

                                        Total lazy sum.

                                        Equations
                                        Instances For

                                          Checked lazy difference.

                                          Equations
                                          Instances For

                                            Total lazy difference.

                                            Equations
                                            Instances For

                                              Guard bits for multiplication-ball amplification.

                                              Equations
                                              Instances For

                                                Guard bits for reciprocal-ball amplification. For a nonzero root of the primitive integer polynomial p, reciprocal Cauchy gives |a| ≥ 1 / (1 + coeffAbsMax p). Doubling the bit bound pays for the |a|⁻² distortion in inversion; sixteen further bits cover the strict nonzero guard and dyadic rounding.

                                                Equations
                                                Instances For

                                                  Certified operation ball shared by lazy and canonical multiplication.

                                                  Equations
                                                  Instances For

                                                    Checked lazy product through the product eliminant.

                                                    Equations
                                                    Instances For

                                                      Checked canonical product reusing its eliminant producer's isolation.

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

                                                        Fused canonical multiplication preserves zeros, representatives and failures.

                                                        Total lazy product.

                                                        Equations
                                                        Instances For

                                                          Checked lazy inverse through coefficient reversal.

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

                                                            Total lazy inverse, with inv 0 = 0.

                                                            Equations
                                                            Instances For

                                                              Checked lazy quotient.

                                                              Equations
                                                              Instances For

                                                                Total lazy quotient.

                                                                Equations
                                                                Instances For

                                                                  Canonical sum, reusing the producer's isolation when the chosen factor is the whole eliminant.

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

                                                                    Canonical addition keeps the exact result of lazy addition followed by exactification.

                                                                    Canonical difference: perform the lazy operation, then exactify.

                                                                    Equations
                                                                    Instances For

                                                                      Canonical product, reusing the producer's isolation when the chosen factor is the whole eliminant.

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

                                                                        Canonical multiplication keeps the exact old result, including its zero case.

                                                                        Canonical negation: reflect the lazy root, then exactify.

                                                                        Equations
                                                                        Instances For

                                                                          Canonical inverse, with inv 0 = 0: perform the lazy operation, then exactify.

                                                                          Equations
                                                                          Instances For

                                                                            Canonical quotient: perform the lazy operation, then exactify.

                                                                            Equations
                                                                            Instances For