Charged native Strassen scalar leaves #
The leaf transition copies real controller arguments into the low helper bank, executes the actual cyclic kernel, and returns through the actual explicit stack. Its numerical premises concern only original coefficient envelopes, pointers and the current frame. This internal composition API assumes no product answer, run or cost certificate.
theorem Cslib.Algorithms.WordRAM.Strassen.exec_leaf {w p A B : ℕ} (x : WordRAM.Data 64) (u v : ℕ → ℤ) (hlen : x.regs Reg.modulus = p) (hbound : GenericRAM.Signed.Fits w ↑(CyclicConvolution.magnitudeBound p A B)) (hu : ∀ i < p, (u i).natAbs ≤ A) (hv : ∀ i < p, (v i).natAbs ≤ B) (hA : ∀ i < p, x.mem (x.regs Reg.inputA + i) = WordRAM.Signed.encode (u i)) (hB : ∀ i < p, x.mem (x.regs Reg.inputB + i) = WordRAM.Signed.encode (v i)) (h2p : WordRAM.Fits (w + 2) (2 * p)) (ha : WordRAM.Fits (w + 2) (x.regs Reg.inputA + p)) (hb : WordRAM.Fits (w + 2) (x.regs Reg.inputB + p)) (hout : WordRAM.Fits (w + 2) (x.regs Reg.output + p)) (hdisjA : x.regs Reg.inputA + p ≤ x.regs Reg.output ∨ x.regs Reg.output + p ≤ x.regs Reg.inputA) (hdisjB : x.regs Reg.inputB + p ≤ x.regs Reg.output ∨ x.regs Reg.output + p ≤ x.regs Reg.inputB) (h7 : x.regs Reg.frameWidth = 7) (hf : WordRAM.Fits (w + 2) (x.regs Reg.frame)) :
∃ (y : WordRAM.Data 64),
WordRAM.ExecWithin (w + 2) leaf x y (42 * p * p + 9 * p + 11) ∧ (∀ r < p, y.mem (x.regs Reg.output + r) = WordRAM.Signed.encode (CyclicIntRing.convolution p u v r)) ∧ (∀ (a : ℕ), a < x.regs Reg.output ∨ x.regs Reg.output + p ≤ a → y.mem a = x.mem a) ∧ (y.regs Reg.frame = if x.regs Reg.frames < x.regs Reg.frame then x.regs Reg.frame - 7 else x.regs Reg.frame) ∧ (y.regs Reg.active = if x.regs Reg.frames < x.regs Reg.frame then x.regs Reg.active else 0) ∧ ∀ (i : Fin 64), 32 ≤ ↑i → i ≠ Reg.frame → i ≠ Reg.active → y.regs i = x.regs i
A scalar leaf, including four argument copies, all coefficient operations, and return. Both input arrays are preserved. The frame and active flag implement the real parent return.