Monic normalization over a checked fixed field.
Equations
Instances For
Formal derivative using the existing rational scalar action, avoiding any law-bearing cast instance on the computational fixed-field carrier.
Equations
- Hex.PolyQuot.Roots.derivative f = Hex.DensePoly.ofCoeffs (List.map (fun (i : Nat) => ↑(i + 1) • f.coeff (i + 1)) (List.range (f.size - 1))).toArray
Instances For
Fuel-bounded characteristic-zero Yun loop. Each returned pair is a monic square-free component and its positive multiplicity index.
Equations
- One or more equations did not get rendered due to their size.
- Hex.PolyQuot.Roots.yunAux w repeated multiplicity 0 out = out
Instances For
Yun square-free decomposition over a checked fixed field. The zero and constant polynomials have no finite components; the public root driver handles their distinct root-set conventions.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Common positive denominator of every rational coordinate occurring among
the coefficients of f.
Equations
- Hex.PolyQuot.Roots.commonDen f = Array.foldl (fun (den : Nat) (a : Hex.PolyQuot p x) => Array.foldl (fun (den : Nat) (q : Rat) => den.lcm q.den) den a.coeffs.toArray) 1 f.toArray
Instances For
Regard a fixed-field polynomial as a polynomial in the generator y,
with coefficients in Int[t], after clearing all rational denominators at
once.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Integer norm eliminant Res_y(p(y), F(y,t)) of a fixed-field
polynomial.
Equations
Instances For
Constant trivariate lift of a candidate eliminant: regard e(z) as a
polynomial in the candidate variable z whose coefficients are constant in
both the generator variable y and the evaluation variable S.
Equations
- Hex.PolyQuot.Roots.candidateLift e = Hex.DensePoly.ofCoeffs (Array.map (fun (c : Int) => Hex.DensePoly.C (Hex.DensePoly.C c)) (Hex.DensePoly.toArray e))
Instances For
The trivariate polynomial S - G(y, z) with G = clearedOuter f,
regarded as a polynomial in the candidate variable z whose coefficients are
polynomials in the generator y over Int[S]. The evaluation variable S
enters only the constant coordinate of the constant z-coefficient.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Integer evaluation eliminant for one component and candidate eliminant:
the double resultant Res_y(p(y), Res_z(e(z), S - G(y, z))) with
G = clearedOuter f, dilated by the common denominator so that its roots are
the candidate evaluations themselves rather than their denominator-cleared
multiples. Zero-root removal and primitive normalization happen inside the
bounded disambiguation search, per the SPEC.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Certified ball Horner evaluation at the selected fixed-field embedding and one absolute candidate root. Coefficient approximation retains its sound fallback; candidate refinement is checked because the bounded selector must observe the requested shrinking radius.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Isolate a component's norm roots and retain exactly the roots belonging to the selected embedding.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Semantic equality of two lazy roots. Equal enclosing polynomials use the
isolation comparison directly; distinct polynomials are first tested for a
nonconstant gcd over Rat. Coprime polynomials cannot share a root, so only
the remaining shared-factor case exactifies both roots.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Merge one root into a list, retaining the first representative of an existing semantic value and the incoming certified multiplicity.
Equations
Instances For
Merge one root using a complete scan of the current array.
Equations
- Hex.PolyQuot.Roots.mergeRoot roots candidate = do let merged ← Hex.PolyQuot.Roots.mergeRootList candidate roots.toList some merged.toArray
Instances For
Lexicographic non-strict order on integer coefficient lists.
Equations
Instances For
Stable root order: enclosing polynomial coefficients, then isolation centre and precision.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Checked roots of a fixed-field polynomial. none is reserved for a
certificate that did not appear within its prescribed finite bound.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Total fixed-field root API. The loud .all fallback is unreachable once
the companion discharges roots?_isSome.
Equations
- Hex.PolyQuot.roots f rep h = (Hex.PolyQuot.roots? f rep h).getD (Hex.panicWith Hex.RootSet.all "PolyQuot.roots: certification failed")
Instances For
A primitive fixed-field presentation of an algebraic coefficient array.
- generator : AlgebraicNumber
The canonical primitive element of the common field.
The input coefficients rewritten in the generator's fixed field.
Instances For
Deterministic signed shift order 0, 1, -1, 2, -2, ....
Equations
Instances For
Checked canonical embedding of a rational number.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Checked canonical sum.
Instances For
Checked canonical product.
Instances For
Checked multiplication by an integer shift.
Equations
- Hex.AlgebraicPoly.Common.scale? c a = do let scalar ← Hex.AlgebraicPoly.Common.rational? ↑c Hex.AlgebraicPoly.Common.mul? scalar a
Instances For
One primitive-element shift candidate theta + c * alpha.
Equations
- Hex.AlgebraicPoly.Common.shift? theta alpha c = if c = 0 then some theta else do let scaled ← Hex.AlgebraicPoly.Common.scale? c alpha Hex.AlgebraicPoly.Common.add? theta scaled
Instances For
Degree of a canonical algebraic number.
Equations
Instances For
A primitive-search candidate together with the signed shift that produced it.
- shift : Int
The signed integer shift that produced this candidate.
- value : AlgebraicNumber
The candidate primitive element
theta + shift * alpha.
Instances For
One maximum-degree update that retains the producing signed shift.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Maximum-degree primitive candidate together with its producing shift.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Extend a primitive presentation by one algebraic number. Testing
choose(deg(theta) * deg(alpha), 2) + 1 shifts is a conservative bounded
primitive-element search. The maximum-degree candidate generates the
compositum even when the two fields overlap.
Equations
Instances For
Bounded primitive element for all nonzero coefficients.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Checked canonical powers 1, gamma, ..., gamma^last.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Field trace of a from a known ambient field degree. If m is the
minimal-polynomial degree of a, this is (ambient / m) times the sum of its
m conjugates.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Recover one coefficient in the power basis of gamma through the
nondegenerate trace pairing, then validate the recovered coordinate by
canonical algebraic equality.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Construct and validate one primitive fixed-field presentation for an algebraic coefficient array.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Total executable embedding of a rational number into canonical algebraic numbers. The companion proves that the checked constructor cannot fail.
Equations
- Hex.AlgebraicNumber.ofRat q = (Hex.AlgebraicPoly.Common.rational? q).getD (Hex.panicWith 0 "AlgebraicNumber.ofRat: certification failed")
Instances For
Equations
Equations
- Hex.AlgebraicNumber.instNatCast = { natCast := fun (n : Nat) => Hex.AlgebraicNumber.ofRat ↑n }
Equations
- Hex.AlgebraicNumber.instIntCast = { intCast := fun (n : Int) => Hex.AlgebraicNumber.ofRat ↑n }
Equations
- Hex.AlgebraicNumber.instOfNatHAddNatOfNat n = { ofNat := Hex.AlgebraicNumber.ofRat ↑(n + 2) }
Executable scalar multiplication through the canonical rational embedding.
Equations
Instances For
Equations
Equations
- Hex.AlgebraicNumber.instSMulNat = { smul := fun (n : Nat) (a : Hex.AlgebraicNumber) => Hex.AlgebraicNumber.smul (↑n) a }
Equations
- Hex.AlgebraicNumber.instSMulInt = { smul := fun (n : Int) (a : Hex.AlgebraicNumber) => Hex.AlgebraicNumber.smul (↑n) a }
Natural powers by repeated squaring using executable canonical multiplication.
Equations
Instances For
Equations
Integer powers assembled from executable multiplication and inversion.
Instances For
Equations
Checked roots of a polynomial with canonical algebraic coefficients. All nonzero coefficients are first embedded in one bounded deterministic primitive presentation, then the fixed-field root driver is reused.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Total roots of a polynomial with canonical algebraic coefficients.
Equations
- f.roots = f.roots?.getD (Hex.panicWith Hex.RootSet.all "AlgebraicPoly.roots: certification failed")