Round-six lemma `p1U_runs`
ProvedNLogN.KFUU.p1U_runsAn 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.KFUURev3):
theorem NLogN.KFUU.p1U_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 ℤ)
(hxs : xs0.length = vol (shP u bs) * cz) (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 xs0 ++ R) {RS LZ LU LN : List Item}
(hpS0 : t.G pS = ints (zl (shP u bs)) ++ RS)
(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 (p1U pM pS) t
(t.upd 0 (ints (Dl (mzB u bs.length cz) (bgB bs) (List.range bs.length ++ [bs.length])
(lay1 (bgB bs) bs.length 0) xs0 0) ++ R))
((bs.length + 1) * (KFU.cMv (vol (shP u bs) * cz) w + 50 * cU Z))
Context. KFUU §2c: phase 1 of the uniform reversal
p1U pM pS (sizes S = shP u bs on pS in order, n = |bs| on nR, 2^u on rU2, cz on
rCZ) moves every extra bit behind the main atoms: Dl (lay1 n) ↦ Dl (lay1 0).
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*).
-- 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.KFC NLogN.KFT NLogN.KFU AModel AModelL12
variable {P : ℕ} {I : List Sym} {iprog : Fin P → IStmt HS P}
theorem NLogN.KFUU.p1U_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 ℤ)
(hxs : xs0.length = vol (shP u bs) * cz) (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 xs0 ++ R) {RS LZ LU LN : List Item}
(hpS0 : t.G pS = ints (zl (shP u bs)) ++ RS)
(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 (p1U pM pS) t
(t.upd 0 (ints (Dl (mzB u bs.length cz) (bgB bs) (List.range bs.length ++ [bs.length])
(lay1 (bgB bs) bs.length 0) xs0 0) ++ R))
((bs.length + 1) * (KFU.cMv (vol (shP u bs) * cz) w + 50 * cU Z)) := by sorry