Integer coefficient addition with the same zero-extending shape as the modular convolution reference.
Equations
- Hex.ZMod64.Ntt.intAddCoeffs [] x✝ = x✝
- Hex.ZMod64.Ntt.intAddCoeffs x✝ [] = x✝
- Hex.ZMod64.Ntt.intAddCoeffs (x_2 :: xs) (y :: ys) = (x_2 + y) :: Hex.ZMod64.Ntt.intAddCoeffs xs ys
Instances For
Ordinary low-to-high integer schoolbook convolution. This is the coefficient target reconstructed from auxiliary-prime transforms.
Equations
Instances For
Zero-pad an integer coefficient list to a requested capacity.
Equations
- Hex.ZMod64.Ntt.intPadTo n coefficients = coefficients ++ List.replicate (n - coefficients.length) 0
Instances For
Reducing an integer convolution modulo p coefficientwise gives the
modular convolution of the reduced inputs.
One fixed auxiliary prime and its maximal radix-two root.
- modulus : Nat
Prime modulus, always below
2^31. Word-arithmetic bounds for the modulus.
- prime : PrimeModulus self.modulus
Kernel-checked primality evidence.
- maxLog : Nat
Maximum supported transform exponent.
The maximal power-of-two length divides the unit-group order.
Primitive root of order
2^maxLog.- root_order : self.root.ExactOrder (2 ^ self.maxLog)
The stored root has exact maximal power-of-two order.
Instances For
Build a reusable plan when n is a supported power-of-two length. A
capacity miss or failed validation is normal control flow.
Equations
Instances For
The root derived for an in-capacity power-of-two length has exact order
n.
Run ordinary convolution at one catalogue prime and erase the dependent modular coefficient type to canonical integer residues.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A successful erased transform is the padded integer convolution reduced coefficientwise to canonical representatives at this catalogue prime.
The finite auxiliary-prime catalogue, ordered by modulus.
Equations
- One or more equations did not get rendered due to their size.