Documentation

CslibFrontier.Algorithms.WordRAM.MatrixMultiplication.Strassen.CopyForm

Actual single-quadrant Strassen operand forms #

The zero-sign form is a real call to the existing copying loop, not a pointer or layout oracle. Both disjoint address orders are admitted. The source is one of the current matrix quarters and the destination is the actual caller-provided child operand buffer. These are internal stage interfaces for composing the full explicit-stack proof.

theorem Cslib.Algorithms.WordRAM.Strassen.exec_copyForm {w q t : ℕ} (base dst : Fin 64) (x : WordRAM.Data 64) (hd : 32 ≤ ↑dst) (hbt : base ≠ Reg.temporary) (hdt : dst ≠ Reg.temporary) (hq : x.regs Reg.quarter = q) (ht : t < 4) (hw : WordRAM.Fits w (x.regs base + 4 * q + x.regs dst + q + 8)) (hsep : x.regs base + 4 * q ≤ x.regs dst ∨ x.regs dst + q ≤ x.regs base) :
∃ (y : WordRAM.Data 64), WordRAM.ExecWithin w (form base dst t 0 0) x y (7 * q + 9) ∧ (∀ j < q, y.mem (x.regs dst + j) = x.mem (x.regs base + t * q + j)) ∧ (∀ (a : ℕ), a < x.regs dst ∨ x.regs dst + q ≤ a → y.mem a = x.mem a) ∧ ∀ (i : Fin 64), 32 ≤ ↑i → i ≠ Reg.temporary → y.regs i = x.regs i

Copy one real quadrant, including its computed source pointer, argument setup and every native copy-loop instruction. All high controller fields except the offset temporary survive.