Documentation

Complexity.Algorithms.WordRAM.ThreeSum.Host.Caller

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 #

Main results #

These native ABI composition proofs are original.

@[reducible, inline]

Saved caller input pointer; the existing layout and square-root banks do not change it.

Instances For

    Adapt the existing adjacent-block layout to the caller's chosen matrix start.

    Instances For

      Restore the actual source pointer after computing the caller's matrix layout.

      Instances For

        Initialize from actual register arguments, without touching any memory cell.

        Instances For
          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)) :
          ∃ (y : WordRAM.Data 64), WordRAM.ExecWithin w prepareAt x y (5 * N.sqrt + 24) ∧ ParametersAt N U src workspace y ∧ y.regs inst = 0 ∧ y.regs found = 0 ∧ y.mem = x.mem

          Every source/layout operation is charged. The source and all other caller memory are kept.