Documentation

CslibFrontier.Algorithms.WordRAM.MatrixMultiplication.Strassen.Dispatch

Charged native Strassen phase dispatch #

This internal proof follows every actual comparison and tag constant in the fixed branch chain. The selected stage executes ordinary native code; no uncharged table dispatch is introduced. Positive branches cost one instruction, negative branches two.

Comparisons and tag constants executed before the selected real stage.

The tag value actually assigned by the branch chain before entering a stage.

theorem Cslib.Algorithms.WordRAM.Strassen.dispatchState_regs (phase : Fin 8) (x : WordRAM.Data 64) (i : Fin 64) (hi : i ≠ Reg.tag) :
(dispatchState phase x).regs i = x.regs i

The dispatch prefix only writes the tag register.

Comparisons and tag constants never change memory.

theorem Cslib.Algorithms.WordRAM.Strassen.exec_dispatch {w T : ℕ} (phase : Fin 8) (x y : WordRAM.Data 64) (hzero : x.regs Reg.zero = 0) (hphase : x.regs Reg.phase = ↑phase) (hfit : WordRAM.Fits w 6) (hstage : WordRAM.ExecWithin w (stage phase) (dispatchState phase x) y T) :

Follow the actual phase chain, charging every failed comparison and tag assignment. The stage premise is an internal composition step, discharged by the native stage lemmas.