Documentation

Complexity.Algorithms.WordRAM.MatrixMultiplication.Schonhage.Pruned.Ready

Entry and return assertions for the native node induction #

Main definitions #

Main results #

Neither assertion contains execution, time or fit fields. Width and magnitude assumptions are ordinary numerical input bounds, and execution is proved in the existing native semantics.

Entry to one node, as established by the native root scan or a native child push.

  • regs : KernelRegs L f a0 b0 x

    The computed workspace pointers and constant registers.

  • depth_add : d + n = L

    The two tuple lengths agree with the original depth.

  • prefix_lt : p < 10 ^ d

    The leaf prefix is within its already processed digit space.

  • level_eq : x.regs level = d

    The actual cursor points to this frame.

  • mode_eq : x.regs mode = 0

    This node has not begun its entry phase.

  • active_eq : x.regs active = 1

    The traversal is still active.

  • epoch_eq : x.regs epoch = E

    Current actual timestamp generation.

  • frame : { base := f + 4 * d, length := 4 }.Realizes x.mem ![S.card, p, 10 ^ d, 0]

    Four stored words: count, prefix, stride and first term.

  • requests : ScanMemory x.mem (f + 4 * (L + 1) + d * 10 ^ L) (f + 4 * (L + 1) + 2 * (L + 1) * 10 ^ L) E (10 ^ L) (Finset.image (fun (q : MatrixMultiplication.Schonhage.OutStr n) => ↑(queryIndex q)) S)

    The actual list and directory represent exactly the requested numerical codes.

Instances For

    The spatial and mathematical result of one node. This is a postcondition on the actual data, with no execution or time claim embedded in it.

    Instances For

      A ready frame's stored count cannot exceed its actual list row capacity.

      The occupied words of the actual row encode exactly the requested output strings.

      theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.PrunedQuery.NodeReady.exists_of_read {L f a0 b0 n d p E i : ℕ} {S : Finset (MatrixMultiplication.Schonhage.OutStr n)} {x : WordRAM.Data registers} (h : NodeReady L f a0 b0 n d p E S x) (hi : i < S.card) :
      ∃ q ∈ S, ↑(queryIndex q) = x.mem (f + 4 * (L + 1) + d * 10 ^ L + i)

      Every occupied source-list word comes from one of the requested mathematical outputs.

      theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.PrunedQuery.NodeReady.read_lt {L f a0 b0 n d p E i : ℕ} {S : Finset (MatrixMultiplication.Schonhage.OutStr n)} {x : WordRAM.Data registers} (h : NodeReady L f a0 b0 n d p E S x) (hi : i < S.card) :
      x.mem (f + 4 * (L + 1) + d * 10 ^ L + i) < 10 ^ n

      Actual query words fit the remaining query space, not only the original workspace row.

      theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.PrunedQuery.NodeReady.exists_read {L f a0 b0 n d p E : ℕ} {S : Finset (MatrixMultiplication.Schonhage.OutStr n)} {x : WordRAM.Data registers} (h : NodeReady L f a0 b0 n d p E S x) {q : MatrixMultiplication.Schonhage.OutStr n} (hq : q ∈ S) :
      ∃ i < S.card, x.mem (f + 4 * (L + 1) + d * 10 ^ L + i) = ↑(queryIndex q)

      Every requested output occurs at a concrete occupied position of the native list.

      theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.PrunedQuery.NodeReady.injOn_read {L f a0 b0 n d p E : ℕ} {S : Finset (MatrixMultiplication.Schonhage.OutStr n)} {x : WordRAM.Data registers} (h : NodeReady L f a0 b0 n d p E S x) :
      Set.InjOn (fun (i : ℕ) => x.mem (f + 4 * (L + 1) + d * 10 ^ L + i)) {i : ℕ | i < S.card}

      Distinct occupied positions cannot name the same parent query.

      Each strided input address remains inside the original input block below the workspace.

      theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.PrunedQuery.exec_ready_zero {w L f a0 b0 d p E A B : ℕ} (S : Finset (MatrixMultiplication.Schonhage.OutStr 0)) (a b : MatrixMultiplication.Schonhage.Leaf 0 → ℤ) (x : WordRAM.Data registers) (hx : NodeReady L f a0 b0 0 d p E S x) (hleft : ∀ (v : MatrixMultiplication.Schonhage.Leaf 0), x.mem (a0 + p + 10 ^ d * ↑(Encoding.leafIndex v)) = WordRAM.Signed.encode (a v)) (hright : ∀ (v : MatrixMultiplication.Schonhage.Leaf 0), x.mem (b0 + p + 10 ^ d * ↑(Encoding.leafIndex v)) = WordRAM.Signed.encode (b v)) (ha : ∀ (v : MatrixMultiplication.Schonhage.Leaf 0), |a v| ≤ ↑A) (hb : ∀ (v : MatrixMultiplication.Schonhage.Leaf 0), |b v| ≤ ↑B) (hw : 0 < w) (hmag : magnitudeBound L A B < 2 ^ (w - 1)) (hfit : WordRAM.Fits (w + 2) (nodeBudget L f a0 b0 E 0)) :
      ∃ (y : WordRAM.Data registers), NodeResult L f a0 b0 0 d E S a b x y ∧ ∀ (z : WordRAM.Data registers) (U : ℕ), WordRAM.ExecWithin (w + 2) controller y z U → WordRAM.ExecWithin (w + 2) controller x z (traceWeight S + U)

      The terminal node proof obtains its signed fits from the common original magnitude envelope. The same returned memory satisfies the result and the charged native continuation.