Round-six lemma `setCost_le`
ProvedIntMul.Kappa.R6.setCost_leAn 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.R6SNeed):
theorem IntMul.Kappa.R6.setCost_le (P : Prm) (hP : P.Ok) (a c : ℕ) :
∃ n₁, ∀ n, n₁ ≤ n → cSet P n a c * kU (BbS P n a c) ≤ 2 ^ LP6 P n * pP6 P n
Context. Round-six setup, part 9: SetupNeed6
The procedure is startP (frozen: n and b = lg n), the compiled register program setRS,
and oP (frozen: 2^{2n} on rO). Its cost is O(n) + cSet · kU; the second term is
O(d r² p²) ≤ T p for large n (since T ≥ r³/4 once d ≥ 3, and r = 2^ℓ beats every fixed
power of b).
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_Defs70 set_option autoImplicit false set_option relaxedAutoImplicit false set_option maxHeartbeats 1000000 open IntMul IntMul.Kappa IntMul.Kappa.R6 open IntMul NLogN NLogN.KIL NLogN.KFM NLogN.RS Finset Function
theorem IntMul.Kappa.R6.setCost_le (P : Prm) (hP : P.Ok) (a c : ℕ) :
∃ n₁, ∀ n, n₁ ≤ n → cSet P n a c * kU (BbS P n a c) ≤ 2 ^ LP6 P n * pP6 P n := by sorry