Round-six lemma `dupP_sp`
ProvedJ6A.DP.dupP_spcomplexity-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.dupP_sp {X : Fin HS} (hXr : X ∉ rg) (hX5 : X.val < 56) (hXT : X ≠ sTmp)
(hXC : X ≠ cRdC) (hX0 : X ≠ 0) (hX1 : X ≠ J6A.DP.T1) (hX2 : X ≠ J6A.DP.T2) (hX3 : X ≠ J6A.DP.CC)
(s : IState HS) (F : Fin HS → List ℤ) (hF : ∀ j, j ≠ 0 → j ≠ X → F j = [])
{k pre post sr t p α d W Bb : ℕ}
(hc : F X = J6A.PA.dL k pre post sr t p α d)
(hL : ∀ x ∈ J6A.PA.dL k pre post sr t p α d, |x| < 2 ^ W) (hW : 8 ≤ 2 ^ W)
(hN : 2 * (pre * (t * post)) ≤ 2 ^ W)
(G l : List ℤ) (h0 : F 0 = G ++ l) (hG : G.length = 2 * (pre * (t * post)))
(hB : Bnd Bb G) (hz : zsz (G.length : ℤ) ≤ Bb) :
Sp (dupP X) (encK s F) (encK s (Function.update F 0 (J6A.dupL 32 G ++ l)))
(cDupP W G.length Bb)
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.dupP_sp {X : Fin HS} (hXr : X ∉ rg) (hX5 : X.val < 56) (hXT : X ≠ sTmp)
(hXC : X ≠ cRdC) (hX0 : X ≠ 0) (hX1 : X ≠ J6A.DP.T1) (hX2 : X ≠ J6A.DP.T2) (hX3 : X ≠ J6A.DP.CC)
(s : IState HS) (F : Fin HS → List ℤ) (hF : ∀ j, j ≠ 0 → j ≠ X → F j = [])
{k pre post sr t p α d W Bb : ℕ}
(hc : F X = J6A.PA.dL k pre post sr t p α d)
(hL : ∀ x ∈ J6A.PA.dL k pre post sr t p α d, |x| < 2 ^ W) (hW : 8 ≤ 2 ^ W)
(hN : 2 * (pre * (t * post)) ≤ 2 ^ W)
(G l : List ℤ) (h0 : F 0 = G ++ l) (hG : G.length = 2 * (pre * (t * post)))
(hB : Bnd Bb G) (hz : zsz (G.length : ℤ) ≤ Bb) :
Sp (dupP X) (encK s F) (encK s (Function.update F 0 (J6A.dupL 32 G ++ l)))
(cDupP W G.length Bb) := 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.dupP_sp`, Solutions/J6AIL11.lean (lines 249–296) of the round-six development.