Radix-4 forward butterfly #
ntt_roots_correct, the radix2Pass correctness lemmas, and the forward radix-4 butterfly
(butterfly4_forward_*) culminating in butterfly4_forward_ZMod_combined. Split out of the
former SolutionHelpers.lean.
A root table is correct for an m-point NTT when every entry at index len/2 + j
holds the twiddle factor ω_{len}^j in the Montgomery domain (multiplied by R),
where ω_{len} = primRoot ^ ((mod64 - 1) / len) is a primitive len-th root of unity
and R = montR1 = 2^32 mod mod64.
Equations
- One or more equations did not get rendered due to their size.
Instances For
ensureRoots m produces a correct NTT root table for an m-point NTT.
butterfly4 only modifies the four butterfly positions; all other positions are unchanged.
radix4Inner leaves position hi unchanged if it is not any of the four butterfly
positions for any j2 in the processed range [j2_start, j2_start + k).
radix4Middle leaves position hi unchanged if it is not any butterfly position for
any group b in [b_start, b_start + k) and any j2 < s.