Packed interpolation using same-input table calls #
The assignment loop of interpolateGrid is a query-machine caller. Its state contains the
parameters, one assignment index and one modular accumulator. Each iteration requests a table
entry from a subroutine on the same original input, then adds its weighted contribution.
The table is never materialized. An explicit context carries the address of the gate or output
chunk needed by the supplier; no tree or truth table is built into this construction.
The supplied loop limit must equal s^n for the interpolation theorem. Computing that limit and
the native costs of supplier initialization, its computation and extracting its answer are
separate charged operations. The callee returns a state, not its output stream.
Supplier context, modulus, alphabet size, coordinate count, point and assignment limit:
(context, (modulus, alphabet, coords), point, limit).
Parameters, the current assignment index and the sum accumulator:
(params, counter, acc).
The fixed interpolation parameters of a caller state.
The current assignment index of a caller state.
The running modular sum accumulator of a caller state.
The fixed parameters with fresh assignment and sum counters.
The controller only advances when its table subroutine returns.
The complete assignment loop and its same-original-input table subroutine.
One table call implements one sum iteration, with one entry and one return step.
Every finite prefix of the assignment loop is realized by finitely many same-input calls. The supplier contract is required at each actual requested state, including the current sum.
With the full grid limit, the same-input caller returns the existing streamed interpolation. Its final accumulator, rather than the deliberately empty output stream, is the result.
A table supplier with the explicit same-input contract realizes the actual packed gate extension used by the iterative evaluator, rather than a separate interpolation specification.