Round-six lemma `sufP_runs`
ProvedNLogN.KFUU.sufP_runsAn auxiliary lemma of the round-six development, published as a separate node because its proof is long or shared.
The following holds (Lean statement, in the scope of module Solutions.KFUUPad):
theorem NLogN.KFUU.sufP_runs {pM : Fin P} (hM : MulOK I iprog pM MS) {pS : Fin HS} (hpS : LS pS)
(S : Shape) (Z : ℕ) (hS1 : ∀ a ∈ S, 1 ≤ a) (hVZ : zsz ((vol S : ℕ) : ℤ) ≤ Z)
(t : IState HS) (RS RV LN : List Item) (hpS0 : t.G pS = ints (zl S).reverse ++ RS)
(hV : t.G pV = .int 1 :: RV) (hN : t.G nR = .int (S.length : ℤ) :: LN) :
IRuns I iprog (sufP pM pS) t
(((t.upd pV (ints (sufV S 0) ++ RV)).upd pS RS).upd tS (ints (zl S) ++ t.G tS))
((S.length + 1) * (cU Z + 76 * Z + 3000))
Context. KFUU §1: uniform padding and deletion scans
padIU / unpadIU are KFU's padI X B Z / unpadI X B C with the three literal counts read
from the parameter stacks qX, qB, qZ = 50, 51, 52 (for unpadIU, qZ holds C - B).
padIU_runs / unpadIU_runs follow from padI_spec / unpadI_spec by KFV.ISim.runs.
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_K_Defs33
import Definitions.Def_IntMul_Kappa_R6_Defs1
import Mathlib
import Definitions.Def_IntMul_HvdH_M_Defs8
import Definitions.Def_IntMul_MultitapeModel
import Definitions.Def_IntMul_HvdH_Numeric
import Definitions.Def_IntMul_HvdH_ExpApprox
import Definitions.Def_IntMul_HvdH_Twiddle
import Definitions.Def_IntMul_HvdH_RealExp
import Definitions.Def_IntMul_HvdH_MachineRef
set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 1000000
open NLogN NLogN.KFUU
open IntMul NLogN.KIL NLogN.KFC NLogN.KFT NLogN.KFU AModel AModelL12
variable {P : ℕ} {I : List Sym} {iprog : Fin P → IStmt HS P}
theorem NLogN.KFUU.sufP_runs {pM : Fin P} (hM : MulOK I iprog pM MS) {pS : Fin HS} (hpS : LS pS)
(S : Shape) (Z : ℕ) (hS1 : ∀ a ∈ S, 1 ≤ a) (hVZ : zsz ((vol S : ℕ) : ℤ) ≤ Z)
(t : IState HS) (RS RV LN : List Item) (hpS0 : t.G pS = ints (zl S).reverse ++ RS)
(hV : t.G pV = .int 1 :: RV) (hN : t.G nR = .int (S.length : ℤ) :: LN) :
IRuns I iprog (sufP pM pS) t
(((t.upd pV (ints (sufV S 0) ++ RV)).upd pS RS).upd tS (ints (zl S) ++ t.G tS))
((S.length + 1) * (cU Z + 76 * Z + 3000)) := by sorry