Round-six lemma `atan_body_cost`
ProvedNLogN.atan_body_costcomplexity-theoryinteger-multiplicationkappa-improvement
An 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 NLogN.HNumAtan):
theorem NLogN.atan_body_cost (x N K : ℕ) (σ : ℤ) (hσ : |σ| = 1) (s0 t : IState HS) (k : ℕ)
(h : atanInv' x N K σ s0 k t) (hk : k < K) (hx : 0 < x) :
(atanBody x σ).cost t + asgCost 45 (decE 45) ((atanBody x σ).run t) ≤
30 * 10 ^ 7 * (atanB x N K + 2) ^ 2
Context. atanInv / atanhInv as a register program
Inputs N on register 0, K on register 1; the result is pushed on register 2.
Scratch registers 40 … 45.
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 import Definitions.Def_IntMul_HvdH_Numeric set_option autoImplicit false set_option relaxedAutoImplicit false set_option maxHeartbeats 1000000 open NLogN open IntMul NLogN.RS
Formal statement
theorem NLogN.atan_body_cost (x N K : ℕ) (σ : ℤ) (hσ : |σ| = 1) (s0 t : IState HS) (k : ℕ)
(h : atanInv' x N K σ s0 k t) (hk : k < K) (hx : 0 < x) :
(atanBody x σ).cost t + asgCost 45 (decE 45) ((atanBody x σ).run t) ≤
30 * 10 ^ 7 * (atanB x N K + 2) ^ 2 := 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.atan_body_cost`, Solutions/HNumAtan.lean (lines 194–285) of the round-six development.