Proposition 14 around any C-layer implementation, with the guarantees of prop14_output
ProvedNLogN.KFH.p14With_irunsProposition 14 around any C-layer implementation, with the guarantees of prop14_output.
The following holds (Lean statement, in the scope of module Solutions.KFHComp):
theorem NLogN.KFH.p14With_iruns {Pp : ℕ} {I : List Sym} {iprog : Fin Pp → IStmt HS Pp}
(hρ : ρ < K) (hD : 1 ≤ D) {r p w : ℕ} (hr : 1 ≤ r) (hS : 1 ≤ S) (hP : 1 ≤ P)
{Cprog : RS} (hfok : fok Cprog = true) {dC : ℕ} {kC : ℕ → ℕ}
(hCimpl : LImpl (P := P) (S := S) hρ r (Butterfly.tens Butterfly.Cm : Butterfly.Op (Fin D))
Cprog D dC kC)
(s : IState HS) (f : Fin HS → List ℤ) (zs : List GI) (l : List ℤ) (xs : List (Fin r → ℂ))
(hx : RecRep r p zs xs) (hl : xs.length = vol (Butterfly.layerShape P K D S))
(h0 : f 0 = gflat zs ++ l) (hC : Cl f) (hb : NLogN.KFB.GB w zs)
(hdisk : ∀ j (h : j < xs.length), ‖xs[j]‖ ≤ 1) :
∃ zs', RecRep r p zs' (Butterfly.prop14Proc (P := P) (S := S) hρ p
(Butterfly.tens Butterfly.Cm : Butterfly.Op (Fin D)) xs) ∧
NLogN.KFB.GB (p + 1) zs' ∧
(∀ j (h : j < (Butterfly.prop14Proc (P := P) (S := S) hρ p
(Butterfly.tens Butterfly.Cm : Butterfly.Op (Fin D)) xs).length)
(h' : j < (Butterfly.layerH P K D S ρ hρ xs).length), ∀ c,
‖(Butterfly.prop14Proc (P := P) (S := S) hρ p
(Butterfly.tens Butterfly.Cm : Butterfly.Op (Fin D)) xs)[j] c -
(Butterfly.layerH P K D S ρ hρ xs)[j] c‖ < Real.sqrt 2 * 2⁻¹ ^ p) ∧
IRuns I iprog (fcode (p14With P K D S ρ r Cprog)) (encK s f)
(encK s (Function.update f 0 (gflat zs' ++ l)))
(kC (w + 2 * D) + cWrap D (vol (Butterfly.layerShape P K D S) * r)
(zsz ((12 * (vol (Butterfly.layerShape P K D S) * r) : ℕ) : ℤ)) w dC)
Context. The lemma belongs to the part KFH: the Proposition 14 wrapper around an arbitrary C^{⊗D} implementation: The recursion of §5.3 replaces the D individual C kernels by the batched network. The
interface between the two is LImpl … (tens Cm) Cprog D dC kC: any fine IL code that maps a
record array at scale F to the C-layer at scale F + D (exact, the D halvings of the
kernels (25) kept as scale), widths +dC, cost kC w.
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.KFH
open IntMul RS AModel KIL KFD KFB Complex
variable {P K D S ρ : ℕ}
theorem NLogN.KFH.p14With_iruns {Pp : ℕ} {I : List Sym} {iprog : Fin Pp → IStmt HS Pp}
(hρ : ρ < K) (hD : 1 ≤ D) {r p w : ℕ} (hr : 1 ≤ r) (hS : 1 ≤ S) (hP : 1 ≤ P)
{Cprog : RS} (hfok : fok Cprog = true) {dC : ℕ} {kC : ℕ → ℕ}
(hCimpl : LImpl (P := P) (S := S) hρ r (Butterfly.tens Butterfly.Cm : Butterfly.Op (Fin D))
Cprog D dC kC)
(s : IState HS) (f : Fin HS → List ℤ) (zs : List GI) (l : List ℤ) (xs : List (Fin r → ℂ))
(hx : RecRep r p zs xs) (hl : xs.length = vol (Butterfly.layerShape P K D S))
(h0 : f 0 = gflat zs ++ l) (hC : Cl f) (hb : NLogN.KFB.GB w zs)
(hdisk : ∀ j (h : j < xs.length), ‖xs[j]‖ ≤ 1) :
∃ zs', RecRep r p zs' (Butterfly.prop14Proc (P := P) (S := S) hρ p
(Butterfly.tens Butterfly.Cm : Butterfly.Op (Fin D)) xs) ∧
NLogN.KFB.GB (p + 1) zs' ∧
(∀ j (h : j < (Butterfly.prop14Proc (P := P) (S := S) hρ p
(Butterfly.tens Butterfly.Cm : Butterfly.Op (Fin D)) xs).length)
(h' : j < (Butterfly.layerH P K D S ρ hρ xs).length), ∀ c,
‖(Butterfly.prop14Proc (P := P) (S := S) hρ p
(Butterfly.tens Butterfly.Cm : Butterfly.Op (Fin D)) xs)[j] c -
(Butterfly.layerH P K D S ρ hρ xs)[j] c‖ < Real.sqrt 2 * 2⁻¹ ^ p) ∧
IRuns I iprog (fcode (p14With P K D S ρ r Cprog)) (encK s f)
(encK s (Function.update f 0 (gflat zs' ++ l)))
(kC (w + 2 * D) + cWrap D (vol (Butterfly.layerShape P K D S) * r)
(zsz ((12 * (vol (Butterfly.layerShape P K D S) * r) : ℕ) : ℤ)) w dC) := by sorry