Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The adapter (round six, `ad_runs`)

Proved
IntMul.Kappa.R6.IL.ad_runs

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

complexity-theoryinteger-multiplicationkappa-improvement

The adapter.

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

theorem IntMul.Kappa.R6.IL.ad_runs {I : List Sym} {tab : Fin 1 → IStmt HS 1} (m k M Bb : ℕ)
    (hM : zsz (M : ℤ) ≤ Bb) (hkM : m ^ k ≤ M) (hmM : m ≤ M) (hm : 1 ≤ m) (hk : k ≤ M)
    (t : IState HS) (R1 : List Item) (hJ : t.G dJ = .int (k : ℤ) :: R1) (X Y : List Item) (c0 : ℕ)
    (hcall : ∀ t' : IState HS, t'.G dJ = .int (-1) :: t.G dJ →
      t'.G dT = .int ((m ^ k : ℕ) : ℤ) :: t.G dT → (∀ j, j ≠ dJ → j ≠ dT → t'.G j = t.G j) →
      IRuns I tab (tab 0) (t'.upd 0 X) (t'.upd 0 Y) c0) :
    IRuns I tab (adS m) (t.upd 0 X) (t.upd 0 Y) (cAd m k Bb c0)

Context. Round six, item language: the adapter from the KIL5 descriptor to the generic one

adS m: with k on top of dJ, compute m ^ k (loop on a scratch register), push it on dT, push -1 on dJ, call procedure 0, pop dJ and dT. ad_runs: the adapter runs the call on the state with the generic descriptor and restores every stack.

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_Defs13

set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 1000000

open IntMul IntMul.Kappa IntMul.Kappa.R6 IntMul.Kappa.R6.IL
open IntMul NLogN NLogN.RS NLogN.KIL NLogN.KFD AModel AModelL12 Finset
Formal statement
theorem IntMul.Kappa.R6.IL.ad_runs {I : List Sym} {tab : Fin 1 → IStmt HS 1} (m k M Bb : ℕ)
    (hM : zsz (M : ℤ) ≤ Bb) (hkM : m ^ k ≤ M) (hmM : m ≤ M) (hm : 1 ≤ m) (hk : k ≤ M)
    (t : IState HS) (R1 : List Item) (hJ : t.G dJ = .int (k : ℤ) :: R1) (X Y : List Item) (c0 : ℕ)
    (hcall : ∀ t' : IState HS, t'.G dJ = .int (-1) :: t.G dJ →
      t'.G dT = .int ((m ^ k : ℕ) : ℤ) :: t.G dT → (∀ j, j ≠ dJ → j ≠ dT → t'.G j = t.G j) →
      IRuns I tab (tab 0) (t'.upd 0 X) (t'.upd 0 Y) c0) :
    IRuns I tab (adS m) (t.upd 0 X) (t.upd 0 Y) (cAd m k Bb c0) := 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 `IntMul.Kappa.R6.IL.ad_runs`, Solutions/R6ILAd.lean (lines 41–157) 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