preB_fsp (KFE: fine binary embedding / extraction and fine high-digit swaps)
ProvedNLogN.KFE.preB_fspThe following holds (Lean statement, in the scope of module Solutions.KFESwap):
theorem NLogN.KFE.preB_fsp (s : IState HS) (F : Fin HS → List ℤ) (v : Fin HS → ℕ) {M B : ℕ}
(hM : zsz (M : ℤ) ≤ B) (hv : ∀ i ∈ regD, v i ≤ M) {Pre G Suf : Shape} {T Q : ℕ}
{LP LG LS : List ℤ}
(FP : F kP = (vol Pre : ℤ) :: LP) (FG : F kG = (vol G : ℤ) :: LG)
(FS : F NLogN.KIL.kS = (vol Suf : ℤ) :: LS)
(vP : v kP = vol Pre) (vG : v kG = vol G) (vS : v NLogN.KIL.kS = vol Suf) (vT : v aT2 = T)
(vQ : v aQE = Q) (hP : 1 ≤ vol Pre) (hg : 1 ≤ vol G) (hS : 1 ≤ vol Suf) (hT : 1 ≤ T)
(hTQ : T ≤ Q) (hVM : vol (binShape Pre G Suf Q) ≤ M) (xs : List (ZMod 2))
(F0 : F 0 = enc2 xs) (F15 : F 15 = []) (F20 : F 20 = []) (F21 : F 21 = [])
(hxs : xs.length = vol (binShape Pre G Suf T)) (hB1 : 1 ≤ B) :
∃ v' : Fin HS → ℕ, (∀ i, i ∉ [pX, pB, pZ, pT] → v' i = v i) ∧ (∀ i ∈ regD, v' i ≤ M) ∧
FSp preB (encK s (regState F v regD))
(encK s (regState (Function.update F 0
(enc2 (AModelL12.embed (binShape Pre G Suf T) (binShape Pre G Suf Q) 0 xs))) v' regD))
(2 * (10 ^ 9 * (B + 2) ^ 2 + cPadF (vol (binShape Pre G Suf Q)) B))
Context. The lemma belongs to the part KFE: fine binary embedding / extraction and fine high-digit swaps.
Formalization Note. This lemma belongs to the item-language (IL) layer of the integer-multiplication-kappa campaign: tape-level programs (register programs over 64 item stacks of the NLogN multitape framework, definition bundles IntMul_HvdH_M_Defs1–IntMul_HvdH_M_Defs8) that implement the data-movement primitives of the OpenAI preprint Integer multiplication below (field moves, row split/merge, shifts, the uniform Proposition 11 interchange, Lemma 12 with fine -per-element costs, Gaussian record primitives, Proposition 14 pieces) with exact list denotations from the array-model bundles IntMul_Kappa_K_Defs* and explicit cost bounds. All names refer to the definition bundles up to IntMul_Kappa_K_Defs18.
-- OpenAI-preprint / κ-improvement development (integer-multiplication-kappa), generated by skeleton subtraction. import Definitions.Def_IntMul_Kappa_K_Defs18 set_option autoImplicit false set_option relaxedAutoImplicit false set_option maxHeartbeats 1000000 set_option linter.unusedSimpArgs false set_option linter.unnecessarySeqFocus false set_option linter.unusedVariables false open NLogN open NLogN.KFE open IntMul RS AModel AModelL12 KIL KFD set_option maxHeartbeats 1000000
theorem NLogN.KFE.preB_fsp (s : IState HS) (F : Fin HS → List ℤ) (v : Fin HS → ℕ) {M B : ℕ}
(hM : zsz (M : ℤ) ≤ B) (hv : ∀ i ∈ regD, v i ≤ M) {Pre G Suf : Shape} {T Q : ℕ}
{LP LG LS : List ℤ}
(FP : F kP = (vol Pre : ℤ) :: LP) (FG : F kG = (vol G : ℤ) :: LG)
(FS : F NLogN.KIL.kS = (vol Suf : ℤ) :: LS)
(vP : v kP = vol Pre) (vG : v kG = vol G) (vS : v NLogN.KIL.kS = vol Suf) (vT : v aT2 = T)
(vQ : v aQE = Q) (hP : 1 ≤ vol Pre) (hg : 1 ≤ vol G) (hS : 1 ≤ vol Suf) (hT : 1 ≤ T)
(hTQ : T ≤ Q) (hVM : vol (binShape Pre G Suf Q) ≤ M) (xs : List (ZMod 2))
(F0 : F 0 = enc2 xs) (F15 : F 15 = []) (F20 : F 20 = []) (F21 : F 21 = [])
(hxs : xs.length = vol (binShape Pre G Suf T)) (hB1 : 1 ≤ B) :
∃ v' : Fin HS → ℕ, (∀ i, i ∉ [pX, pB, pZ, pT] → v' i = v i) ∧ (∀ i ∈ regD, v' i ≤ M) ∧
FSp preB (encK s (regState F v regD))
(encK s (regState (Function.update F 0
(enc2 (AModelL12.embed (binShape Pre G Suf T) (binShape Pre G Suf Q) 0 xs))) v' regD))
(2 * (10 ^ 9 * (B + 2) ^ 2 + cPadF (vol (binShape Pre G Suf Q)) B)) := by sorry