Canonical reduced rational coordinates in the fixed field ℚ(x).
Reduced rational coordinates in the power basis of the selected root.
The coordinates are already reduced modulo the defining polynomial.
Instances For
A factorization-lazy algebraic root with an eagerly certified isolating representative.
- p : ZPoly
The enclosing integer polynomial; it need not be irreducible.
phas unit content.phas positive leading coefficient.phas positive degree.- squarefree : HasOnlySimpleRoots self.p
phas only simple roots. - x : SimpleRoot self.p
The selected root of
p. - rep : RefinedIsolation self.p
The certified refined isolation of the selected root.
The stored representative selects exactly the root
x.
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
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.
- p : ZPoly
The normalized minimal integer polynomial of the represented value.
phas unit content.phas positive leading coefficient.phas positive degree.- checked : self.p.CheckedIrreducible
The Boolean irreducibility checker accepted
p. - squarefree : HasOnlySimpleRoots self.p
phas only simple roots. - rep : RefinedIsolation self.p
The certified refined isolation of the represented root.
- canonical : IsCanonical self.p ⋯ self.rep
The stored representative comes from the deterministic canonical isolation pipeline (or is the fixed representative of zero).
Instances For
The selected simple root is determined by the canonical representative.
Equations
- a.x = Hex.SimpleRoot.mk a.rep
Instances For
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.
Instances For
Equations
The named canonical zero agrees with the Zero instance.
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
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.
Successful canonicalization retains the supplied normalized polynomial.
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.
Equations
- Hex.AlgebraicNumber.instInhabited = { default := Hex.AlgebraicNumber.zero }
Closed-disc membership test for zero, including boundary contact.
Equations
- r.containsZero = r.val.square.discContains (0, 0)
Instances For
Equations
A canonical algebraic number is zero exactly when its minimal polynomial
is X.
Equations
- a.isZero = (a.p == Hex.ZPoly.X)
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
- a.isZero = (Hex.DensePoly.coeff a.p 0 == 0 && a.rep.containsZero)
Instances For
Print a diagnostic in compiled code and return the supplied fallback.
Equations
- Hex.panicWith fallback message = Batteries.panicWith fallback message
Instances For
A root paired with its positive multiplicity.
- root : AlgebraicRoot
The recorded root.
- multiplicity : Nat
The multiplicity of the root in the polynomial being solved.
Roots are recorded only with positive multiplicity.
Instances For
The recorded roots of a nonzero polynomial, or none for the zero
polynomial, every number being a root of that.
Equations
- (Hex.RootSet.finite roots).finite? = some roots
- Hex.RootSet.all.finite? = none