Native matrix-building loop for Convolution-3SUM #
This is a fixed native word-RAM program for one tripartite instance. Its parameters are supplied in registers. Every row/column calculation, index calculation, guarded input read, store and loop instruction is charged. The three matrices follow the input in disjoint blocks.
The construction directly adapts Anthropic's convFillBody and its prefix invariant at
formal-math@16a5ce4.
The graph builder does not invoke an Exact Triangle solver.
Main definitions #
Fill.body: one matrix cell and the loop-counter increment.Fill.program: initialize counters and fill all three matrices.
Main results #
Fill.exec: the complete matrix builder with charged time and memory correctness.
References #
Register holding the number of cells in each matrix.
Instances For
Loop increment.
Instances For
Write all three weights at the current cell and advance the counter.
Instances For
Initialize the counter and matrix area, then write each row-major cell.
Instances For
Fill three disjoint matrices within 131t² + 5 native instructions, excluding the halt.
All matrix addresses and the one-past-end addresses fit target words. The signed index bound
and both signs of the filler fit the source width. The program keeps its input and parameters.