Round-six lemma `rowCodeU_runs`
ProvedNLogN.KFX.rowCodeU_runsAn auxiliary lemma of the round-six development, published as a separate node because its proof is long or shared.
The following holds (Lean statement, in the scope of module Solutions.KFX6Run):
theorem NLogN.KFX.rowCodeU_runs {q : ℕ} {Kc : ℝ} (H13 : L13U q Kc) {I : List Sym}
{k K e T S0 B r H : ℕ} {i j : Fin mC} (hij : (i : ℕ) ≠ j) (hK : 6 ≤ K)
(hp : PF k K e T S0 B r) {u : IState HS} (hA : Agree (rowσ k K e T S0 B r H i j) u)
(zs : List GI) (R0 : List Item) (hg0 : u.G 0 = ints (gflat zs) ++ R0)
(hl : zs.length = B * 2 ^ T * S0 * r) (hGB : GB H zs) :
∃ c, IRuns I l12prog (rowCodeU q) u
(u.upd 0 (ints (gflat (permRecs (rect (N0R k K e T B i j) (N1R k K e i j) (N2R k K e i j)
(N3R k K e S0 i j) (mC ^ k * K)) (rowAddAddr K (e % K) (mC ^ k) (pxR i j) (pyR i j)) r zs))
++ R0)) c ∧
(c : ℝ) ≤ KFR.bnd Kc K (mC ^ k) (B * 2 ^ T * S0) r H +
(cHd (zsz ((VbR T S0 B r H : ℕ) : ℤ)) : ℝ)
Context. KFX §6: the bit-length loop and the run of the uniform row addition
loopZ computes A = zsz V on stack 48 by halving V (pushed on stack 14) until it is 0.
rowCodeU q = withPushI hdrL (zB (l13U q)) pushes the master registers computed from the
parameter registers (hdrL), runs loopZ, then l13U q.
Formalization Note. Part of the Lean formalization of the round-six κ-improvement (integer-multiplication-kappa campaign, target IntMul.Kappa.jain_round6_framework). The statement is copied verbatim from the Lean development; the platform node carries the same declaration name. Definitions it mentions live in the IntMul_Kappa_R6_Defs* bundles (on top of the published κ bundles IntMul_Kappa_K_Defs*).
-- Round-six κ development (integer-multiplication-kappa), generated by skeleton subtraction. import Definitions.Def_IntMul_Kappa_K_Defs33 import Definitions.Def_IntMul_Kappa_R6_Defs1 import Mathlib import Definitions.Def_IntMul_HvdH_M_Defs8 import Definitions.Def_IntMul_MultitapeModel set_option autoImplicit false set_option relaxedAutoImplicit false set_option maxHeartbeats 1000000 open NLogN NLogN.KFX open IntMul NLogN.RS NLogN.KIL NLogN.KFD NLogN.KFE NLogN.KFB NLogN.KFL NLogN.KFW NLogN.KFH AModel Butterfly
theorem NLogN.KFX.rowCodeU_runs {q : ℕ} {Kc : ℝ} (H13 : L13U q Kc) {I : List Sym}
{k K e T S0 B r H : ℕ} {i j : Fin mC} (hij : (i : ℕ) ≠ j) (hK : 6 ≤ K)
(hp : PF k K e T S0 B r) {u : IState HS} (hA : Agree (rowσ k K e T S0 B r H i j) u)
(zs : List GI) (R0 : List Item) (hg0 : u.G 0 = ints (gflat zs) ++ R0)
(hl : zs.length = B * 2 ^ T * S0 * r) (hGB : GB H zs) :
∃ c, IRuns I l12prog (rowCodeU q) u
(u.upd 0 (ints (gflat (permRecs (rect (N0R k K e T B i j) (N1R k K e i j) (N2R k K e i j)
(N3R k K e S0 i j) (mC ^ k * K)) (rowAddAddr K (e % K) (mC ^ k) (pxR i j) (pyR i j)) r zs))
++ R0)) c ∧
(c : ℝ) ≤ KFR.bnd Kc K (mC ^ k) (B * 2 ^ T * S0) r H +
(cHd (zsz ((VbR T S0 B r H : ℕ) : ℤ)) : ℝ) := by sorry