Uniform padding (round six, `sImplQ_padU`)
ProvedNLogN.KFW.sImplQ_padUcomplexity-theoryinteger-multiplicationkappa-improvement
Uniform padding.
The following holds (Lean statement, in the scope of module Solutions.KFWC4):
theorem NLogN.KFW.sImplQ_padU {ι : Type*} [Fintype ι] [DecidableEq ι] {lo hi r : ℕ} {st : ι → ℕ} {n np : ℕ}
(hs : SLaws st n) (hnp : n ≤ np) {T : Matrix (ι → Fin 2) (ι → Fin 2) ℂ}
{σ : Fin HS → Option ℤ} (hlt : ∀ i v, σ i = some v → i.val < 56) (hoff : OffG σ)
{xL xQ : Fin HS} (hL : σ xL = some ((2 * (n * r) : ℕ) : ℤ))
(hQ : σ xQ = some ((2 * ((np - n) * r) : ℕ) : ℤ))
{U : IStmt HS Pp} {e dw : ℕ} {cost : ℕ → ℕ}
(h : SImplQ Isym iprog (fun s => Agree σ s) lo hi r st np T U e dw cost) (Z : ℕ)
(hZ : zsz ((2 * ((np - n) * r) : ℕ) : ℤ) ≤ Z) :
SImplQ Isym iprog (fun s => Agree σ s) lo hi r st n T (padCU xL xQ U) e dw
(fun w => 400 * (cPadC (2 * (n * r)) (2 * ((np - n) * r)) Z w dw cost + 0) + cost w)
Context. KFW C-layer 4: uniform truncation and uniform padding
truncU xD xN:KFH.truncPwith the divisor2^Δread fromxDand the item count fromxN;runQ_truncU: on records at scalep + Δit givesQ_pat scalep(a fixed run).padPreU xL xQ,padPostU xL xQ:KFN.padPre/padPostwith the lengths read from registers;sImplQ_padU: a uniform program onnp ≥ nrecords implements the same operator onnrecords, padded (asKFN.sImpl_pad).
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_K_Defs33
import Definitions.Def_IntMul_Kappa_R6_Defs1
import Mathlib
import Definitions.Def_IntMul_HvdH_M_Defs8
import Definitions.Def_IntMul_MultitapeModel
set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 1000000
open NLogN NLogN.KFW
open IntMul NLogN.KIL NLogN.KFD NLogN.KFB NLogN.KFG NLogN.KFH NLogN.KFN Complex Butterfly
variable {Pp : ℕ} {Isym : List Sym} {iprog : Fin Pp → IStmt HS Pp}
Formal statement
theorem NLogN.KFW.sImplQ_padU {ι : Type*} [Fintype ι] [DecidableEq ι] {lo hi r : ℕ} {st : ι → ℕ} {n np : ℕ}
(hs : SLaws st n) (hnp : n ≤ np) {T : Matrix (ι → Fin 2) (ι → Fin 2) ℂ}
{σ : Fin HS → Option ℤ} (hlt : ∀ i v, σ i = some v → i.val < 56) (hoff : OffG σ)
{xL xQ : Fin HS} (hL : σ xL = some ((2 * (n * r) : ℕ) : ℤ))
(hQ : σ xQ = some ((2 * ((np - n) * r) : ℕ) : ℤ))
{U : IStmt HS Pp} {e dw : ℕ} {cost : ℕ → ℕ}
(h : SImplQ Isym iprog (fun s => Agree σ s) lo hi r st np T U e dw cost) (Z : ℕ)
(hZ : zsz ((2 * ((np - n) * r) : ℕ) : ℤ) ≤ Z) :
SImplQ Isym iprog (fun s => Agree σ s) lo hi r st n T (padCU xL xQ U) e dw
(fun w => 400 * (cPadC (2 * (n * r)) (2 * ((np - n) * r)) Z w dw cost + 0) + cost w) := 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 `NLogN.KFW.sImplQ_padU`, Solutions/KFWC4.lean (lines 126–245) of the round-six development.