Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The `A` kernel v2 in IL (round six, `aK2_runs`)

Proved
J6Seg.KR.AK.aK2_runs

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

complexity-theoryinteger-multiplicationkappa-improvement

The A kernel v2 in IL.

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

theorem J6Seg.KR.AK.aK2_runs {M : MulSpec} {pM : Fin Pp} (hM : MulOK I iprog pM M) (hdom : ∀ x y, M.dom x y)
    {w2 bk win Q pk b φ1 φ2 B BH : ℕ}
    (hΦ1 : ∀ x y : ℤ, zsz x ≤ B → zsz y ≤ B → M.Φ x y ≤ φ1)
    (hΦ2 : ∀ x y : ℤ, zsz x ≤ b * (2 * (w2 + bk)) + 2 → zsz y ≤ b * (2 * (w2 + bk)) + 2 →
      M.Φ x y ≤ φ2)
    (hb : 1 ≤ b) (hn1 : 1 ≤ w2 + bk) (hbig : 2 * (2 * (w2 + bk)) * 2 ^ (2 * pk) < 2 ^ (b - 1))
    (hw2 : w2 ≤ win) (hbk : bk ≤ win)
    {aTab rTab cTab : List ℤ} (hal : aTab.length = w2) (hrl : rTab.length = w2 + bk)
    (hcl : cTab.length = bk)
    {Ka Kr Kc X0 : ℤ} (hKa : 0 ≤ Ka) (hKr : 0 ≤ Kr) (hKc : 0 ≤ Kc) (hX0 : 0 ≤ X0)
    (hta : TB (2 ^ Q * Ka) aTab) (htr : TB (2 ^ Q * Kr) rTab) (htc : TB (2 ^ Q * Kc) cTab)
    (hea : 2 ^ Q * Ka ≤ 2 ^ pk) (her : 2 ^ Q * Kr ≤ 2 ^ pk) (hec : 2 ^ Q * Kc ≤ 2 ^ pk)
    (he0 : X0 ≤ 2 ^ pk) (he1 : Ka * X0 + 1 ≤ 2 ^ pk)
    (he2 : ((w2 + bk : ℕ) : ℤ) * Kr * (Ka * X0 + 1) + 1 ≤ 2 ^ pk)
    (he3 : Kc * (((w2 + bk : ℕ) : ℤ) * Kr * (Ka * X0 + 1) + 1) + 1 ≤ 2 ^ pk)
    (hBz : 2 * (pk + 1) + 2 ≤ B) (hBb : b + 4 ≤ B) (hPB : Q + 3 ≤ B)
    (hBc : zsz ((2 * win + 2 * (w2 + bk) : ℕ) : ℤ) ≤ B)
    (hBH : ∀ v ∈ aHdr2 w2 bk win Q pk b, zsz v ≤ BH)
    (s : IState HS) (F : Fin HS → List ℤ) (x : List GI) (l : List ℤ)
    (hF : ∀ j, j ≠ 0 → j ≠ J6Seg.KR.dT → F j = []) (hdT : F J6Seg.KR.dT = aKTab2 w2 bk win Q pk b aTab rTab cTab)
    (h0 : F 0 = gflat x ++ l) (hxl : x.length = win) (hx : AB X0 x) :
    IRuns I iprog (aKprog2 pM) (encK s F)
      (encK s (Function.update F 0 (gflat (J6A.aKerL w2 bk win Q aTab rTab cTab x) ++ l)))
      (cAK2 w2 bk win pk b φ1 φ2 B BH)

Context. A lines, IL side 5b: the run of the A kernel v2

aK2_runs: as aK_runs, with the v2 table aKTab2 … (small header) on dT, the program aKprog2 pM and the cost cAK2 …; the header bound BH is over aHdr2 only (every entry O(Q + pk + b) bits), the two Kronecker constants live only inside the row (bound BkA).

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_Defs68

set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 1000000

open J6Seg J6Seg.KR J6Seg.KR.AK
open IntMul NLogN NLogN.KIL NLogN.KFD NLogN.KFB NLogN.KFV
variable {Pp : ℕ} {I : List Sym} {iprog : Fin Pp → IStmt HS Pp}
Formal statement
theorem J6Seg.KR.AK.aK2_runs {M : MulSpec} {pM : Fin Pp} (hM : MulOK I iprog pM M) (hdom : ∀ x y, M.dom x y)
    {w2 bk win Q pk b φ1 φ2 B BH : ℕ}
    (hΦ1 : ∀ x y : ℤ, zsz x ≤ B → zsz y ≤ B → M.Φ x y ≤ φ1)
    (hΦ2 : ∀ x y : ℤ, zsz x ≤ b * (2 * (w2 + bk)) + 2 → zsz y ≤ b * (2 * (w2 + bk)) + 2 →
      M.Φ x y ≤ φ2)
    (hb : 1 ≤ b) (hn1 : 1 ≤ w2 + bk) (hbig : 2 * (2 * (w2 + bk)) * 2 ^ (2 * pk) < 2 ^ (b - 1))
    (hw2 : w2 ≤ win) (hbk : bk ≤ win)
    {aTab rTab cTab : List ℤ} (hal : aTab.length = w2) (hrl : rTab.length = w2 + bk)
    (hcl : cTab.length = bk)
    {Ka Kr Kc X0 : ℤ} (hKa : 0 ≤ Ka) (hKr : 0 ≤ Kr) (hKc : 0 ≤ Kc) (hX0 : 0 ≤ X0)
    (hta : TB (2 ^ Q * Ka) aTab) (htr : TB (2 ^ Q * Kr) rTab) (htc : TB (2 ^ Q * Kc) cTab)
    (hea : 2 ^ Q * Ka ≤ 2 ^ pk) (her : 2 ^ Q * Kr ≤ 2 ^ pk) (hec : 2 ^ Q * Kc ≤ 2 ^ pk)
    (he0 : X0 ≤ 2 ^ pk) (he1 : Ka * X0 + 1 ≤ 2 ^ pk)
    (he2 : ((w2 + bk : ℕ) : ℤ) * Kr * (Ka * X0 + 1) + 1 ≤ 2 ^ pk)
    (he3 : Kc * (((w2 + bk : ℕ) : ℤ) * Kr * (Ka * X0 + 1) + 1) + 1 ≤ 2 ^ pk)
    (hBz : 2 * (pk + 1) + 2 ≤ B) (hBb : b + 4 ≤ B) (hPB : Q + 3 ≤ B)
    (hBc : zsz ((2 * win + 2 * (w2 + bk) : ℕ) : ℤ) ≤ B)
    (hBH : ∀ v ∈ aHdr2 w2 bk win Q pk b, zsz v ≤ BH)
    (s : IState HS) (F : Fin HS → List ℤ) (x : List GI) (l : List ℤ)
    (hF : ∀ j, j ≠ 0 → j ≠ J6Seg.KR.dT → F j = []) (hdT : F J6Seg.KR.dT = aKTab2 w2 bk win Q pk b aTab rTab cTab)
    (h0 : F 0 = gflat x ++ l) (hxl : x.length = win) (hx : AB X0 x) :
    IRuns I iprog (aKprog2 pM) (encK s F)
      (encK s (Function.update F 0 (gflat (J6A.aKerL w2 bk win Q aTab rTab cTab x) ++ l)))
      (cAK2 w2 bk win pk b φ1 φ2 B BH) := 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.KR.AK.aK2_runs`, Solutions/J6AIL5b.lean (lines 38–411) 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