Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The control builder runs (round six, `ctlB_runs`)

Proved
J6Seg.Slab.ctlB_runs

by xuanji · Oct 20, 2026 · Mathlib 0df444a (Lean v4.33.1)

complexity-theoryinteger-multiplicationkappa-improvement

The control builder runs.

The following holds (Lean statement, in the scope of module Solutions.J6SegILCtl5):

theorem J6Seg.Slab.ctlB_runs (s : IState HS) (G : Fin HS → List ℤ) {n n' : ℕ} {src : ℕ → Option ℕ}
    (argOf : ℕ → ℤ) (hs : J6Seg.MonoSrc n n' src) {LX L1 L2 : List ℤ}
    (hX : G bX = srcTab src argOf n' ++ LX) (hN' : G bN' = (n' : ℤ) :: L1)
    (hN : G bN = (n : ℤ) :: L2) {Z : ℕ} (hZ : 1 ≤ Z) (hn : zsz (n : ℤ) ≤ Z)
    (hn' : zsz (n' : ℤ) ≤ Z) (ha : ∀ l < n', zsz (argOf l) ≤ Z)
    (hA : G lA = []) (hC : G lC = []) (hD : G lD = []) :
    IRuns I iprog ctlB (encK s G)
      (encK s (update (update G rNC (((n + n' : ℕ) : ℤ) :: G rNC)) rC
        (flatC (J6Seg.ctlOf n n' src argOf) ++ G rC)))
      (ctlCost Z n n')

Context. B-line IL, B1 follow-up: building the control list, §5 the builder

ctlB = const bCur 0; rptX bN' entP; finB; lenB; rptX rNC (mv bT rC; mv bT rC); rptX bN' (mv bSv bX; mv bSv bX).

ctlB_runs: from any managed state G with the source table srcTab src argOf n' on top of bX = 44, n' on bN' = 20, n on bN = 21 and empty rptX counters, for a monotone source (MonoSrc n n' src), the builder pushes flatC (ctlOf n n' src argOf) onto rC = 45 and n + n' (= |ctlOf …|) onto rNC = 38; every other stack is restored (the table included). Cost ≤ (n + n' + 1) (30 cU Z + 20000) with Z ≥ 1, Z ≥ zsz n, zsz n', Z ≥ zsz (argOf l).

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.ctlB_runs (s : IState HS) (G : Fin HS → List ℤ) {n n' : ℕ} {src : ℕ → Option ℕ}
    (argOf : ℕ → ℤ) (hs : J6Seg.MonoSrc n n' src) {LX L1 L2 : List ℤ}
    (hX : G bX = srcTab src argOf n' ++ LX) (hN' : G bN' = (n' : ℤ) :: L1)
    (hN : G bN = (n : ℤ) :: L2) {Z : ℕ} (hZ : 1 ≤ Z) (hn : zsz (n : ℤ) ≤ Z)
    (hn' : zsz (n' : ℤ) ≤ Z) (ha : ∀ l < n', zsz (argOf l) ≤ Z)
    (hA : G lA = []) (hC : G lC = []) (hD : G lD = []) :
    IRuns I iprog ctlB (encK s G)
      (encK s (update (update G rNC (((n + n' : ℕ) : ℤ) :: G rNC)) rC
        (flatC (J6Seg.ctlOf n n' src argOf) ++ G rC)))
      (ctlCost Z n n') := by sorry
Source
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.ctlB_runs`, Solutions/J6SegILCtl5.lean (lines 66–168) of the round-six development.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me