Documentation

CslibFrontier.Algorithms.WordRAM.ExactTriangle.CallableFixedPrime.Adapt

Complete original-array adaptation and actual word accumulation #

All three real copy calls operate only on original squares. Their sum and memory effects are composed without a clean destination, a supplied list of words or a layout certificate. The implementation interfaces here retain numerical fits; the complete caller derives them from original input bounds and the computed virtual-window threshold.

Original raw-word sum computed while copying the three source squares.

theorem Cslib.Algorithms.WordRAM.ExactTriangle.CallableFixedPrime.matrixWordSum_eq_rawTotal {n ab bc ac : ℕ} (mem : ℕ → ℕ) (values : List ℤ) (vab : ∀ q < n * n, mem (ab + q) = WordRAM.Signed.encode (values.getD q 0)) (vbc : ∀ q < n * n, mem (bc + q) = WordRAM.Signed.encode (values.getD (n * n + q) 0)) (vac : ∀ q < n * n, mem (ac + q) = WordRAM.Signed.encode (values.getD (2 * (n * n) + q) 0)) :
matrixWordSum mem n ab bc ac = rawTotal n values

Original canonical source words identify the actual native sum with the original list sum used by source-width admission. No additional matrix traversal is performed.

Actual stores/copies and their complete linear charge. The three sources may alias each other, but precede workspace. Only original source/end/sum quantities occur in the fits.