The adapter (round six, `ad_runs`)
ProvedIntMul.Kappa.R6.IL.ad_runsThe adapter.
The following holds (Lean statement, in the scope of module Solutions.R6ILAd):
theorem IntMul.Kappa.R6.IL.ad_runs {I : List Sym} {tab : Fin 1 → IStmt HS 1} (m k M Bb : ℕ)
(hM : zsz (M : ℤ) ≤ Bb) (hkM : m ^ k ≤ M) (hmM : m ≤ M) (hm : 1 ≤ m) (hk : k ≤ M)
(t : IState HS) (R1 : List Item) (hJ : t.G dJ = .int (k : ℤ) :: R1) (X Y : List Item) (c0 : ℕ)
(hcall : ∀ t' : IState HS, t'.G dJ = .int (-1) :: t.G dJ →
t'.G dT = .int ((m ^ k : ℕ) : ℤ) :: t.G dT → (∀ j, j ≠ dJ → j ≠ dT → t'.G j = t.G j) →
IRuns I tab (tab 0) (t'.upd 0 X) (t'.upd 0 Y) c0) :
IRuns I tab (adS m) (t.upd 0 X) (t.upd 0 Y) (cAd m k Bb c0)
Context. Round six, item language: the adapter from the KIL5 descriptor to the generic one
adS m: with k on top of dJ, compute m ^ k (loop on a scratch register), push it on dT,
push -1 on dJ, call procedure 0, pop dJ and dT. ad_runs: the adapter runs the call on
the state with the generic descriptor and restores every stack.
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_Defs13 set_option autoImplicit false set_option relaxedAutoImplicit false set_option maxHeartbeats 1000000 open IntMul IntMul.Kappa IntMul.Kappa.R6 IntMul.Kappa.R6.IL open IntMul NLogN NLogN.RS NLogN.KIL NLogN.KFD AModel AModelL12 Finset
theorem IntMul.Kappa.R6.IL.ad_runs {I : List Sym} {tab : Fin 1 → IStmt HS 1} (m k M Bb : ℕ)
(hM : zsz (M : ℤ) ≤ Bb) (hkM : m ^ k ≤ M) (hmM : m ≤ M) (hm : 1 ≤ m) (hk : k ≤ M)
(t : IState HS) (R1 : List Item) (hJ : t.G dJ = .int (k : ℤ) :: R1) (X Y : List Item) (c0 : ℕ)
(hcall : ∀ t' : IState HS, t'.G dJ = .int (-1) :: t.G dJ →
t'.G dT = .int ((m ^ k : ℕ) : ℤ) :: t.G dT → (∀ j, j ≠ dJ → j ≠ dT → t'.G j = t.G j) →
IRuns I tab (tab 0) (t'.upd 0 X) (t'.upd 0 Y) c0) :
IRuns I tab (adS m) (t.upd 0 X) (t.upd 0 Y) (cAd m k Bb c0) := by sorry