Documentation

CslibFrontier.Algorithms.WordRAM.MatrixMultiplication.Strassen.Quadrant

Charged quadrant-pointer computation #

The controller's matrix-pointer fields are in the high bank, and the computed helper arguments are in the low bank. The static quadrant number selects finite code; its runtime offset multiplication and address addition are ordinary charged instructions.

theorem Cslib.Algorithms.WordRAM.Strassen.exec_quadrant {w t : ℕ} (base dst : Fin 64) (x : WordRAM.Data 64) (hbt : base ≠ Reg.temporary) (ht : t < 4) (hw : WordRAM.Fits w (x.regs base + 4 * x.regs Reg.quarter + 4)) :
∃ (y : WordRAM.Data 64), WordRAM.ExecWithin w (quadrant base dst t) x y 3 ∧ y.mem = x.mem ∧ y.regs dst = x.regs base + t * x.regs Reg.quarter ∧ ∀ (i : Fin 64), i ≠ dst → i ≠ Reg.temporary → y.regs i = x.regs i

Compute one of the four actual contiguous-quadrant pointers, preserving memory and every register except the chosen low argument and the offset temporary.