Actual positive-depth Strassen entry #
The first parent stage clears only its current output and materializes the first child.
Original coefficient arrays and older frames are protected by the derived native footprint.
Together with the scalar case, this is an internal stage composed by Strassen.Traversal.
The modular triangle counter still requires its own complete pipeline composition.
theorem Cslib.Algorithms.WordRAM.Strassen.exec_stage_zero {w p k A B a b out scratch frames frame : ℕ} (x : WordRAM.Data 64) (u v : ℕ → ℤ) (hx : NodeHeader p (k + 1) a b out scratch frames frame x) (hc : ChildBuffers p k scratch x) (hl : NodeLayout p (k + 1) a b out scratch frames frame) (hu : ∀ i < 4 ^ (k + 1) * p, (u i).natAbs ≤ A) (hv : ∀ i < 4 ^ (k + 1) * p, (v i).natAbs ≤ B) (hleft : ∀ i < 4 ^ (k + 1) * p, x.mem (a + i) = WordRAM.Signed.encode (u i)) (hright : ∀ i < 4 ^ (k + 1) * p, x.mem (b + i) = WordRAM.Signed.encode (v i)) (hmag : GenericRAM.Signed.Fits w ↑(magnitudeBound p A B (k + 1))) (haddr : WordRAM.Fits (w + 2) (addressBound frames frame (k + 1))) :
∃ (y : WordRAM.Data 64),
WordRAM.ExecWithin (w + 2) (stage 0) x y (68 * (4 ^ k * p) + 54) ∧ NodeReady p k scratch (scratch + 4 ^ k * p) (scratch + 2 * (4 ^ k * p)) (scratch + 3 * (4 ^ k * p)) frames
(frame + 7) y ∧ (∀ j < 4 ^ k * p,
y.mem (scratch + j) = WordRAM.Signed.encode (MatrixMultiplication.Strassen.leftOperand p k u 0 j)) ∧ (∀ j < 4 ^ k * p,
y.mem (scratch + 4 ^ k * p + j) = WordRAM.Signed.encode (MatrixMultiplication.Strassen.rightOperand p k v 0 j)) ∧ (∀ j < 4 ^ (k + 1) * p, y.mem (out + j) = 0) ∧ y.mem (frame + 6) = 1 ∧ ∀ (d : ℕ),
d < out ∨ out + 4 ^ (k + 1) * p ≤ d →
d < scratch ∨ scratch + 2 * (4 ^ k * p) ≤ d → d < frame + 6 ∨ frame + 14 ≤ d → y.mem d = x.mem d
The first real parent stage clears its output and computes both first-child operands. No clean output or preformed child input is required.
theorem Cslib.Algorithms.WordRAM.Strassen.exec_step_entry {w p k A B a b out scratch frames frame : ℕ} (x : WordRAM.Data 64) (u v : ℕ → ℤ) (hx : NodeReady p (k + 1) a b out scratch frames frame x) (hl : NodeLayout p (k + 1) a b out scratch frames frame) (hu : ∀ i < 4 ^ (k + 1) * p, (u i).natAbs ≤ A) (hv : ∀ i < 4 ^ (k + 1) * p, (v i).natAbs ≤ B) (hleft : ∀ i < 4 ^ (k + 1) * p, x.mem (a + i) = WordRAM.Signed.encode (u i)) (hright : ∀ i < 4 ^ (k + 1) * p, x.mem (b + i) = WordRAM.Signed.encode (v i)) (hmag : GenericRAM.Signed.Fits w ↑(magnitudeBound p A B (k + 1))) (haddr : WordRAM.Fits (w + 2) (addressBound frames frame (k + 1))) :
∃ (y : WordRAM.Data 64),
WordRAM.ExecWithin (w + 2) step x y (68 * (4 ^ k * p) + 77) ∧ NodeReady p k scratch (scratch + 4 ^ k * p) (scratch + 2 * (4 ^ k * p)) (scratch + 3 * (4 ^ k * p)) frames
(frame + 7) y ∧ (∀ j < 4 ^ k * p,
y.mem (scratch + j) = WordRAM.Signed.encode (MatrixMultiplication.Strassen.leftOperand p k u 0 j)) ∧ (∀ j < 4 ^ k * p,
y.mem (scratch + 4 ^ k * p + j) = WordRAM.Signed.encode (MatrixMultiplication.Strassen.rightOperand p k v 0 j)) ∧ (∀ j < 4 ^ (k + 1) * p, y.mem (out + j) = 0) ∧ y.mem (frame + 6) = 1 ∧ ∀ (d : ℕ),
d < out ∨ out + 4 ^ (k + 1) * p ≤ d →
d < scratch ∨ scratch + 2 * (4 ^ k * p) ≤ d → d < frame + 6 ∨ frame + 14 ≤ d → y.mem d = x.mem d
The actual first positive-depth controller iteration includes frame loading, depth comparison, computed child pointers, phase dispatch, clearing and both operand loops.