The child step as an IL run on the encoding
ProvedNLogN.KFG.child_irunsThe child step as an IL run on the encoding. The called program PT computes U blockwise (BlkT U F).
The following holds (Lean statement, in the scope of module Solutions.KFGChild):
theorem NLogN.KFG.child_iruns {W m n : ℕ} (w : Fin W) (h : Fin m) (U : Butterfly.Op (Fin n))
(PT : IStmt HS Pp) (F : List GI → List GI) (hF : BlkT U F) (Q : (Fin HS → List ℤ) → Prop)
(hQs : ∀ g v0 vP vR, Q g → Q (Function.update (Function.update (Function.update g 0 v0) qP vP)
NLogN.KFB.rP vR))
(Bb Z wb wb' cP : ℕ)
(hA : zsz ((2 ^ (n * (m - 1 - h.val)) : ℕ) : ℤ) ≤ Bb) (hq : zsz ((2 ^ n : ℕ) : ℤ) ≤ Bb)
(hM : zsz ((2 ^ (n * h.val) : ℕ) : ℤ) ≤ Bb) (h2 : zsz (2 : ℤ) ≤ Bb)
(hPT : ∀ (s' : IState HS) (g : Fin HS → List ℤ) (ys : List GI) (R : List ℤ),
g 0 = gflat ys ++ R → Q g → ys.length = 2 ^ (m * n) → NLogN.KFB.GB wb ys →
IRuns I iprog PT (encK s' g) (encK s' (Function.update g 0 (gflat (F ys) ++ R))) cP ∧
NLogN.KFB.GB wb' (F ys))
(s : IState HS) (f : Fin HS → List ℤ) (zs : List GI) (l : List ℤ)
(x : Fin W × (Fin m × Fin n → Fin 2) → ℂ) (hx : Rep zs x)
(h0 : f 0 = gflat zs ++ l) (hQ : Q f) (hP : f qP = []) (hR : f NLogN.KFB.rP = []) (hb : NLogN.KFB.GB wb zs)
(hZ : zsz ((2 * (w.val * 2 ^ (m * n)) : ℕ) : ℤ) ≤ Z) :
∃ zs', Rep zs' ((P8Lift.RStep.childR w h U).mulVec x) ∧
IRuns I iprog (childI (w.val * 2 ^ (m * n)) (2 ^ (n * (m - 1 - h.val))) (2 ^ n)
(2 ^ (n * h.val)) PT) (encK s f) (encK s (Function.update f 0 (gflat zs' ++ l)))
(cChild wb wb' (w.val * 2 ^ (m * n)) (2 ^ (n * (m - 1 - h.val))) (2 ^ n)
(2 ^ (n * h.val)) Bb Z + cP)
Context. The lemma belongs to the part KFG: the IL wrapper of a child call (task D).
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.unusedVariables false
open NLogN
open NLogN.KFG
open IntMul RS AModel KIL KFD KFB Complex
variable {Pp : ℕ} {I : List Sym} {iprog : Fin Pp → IStmt HS Pp}
variable {Pp : ℕ} {I : List Sym} {iprog : Fin Pp → IStmt HS Pp}
theorem NLogN.KFG.child_iruns {W m n : ℕ} (w : Fin W) (h : Fin m) (U : Butterfly.Op (Fin n))
(PT : IStmt HS Pp) (F : List GI → List GI) (hF : BlkT U F) (Q : (Fin HS → List ℤ) → Prop)
(hQs : ∀ g v0 vP vR, Q g → Q (Function.update (Function.update (Function.update g 0 v0) qP vP)
NLogN.KFB.rP vR))
(Bb Z wb wb' cP : ℕ)
(hA : zsz ((2 ^ (n * (m - 1 - h.val)) : ℕ) : ℤ) ≤ Bb) (hq : zsz ((2 ^ n : ℕ) : ℤ) ≤ Bb)
(hM : zsz ((2 ^ (n * h.val) : ℕ) : ℤ) ≤ Bb) (h2 : zsz (2 : ℤ) ≤ Bb)
(hPT : ∀ (s' : IState HS) (g : Fin HS → List ℤ) (ys : List GI) (R : List ℤ),
g 0 = gflat ys ++ R → Q g → ys.length = 2 ^ (m * n) → NLogN.KFB.GB wb ys →
IRuns I iprog PT (encK s' g) (encK s' (Function.update g 0 (gflat (F ys) ++ R))) cP ∧
NLogN.KFB.GB wb' (F ys))
(s : IState HS) (f : Fin HS → List ℤ) (zs : List GI) (l : List ℤ)
(x : Fin W × (Fin m × Fin n → Fin 2) → ℂ) (hx : Rep zs x)
(h0 : f 0 = gflat zs ++ l) (hQ : Q f) (hP : f qP = []) (hR : f NLogN.KFB.rP = []) (hb : NLogN.KFB.GB wb zs)
(hZ : zsz ((2 * (w.val * 2 ^ (m * n)) : ℕ) : ℤ) ≤ Z) :
∃ zs', Rep zs' ((P8Lift.RStep.childR w h U).mulVec x) ∧
IRuns I iprog (childI (w.val * 2 ^ (m * n)) (2 ^ (n * (m - 1 - h.val))) (2 ^ n)
(2 ^ (n * h.val)) PT) (encK s f) (encK s (Function.update f 0 (gflat zs' ++ l)))
(cChild wb wb' (w.val * 2 ^ (m * n)) (2 ^ (n * (m - 1 - h.val))) (2 ^ n)
(2 ^ (n * h.val)) Bb Z + cP) := by sorry