The clog loop (`clL`)
ProvedJ6Seg.PJ.clLcomplexity-theoryinteger-multiplicationkappa-improvement
The clog loop.
The following holds (Lean statement, in the scope of module Solutions.J6SegILPreJC1):
theorem J6Seg.PJ.clL {W : ℕ} {c : Cs} {vb : Vr} {m : ℕ} (hvb : BV W vb) (h5 : vb 5 = 1) (h6 : vb 6 = 0)
(h24 : vb 24 = m) (hm : 2 * m + 2 < 2 ^ W) (hc : c cLC = []) :
Rn (.rep cLC (.reg 24) (PJ.asgs [(6, eCf), (5, eCg)])) vb c
(fun v => v = update (update vb 6 (Nat.clog 2 m : ℤ)) 5 ((2 ^ Nat.clog 2 m : ℕ) : ℤ) ∧ BV W v)
c (cLoop W m (cA W [(6, eCf), (5, eCg)]))
Context. B5 chunk side (eC), part 1: before the chunk store
From the parameter registers (ParV): stash pre, post, wd on 44, set 26 := pk,
28 := b, 29 := nc = t / λ, compute f = ⌈log₂ λ⌉ and g = 2^f (loop on 24), stash
f, g (Rn.cPre).
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 J6Seg J6Seg.PJ open IntMul NLogN NLogN.KIL NLogN.RS Function
Formal statement
theorem J6Seg.PJ.clL {W : ℕ} {c : Cs} {vb : Vr} {m : ℕ} (hvb : BV W vb) (h5 : vb 5 = 1) (h6 : vb 6 = 0)
(h24 : vb 24 = m) (hm : 2 * m + 2 < 2 ^ W) (hc : c cLC = []) :
Rn (.rep cLC (.reg 24) (PJ.asgs [(6, eCf), (5, eCg)])) vb c
(fun v => v = update (update vb 6 (Nat.clog 2 m : ℤ)) 5 ((2 ^ Nat.clog 2 m : ℕ) : ℤ) ∧ BV W v)
c (cLoop W m (cA W [(6, eCf), (5, eCg)])) := 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 `J6Seg.PJ.clL`, Solutions/J6SegILPreJC1.lean (lines 45–88) of the round-six development.