sImpl_cinv (KFN: one node of the recursive `C`-layer)
ProvedNLogN.KFN.sImpl_cinvThe following holds (Lean statement, in the scope of module Solutions.KFNNode):
theorem NLogN.KFN.sImpl_cinv {r : ℕ} (hr : 0 < r) (pos : κ → ℕ) (t S0 B : ℕ) (hpos : ∀ p, pos p < t)
(hS : 0 < S0) (hB : 1 ≤ B) (hs : SLaws (fun c => 2 ^ pos c * S0) (B * 2 ^ t * S0))
{code : ℕ → IStmt HS Pp} {e dw : ℕ} {cost : ℕ → ℕ}
(H : SImplI Isym iprog r (fun c => 2 ^ pos c * S0) (B * 2 ^ t * S0) (Butterfly.tens Cm : Butterfly.Op κ)
code e dw cost)
(Z : ℕ) (hZ1 : zsz ((4 * (B * (S0 * r * 2 ^ t) + S0 * r + B + 1) : ℕ) : ℤ) ≤ Z) :
SImplI Isym iprog r (fun c => 2 ^ pos c * S0) (B * 2 ^ t * S0) (Butterfly.tens Cinv : Butterfly.Op κ)
(cinvC pos S0 r t B code dw) (0 + e + 0) (0 + dw + 0)
(fun w => (cPhL w (B * (S0 * r * 2 ^ t)) t B Z + cost (w + 0)) +
cPhL (w + (0 + dw)) (B * (S0 * r * 2 ^ t)) t B Z)
Context. The lemma belongs to the part KFN: one node of the recursive C-layer: A node runs the steps of an interface J : Prop8IfaceR W m s on W role streams of n
records; its bits are Fin m × κ (rows × the bits of a child), at record strides st.
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_Defs20.
-- OpenAI-preprint / κ-improvement development (integer-multiplication-kappa), generated by skeleton subtraction.
import Definitions.Def_IntMul_Kappa_K_Defs20
set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 1000000
set_option linter.unusedSimpArgs false
set_option linter.unusedVariables false
set_option linter.unusedSectionVars false
open NLogN
open NLogN.KFN
open IntMul RS AModel KIL KFD KFB KFG KFH Complex P8Lift Butterfly
variable {Pp : ℕ} {Isym : List Sym} {iprog : Fin Pp → IStmt HS Pp}
variable {W m : ℕ} {κ : Type} [Fintype κ] [DecidableEq κ]
theorem NLogN.KFN.sImpl_cinv {r : ℕ} (hr : 0 < r) (pos : κ → ℕ) (t S0 B : ℕ) (hpos : ∀ p, pos p < t)
(hS : 0 < S0) (hB : 1 ≤ B) (hs : SLaws (fun c => 2 ^ pos c * S0) (B * 2 ^ t * S0))
{code : ℕ → IStmt HS Pp} {e dw : ℕ} {cost : ℕ → ℕ}
(H : SImplI Isym iprog r (fun c => 2 ^ pos c * S0) (B * 2 ^ t * S0) (Butterfly.tens Cm : Butterfly.Op κ)
code e dw cost)
(Z : ℕ) (hZ1 : zsz ((4 * (B * (S0 * r * 2 ^ t) + S0 * r + B + 1) : ℕ) : ℤ) ≤ Z) :
SImplI Isym iprog r (fun c => 2 ^ pos c * S0) (B * 2 ^ t * S0) (Butterfly.tens Cinv : Butterfly.Op κ)
(cinvC pos S0 r t B code dw) (0 + e + 0) (0 + dw + 0)
(fun w => (cPhL w (B * (S0 * r * 2 ^ t)) t B Z + cost (w + 0)) +
cPhL (w + (0 + dw)) (B * (S0 * r * 2 ^ t)) t B Z) := by sorry