The pass (round six, `pass_runs`)
ProvedJ6Seg.Slab.pass_runsThe pass.
The following holds (Lean statement, in the scope of module Solutions.J6SegILSlab4):
theorem J6Seg.Slab.pass_runs (H : UnitsOK (I := I) (iprog := iprog) lin OkU OkA KG g dr rd it bk cdr crd cit cbk)
(s : IState HS) (G : Fin HS → List ℤ) (hK : ∀ C CU OP ARG ACC, KG (skS G C CU OP ARG ACC)) (hA : G lA = []) (hC : G lC = []) (hD : G lD = [])
{m : ℕ} {LM : List ℤ} (hM : G rM = (m : ℤ) :: LM) (cs : List (ℤ × ℤ)) {LN : List ℤ}
(hN : G rNC = (cs.length : ℤ) :: LN) {Ba : ℕ} (hcs : CmdsOK OkA Ba cs) (n : ℕ)
(hV : VC n cs 0) (hND : nDrop cs = n) (pre : ℕ) {LB : List ℤ}
(hB : G rNB = (pre : ℤ) :: LB) (xs : List U) (hxs : xs.length = pre * (n * m))
(hok : ∀ u ∈ xs, OkU u) {LT : List ℤ}
(hT : G rTOT = ((passOut m g cs n pre xs).length : ℤ) :: LT) {Bo : ℕ}
(hBo : ∀ y ∈ passOut m g cs n pre xs, zsz y ≤ Bo) (RC CU OP ARG : List ℤ) :
IRuns I iprog (J6Seg.Slab.passP dr rd it bk)
(encK s (lin xs [] (skS G (flatC cs ++ RC) CU OP ARG [])))
(encK s (skS (update G 0 (passOut m g cs n pre xs ++ G 0)) (flatC cs ++ RC) CU OP ARG []))
(passC pre cs.length m Ba (cdr + crd + cit + cbk) (passOut m g cs n pre xs).length Bo)
Context. B-line IL, B1 (streaming slab pass) §4: the whole pass (generic lanes)
passP = rptX rNB blockP; rptX rTOT (mv rACC 0): the blocks, then the output (collected
reversed on rACC) is moved onto stack 0. pass_runs: from the lane state with the input
xs (pre blocks of n slabs of m units) the output passOut … ++ G 0 lands on stack 0; all
skeleton registers are restored (rACC empty again). passOut_eq: for the control list
ctlOf n n' src argOf of a monotone source, passOut is slabPass (block form).
Formalization Note. Part of the Lean formalization of the round-six κ-improvement (integer-multiplication-kappa campaign, target IntMul.Kappa.jain_round6_framework). The statement is copied verbatim from the Lean development; the platform node carries the same declaration name. Definitions it mentions live in the IntMul_Kappa_R6_Defs* bundles (on top of the published κ bundles IntMul_Kappa_K_Defs*).
-- Round-six κ development (integer-multiplication-kappa), generated by skeleton subtraction.
import Definitions.Def_IntMul_Kappa_R6_Defs64
set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 1000000
open J6Seg J6Seg.Slab
set_option maxRecDepth 20000
open IntMul NLogN NLogN.KIL Function
open NLogN.KFUU (lA lC lD)
open NLogN.KFT (cf3 rptX)
variable {U : Type*} {P : ℕ} {I : List Sym} {iprog : Fin P → IStmt HS P}
{lin : List U → List U → (Fin HS → List ℤ) → (Fin HS → List ℤ)} {OkU : U → Prop}
{OkA : ℤ → Prop} {KG : (Fin HS → List ℤ) → Prop} {g : ℤ → U → ℤ} {dr rd it bk : IStmt HS P}
{cdr crd cit cbk : ℕ}
theorem J6Seg.Slab.pass_runs (H : UnitsOK (I := I) (iprog := iprog) lin OkU OkA KG g dr rd it bk cdr crd cit cbk)
(s : IState HS) (G : Fin HS → List ℤ) (hK : ∀ C CU OP ARG ACC, KG (skS G C CU OP ARG ACC)) (hA : G lA = []) (hC : G lC = []) (hD : G lD = [])
{m : ℕ} {LM : List ℤ} (hM : G rM = (m : ℤ) :: LM) (cs : List (ℤ × ℤ)) {LN : List ℤ}
(hN : G rNC = (cs.length : ℤ) :: LN) {Ba : ℕ} (hcs : CmdsOK OkA Ba cs) (n : ℕ)
(hV : VC n cs 0) (hND : nDrop cs = n) (pre : ℕ) {LB : List ℤ}
(hB : G rNB = (pre : ℤ) :: LB) (xs : List U) (hxs : xs.length = pre * (n * m))
(hok : ∀ u ∈ xs, OkU u) {LT : List ℤ}
(hT : G rTOT = ((passOut m g cs n pre xs).length : ℤ) :: LT) {Bo : ℕ}
(hBo : ∀ y ∈ passOut m g cs n pre xs, zsz y ≤ Bo) (RC CU OP ARG : List ℤ) :
IRuns I iprog (J6Seg.Slab.passP dr rd it bk)
(encK s (lin xs [] (skS G (flatC cs ++ RC) CU OP ARG [])))
(encK s (skS (update G 0 (passOut m g cs n pre xs ++ G 0)) (flatC cs ++ RC) CU OP ARG []))
(passC pre cs.length m Ba (cdr + crd + cit + cbk) (passOut m g cs n pre xs).length Bo) := by sorry