x ^ p reduced modulo a monic f, computed by the structurally recursive
binary modular exponentiation so the kernel can replay it in logarithmically
many modular multiplications.
Equations
- Hex.Conway.frobeniusBase f hmonic = Hex.Conway.powMod Hex.FpPoly.X f hmonic p
Instances For
Apply the Frobenius g ↦ g ^ p to a residue k times, as k modular
compositions with xp = x ^ p mod f.
Composition rather than exponentiation is the point: g(x) ^ p = g(x ^ p) in
characteristic p, so one Frobenius step costs a Horner walk over g's
coefficients instead of p modular multiplications.
Equations
- Hex.Conway.frobeniusIter f xp hmonic 0 x✝ = x✝
- Hex.Conway.frobeniusIter f xp hmonic k.succ x✝ = Hex.Conway.frobeniusIter f xp hmonic k (Hex.Conway.compose x✝ xp f hmonic)
Instances For
The norm accumulator: multiply together k successive p^m-th powers of
the residue of x, reducing modulo f at each step.
cur is α ^ (p ^ (i m)) on entry to the i-th step, and advances by m
Frobenius applications.
Equations
- Hex.Conway.normAux f xp hmonic m 0 x✝¹ x✝ = x✝¹
- Hex.Conway.normAux f xp hmonic m k.succ x✝¹ x✝ = Hex.Conway.normAux f xp hmonic m k (f.modByMonic (x✝¹ * x✝) hmonic) (Hex.Conway.frobeniusIter f xp hmonic m x✝)
Instances For
The norm N_{F_{p^n} / F_{p^m}}(α) of the residue α of x, as a reduced
representative modulo f.
f is the degree-n modulus and m divides n; k = n / m is passed
explicitly so that the recursion is structural.
Equations
- Hex.Conway.normX f hmonic m k = Hex.Conway.normAux f (Hex.Conway.frobeniusBase f hmonic) hmonic m k 1 Hex.FpPoly.X
Instances For
The exponent 1 + q + ⋯ + q^(k-1), in a structural-recursion spelling
that follows the norm accumulator.
Equations
- Hex.Conway.normExponent q 0 = 0
- Hex.Conway.normExponent q k.succ = 1 + q * Hex.Conway.normExponent q k
Instances For
The executable Frobenius base represents the p-th power of the quotient
indeterminate.
Iterating executable modular composition k times represents raising a
quotient element to p^k.
The norm accumulator represents its initial accumulator multiplied by the geometric sequence of Frobenius powers of its initial current value.
The quotient class of normX is the geometric-sum power of the quotient
indeterminate.
The Tier 2 compatibility check for a committed pair of entries: is the norm
of α down to the degree-m subfield a root of C(p, m)?
fm is the smaller modulus, fn the larger, and k = n / m. Evaluating fm
at the norm is exactly a modular composition.
Equations
- Hex.Conway.compatCheck fm fn hmonic m k = (Hex.Conway.compose fm (Hex.Conway.normX fn hmonic m k) fn hmonic == 0)
Instances For
Compatibility of two committed Conway entries across the subfield lattice.
Compatible p m n says that the residue of x in F_p[x] / (C(p, n)), raised
to the power (p^n - 1) / (p^m - 1), is a root of C(p, m). Phrased through
Hex.Conway.compatCheck, which computes that power as a product of
Frobenius images rather than as a modular exponentiation, so the statement is
decide-able for the committed entries.
The hypothesis m ∣ n is carried rather than derived: the quotient n / m is
what the check recurses on, and outside the divisor case it would not be the
right number of factors.
Equations
- Hex.Conway.Compatible p m n hm hn = (Hex.Conway.compatCheck (Hex.Conway.conwayPoly p m hm) (Hex.Conway.conwayPoly p n hn) ⋯ m (n / m) = true)
Instances For
The committed modulus has positive degree, in the degree?.getD spelling
the quotient type is indexed by. conwayPoly_nonconstant says the same thing
through FpPoly.degree; the two are definitionally equal, but instance search
on Quotient wants this shape.
The generator of the canonical degree-m subfield of
F_p[x] / (C(p, n)), as an element of the quotient rather than as a
representative: the class of the norm of x.
Equations
- Hex.Conway.subfieldGen p m n hn = Hex.FpPoly.Quotient.reduce (Hex.Conway.normX (Hex.Conway.conwayPoly p n hn) ⋯ m (n / m))
Instances For
The canonical subfield generator is the field norm of the ambient Conway generator.
The positivity assumption excludes the meaningless degree-zero denominator;
divisibility identifies p ^ (m * (n / m)) with p ^ n.
The subfield generator is a root of the smaller Conway polynomial.
This is compatibility as a statement about field elements: evaluating
C(p, m) at Hex.Conway.subfieldGen in F_p[x] / (C(p, n)) gives zero.
The Bool-valued Hex.Conway.Compatible is the computation; this is
what the computation establishes, and it is the well-definedness input a
subfield embedding needs.
The explicit finite-field norm power is a root of the smaller Conway polynomial.