Native box-table input adaptation #
The actual header loads, reused power code and pointer arithmetic locate the original two leaf arrays and the first writable word. No array or workspace is copied or cleared.
theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxTable.exec_inputHeaders {w L m t : ℕ} (x : WordRAM.Data registers) (hL : x.mem 1 = L) (hm : x.mem 2 = m) (ht : x.mem 3 = t) (hfit : WordRAM.Fits w 3) :
∃ (y : WordRAM.Data registers),
WordRAM.ExecWithin w inputHeaders x y 6 ∧ y.regs Reg.levels = L ∧ y.regs Reg.inner = m ∧ y.regs Reg.threshold = t ∧ y.mem = x.mem
Actual scalar header loads with unchanged memory.
theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxTable.exec_loadInput {w L m t : ℕ} (x : WordRAM.Data registers) (hL : x.mem 1 = L) (hm : x.mem 2 = m) (ht : x.mem 3 = t) (hfit : WordRAM.Fits w (2 * 10 ^ L + L + 12)) :
∃ (y : WordRAM.Data registers),
WordRAM.ExecWithin w loadInput x y (4 * L + 19) ∧ y.regs Reg.levels = L ∧ y.regs Reg.inner = m ∧ y.regs Reg.threshold = t ∧ y.regs Reg.arrayA = 4 ∧ y.regs Reg.arrayB = 4 + 10 ^ L ∧ y.regs Reg.directory = directoryBase L ∧ y.mem = x.mem
Complete native initialization from the three actual input header words.