p3B_runs (KFUU §2k: one step of phase 3 in IL)
ProvedNLogN.KFUU.p3B_runsThe following holds (Lean statement, in the scope of module Solutions.KFUURev11):
theorem NLogN.KFUU.p3B_runs {pM : Fin P} (hM : MulOK I iprog pM NLogN.KFUU.MS) (u cz : ℕ) (bs : List Bool) {i j : ℕ}
(hij : i + j + 1 = bs.length) (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 i) xs0 0) ++ R)
{LV LtS LX LM LZ LU : List Item}
(hV : t.G pV = .int (vol ((shP u bs).take j) : ℤ) :: LV)
(hS : t.G tS = .int ((shP u bs)[j]'(by rw [len_shP]; omega) : ℤ) :: LtS)
(hX : t.G pXr = .int (vol ((shP u bs).drop (j + 1)) : ℤ) :: LX)
(hMr : t.G NLogN.KFUU.rM = .int (((2 ^ u) ^ (j + 1) : ℕ) : ℤ) :: LM)
(hZ : t.G rCZ = .int (cz : ℤ) :: LZ) (hU : t.G rU2 = .int ((2 ^ u : ℕ) : ℤ) :: LU) :
IRuns I iprog (p3B pM) t
((((t.upd 0 (ints (Dl (mzB u bs.length cz) (bgB bs) (List.range bs.length ++ [bs.length])
(lay3 (bgB bs) bs.length (i + 1)) xs0 0) ++ R)).upd pV LV).upd pXr
(.int (vol ((shP u bs).drop j) : ℤ) :: LX)).upd NLogN.KFUU.rM (.int (((2 ^ u) ^ j : ℕ) : ℤ) :: LM))
(KFU.cMv (vol (shP u bs) * cz) w + 60 * cU Z)
Context. The lemma belongs to the part KFUU §2k: one step of phase 3 in IL: Axis j = n-1-i: rM := U^j, qX := U·G (G = vol (S.drop (j+1)) on pXr), qB := U^j,
qZ := cz·P/U^j (P = vol (S.take j) on pV), then the bit moves back (mvBU) when S_j > U,
and G := S_j·G.
Formalization Note. This lemma belongs to layer 5 of the Lean formalization (integer-multiplication-kappa campaign) of the OpenAI preprint Integer multiplication below : the uniform item-language machine (register programs over the NLogN multitape framework) assembling the Proposition 14 / Lemma 13 / Proposition 18 pieces, the resampling and chirp stages and the cost recurrences into one fixed machine, culminating in NLogN.KFTop.kappa_bound : IntMul.KappaBound (1 / 2 ^ 182) (the bound of Def_IntMul_MultitapeModel). All names refer to the definition bundles up to IntMul_Kappa_K_Defs33.
-- OpenAI-preprint / κ-improvement development (integer-multiplication-kappa), generated by skeleton subtraction.
import Definitions.Def_IntMul_Kappa_K_Defs33
set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 1000000
set_option linter.unusedSimpArgs false
set_option linter.unusedVariables false
set_option linter.unusedSectionVars false
set_option linter.unnecessarySeqFocus false
set_option maxRecDepth 20000
open NLogN
open NLogN.KFUU
open IntMul KIL KFB KFC KFT KFU AModel AModelL12
variable {P : ℕ} {I : List Sym} {iprog : Fin P → IStmt HS P}
set_option maxHeartbeats 8000000
theorem NLogN.KFUU.p3B_runs {pM : Fin P} (hM : MulOK I iprog pM NLogN.KFUU.MS) (u cz : ℕ) (bs : List Bool) {i j : ℕ}
(hij : i + j + 1 = bs.length) (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 i) xs0 0) ++ R)
{LV LtS LX LM LZ LU : List Item}
(hV : t.G pV = .int (vol ((shP u bs).take j) : ℤ) :: LV)
(hS : t.G tS = .int ((shP u bs)[j]'(by rw [len_shP]; omega) : ℤ) :: LtS)
(hX : t.G pXr = .int (vol ((shP u bs).drop (j + 1)) : ℤ) :: LX)
(hMr : t.G NLogN.KFUU.rM = .int (((2 ^ u) ^ (j + 1) : ℕ) : ℤ) :: LM)
(hZ : t.G rCZ = .int (cz : ℤ) :: LZ) (hU : t.G rU2 = .int ((2 ^ u : ℕ) : ℤ) :: LU) :
IRuns I iprog (p3B pM) t
((((t.upd 0 (ints (Dl (mzB u bs.length cz) (bgB bs) (List.range bs.length ++ [bs.length])
(lay3 (bgB bs) bs.length (i + 1)) xs0 0) ++ R)).upd pV LV).upd pXr
(.int (vol ((shP u bs).drop j) : ℤ) :: LX)).upd NLogN.KFUU.rM (.int (((2 ^ u) ^ j : ℕ) : ℤ) :: LM))
(KFU.cMv (vol (shP u bs) * cz) w + 60 * cU Z) := by sorry