Correct evaluation of runtime coefficient blocks #
For every nonzero binary modulus, the evaluator computes
sum_{j<count} ofBits(block j) * ofBits(seed)^j modulo that modulus.
The coefficient blocks are consecutive low-to-high slices of one flat bit
string. Short or absent blocks contribute implicit high zeros. Width zero,
count zero, padded inputs, and constant-one moduli are covered.
The Horner fold runs from high coefficient indices to low indices, retaining
exactly the modulus degree in bits. Its partial-fold theorem explicitly
requires the remaining count length to be at most the total count. A zero
modulus returns the empty list. The machine certificate is in
Complexitylib.Classes.P.BitPolynomial.BlockEval.
A coefficient slice never exceeds its requested width.
Each guarded Horner step restores the modulus-degree width.
A Horner step adds the next coefficient to the seed times the prior state.
A partial fold evaluates the highest requested blocks, starting at exponent zero.
The full fold equals the coefficient-block power sum modulo the runtime modulus.
The codec supplies all five runtime inputs, with width given by its word length.