Round-six lemma `coefBd_sp`
ProvedNLogN.KFUU.R6Crt.coefBd_spAn 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.R6CrtTab):
theorem NLogN.KFUU.R6Crt.coefBd_sp (sF : ℕ → ℕ) (μ D Q i k : ℕ) (hk : k < i)
(hs : ∀ j < i, 1 ≤ sF j) (hQ1 : 1 ≤ Q) (hμ : μ < Q) (hD1 : 1 ≤ D) (hDP : D ≤ Pv sF i) (B : ℕ)
(hB : zsz ((Q * Pv sF i : ℕ) : ℤ) ≤ B)
(s : IState HS) (f0 : Fin HS → List ℤ) (hfQ : f0 oQ = []) (hfM : f0 oMu = [])
(hfP : f0 oPi = []) (hfD : f0 oDc = []) {LQ LM LP LD : List Item}
(hQ : s.G oQ = .int Q :: LQ) (hMu : s.G oMu = .int μ :: LM)
(hPi : s.G oPi = .int (Pv sF i) :: LP) (hDc : s.G oDc = .int D :: LD) (n : ℤ) :
Sp (coefBd) (encK s (Function.update (cfFd f0 sF μ D Q i k) oCC [n]))
(encK s (Function.update (cfFd f0 sF μ D Q i (k + 1)) oCC [n])) (10 ^ 9 * (B + 2) ^ 2)
Context. CRT reversal §1: the digit-selector rotation rotDU
A copy of KFUU's uniform shift rotCU (KFUURot2–5) whose coefficient of field j is
cFd = μ · (P_j / D) mod Q (register oDc = D) instead of μ P_j mod Q. With all field sizes
equal to Q and D = Q^k, the coefficient is μ · [j = k], so rotDU adds μ · a_k to the
target digit: one shear y += μ x_k of the additive-swap reversal (see jain6/crt/DESIGN.md).
rotDU_runs: the KFU form pull … (rotG i Q (fun a => lf cs a % Q)).
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_Defs14
set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 1000000
open NLogN NLogN.KFUU NLogN.KFUU.R6Crt
open IntMul NLogN.KIL NLogN.KFC AModel AModelL12 NLogN.KFUU
variable {Pp : ℕ} {I : List Sym} {iprog : Fin Pp → IStmt HS Pp}
theorem NLogN.KFUU.R6Crt.coefBd_sp (sF : ℕ → ℕ) (μ D Q i k : ℕ) (hk : k < i)
(hs : ∀ j < i, 1 ≤ sF j) (hQ1 : 1 ≤ Q) (hμ : μ < Q) (hD1 : 1 ≤ D) (hDP : D ≤ Pv sF i) (B : ℕ)
(hB : zsz ((Q * Pv sF i : ℕ) : ℤ) ≤ B)
(s : IState HS) (f0 : Fin HS → List ℤ) (hfQ : f0 oQ = []) (hfM : f0 oMu = [])
(hfP : f0 oPi = []) (hfD : f0 oDc = []) {LQ LM LP LD : List Item}
(hQ : s.G oQ = .int Q :: LQ) (hMu : s.G oMu = .int μ :: LM)
(hPi : s.G oPi = .int (Pv sF i) :: LP) (hDc : s.G oDc = .int D :: LD) (n : ℤ) :
Sp (coefBd) (encK s (Function.update (cfFd f0 sF μ D Q i k) oCC [n]))
(encK s (Function.update (cfFd f0 sF μ D Q i (k + 1)) oCC [n])) (10 ^ 9 * (B + 2) ^ 2) := by sorry