Documentation

HexNumberFieldMathlib.Roots

@[implicit_reducible]

Proof-local Mathlib CommRing view of ZPoly, assembled from the executable library's verified Lean.Grind.CommRing instance.

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

    Proof-local domain structure on ZPoly, transported from Polynomial Int.

    def Hex.RootSet.Contains (roots : RootSet) (z : ) :

    Semantic membership in a root set. Every complex number belongs to the root set of the zero polynomial.

    Equations
    Instances For
      noncomputable def Hex.RootSet.multiplicityOf (roots : RootSet) (z : ) :

      The recorded multiplicity of a complex value, or zero when it is absent. The .all case also returns zero, matching Mathlib's convention for Polynomial.rootMultiplicity of the zero polynomial.

      Equations
      Instances For

        Sum of the multiplicities in a finite root set.

        Equations
        Instances For

          Every stored entry has positive multiplicity.

          Equations
          Instances For

            A finite root set contains no two entries with the same semantic value.

            Equations
            Instances For

              Finite root entries occur in the executable canonical order.

              Equations
              Instances For

                A successful lazy-root comparison decides equality of represented complex values.

                Lazy-root comparison always succeeds, exactifying only when distinct enclosing polynomials have a nonconstant gcd.

                theorem Hex.PolyQuot.Roots.evalBall?_isSome {p : ZPoly} {x : SimpleRoot p} [p.CheckedIrreducible] (f : DensePoly (PolyQuot p x)) (rep : RefinedIsolation p) (h : SimpleRoot.mk rep = x) (candidate : AlgebraicRoot) (prec : ) :
                (evalBall? f rep h candidate prec).isSome = true

                Certified ball Horner evaluation always reaches its requested precision.

                theorem Hex.PolyQuot.Roots.componentRoots?_isSome {p : ZPoly} {x : SimpleRoot p} [p.CheckedIrreducible] (f : DensePoly (PolyQuot p x)) (multiplicity : ) (hMultiplicity : 0 < multiplicity) (rep : RefinedIsolation p) (h : SimpleRoot.mk rep = x) (hprim : (normEliminant f).squareFreeCore.content = 1) (hpos : 0 < DensePoly.leadingCoeff (normEliminant f).squareFreeCore) (hdegree : 0 < DensePoly.natDegree (normEliminant f).squareFreeCore) (hsimple : HasOnlySimpleRoots (normEliminant f).squareFreeCore) :
                (componentRoots? f multiplicity hMultiplicity rep h).isSome = true

                Once the norm eliminant passes its normalization checks, component root isolation, refinement, exact evaluation, and bounded disambiguation are total.

                theorem Hex.PolyQuot.Roots.componentRoots?_total {p : ZPoly} {x : SimpleRoot p} [p.CheckedIrreducible] (f : DensePoly (PolyQuot p x)) (multiplicity : ) (hMultiplicity : 0 < multiplicity) (rep : RefinedIsolation p) (h : SimpleRoot.mk rep = x) (hnorm : normEliminant f 0) (hdegree : 0 < DensePoly.natDegree (normEliminant f).squareFreeCore) :
                (componentRoots? f multiplicity hMultiplicity rep h).isSome = true

                A nonzero norm eliminant with positive-degree square-free core supplies all normalization witnesses required by the component driver.

                theorem Hex.PolyQuot.Roots.mergeRoot_isSome (roots : Array RootCount) (candidate : RootCount) :
                (mergeRoot roots candidate).isSome = true

                Merging a root through a complete semantic scan cannot fail.

                theorem Hex.PolyQuot.Roots.mergeRoots_isSome (roots candidates : Array RootCount) :
                (Array.foldlM mergeRoot roots candidates).isSome = true

                Folding semantic root merging over a finite candidate array cannot fail.

                theorem Hex.PolyQuot.Roots.yun_positive {p : ZPoly} {x : SimpleRoot p} [p.CheckedIrreducible] (f : DensePoly (PolyQuot p x)) (component : DensePoly (PolyQuot p x) × ) (hcomponent : component (yun f).toList) :
                0 < component.1.natDegree 0 < component.2

                Every component emitted by the executable Yun loop has positive degree and positive multiplicity.

                theorem Hex.PolyQuot.Roots.coeffDen_dvd {p : ZPoly} {x : SimpleRoot p} (f : DensePoly (PolyQuot p x)) (i j : ) :

                Every stored rational coordinate denominator divides the executable common denominator, including zero-extended coefficient reads.

                The executable common denominator is positive.

                theorem Hex.PolyQuot.Roots.clearRat_cast (den : ) (q : ) (hden : q.den den) :
                (clearRat den q) = den * q

                Clearing a rational coordinate against a divisible denominator has the expected value after embedding into .

                The rectangular coefficient array used for the bivariate lift stores the cleared coordinate at the corresponding outer and polynomial indices.

                noncomputable def Hex.PolyQuot.toPolynomialAt {p : ZPoly} {x : SimpleRoot p} (f : DensePoly (PolyQuot p x)) (rep : RefinedIsolation p) (h : SimpleRoot.mk rep = x) :

                Interpret a fixed-field dense polynomial at the selected embedding.

                Equations
                Instances For
                  theorem Hex.PolyQuot.coeff_toPolynomialAt {p : ZPoly} {x : SimpleRoot p} (f : DensePoly (PolyQuot p x)) (rep : RefinedIsolation p) (h : SimpleRoot.mk rep = x) (n : ) :
                  (toPolynomialAt f rep h).coeff n = (f.coeff n).toComplex rep h

                  Semantic coefficients agree with fixed-coordinate evaluation.

                  Fixed-field Horner interpretation is polynomial coefficient mapping by the selected complex embedding.

                  Fixed-field executable zero detection agrees with semantic polynomial zero.

                  A nonzero fixed-field polynomial has the expected semantic degree.

                  The integer bivariate lift specializes at the selected generator to the fixed-field polynomial, scaled by its positive common denominator.

                  Every root at the selected fixed-field embedding is a root of the integer norm eliminant.

                  The integer norm eliminant of a nonzero fixed-field polynomial is nonzero.

                  The evaluation eliminant vanishes at the evaluation of the fixed-field polynomial at any root of the candidate eliminant and the selected embedding.

                  The evaluation eliminant of a nonzero fixed-field polynomial and a positive-degree candidate eliminant is nonzero.

                  A positive-degree square-free norm-eliminant core forces the component itself to be nonzero.

                  theorem Hex.PolyQuot.Roots.componentRoots?_total_of_degree {p : ZPoly} {x : SimpleRoot p} [p.CheckedIrreducible] (f : DensePoly (PolyQuot p x)) (multiplicity : ) (hMultiplicity : 0 < multiplicity) (rep : RefinedIsolation p) (h : SimpleRoot.mk rep = x) (hdegree : 0 < f.natDegree) :
                  (componentRoots? f multiplicity hMultiplicity rep h).isSome = true

                  Every positive-degree fixed-field component satisfies the normalization conditions needed by the component root driver.

                  theorem Hex.PolyQuot.Roots.evalBall?_sound {p : ZPoly} {x : SimpleRoot p} [p.CheckedIrreducible] (f : DensePoly (PolyQuot p x)) (rep : RefinedIsolation p) (h : SimpleRoot.mk rep = x) (candidate : AlgebraicRoot) (prec : ) {ball : DyadicComplexBall} (hrun : evalBall? f rep h candidate prec = some ball) :

                  Certified ball Horner evaluation encloses exact evaluation at the selected embedding and candidate root.

                  theorem Hex.PolyQuot.Roots.retainZero?_correct {p : ZPoly} {x : SimpleRoot p} [p.CheckedIrreducible] (f : DensePoly (PolyQuot p x)) (rep : RefinedIsolation p) (h : SimpleRoot.mk rep = x) (candidate : AlgebraicRoot) (hf : 0 < f.size) {keep : Bool} (hkeep : retainZero? (evalEliminant f candidate.p) (evalMajorant f candidate.p) (evalBall? f rep h candidate) = some keep) :
                  keep = true Polynomial.eval candidate.toComplex (toPolynomialAt f rep h) = 0

                  Bounded disambiguation against the shared double-resultant evaluation eliminant retains precisely the candidates at which the fixed-field polynomial vanishes.

                  theorem Hex.PolyQuot.roots?_isSome {p : ZPoly} {x : SimpleRoot p} [p.CheckedIrreducible] (f : DensePoly (PolyQuot p x)) (rep : RefinedIsolation p) (h : SimpleRoot.mk rep = x) :
                  (roots? f rep h).isSome = true

                  The fixed-field root driver always produces a checked root set.

                  theorem Hex.PolyQuot.roots?_eq_roots {p : ZPoly} {x : SimpleRoot p} [p.CheckedIrreducible] (f : DensePoly (PolyQuot p x)) (rep : RefinedIsolation p) (h : SimpleRoot.mk rep = x) :
                  roots? f rep h = some (roots f rep h)

                  The total fixed-field root API is exactly the output of its now-proved total checked driver.

                  The fixed-field driver returns .all exactly for the zero polynomial.