Round-six lemma `rdN`
ProvedJ6A.DP.Rn.rdNcomplexity-theoryinteger-multiplicationkappa-improvement
An 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.J6AIL11):
theorem J6A.DP.Rn.rdN {X : Fin HS} (hXr : X ∉ rg) (hX5 : X.val < 56) (hXT : X ≠ sTmp)
(hXC : X ≠ cRdC) {c : Cs} {k pre post s t p α d W : ℕ}
(hc : c X = J6A.PA.dL k pre post s t p α d)
(hL : ∀ x ∈ J6A.PA.dL k pre post s t p α d, |x| < 2 ^ W) (hW : 8 ≤ 2 ^ W)
(hN : 2 * (pre * (t * post)) ≤ 2 ^ W) :
Rn (J6A.DP.rdN X) (fun _ => 0) c
(fun v => v 20 = ((2 * (pre * (t * post)) : ℕ) : ℤ) ∧ BV W v) c
(cRdK 1 W + (cRdK 2 W + (cRdK 4 W + J6Seg.PJ.cT nE W)))
Context. A lines, IL side 11: the copy step dupL 32
Sp.dupKE:dupKwith a general count expression;cpBody T T2 C r: fromT = G.reverse, pushGonto stack0(viaT2) and restoreT;rpt k b:kcopies ofbin sequence;dupP: readpre, post, tof the descriptor ondAinto the register file, compute2·pre·t·post, move the array toT, push it back32times, dropT, leave the register file.
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*).
Preamble
-- Round-six κ development (integer-multiplication-kappa), generated by skeleton subtraction. import Definitions.Def_IntMul_Kappa_R6_Defs64 set_option autoImplicit false set_option relaxedAutoImplicit false set_option maxHeartbeats 1000000 open J6A J6A.DP open IntMul NLogN NLogN.KIL NLogN.RS J6Seg.PJ IntMul.HvdH J6A.PA
Formal statement
theorem J6A.DP.Rn.rdN {X : Fin HS} (hXr : X ∉ rg) (hX5 : X.val < 56) (hXT : X ≠ sTmp)
(hXC : X ≠ cRdC) {c : Cs} {k pre post s t p α d W : ℕ}
(hc : c X = J6A.PA.dL k pre post s t p α d)
(hL : ∀ x ∈ J6A.PA.dL k pre post s t p α d, |x| < 2 ^ W) (hW : 8 ≤ 2 ^ W)
(hN : 2 * (pre * (t * post)) ≤ 2 ^ W) :
Rn (J6A.DP.rdN X) (fun _ => 0) c
(fun v => v 20 = ((2 * (pre * (t * post)) : ℕ) : ℤ) ∧ BV W v) c
(cRdK 1 W + (cRdK 2 W + (cRdK 4 W + J6Seg.PJ.cT nE W))) := by sorrySource
S. Jain, round-six networks for the integer-multiplication κ-improvement campaign (https://github.com/Swapnil-jain/integer-mult-kappa, commit 5868dc7) and D. Colkitt, integer-mult-bounds (https://github.com/CrocSwap/integer-mult-bounds); target `IntMul.Kappa.jain_round6_framework`. Lean declaration `J6A.DP.Rn.rdN`, Solutions/J6AIL11.lean (lines 189–233) of the round-six development.