`X` above `Y` (round six, `topA_step`)
ProvedIntMul.Kappa.R6.IL2C.topA_stepcomplexity-theoryinteger-multiplicationkappa-improvement
X above Y: the last-bit rotation is the flip.
The following holds (Lean statement, in the scope of module Solutions.R6IL2CTop):
theorem IntMul.Kappa.R6.IL2C.topA_step (hT : TopOK l L q Br) {k : ℕ} (hk : 0 < k) (hXY : l.sX = l.sY * l.QL * k) :
RecStep I tab topA (fun t => CEnv t l K ρ G n q Br fl) l.M Br (l.stepP (flipS q))
(cXorU (l.M / (2 * (l.sY * 2 ^ q))) (l.sY * 2 ^ q * Br) 1 (zsz ((l.M * Br : ℕ) : ℤ) + 3) : ℕ)
Context. Round six, compact controls (I2C): the top selected bit and the record-step calculus
Tl_xor: the ideal toggle isy ⊕ (x ∧ selM n); with the top bitq = ρ + n Kflipped as well (flipS q) the composite step is the slot row additionphi g (Fpp K ρ (n+1) px py)(tlflip_phi).flip_pull,swflip: the last-bit table rotation (directly whenXis aboveY, between two swaps of single bits otherwise) is the record pulll.stepP (flipS q).RecStep: a program acting on the record arrayflR recs Masrecs ∘ π, with sequencing, branching and skip.CEnv: the registers of the compact program;topC_step: the top-bit code as aRecStep.
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_Defs21
set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 1000000
open IntMul IntMul.Kappa IntMul.Kappa.R6 IntMul.Kappa.R6.IL2C
open NLogN NLogN.KFL NLogN.KIL NLogN.KFD NLogN.KFW NLogN.KFX IntMul NLogN.RS NLogN.KFW.RS AModel AModelL12 Butterfly
variable {I : List Sym} {tab : Fin 1 → IStmt HS 1} {l12 : IStmt HS 1} {τ : ℝ}
{l : Lay} {K ρ G n q L Br : ℕ} {fl : ℤ}
Formal statement
theorem IntMul.Kappa.R6.IL2C.topA_step (hT : TopOK l L q Br) {k : ℕ} (hk : 0 < k) (hXY : l.sX = l.sY * l.QL * k) :
RecStep I tab topA (fun t => CEnv t l K ρ G n q Br fl) l.M Br (l.stepP (flipS q))
(cXorU (l.M / (2 * (l.sY * 2 ^ q))) (l.sY * 2 ^ q * Br) 1 (zsz ((l.M * Br : ℕ) : ℤ) + 3) : ℕ) := 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.IL2C.topA_step`, Solutions/R6IL2CTop.lean (lines 437–498) of the round-six development.