Documentation

CslibFrontier.Algorithms.WordRAM.MatrixMultiplication.Strassen.Frame

Actual seven-word Strassen stack access #

The frame lemmas read and write actual memory via Cslib.WordRAM.storeRecord and Cslib.WordRAM.loadRecord. They expose only internal composition APIs for the native controller proof; a caller does not supply a frame layout or execution oracle.

The fixed order of the seven register fields stored in an explicit frame.

theorem Cslib.Algorithms.WordRAM.Strassen.exec_storeFrame {w : ℕ} (x : WordRAM.Data 64) (h1 : x.regs Reg.one = 1) (hfit : WordRAM.Fits w (x.regs Reg.frame + 7)) :
∃ (y : WordRAM.Data 64), WordRAM.ExecWithin w storeFrame x y 14 ∧ (∀ (j : Fin 7), y.mem (x.regs Reg.frame + ↑j) = x.regs (field j)) ∧ (∀ (a : ℕ), a < x.regs Reg.frame ∨ x.regs Reg.frame + 7 ≤ a → y.mem a = x.mem a) ∧ ∀ (i : Fin 64), i ≠ Reg.address → y.regs i = x.regs i

Store every current field, charge all seven stores and all seven address instructions, and preserve memory outside exactly this frame.

Registers loaded by the actual frame-read block, including its address temporary.

Instances For
    theorem Cslib.Algorithms.WordRAM.Strassen.exec_loadFrame {w : ℕ} (x : WordRAM.Data 64) (h1 : x.regs Reg.one = 1) (hfit : WordRAM.Fits w (x.regs Reg.frame + 7)) :
    ∃ (y : WordRAM.Data 64), WordRAM.ExecWithin w loadFrame x y 14 ∧ y.mem = x.mem ∧ (∀ (j : Fin 7), y.regs (field j) = x.mem (x.regs Reg.frame + ↑j)) ∧ ∀ (i : Fin 64), ¬LoadLocal i → y.regs i = x.regs i

    Read every field from the actual current frame in fourteen instructions, without stores.

    theorem Cslib.Algorithms.WordRAM.Strassen.exec_loadCurrent {w : ℕ} (x : WordRAM.Data 64) (h1 : x.regs Reg.one = 1) (hfit : WordRAM.Fits w (x.regs Reg.frame + 7)) (hframe : ∀ (j : Fin 7), x.mem (x.regs Reg.frame + ↑j) = x.regs (field j)) :
    ∃ (y : WordRAM.Data 64), WordRAM.ExecWithin w loadFrame x y 14 ∧ y.mem = x.mem ∧ ∀ (i : Fin 64), i ≠ Reg.address → y.regs i = x.regs i

    Loading a frame just stored by the controller restores the same current parameters. This assertion is produced by native setup/push and maintained by the node proof.