Memory layout of the Convolution-3SUM graph builder #
The three matrices occupy disjoint row-major blocks following the input. This directly adapts
the memory invariant of Anthropic's ConvFill.Args.filled at
formal-math@16a5ce4.
Values use the native signed encoding; addresses are natural numbers.
Main definitions #
Fill.Args: layout and values of one tripartite instance.Fill.Args.filled: the memory after writing a prefix of each matrix.
Main results #
Fill.Args.filled_ab,Fill.Args.filled_bc,Fill.Args.filled_ac: reading a cell of each matrix prefix.Fill.Args.filled_succ: one round consists of exactly three writes.Fill.Args.input_filled: matrix writes preserve the input.Fill.Args.matrices_filled: the completed memory contains the mathematical reduction.
References #
Input length, matrix side and instance number, input base and three matrix bases, input values, and the filler. The bounds and disjointness assumptions belong to the execution theorem.
The encoded AB weight in row-major cell q.
The encoded BC weight; a negative index is rejected before reading the input.
The encoded AC weight; invalid entries retain the positive filler.
theorem Cslib.Algorithms.WordRAM.ThreeSum.Fill.Args.matrices_filled (A : Args) (mem : ℕ → ℕ) (hbc : A.ab + A.t * A.t ≤ A.bc) (hac : A.bc + A.t * A.t ≤ A.ac) (a b c : Fin A.t) :
A.filled mem (A.t * A.t) (A.ab + ↑a * A.t + ↑b) = WordRAM.Signed.encode (ThreeSum.weightAB A.N A.values A.filler a b) ∧ A.filled mem (A.t * A.t) (A.bc + ↑b * A.t + ↑c) = WordRAM.Signed.encode (ThreeSum.weightBC A.N A.s A.values A.filler b c) ∧ A.filled mem (A.t * A.t) (A.ac + ↑a * A.t + ↑c) = WordRAM.Signed.encode (ThreeSum.weightAC A.N A.s A.values A.filler a c)
The fully written blocks contain the three matrices of the mathematical reduction.