The forward rows (round six, `fLoop`)
ProvedJ6Seg.PJ.Rn.fLoopThe forward rows.
The following holds (Lean statement, in the scope of module Solutions.J6SegILPreJD7):
theorem J6Seg.PJ.Rn.fLoop {v : Vr} {D : Cs} (hF : Fx Q kk m mw cB v) (hS : StS m L Mf D)
(hB : BdS W m L Mf) (hLm : L.length = m) (hv : BV W v) {t : ℕ} (h23 : v 23 = t)
(hD50 : D 50 = []) (hD51 : D 51 = [])
(ht : t + ((List.range m).flatMap (fun r' => rowP Q m mw cB L Mf (m - 1 - r'))).length ≤ 2 ^ W)
(hW8 : 8 * (m + 1) ^ 2 ≤ 2 ^ W) :
Rn (PJ.forL 50 28 1 J6Seg.PJ.fBody) v D (fun v' =>
v' 23 = ((t + ((List.range m).flatMap (fun r' => rowP Q m mw cB L Mf (m - 1 - r'))).length
: ℕ) : ℤ) ∧
(∀ i ∉ ([1, 2, 3, 4, 5, 6, 7, 8, 23, 29] : List (Fin HS)), v' i = v i) ∧ BV W v')
(update D 41 (((List.range m).flatMap (fun r' => rowP Q m mw cB L Mf (m - 1 - r'))).reverse
++ D 41))
(cFor W m (cfB W m))
Context. B-line IL, J pre-table (B5-J), jTab part D7: the serialization stage serP
Rn.serPs: serP pushes (serL …).reverse onto 41, sets 22 to the number of border
rows and 23 to the number of pushed entries; registers outside 1–8, 22, 23, 29 and all
stacks but 41 are unchanged.
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_R6_Defs71
set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 1000000
open J6Seg J6Seg.PJ
open IntMul NLogN NLogN.KIL NLogN.RS Function J6Seg.PJ.E
variable {Q kk m mw cB W : ℕ} {L : List ℕ} {Mf : ℕ → ℕ → ℤ}
theorem J6Seg.PJ.Rn.fLoop {v : Vr} {D : Cs} (hF : Fx Q kk m mw cB v) (hS : StS m L Mf D)
(hB : BdS W m L Mf) (hLm : L.length = m) (hv : BV W v) {t : ℕ} (h23 : v 23 = t)
(hD50 : D 50 = []) (hD51 : D 51 = [])
(ht : t + ((List.range m).flatMap (fun r' => rowP Q m mw cB L Mf (m - 1 - r'))).length ≤ 2 ^ W)
(hW8 : 8 * (m + 1) ^ 2 ≤ 2 ^ W) :
Rn (PJ.forL 50 28 1 J6Seg.PJ.fBody) v D (fun v' =>
v' 23 = ((t + ((List.range m).flatMap (fun r' => rowP Q m mw cB L Mf (m - 1 - r'))).length
: ℕ) : ℤ) ∧
(∀ i ∉ ([1, 2, 3, 4, 5, 6, 7, 8, 23, 29] : List (Fin HS)), v' i = v i) ∧ BV W v')
(update D 41 (((List.range m).flatMap (fun r' => rowP Q m mw cB L Mf (m - 1 - r'))).reverse
++ D 41))
(cFor W m (cfB W m)) := by sorry