The serialization stage (round six, `serPs`)
ProvedJ6Seg.PJ.Rn.serPsThe serialization stage, in terms of serL.
The following holds (Lean statement, in the scope of module Solutions.J6SegILPreJD7):
theorem J6Seg.PJ.Rn.serPs {v : Vr} {c : Cs} (hF : Fx Q kk m mw cB v) (hS : StS m L Mf c)
(hB : BdS W m L Mf) (hLm : L.length = m) (hv : BV W v) (hc50 : c 50 = []) (hc51 : c 51 = [])
(hW8 : 8 * (m + 1) ^ 2 ≤ 2 ^ W) :
Rn J6Seg.PJ.serP v c (fun v' =>
(∀ i ∉ ([1, 2, 3, 4, 5, 6, 7, 8, 22, 23, 29] : List (Fin HS)), v' i = v i) ∧
v' 22 = (flN cB L m : ℤ) ∧ v' 23 = ((serL Q kk m mw cB L Mf).length : ℤ) ∧ BV W v')
(update c 41 ((serL Q kk m mw cB L Mf).reverse ++ c 41)) (cSer 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.serPs {v : Vr} {c : Cs} (hF : Fx Q kk m mw cB v) (hS : StS m L Mf c)
(hB : BdS W m L Mf) (hLm : L.length = m) (hv : BV W v) (hc50 : c 50 = []) (hc51 : c 51 = [])
(hW8 : 8 * (m + 1) ^ 2 ≤ 2 ^ W) :
Rn J6Seg.PJ.serP v c (fun v' =>
(∀ i ∉ ([1, 2, 3, 4, 5, 6, 7, 8, 22, 23, 29] : List (Fin HS)), v' i = v i) ∧
v' 22 = (flN cB L m : ℤ) ∧ v' 23 = ((serL Q kk m mw cB L Mf).length : ℤ) ∧ BV W v')
(update c 41 ((serL Q kk m mw cB L Mf).reverse ++ c 41)) (cSer W m) := by sorry