Documentation

HexNumberField.Basic

Runtime evidence that the factorization-backed irreducibility checker accepted an integer polynomial.

  • is_true : p.isIrreducible = true

    The factorization-backed Boolean irreducibility checker accepted p.

  • pos_degree : 0 < DensePoly.natDegree p

    p has positive degree, excluding the prime constants the integer checker also accepts.

Instances
    structure Hex.PolyQuot (p : ZPoly) (x : SimpleRoot p) :

    Canonical reduced rational coordinates in the fixed field ℚ(x).

    Instances For

      A factorization-lazy algebraic root with an eagerly certified isolating representative.

      Instances For

        The fixed explicit representative of the root of X.

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

          Evidence that a representative is the deterministic representative stored by the canonical algebraic-number constructor.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            def Hex.AlgebraicNumber.canonicalRep? (p : ZPoly) (squarefree : HasOnlySimpleRoots p) (rep : RefinedIsolation p) (hzero : p ZPoly.X) :

            Run the deterministic representative-selection pipeline and retain its provenance together with the match against the supplied root.

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

              A canonical algebraic number. Construction is sealed so each normalized polynomial/root pair receives one fixed representative.

              Instances For

                The selected simple root is determined by the canonical representative.

                Equations
                Instances For
                  @[simp]

                  The stored canonical representative selects exactly the root a.x.

                  The canonical algebraic number zero, represented by the fixed explicit isolation of the normalized polynomial X.

                  Equations
                  Instances For

                    The named canonical zero agrees with the Zero instance.

                    @[simp]

                    The canonical zero retains X as its normalized polynomial.

                    Re-isolate an already normalized irreducible polynomial with the fixed default strategy and retain the unique canonical disc matching rep.

                    The normalized polynomial X takes the explicit canonical-zero fast path, so the total Zero instance does not depend on success of a bounded driver. For all other inputs this is the implementation boundary used by later smart constructors. It is checked because failure of the bounded isolation driver is retired only by the Mathlib companion's completeness proof.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      theorem Hex.AlgebraicNumber.ofNormalized?_isSome_eq (p : ZPoly) (prim : p.Primitive) (pos_lc : 0 < DensePoly.leadingCoeff p) (pos_degree : 0 < DensePoly.natDegree p) (checked : p.CheckedIrreducible) (squarefree : HasOnlySimpleRoots p) (rep : RefinedIsolation p) :
                      (ofNormalized? p prim pos_lc pos_degree checked squarefree rep).isSome = if _hzero : p = ZPoly.X then true else (canonicalRep? p squarefree rep _hzero).isSome

                      The success bit of canonicalization is exactly the success bit of its isolation, refinement, and representative-selection pipeline. This exposes the checked boundary needed by the Mathlib totality proof without exposing the sealed AlgebraicNumber constructor.

                      theorem Hex.AlgebraicNumber.ofNormalized?_p (p : ZPoly) (prim : p.Primitive) (pos_lc : 0 < DensePoly.leadingCoeff p) (pos_degree : 0 < DensePoly.natDegree p) (checked : p.CheckedIrreducible) (squarefree : HasOnlySimpleRoots p) (rep : RefinedIsolation p) {a : AlgebraicNumber} (h : ofNormalized? p prim pos_lc pos_degree checked squarefree rep = some a) :
                      a.p = p

                      Successful canonicalization retains the supplied normalized polynomial.

                      theorem Hex.AlgebraicNumber.ofNormalized?_spec (p : ZPoly) (prim : p.Primitive) (pos_lc : 0 < DensePoly.leadingCoeff p) (pos_degree : 0 < DensePoly.natDegree p) (checked : p.CheckedIrreducible) (squarefree : HasOnlySimpleRoots p) (rep : RefinedIsolation p) {a : AlgebraicNumber} (h : ofNormalized? p prim pos_lc pos_degree checked squarefree rep = some a) :
                      p = ZPoly.X a = 0 (hp : a.p = p), Intersects (hp a.rep) rep

                      A successful canonicalization either takes the explicit zero path or stores a representative intersecting the supplied isolation. This is the Mathlib-free behavioral boundary used by semantic soundness proofs.

                      theorem Hex.AlgebraicNumber.ext (a b : AlgebraicNumber) (hp : a.p = b.p) (hrep : a.rep b.rep) :
                      a = b

                      Two canonical values are equal once their dependent polynomials and stored representatives agree. The remaining fields are propositions, and the selected SimpleRoot is forced by rep_mk.

                      Closed-disc membership test for zero, including boundary contact.

                      Equations
                      Instances For

                        Canonical equality: compare minimal polynomials, then the selected roots.

                        Equations
                        Instances For

                          A canonical algebraic number is zero exactly when its minimal polynomial is X.

                          Equations
                          Instances For

                            The selected lazy root is zero exactly when its polynomial has zero constant coefficient and its closed isolating disc contains zero. The refined separation bound makes this test decisive between distinct simple roots.

                            Equations
                            Instances For
                              def Hex.panicWith {α : Sort u_1} (fallback : α) (message : String) :
                              α

                              Print a diagnostic in compiled code and return the supplied fallback.

                              Equations
                              Instances For
                                structure Hex.RootCount :

                                A root paired with its positive multiplicity.

                                • The recorded root.

                                • multiplicity : Nat

                                  The multiplicity of the root in the polynomial being solved.

                                • multiplicity_pos : 0 < self.multiplicity

                                  Roots are recorded only with positive multiplicity.

                                Instances For
                                  inductive Hex.RootSet :

                                  A polynomial root set; .all is reserved for the zero polynomial.

                                  Instances For

                                    The recorded roots of a nonzero polynomial, or none for the zero polynomial, every number being a root of that.

                                    Equations
                                    Instances For

                                      The recorded roots, with the zero polynomial giving the empty array.

                                      Equations
                                      Instances For
                                        @[simp]
                                        theorem Hex.RootSet.finite?_finite (roots : Array RootCount) :
                                        (finite roots).finite? = some roots
                                        @[simp]
                                        theorem Hex.RootSet.toArray_finite (roots : Array RootCount) :
                                        (finite roots).toArray = roots