The pointwise Kronecker stage in IL
ProvedNLogN.KFV.kronU_runsThe pointwise Kronecker stage in IL.
The following holds (Lean statement, in the scope of module Solutions.KFV11Kron):
theorem NLogN.KFV.kronU_runs {M : MulSpec} {pM : Fin Pp} (hM : MulOK I iprog pM M) (hdom : ∀ x y, M.dom x y)
{b r p ρ φ N : ℕ} (hΦ : ∀ x y : ℤ, zsz x ≤ b * r + 2 → zsz y ≤ b * r + 2 → M.Φ x y ≤ φ)
(hb : 1 ≤ b) (hr : 1 ≤ r) (hbig : 2 * r * 2 ^ (2 * p) < 2 ^ (b - 1))
(s : IState HS) (f : Fin HS → List ℤ) (zf zg : List GI) (l : List ℤ)
(h0 : f 0 = gflat zf ++ (gflat zg ++ l)) (hlf : zf.length = N * r) (hlg : zg.length = N * r)
(hzf : ∀ z ∈ zf, |z.1| ≤ 2 ^ p ∧ |z.2| ≤ 2 ^ p) (hzg : ∀ z ∈ zg, |z.1| ≤ 2 ^ p ∧ |z.2| ≤ 2 ^ p)
(hE : ∀ j : Fin HS, j ≠ 0 → (j.val < 24 ∨ j = tX) → f j = [])
(hP : PV (πr (2 ^ p) (kG b r (2 ^ p)) b r ((2 ^ b) ^ (2 * r)) (2 ^ (p + ρ))) s)
(hF : PZ (πr (2 ^ p) (kG b r (2 ^ p)) b r ((2 ^ b) ^ (2 * r)) (2 ^ (p + ρ))) f)
{LN LM : List Item} (hN : s.G vRH = .int (N : ℤ) :: LN)
(hNr : s.G NLogN.KFV.vT = .int ((2 * (N * r) : ℕ) : ℤ) :: LM) (hZ : NM (s.G vZ)) :
IRuns I iprog (kronU pM) (NLogN.KIL.encK s f)
(NLogN.KIL.encK s (Function.update f 0 (gflat (kmulN r p ρ N zf zg) ++ l))) (cKron N r p b ρ φ)
Context. The lemma belongs to the part KFV §15: the uniform pointwise Kronecker stage kronU: kronU pM multiplies two arrays of N records (r Gaussian integers each) record by record:
stack 0 holds gflat zf ++ gflat zg ++ l; afterwards it holds gflat (kmulN r p ρ N zf zg) ++ l,
where record j of kmulN is kmul r p ρ of records j of zf and zg (KFV6Math).
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.unusedVariables false
set_option linter.unusedSimpArgs false
open NLogN
open NLogN.KFV
open IntMul KIL KFD KFT KFB KFC RS
variable {Pp : ℕ} {I : List Sym} {iprog : Fin Pp → IStmt HS Pp}
set_option maxHeartbeats 4000000
theorem NLogN.KFV.kronU_runs {M : MulSpec} {pM : Fin Pp} (hM : MulOK I iprog pM M) (hdom : ∀ x y, M.dom x y)
{b r p ρ φ N : ℕ} (hΦ : ∀ x y : ℤ, zsz x ≤ b * r + 2 → zsz y ≤ b * r + 2 → M.Φ x y ≤ φ)
(hb : 1 ≤ b) (hr : 1 ≤ r) (hbig : 2 * r * 2 ^ (2 * p) < 2 ^ (b - 1))
(s : IState HS) (f : Fin HS → List ℤ) (zf zg : List GI) (l : List ℤ)
(h0 : f 0 = gflat zf ++ (gflat zg ++ l)) (hlf : zf.length = N * r) (hlg : zg.length = N * r)
(hzf : ∀ z ∈ zf, |z.1| ≤ 2 ^ p ∧ |z.2| ≤ 2 ^ p) (hzg : ∀ z ∈ zg, |z.1| ≤ 2 ^ p ∧ |z.2| ≤ 2 ^ p)
(hE : ∀ j : Fin HS, j ≠ 0 → (j.val < 24 ∨ j = tX) → f j = [])
(hP : PV (πr (2 ^ p) (kG b r (2 ^ p)) b r ((2 ^ b) ^ (2 * r)) (2 ^ (p + ρ))) s)
(hF : PZ (πr (2 ^ p) (kG b r (2 ^ p)) b r ((2 ^ b) ^ (2 * r)) (2 ^ (p + ρ))) f)
{LN LM : List Item} (hN : s.G vRH = .int (N : ℤ) :: LN)
(hNr : s.G NLogN.KFV.vT = .int ((2 * (N * r) : ℕ) : ℤ) :: LM) (hZ : NM (s.G vZ)) :
IRuns I iprog (kronU pM) (NLogN.KIL.encK s f)
(NLogN.KIL.encK s (Function.update f 0 (gflat (kmulN r p ρ N zf zg) ++ l))) (cKron N r p b ρ φ) := by sorry