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
Equations
Equations
- Hex.AlgebraicNumber.instBEqRootSide.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
An isolation with a canonical upper or real base and an orientation.
- base : RefinedIsolation p
- side : RootSide
Instances For
The effective isolation of an oriented root.
Equations
Instances For
Reflect an oriented root without changing its base isolation.
Equations
- { base := base, side := Hex.AlgebraicNumber.RootSide.real, valid := h }.conj = { base := base, side := Hex.AlgebraicNumber.RootSide.real, valid := h }
- { base := base, side := Hex.AlgebraicNumber.RootSide.upper, valid := h }.conj = { base := base, side := Hex.AlgebraicNumber.RootSide.lower, valid := h }
- { base := base, side := Hex.AlgebraicNumber.RootSide.lower, valid := h }.conj = { base := base, side := Hex.AlgebraicNumber.RootSide.upper, valid := h }
Instances For
Determine the half plane of a refined isolation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Check that the base lies in the required half plane.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Successful orientation preserves the base.
Select the canonical upper representative and restore the requested orientation.
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. - isolation : OrientedIsolation self.p
The canonical base isolation and the selected orientation.
- canonical : IsCanonical self.p ⋯ self.isolation.base
The base comes from the deterministic isolation pipeline or explicit zero.
Instances For
The certified isolation of the selected complex root.
Instances For
The half plane of the represented number.
Instances For
Complex conjugation shares the canonical base and only changes orientation.
Equations
Instances For
Conjugation is an involution on the stored data.
Conjugation exposes the reflected isolation without exposing the sealed constructor.
Conjugation flips precisely the two nonreal sides.
Real values are fixed by conjugation.
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.
The canonical zero carries its explicit square centred on the real axis.
Zero lies on the real axis.
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 }
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
- 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