Native lookup in the computed compact box table #
The real code scans the original cube digits and reads its computed directory rank and signed table word. The caller supplies ordinary memory readback, as obtained from the native catalogue and value constructors. All scan and address arithmetic is charged; the lookup preserves all memory and registers outside its documented scalar workspace.
def Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxTable.LookupWholeLocal (i : Fin registers) :
The complete scalar workspace modified by native lookup, including returned fields.
Instances For
@[instance_reducible]
theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxTable.exec_lookup {w L m t C D V : ℕ} (x : WordRAM.Data registers) (π : MatrixMultiplication.Schonhage.Cube L) (a b : MatrixMultiplication.Schonhage.Leaf L → ℤ) (hπ : MatrixMultiplication.Schonhage.IsBox m t π) (hL : x.regs Reg.levels = L) (hH : x.regs Reg.height = m - t) (hT : x.regs Reg.span = 10 ^ L) (hC : x.regs Reg.cube = C) (hD : x.regs Reg.directory = D) (hV : x.regs Reg.values = V) (hread : ∀ i < L, x.mem (C + i) = rawCubeDigit π i) (hdir : ∀ s < (m - t + 1) * 10 ^ L, x.mem (D + s) = directoryWord L (m - t) s) (hvalues :
∀ s < (m - t + 1) * 10 ^ L,
Eligible L (m - t) s → x.mem (V + Nat.count (Eligible L (m - t)) s) = WordRAM.Signed.encode (slotValue a b s)) (hfit : WordRAM.Fits w (C + D + V + (m - t + 1) * 10 ^ L + 10 ^ L + L + 30)) :
∃ (y : WordRAM.Data registers),
WordRAM.ExecWithin w lookup x y (18 * L + 32) ∧ y.mem = x.mem ∧ y.regs Reg.found = 1 ∧ y.regs Reg.answer = WordRAM.Signed.encode (MatrixMultiplication.Schonhage.boxValue a b π.starLevels.card π) ∧ ∀ (i : Fin registers), ¬LookupWholeLocal i → y.regs i = x.regs i
Read the genuine signed word at a valid box's computed compact rank.