The scale pad implements the identity with scale shift `e` (round six, `sImplQ_scale`)
ProvedIntMul.Kappa.R6.IL3H.sImplQ_scaleThe scale pad implements the identity with scale shift e.
The following holds (Lean statement, in the scope of module Solutions.R6IL3Pad):
theorem IntMul.Kappa.R6.IL3H.sImplQ_scale {Isym : List Sym} {ι : Type*} [Fintype ι] [DecidableEq ι] {lo hi r : ℕ}
{st : ι → ℕ} {n : ℕ} (hr : 0 < r) (hn : 0 < n)
{σ : Fin HS → Option ℤ} (hlt : ∀ i v, σ i = some v → i.val < 56) (hoff : OffG σ)
{xL xQ ρ ρE : Fin HS} (hL : σ xL = some ((2 * (n * r) : ℕ) : ℤ))
(hQ : σ xQ = some ((2 * (n * r) : ℕ) : ℤ)) {e : ℕ} (hR : WReg σ ρ ρE (n * r) e) (Z : ℕ)
(hZ2 : zsz ((2 * (2 * (n * r)) : ℕ) : ℤ) ≤ Z) (hZ : zsz ((2 * (n * r) : ℕ) : ℤ) ≤ Z) :
SImplQ Isym iprog (fun s => Agree σ s) lo hi r st n 1 (scaleQ xL xQ ρ ρE) e ((e + 2) * 2)
(fun w => 400 * (cPadC (2 * (n * r)) (2 * (n * r)) Z w ((e + 2) * 2)
(cWrapQ 2 (n * r) Z e 0 (fun _ => 1)) + 0) + cWrapQ 2 (n * r) Z e 0 (fun _ => 1) w)
Context. Round six, item language (I3): the scale pad
scaleQ xL xQ ρ ρE = padCU xL xQ (wrapQ 2 1 ρ ρE .skip): append n zero records, swap the zero
half to the front, level the data half by 2^e, swap back, drop the zeros.
wrapQ_zero: the wrapper withU = skipon a zero role (zeros sit at every scale);sImplQ_scale:scaleQimplements the identity with scale shifte.
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*).
-- 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.IL3H
open IntMul NLogN NLogN.KIL NLogN.KFD NLogN.KFB NLogN.KFG NLogN.KFH NLogN.KFN NLogN.KFW Complex P8Lift Butterfly
variable {Pp : ℕ} {I : List Sym} {iprog : Fin Pp → IStmt HS Pp}
theorem IntMul.Kappa.R6.IL3H.sImplQ_scale {Isym : List Sym} {ι : Type*} [Fintype ι] [DecidableEq ι] {lo hi r : ℕ}
{st : ι → ℕ} {n : ℕ} (hr : 0 < r) (hn : 0 < n)
{σ : Fin HS → Option ℤ} (hlt : ∀ i v, σ i = some v → i.val < 56) (hoff : OffG σ)
{xL xQ ρ ρE : Fin HS} (hL : σ xL = some ((2 * (n * r) : ℕ) : ℤ))
(hQ : σ xQ = some ((2 * (n * r) : ℕ) : ℤ)) {e : ℕ} (hR : WReg σ ρ ρE (n * r) e) (Z : ℕ)
(hZ2 : zsz ((2 * (2 * (n * r)) : ℕ) : ℤ) ≤ Z) (hZ : zsz ((2 * (n * r) : ℕ) : ℤ) ≤ Z) :
SImplQ Isym iprog (fun s => Agree σ s) lo hi r st n 1 (scaleQ xL xQ ρ ρE) e ((e + 2) * 2)
(fun w => 400 * (cPadC (2 * (n * r)) (2 * (n * r)) Z w ((e + 2) * 2)
(cWrapQ 2 (n * r) Z e 0 (fun _ => 1)) + 0) + cWrapQ 2 (n * r) Z e 0 (fun _ => 1) w) := by sorry