Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Round-six lemma `rowCodeU_runs`

Proved
NLogN.KFX.rowCodeU_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.KFX6Run):

theorem NLogN.KFX.rowCodeU_runs {q : ℕ} {Kc : ℝ} (H13 : L13U q Kc) {I : List Sym}
    {k K e T S0 B r H : ℕ} {i j : Fin mC} (hij : (i : ℕ) ≠ j) (hK : 6 ≤ K)
    (hp : PF k K e T S0 B r) {u : IState HS} (hA : Agree (rowσ k K e T S0 B r H i j) u)
    (zs : List GI) (R0 : List Item) (hg0 : u.G 0 = ints (gflat zs) ++ R0)
    (hl : zs.length = B * 2 ^ T * S0 * r) (hGB : GB H zs) :
    ∃ c, IRuns I l12prog (rowCodeU q) u
        (u.upd 0 (ints (gflat (permRecs (rect (N0R k K e T B i j) (N1R k K e i j) (N2R k K e i j)
          (N3R k K e S0 i j) (mC ^ k * K)) (rowAddAddr K (e % K) (mC ^ k) (pxR i j) (pyR i j)) r zs))
          ++ R0)) c ∧
      (c : ℝ) ≤ KFR.bnd Kc K (mC ^ k) (B * 2 ^ T * S0) r H +
        (cHd (zsz ((VbR T S0 B r H : ℕ) : ℤ)) : ℝ)

Context. KFX §6: the bit-length loop and the run of the uniform row addition

loopZ computes A = zsz V on stack 48 by halving V (pushed on stack 14) until it is 0. rowCodeU q = withPushI hdrL (zB (l13U q)) pushes the master registers computed from the parameter registers (hdrL), runs loopZ, then l13U q.

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_K_Defs33
import Definitions.Def_IntMul_Kappa_R6_Defs1
import Mathlib
import Definitions.Def_IntMul_HvdH_M_Defs8
import Definitions.Def_IntMul_MultitapeModel

set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 1000000

open NLogN NLogN.KFX
open IntMul NLogN.RS NLogN.KIL NLogN.KFD NLogN.KFE NLogN.KFB NLogN.KFL NLogN.KFW NLogN.KFH AModel Butterfly
Formal statement
theorem NLogN.KFX.rowCodeU_runs {q : ℕ} {Kc : ℝ} (H13 : L13U q Kc) {I : List Sym}
    {k K e T S0 B r H : ℕ} {i j : Fin mC} (hij : (i : ℕ) ≠ j) (hK : 6 ≤ K)
    (hp : PF k K e T S0 B r) {u : IState HS} (hA : Agree (rowσ k K e T S0 B r H i j) u)
    (zs : List GI) (R0 : List Item) (hg0 : u.G 0 = ints (gflat zs) ++ R0)
    (hl : zs.length = B * 2 ^ T * S0 * r) (hGB : GB H zs) :
    ∃ c, IRuns I l12prog (rowCodeU q) u
        (u.upd 0 (ints (gflat (permRecs (rect (N0R k K e T B i j) (N1R k K e i j) (N2R k K e i j)
          (N3R k K e S0 i j) (mC ^ k * K)) (rowAddAddr K (e % K) (mC ^ k) (pxR i j) (pyR i j)) r zs))
          ++ R0)) c ∧
      (c : ℝ) ≤ KFR.bnd Kc K (mC ^ k) (B * 2 ^ T * S0) r H +
        (cHd (zsz ((VbR T S0 B r H : ℕ) : ℤ)) : ℝ) := 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 `NLogN.KFX.rowCodeU_runs`, Solutions/KFX6Run.lean (lines 287–430) 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