Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Round-six lemma `finB_runs`

Proved
J6Seg.Slab.finB_runs

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

complexity-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' entP over the whole table: the reversed control prefix (ctlAux src argOf (range n') 0).1 on bT, the position pos n' on bCur, the table moved (reversed) to bSv; cost n' (21 cU Z + 4000) + 4000 n + 3000 (n' + 1) (the drops telescope).
  • finB_runs: the final n - pos n' drops, bCur popped: bT holds (flatC (ctlOf …)).reverse.
  • lenB_runs: n + n' pushed on rNC.

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 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.finB_runs`, Solutions/J6SegILCtl4.lean (lines 87–145) 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