Caller-owned Convolution-3SUM input and workspace #
The caller supplies raw length, magnitude, input pointer and matrix-workspace pointer in the existing host registers. Initialization reuses the existing square-root and layout code without reading header zero. The input pointer is restored before the unchanged instance loop runs.
Main definitions #
prepareAt: prepare the actual caller-owned source and matrix blocks.
Main results #
exec_prepare_at: charged setup with exact parameters and a complete memory frame.
These native ABI composition proofs are original.
@[reducible, inline]
Saved caller input pointer; the existing layout and square-root banks do not change it.
Adapt the existing adjacent-block layout to the caller's chosen matrix start.
Restore the actual source pointer after computing the caller's matrix layout.
Initialize from actual register arguments, without touching any memory cell.
theorem Cslib.Algorithms.WordRAM.ThreeSum.Host.exec_prepare_at {w N U src workspace : ℕ} (x : WordRAM.Data 64) (hN : x.regs len = N) (hU : x.regs upper = U) (hb : x.regs base = src) (hab : x.regs matAB = workspace) (hbelow : src + N ≤ workspace) (hsize : WordRAM.Fits w (workspace + 3 * (sideLength N * sideLength N))) (hfill : WordRAM.Fits w (4 * U + 2)) (hsqrt : WordRAM.Fits w (4 * N + 4)) :
Every source/layout operation is charged. The source and all other caller memory are kept.