Round-six lemma `finB_runs`
ProvedJ6Seg.Slab.finB_runscomplexity-theoryinteger-multiplicationkappa-improvement
An 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.J6SegILCtl4):
theorem J6Seg.Slab.finB_runs (s : IState HS) (G : Fin HS → List ℤ) (X Sv LC T Cd A D W : List ℤ) (n cur : ℕ)
{L2 : List ℤ} (hN : G bN = (n : ℤ) :: L2) (hle : cur ≤ n) {Z : ℕ} (hn : zsz (n : ℤ) ≤ Z)
(hA : G lA = []) (hC : G lC = []) (hD : G lD = []) :
IRuns I iprog finB (encK s (cS G X Sv ((cur : ℤ) :: LC) T Cd A D W))
(encK s (cS G X Sv LC ((flatC (List.replicate (n - cur) J6Seg.dropC)).reverse ++ T)
Cd A D W))
(6 * cU Z + 4000 * (n - cur + 1))
Context. B-line IL, B1 follow-up: building the control list, §4 the main loop and the final drops
mainLoop_runs:rptX bN' entPover the whole table: the reversed control prefix(ctlAux src argOf (range n') 0).1onbT, the positionpos n'onbCur, the table moved (reversed) tobSv; costn' (21 cU Z + 4000) + 4000 n + 3000 (n' + 1)(the drops telescope).finB_runs: the finaln - pos n'drops,bCurpopped:bTholds(flatC (ctlOf …)).reverse.lenB_runs:n + n'pushed onrNC.
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*).
Preamble
-- Round-six κ development (integer-multiplication-kappa), generated by skeleton subtraction.
import Definitions.Def_IntMul_Kappa_R6_Defs65
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 cU)
open NLogN.KFT (cf3 rptX)
variable {P : ℕ} {I : List Sym} {iprog : Fin P → IStmt HS P}
Formal statement
theorem J6Seg.Slab.finB_runs (s : IState HS) (G : Fin HS → List ℤ) (X Sv LC T Cd A D W : List ℤ) (n cur : ℕ)
{L2 : List ℤ} (hN : G bN = (n : ℤ) :: L2) (hle : cur ≤ n) {Z : ℕ} (hn : zsz (n : ℤ) ≤ Z)
(hA : G lA = []) (hC : G lC = []) (hD : G lD = []) :
IRuns I iprog finB (encK s (cS G X Sv ((cur : ℤ) :: LC) T Cd A D W))
(encK s (cS G X Sv LC ((flatC (List.replicate (n - cur) J6Seg.dropC)).reverse ++ T)
Cd A D W))
(6 * cU Z + 4000 * (n - cur + 1)) := by sorrySource
S. Jain, round-six networks for the integer-multiplication κ-improvement campaign (https://github.com/Swapnil-jain/integer-mult-kappa, commit 5868dc7) and D. Colkitt, integer-mult-bounds (https://github.com/CrocSwap/integer-mult-bounds); target `IntMul.Kappa.jain_round6_framework`. Lean declaration `J6Seg.Slab.finB_runs`, Solutions/J6SegILCtl4.lean (lines 87–145) of the round-six development.