The layout-in program, uniform: it computes the pull by relabel initL tgtL
ProvedNLogN.KFV.layIn_okThe layout-in program, uniform: it computes the pull by relabel initL tgtL.
The following holds (Lean statement, in the scope of module Solutions.KFV35LayIn):
theorem NLogN.KFV.layIn_ok {eSw : Fin Pp} {dW : Fin HS} {Kc : ℝ} (HSw : SwOK I iprog eSw dW Kc)
(hd0 : dW ≠ 0) (hd56 : dW.val < 56) (hKc : 0 ≤ Kc) (hdW : dW ∉ r3)
(hK : 0 < K) (hℓ : 2 ≤ ℓ) (hq1 : 1 ≤ qq ℓ K) {mk p W B : ℕ} (hmk : mk = mkOf (flOf D long))
(hB : (pLP D ℓ K long).n + ℓ + 5 ≤ B) (hNB : D * qq ℓ K + D + 1 ≤ B) (hWB : W ≤ B) :
LayerU (r := 2 ^ ℓ) I iprog (fun s => LRg s (pLP D ℓ K long) mk W) (layIn eSw dW)
(pull (binSh (pLP D ℓ K long).n) (binSh (pLP D ℓ K long).n)
(relabel (initL D ℓ long) (tgtL D ℓ K long)) 0) (2 ^ (pLP D ℓ K long).n) p W
(cLayIn D ℓ K long Kc (pLP D ℓ K long).n W B)
Context. The lemma belongs to the part KFV §38: the layout-in program (three phases) as one LayerU: layIn = ph1 ; ph2 ; ph3. The three primitive lists are well formed (ops1_wf, ops2_wf,
ops3_wf), so the composed run is the pull by relabel initL tgtL (runArr_eq_pull_init,
applyN_lay3). layIn_ok.
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.unusedSectionVars false
set_option linter.unusedSimpArgs false
set_option linter.unusedVariables false
open NLogN
open NLogN.KFV
open IntMul RS KIL KFD KFB KFH KFC KFT Synth AModel AModelL12
variable {Pp : ℕ} {I : List Sym} {iprog : Fin Pp → IStmt HS Pp}
variable (D ℓ K : ℕ) [NeZero D] (long : Fin D → Bool)
set_option maxHeartbeats 1000000
theorem NLogN.KFV.layIn_ok {eSw : Fin Pp} {dW : Fin HS} {Kc : ℝ} (HSw : SwOK I iprog eSw dW Kc)
(hd0 : dW ≠ 0) (hd56 : dW.val < 56) (hKc : 0 ≤ Kc) (hdW : dW ∉ r3)
(hK : 0 < K) (hℓ : 2 ≤ ℓ) (hq1 : 1 ≤ qq ℓ K) {mk p W B : ℕ} (hmk : mk = mkOf (flOf D long))
(hB : (pLP D ℓ K long).n + ℓ + 5 ≤ B) (hNB : D * qq ℓ K + D + 1 ≤ B) (hWB : W ≤ B) :
LayerU (r := 2 ^ ℓ) I iprog (fun s => LRg s (pLP D ℓ K long) mk W) (layIn eSw dW)
(pull (binSh (pLP D ℓ K long).n) (binSh (pLP D ℓ K long).n)
(relabel (initL D ℓ long) (tgtL D ℓ K long)) 0) (2 ^ (pLP D ℓ K long).n) p W
(cLayIn D ℓ K long Kc (pLP D ℓ K long).n W B) := by sorry