Coefficient cast of an executable integer polynomial into ZMod m.toNat[X].
Equations
Instances For
Coefficient cast of an executable WordMod polynomial into ZMod m.toNat[X].
Equations
Instances For
Coefficient rule for the integer-polynomial cast cZ.
Coefficient rule for the WordMod-polynomial cast cW.
cW is multiplicative.
cW is additive.
Canonical-representative uniqueness: two integer polynomials with all
coefficients in [0, m) that are congruent mod m coefficientwise are equal.
Monic division commutes with a coefficient ring hom, in the target T[X]:
the mapped executable quotient is the Mathlib monic-division quotient of the
mapped inputs. Uniqueness (div_modByMonic_unique) does the work; the caller
supplies the transported monic/degree facts.
The canonical natural representative intModNat casts back to the original
residue in ZMod M.
The word-mapped executable image toW = ofNat ∘ intModNat.
Equations
- HexBerlekampZassenhausMathlib.toWMap ctx x = Hex.DensePoly.ofCoeffs (Array.map (fun (c : ℤ) => Hex.WordMod.ofNat (Hex.ZPoly.intModNat c m.toNat)) (Hex.DensePoly.toArray x))
Instances For
The ZMod cast commutes with the executable derivative.
The ZMod cast of a word-modular polynomial commutes with the executable
derivative.
A successful powLtWordAux run computes acc * p ^ n.
A successful powLtWordAux run stays below the word bound.
A successful powLtWord? guard certifies both the power value and the word
bound.
Executable degree comparison transports to Mathlib degree comparison.
The natural representative of an integer residue is below a positive modulus.
Word-sized and arbitrary-precision logarithmic-derivative quotients agree when the modulus fits.
The word-sized selection in cldQuotientMod agrees with the bignum reference
cldQuotientModBignum for every input: the guard exactly matches the hypotheses
of cldQuotientModWord?_eq, so on the fast path the word quotient is byte-identical
and Option.getD returns it; off the fast path the bignum branch is taken.