The fine Lemma 12 program (oracle: the fine uniform Prop. 11 code progF)
ProvedNLogN.KFE.l12F_uniform_ratThe fine Lemma 12 program (oracle: the fine uniform Prop. 11 code progF).
The following holds (Lean statement, in the scope of module Solutions.KFEInst):
theorem NLogN.KFE.l12F_uniform_rat (Qc : QCircuit (ZMod 2) m W) (hm : 2 ≤ m) :
∀ (q : ℕ), q.Prime → ∀ (Bb u : ℕ) (Pre G Suf : Shape), 1 ≤ u →
(∀ a ∈ Pre, 1 ≤ a) → (∀ a ∈ G, 1 ≤ a) → (∀ a ∈ Suf, 1 ≤ a) →
∀ e Kp : ℕ, e = Nat.clog q (2 ^ u) → Kp = Nat.clog m e →
(∀ j < Kp, FramesOK (fun X => GoodAtQ q ((Qc.den : ℚ)⁻¹ • ratM X) ∧
∀ T, TStep.sh T ∈ edgeTplQ Qc X → TOK T (q ^ m ^ j) Bb)
(Qc.toCircuit (q ^ m ^ Kp)).gates (Qc.toCircuit (q ^ m ^ Kp)).Min
(Qc.toCircuit (q ^ m ^ Kp)).Mout) →
(∀ j < Kp, SubBnd (q ^ m ^ j) Bb) →
zsz (((2 * vol (qShape Pre G Suf q e) + m + W * e : ℕ)) : ℤ) ≤ Bb → 1 ≤ Bb →
∀ (I : List Sym) (s : IState HS) (F : Fin HS → List ℤ) (xs : List (ZMod 2))
(LP LG LS LU : List ℤ),
F kP = (vol Pre : ℤ) :: LP → F kG = (vol G : ℤ) :: LG → F NLogN.KIL.kS = (vol Suf : ℤ) :: LS →
F aU = (u : ℤ) :: LU → F 0 = enc2 xs →
F 8 = [] → F 9 = [] → F 10 = [] → F 11 = [] → F 15 = [] → F 20 = [] → F 21 = [] →
F 23 = [] → F 24 = [] →
xs.length = vol (binShape Pre G Suf (2 ^ u)) →
IRuns I (progF (Qc.toCircuit 1) (edgeTplQ Qc)) (l12F q m W) (encK s F)
(encK s (Function.update F 0 (enc2 (l12v (normO (AModel.prog (Qc.toCircuit (q ^ m ^ Kp)) q))
W m q Kp (W * Kp) e u Pre G Suf 0 xs))))
(cL12F u e (min (W * Kp) e) Kp (e - min (W * Kp) e) (vol (qShape Pre G Suf q e))
(vol (rowShape (vol Pre) (padRows W Kp (q ^ min (W * Kp) e))
(G ++ List.replicate (min (W * Kp) e) q) Suf q (e - min (W * Kp) e))) m q
(fun j => ilCostF W (KlevF (Qc.toCircuit 1) (edgeTplQ Qc) + 10 ^ 5) (KbF (Qc.toCircuit 1) (edgeTplQ Qc) + 10 ^ 9 + 100) (Kd m)
(SWn (Qc.toCircuit 1) (edgeTplQ Qc)) q Bb j
(vol (rowShape (vol Pre) (padRows W Kp (q ^ min (W * Kp) e))
(G ++ List.replicate (min (W * Kp) e) q) Suf q (e - min (W * Kp) e)))) Bb)
Context. The lemma belongs to the part KFE: the fine Lemma 12 program with the fine Prop. 11 code as oracle.
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.KFE
open IntMul RS AModel AModelL12 AModelRat AModelFac KIL KFD
variable {m W : ℕ} [NeZero W]
theorem NLogN.KFE.l12F_uniform_rat (Qc : QCircuit (ZMod 2) m W) (hm : 2 ≤ m) :
∀ (q : ℕ), q.Prime → ∀ (Bb u : ℕ) (Pre G Suf : Shape), 1 ≤ u →
(∀ a ∈ Pre, 1 ≤ a) → (∀ a ∈ G, 1 ≤ a) → (∀ a ∈ Suf, 1 ≤ a) →
∀ e Kp : ℕ, e = Nat.clog q (2 ^ u) → Kp = Nat.clog m e →
(∀ j < Kp, FramesOK (fun X => GoodAtQ q ((Qc.den : ℚ)⁻¹ • ratM X) ∧
∀ T, TStep.sh T ∈ edgeTplQ Qc X → TOK T (q ^ m ^ j) Bb)
(Qc.toCircuit (q ^ m ^ Kp)).gates (Qc.toCircuit (q ^ m ^ Kp)).Min
(Qc.toCircuit (q ^ m ^ Kp)).Mout) →
(∀ j < Kp, SubBnd (q ^ m ^ j) Bb) →
zsz (((2 * vol (qShape Pre G Suf q e) + m + W * e : ℕ)) : ℤ) ≤ Bb → 1 ≤ Bb →
∀ (I : List Sym) (s : IState HS) (F : Fin HS → List ℤ) (xs : List (ZMod 2))
(LP LG LS LU : List ℤ),
F kP = (vol Pre : ℤ) :: LP → F kG = (vol G : ℤ) :: LG → F NLogN.KIL.kS = (vol Suf : ℤ) :: LS →
F aU = (u : ℤ) :: LU → F 0 = enc2 xs →
F 8 = [] → F 9 = [] → F 10 = [] → F 11 = [] → F 15 = [] → F 20 = [] → F 21 = [] →
F 23 = [] → F 24 = [] →
xs.length = vol (binShape Pre G Suf (2 ^ u)) →
IRuns I (progF (Qc.toCircuit 1) (edgeTplQ Qc)) (l12F q m W) (encK s F)
(encK s (Function.update F 0 (enc2 (l12v (normO (AModel.prog (Qc.toCircuit (q ^ m ^ Kp)) q))
W m q Kp (W * Kp) e u Pre G Suf 0 xs))))
(cL12F u e (min (W * Kp) e) Kp (e - min (W * Kp) e) (vol (qShape Pre G Suf q e))
(vol (rowShape (vol Pre) (padRows W Kp (q ^ min (W * Kp) e))
(G ++ List.replicate (min (W * Kp) e) q) Suf q (e - min (W * Kp) e))) m q
(fun j => ilCostF W (KlevF (Qc.toCircuit 1) (edgeTplQ Qc) + 10 ^ 5) (KbF (Qc.toCircuit 1) (edgeTplQ Qc) + 10 ^ 9 + 100) (Kd m)
(SWn (Qc.toCircuit 1) (edgeTplQ Qc)) q Bb j
(vol (rowShape (vol Pre) (padRows W Kp (q ^ min (W * Kp) e))
(G ++ List.replicate (min (W * Kp) e) q) Suf q (e - min (W * Kp) e)))) Bb) := by sorry