The uniform twiddle pass (twC_spec with N, 2r, 2r on qX, qB, qZ)
ProvedNLogN.KFV.twCU_runsThe uniform twiddle pass (twC_spec with N, 2r, 2r on qX, qB, qZ).
The following holds (Lean statement, in the scope of module Solutions.KFV15Tw):
theorem NLogN.KFV.twCU_runs (N r w : ℕ) (hr : 0 < r) (sv : ℕ → ℕ) (hsv : ∀ p, sv p ≤ 2 * r)
(zs : List GI) (hzs : zs.length = N * r) (hb : NLogN.KFB.GB w zs) (t : IState HS) (R L14 : List Item)
(h0 : t.G 0 = ints (gflat zs) ++ R)
(h14 : t.G 14 = ints ((List.range N).map fun p => (sv p : ℤ)) ++ L14)
{L1 L2 L3 : List Item} (h1 : t.G NLogN.KFUU.qX = .int (N : ℤ) :: L1)
(h2 : t.G NLogN.KFUU.qB = .int ((2 * r : ℕ) : ℤ) :: L2) (h3 : t.G NLogN.KFUU.qZ = .int ((2 * r : ℕ) : ℤ) :: L3) :
IRuns I iprog twCU t ((t.upd 0 (ints (gflat (twZ r N sv zs)) ++ R)).upd 14 L14)
(2000 * cTw N r w)
Context. The lemma belongs to the part KFV §19: the uniform twiddle pass twCU: KFV.twC N r = dblI N (2r) ; rotC N (2r) ; unpadI N (2r) (4r) carries the literals N and 2r.
twCU reads them from the parameter stacks qX = N, qB = 2r, qZ = 2r (KFUU.π3):
dblIU (register-counted doubling), rotCU (const 1 N, const 2 Q become dups), and
KFUU's unpadIU. twCU_runs: twC_spec transported by KFV.ISim.runs.
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 maxRecDepth 20000
open NLogN
open NLogN.KFV
open IntMul KIL KFC KFT KFU KFB KFH KFUU AModel
variable {Pp : ℕ} {I : List Sym} {iprog : Fin Pp → IStmt HS Pp}
theorem NLogN.KFV.twCU_runs (N r w : ℕ) (hr : 0 < r) (sv : ℕ → ℕ) (hsv : ∀ p, sv p ≤ 2 * r)
(zs : List GI) (hzs : zs.length = N * r) (hb : NLogN.KFB.GB w zs) (t : IState HS) (R L14 : List Item)
(h0 : t.G 0 = ints (gflat zs) ++ R)
(h14 : t.G 14 = ints ((List.range N).map fun p => (sv p : ℤ)) ++ L14)
{L1 L2 L3 : List Item} (h1 : t.G NLogN.KFUU.qX = .int (N : ℤ) :: L1)
(h2 : t.G NLogN.KFUU.qB = .int ((2 * r : ℕ) : ℤ) :: L2) (h3 : t.G NLogN.KFUU.qZ = .int ((2 * r : ℕ) : ℤ) :: L3) :
IRuns I iprog twCU t ((t.upd 0 (ints (gflat (twZ r N sv zs)) ++ R)).upd 14 L14)
(2000 * cTw N r w) := by sorry