Documentation

Complexity.Algorithms.WordRAM.MatrixMultiplication.Schonhage.Pruned.LeafStep

The terminal case of the actual pruned-query controller #

Main results #

These use the existing native ExecWithin semantics throughout. The continuation is a conclusion of the execution proof, rather than a hypothesis supplying a solver or its cost.

Registers written by frame loading and a terminal controller phase.

Instances For
    theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.PrunedQuery.exec_leafStep {w p : ℕ} {a b : ℤ} (ha : GenericRAM.Signed.Fits w a) (hb : GenericRAM.Signed.Fits w b) (hab : GenericRAM.Signed.Fits w (a * b)) (x : WordRAM.Data registers) (h0 : x.regs nil = 0) (h1 : x.regs one = 1) (h4 : x.regs frameWidth = 4) (hm : x.regs mode = 0) (hd : x.regs level = x.regs inputDepth) (hpref : x.mem (x.regs frames + 4 * x.regs level + 1) = p) (hleft : x.mem (x.regs arrayA + p) = WordRAM.Signed.encode a) (hright : x.mem (x.regs arrayB + p) = WordRAM.Signed.encode b) (hw : WordRAM.Fits (w + 2) (x.regs frames + 4 * (x.regs level + 1) + x.regs lists + x.regs values + (x.regs level + 1) * x.regs span + x.regs level + x.regs arrayA + p + x.regs arrayB + p + 12)) :

    The actual controller reads its frame and takes both real entry/leaf comparisons. The only possible store is the requested product at this depth's value-row base.

    theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.PrunedQuery.exec_controller_leaf {w p : ℕ} {a b : ℤ} (ha : GenericRAM.Signed.Fits w a) (hb : GenericRAM.Signed.Fits w b) (hab : GenericRAM.Signed.Fits w (a * b)) (x : WordRAM.Data registers) (h0 : x.regs nil = 0) (h1 : x.regs one = 1) (h4 : x.regs frameWidth = 4) (hm : x.regs mode = 0) (hd : x.regs level = x.regs inputDepth) (hactive : x.regs active = 1) (hpref : x.mem (x.regs frames + 4 * x.regs level + 1) = p) (hleft : x.mem (x.regs arrayA + p) = WordRAM.Signed.encode a) (hright : x.mem (x.regs arrayB + p) = WordRAM.Signed.encode b) (hw : WordRAM.Fits (w + 2) (x.regs frames + 4 * (x.regs level + 1) + x.regs lists + x.regs values + (x.regs level + 1) * x.regs span + x.regs level + x.regs arrayA + p + x.regs arrayB + p + 12)) :

    A terminal node is one actual iteration of the existing native loop. Its 43 body instructions plus the two loop instructions are charged before any continuation.