Round-six lemma `p3L_runs`
ProvedNLogN.KFUU.p3L_runscomplexity-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.KFUURev12):
theorem NLogN.KFUU.p3L_runs {pM : Fin P} (hM : MulOK I iprog pM MS) {pS : Fin HS} (hpS : LS pS)
(u cz : ℕ) (bs : List Bool) (hcz : 1 ≤ cz) (w : ℕ) (xs0 : List ℤ) (hx : Bnd w xs0) (Z : ℕ)
(hVZ : zsz ((vol (shP u bs) * cz : ℕ) : ℤ) ≤ Z) (hZ2 : 2 ≤ Z) (t : IState HS) (R : List Item)
(h0 : t.G 0 = ints (Dl (mzB u bs.length cz) (bgB bs) (List.range bs.length ++ [bs.length])
(lay3 (bgB bs) bs.length 0) xs0 0) ++ R)
{RV RtS RS LX LM LZ LU LN : List Item}
(hV : t.G pV = ints (sufV (shP u bs).reverse 1) ++ RV)
(htS : t.G tS = ints (zl (shP u bs).reverse) ++ RtS) (hpS0 : t.G pS = RS)
(hX : t.G pXr = .int 1 :: LX) (hMr : t.G rM = .int (((2 ^ u) ^ bs.length : ℕ) : ℤ) :: LM)
(hZ : t.G rCZ = .int (cz : ℤ) :: LZ) (hU : t.G rU2 = .int ((2 ^ u : ℕ) : ℤ) :: LU)
(hN : t.G nR = .int (bs.length : ℤ) :: LN) :
IRuns I iprog (p3L pM pS) t
(((((t.upd 0 (ints (Dl (mzB u bs.length cz) (bgB bs) (List.range bs.length ++ [bs.length])
(lay3 (bgB bs) bs.length bs.length) xs0 0) ++ R)).upd pV RV).upd pXr
(.int (vol (shP u bs) : ℤ) :: LX)).upd rM (.int (((2 ^ u) ^ 0 : ℕ) : ℤ) :: LM)).upd tS RtS
|>.upd pS (ints (zl (shP u bs)) ++ RS))
((bs.length + 1) * (KFU.cMv (vol (shP u bs) * cz) w + 60 * cU Z + 76 * Z + 3000))
Context. KFUU §2l: phase 3 in IL (the loop)
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
import Definitions.Def_IntMul_HvdH_Numeric
import Definitions.Def_IntMul_HvdH_ExpApprox
import Definitions.Def_IntMul_HvdH_Twiddle
import Definitions.Def_IntMul_HvdH_RealExp
import Definitions.Def_IntMul_HvdH_MachineRef
set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 1000000
open NLogN NLogN.KFUU
open IntMul NLogN.KIL NLogN.KFB NLogN.KFC NLogN.KFT NLogN.KFU AModel AModelL12
variable {P : ℕ} {I : List Sym} {iprog : Fin P → IStmt HS P}
Formal statement
theorem NLogN.KFUU.p3L_runs {pM : Fin P} (hM : MulOK I iprog pM MS) {pS : Fin HS} (hpS : LS pS)
(u cz : ℕ) (bs : List Bool) (hcz : 1 ≤ cz) (w : ℕ) (xs0 : List ℤ) (hx : Bnd w xs0) (Z : ℕ)
(hVZ : zsz ((vol (shP u bs) * cz : ℕ) : ℤ) ≤ Z) (hZ2 : 2 ≤ Z) (t : IState HS) (R : List Item)
(h0 : t.G 0 = ints (Dl (mzB u bs.length cz) (bgB bs) (List.range bs.length ++ [bs.length])
(lay3 (bgB bs) bs.length 0) xs0 0) ++ R)
{RV RtS RS LX LM LZ LU LN : List Item}
(hV : t.G pV = ints (sufV (shP u bs).reverse 1) ++ RV)
(htS : t.G tS = ints (zl (shP u bs).reverse) ++ RtS) (hpS0 : t.G pS = RS)
(hX : t.G pXr = .int 1 :: LX) (hMr : t.G rM = .int (((2 ^ u) ^ bs.length : ℕ) : ℤ) :: LM)
(hZ : t.G rCZ = .int (cz : ℤ) :: LZ) (hU : t.G rU2 = .int ((2 ^ u : ℕ) : ℤ) :: LU)
(hN : t.G nR = .int (bs.length : ℤ) :: LN) :
IRuns I iprog (p3L pM pS) t
(((((t.upd 0 (ints (Dl (mzB u bs.length cz) (bgB bs) (List.range bs.length ++ [bs.length])
(lay3 (bgB bs) bs.length bs.length) xs0 0) ++ R)).upd pV RV).upd pXr
(.int (vol (shP u bs) : ℤ) :: LX)).upd rM (.int (((2 ^ u) ^ 0 : ℕ) : ℤ) :: LM)).upd tS RtS
|>.upd pS (ints (zl (shP u bs)) ++ RS))
((bs.length + 1) * (KFU.cMv (vol (shP u bs) * cz) w + 60 * cU Z + 76 * Z + 3000)) := by sorrySource
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.KFUU.p3L_runs`, Solutions/KFUURev12.lean (lines 25–117) of the round-six development.