Package a rational polynomial after canonical modular reduction.
Equations
- Hex.PolyQuot.reduce p x f = { coeffs := Hex.PolyQuot.reduceCoeffs p f, degree_lt := ⋯ }
Instances For
Fixed-presentation elements are equal when their canonical coordinates are equal.
Equality is exactly equality of canonical coordinate polynomials; the
generated iff form of Hex.PolyQuot.ext.
Equality is exactly equality of canonical coordinate polynomials.
Boolean zero test on canonical coordinates.
Instances For
Reduced coordinate addition.
Instances For
Equations
- Hex.PolyQuot.instAdd = { add := Hex.PolyQuot.add }
Reduced coordinate subtraction.
Instances For
Equations
- Hex.PolyQuot.instSub = { sub := Hex.PolyQuot.sub }
Equations
- Hex.PolyQuot.instNeg = { neg := Hex.PolyQuot.neg }
Reduced coordinate multiplication.
Instances For
Equations
- Hex.PolyQuot.instMul = { mul := Hex.PolyQuot.mul }
Rational scalar action followed by canonical reduction.
Equations
- Hex.PolyQuot.smul c a = Hex.PolyQuot.reduce p x (Hex.DensePoly.scale c a.coeffs)
Instances For
Equations
- Hex.PolyQuot.instSMulRat = { smul := Hex.PolyQuot.smul }
The element of ℚ(root of pisolated bys) with coordinates f.
This is the self-contained form Repr emits: every argument is printable
data, and the two root side conditions are decide-discharged auto-params
of SimpleRoot.ofSquare.
Equations
- Hex.PolyQuot.ofSquare p s f hw hp = Hex.PolyQuot.reduce p (Hex.SimpleRoot.ofSquare p s hw hp) f
Instances For
A rational polynomial denotes its reduction, so #p[0, 0, 2] names the
element 2x² when the expected type is PolyQuot p x.
Equations
- Hex.PolyQuot.instCoeDensePolyRat = { coe := Hex.PolyQuot.reduce p x }
Equations
- Hex.PolyQuot.instNatCast = { natCast := fun (n : Nat) => Hex.PolyQuot.ofRat ↑n }
Equations
- Hex.PolyQuot.instIntCast = { intCast := fun (n : Int) => Hex.PolyQuot.ofRat ↑n }
Equations
- Hex.PolyQuot.instOfNatHAddNatOfNat n = { ofNat := Hex.PolyQuot.ofRat ↑(n + 2) }
Inversion in a checked irreducible presentation, with 0⁻¹ = 0. The
one-sided extended gcd tracks only the Bezout coefficient used for the inverse;
the constant-gcd check is a defensive executable guard whose failure is
unreachable under checked irreducibility.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Division in a checked irreducible presentation.
Instances For
Equations
Natural powers by repeated squaring using executable fixed-presentation multiplication.
Equations
Instances For
Equations
Integer powers assembled from executable multiplication and inversion.
Instances For
Equations
Refine a fixed-field generator representative once and evaluate canonical
coordinates on its disc. The checked driver's none fallback retains the
original representative and therefore still returns a sound ball; the
companion proves that branch unreachable and proves the requested radius.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The representative returned by Hex.PolyQuot.approx denotes the input root, so callers
can pass it directly to their next approximation request.