Round-six lemma `sp_reg`
ProvedIntMul.Kappa.R6.sp_regcomplexity-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.R6SHdr):
theorem IntMul.Kappa.R6.sp_reg (s : IState HS) (f : Fin HS → List ℤ) (S L n b' p d α Aa Bb : ℕ)
(l36 l31 l23 l29 l30 l25 l35 : List ℤ) (h36 : f 36 = (S : ℤ) :: l36)
(h31 : f 31 = (L : ℤ) :: l31) (h23 : f 23 = (n : ℤ) :: l23) (h29 : f 29 = (b' : ℤ) :: l29)
(h30 : f 30 = (p : ℤ) :: l30) (h25 : f 25 = (d : ℤ) :: l25) (h35 : f 35 = (α : ℤ) :: l35)
(hp : p = 6 * b') (hb1 : 1 ≤ b') (hLp : L + 1 ≤ p) (hGp : 2 * d * α ^ 2 ≤ p)
(hAa : 64 ≤ Aa) (hB : Aa ^ 6 < 2 ^ Bb) (hpA : 2 ^ p ≤ Aa) (hSA : 2 * S ≤ Aa)
(hnA : 4 * n ≤ Aa) (hdA : d ≤ Aa) (hαA : α ≤ Aa) (hn1 : 1 ≤ n) :
Sp regP (encK s f) (encK s (update (update (update (update (update (update (update (update
(update (update (update (update (update f
6 ((S : ℤ) :: f 6)) 7 ((2 : ℤ) ^ L :: f 7)) 8 ((2 : ℤ) ^ (L + 1) :: f 8))
9 ((((n + b' - 1) / b' : ℕ) : ℤ) :: f 9)) 10 ((2 : ℤ) ^ p :: f 10))
11 ((2 : ℤ) ^ (2 * d * α ^ 2) :: f 11)) 12 ((2 : ℤ) ^ (p - b' - 2) :: f 12))
13 ((2 : ℤ) ^ b' :: f 13)) 14 (2 * ((S : ℤ) - (((n + b' - 1) / b' : ℕ) : ℤ)) :: f 14))
15 ((2 : ℤ) ^ (p - 1) :: f 15)) 16 ((2 : ℤ) ^ (2 * b' + 4) :: f 16))
18 (((p : ℤ) + 2) :: f 18)) 19 (1 :: f 19))) (66 * kU Bb)
Context. Round-six setup, part 7: descriptor headers and the register file
hdrP: pushes the headers of the three descriptors (26:[p+2, h, d],27:[K, p, α, h, d]withK = h,28:[p, α, h, d]).regP: pushes the register filerS, …, rF, rPw, rOne(registers6–16,18,19).
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_Defs69 set_option autoImplicit false set_option relaxedAutoImplicit false set_option maxHeartbeats 1000000 open IntMul IntMul.Kappa IntMul.Kappa.R6 open IntMul NLogN NLogN.KIL NLogN.KFM NLogN.RS Finset Function
Formal statement
theorem IntMul.Kappa.R6.sp_reg (s : IState HS) (f : Fin HS → List ℤ) (S L n b' p d α Aa Bb : ℕ)
(l36 l31 l23 l29 l30 l25 l35 : List ℤ) (h36 : f 36 = (S : ℤ) :: l36)
(h31 : f 31 = (L : ℤ) :: l31) (h23 : f 23 = (n : ℤ) :: l23) (h29 : f 29 = (b' : ℤ) :: l29)
(h30 : f 30 = (p : ℤ) :: l30) (h25 : f 25 = (d : ℤ) :: l25) (h35 : f 35 = (α : ℤ) :: l35)
(hp : p = 6 * b') (hb1 : 1 ≤ b') (hLp : L + 1 ≤ p) (hGp : 2 * d * α ^ 2 ≤ p)
(hAa : 64 ≤ Aa) (hB : Aa ^ 6 < 2 ^ Bb) (hpA : 2 ^ p ≤ Aa) (hSA : 2 * S ≤ Aa)
(hnA : 4 * n ≤ Aa) (hdA : d ≤ Aa) (hαA : α ≤ Aa) (hn1 : 1 ≤ n) :
Sp regP (encK s f) (encK s (update (update (update (update (update (update (update (update
(update (update (update (update (update f
6 ((S : ℤ) :: f 6)) 7 ((2 : ℤ) ^ L :: f 7)) 8 ((2 : ℤ) ^ (L + 1) :: f 8))
9 ((((n + b' - 1) / b' : ℕ) : ℤ) :: f 9)) 10 ((2 : ℤ) ^ p :: f 10))
11 ((2 : ℤ) ^ (2 * d * α ^ 2) :: f 11)) 12 ((2 : ℤ) ^ (p - b' - 2) :: f 12))
13 ((2 : ℤ) ^ b' :: f 13)) 14 (2 * ((S : ℤ) - (((n + b' - 1) / b' : ℕ) : ℤ)) :: f 14))
15 ((2 : ℤ) ^ (p - 1) :: f 15)) 16 ((2 : ℤ) ^ (2 * b' + 4) :: f 16))
18 (((p : ℤ) + 2) :: f 18)) 19 (1 :: f 19))) (66 * kU 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 `IntMul.Kappa.R6.sp_reg`, Solutions/R6SHdr.lean (lines 97–235) of the round-six development.