One step (round six, `clA_sp`)
ProvedJ6Seg.PreT.clA_spOne step.
The following holds (Lean statement, in the scope of module Solutions.J6SegILPre9):
theorem J6Seg.PreT.clA_sp (s : IState HS) (w : Fin HS → ℤ) (cc : Fin HS → List ℤ) {A : ℕ} (hA : 2 ≤ A)
(hw : VB w A) {P sN tN aN k : ℕ} (hPA : P ≤ A) (h20 : w 20 = P) (h22 : w 22 = sN)
(h23 : w 23 = tN) (h25 : w 25 = aN) (h12 : w 12 = k) (h9 : w 9 = 2 ^ P)
(h10 : w 10 = 2 ^ (P + 1)) {S Γ : ℤ} (h3 : w 3 = S) (h4 : w 4 = Γ)
{eJ : Ex HS} (hiJ : InRg eJ) (hpJ : Poly eJ = true) (hdJ : J6Seg.PreT.dg eJ ≤ 40)
(hoJ : eJ.ok (encK s (J6Seg.PreT.RF w cc))) {jv : ℕ} (hJ : eJ.eval (encK s (J6Seg.PreT.RF w cc)) = jv)
(hX : |expNeg P sN jv| ≤ 2 ^ A)
(hF : |S * J6Seg.fmul P (expNeg P sN jv) (J6Seg.fdiv P (2 ^ P) Γ)| ≤ 2 ^ A)
(hS : |S| ≤ 1)
(hq : |expNeg P sN (2 * aN ^ 2 * tN * (k + 1))| ≤ 2 ^ A)
(hG : |J6Seg.fmul P Γ (2 ^ P - max (expNeg P sN (2 * aN ^ 2 * tN * (k + 1))) 0)| ≤ 2 ^ A) :
Sp (clA eJ) (encK s (J6Seg.PreT.RF w cc))
(encK s (J6Seg.PreT.RF (Function.update (Function.update (Function.update (Function.update w 11
(S * J6Seg.fmul P (expNeg P sN jv) (J6Seg.fdiv P (2 ^ P) Γ))) 3 (-S)) 5
(expNeg P sN (2 * aN ^ 2 * tN * (k + 1)))) 4
(J6Seg.fmul P Γ (2 ^ P - max (expNeg P sN (2 * aN ^ 2 * tN * (k + 1))) 0))) cc))
(cClA A eJ)
Context. B-line IL, pre-tables (B5), part 9: the block tables am, ap
stA O eJ = Γ := 2^P; S := 1; loop U < n { X := expNeg P s (eJ); X := S·fmul P X (fdiv P 2^P Γ); S := -S; q := expNeg P s (2α²t(U+1)); Γ := fmul P Γ (2^P - q⁺); push X; U++ } (count on 2).
With eJ = jME (amP) it pushes (mkTables …).am c 0, …, am c (n-1) (block start c on 1),
with eJ = jPE (apP) the ap c h. Clobbers 3, 4, 5, 11, 12.
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_Defs68 set_option autoImplicit false set_option relaxedAutoImplicit false set_option maxHeartbeats 1000000 open J6Seg J6Seg.PreT open IntMul NLogN NLogN.KIL NLogN.RS IntMul.HvdH
theorem J6Seg.PreT.clA_sp (s : IState HS) (w : Fin HS → ℤ) (cc : Fin HS → List ℤ) {A : ℕ} (hA : 2 ≤ A)
(hw : VB w A) {P sN tN aN k : ℕ} (hPA : P ≤ A) (h20 : w 20 = P) (h22 : w 22 = sN)
(h23 : w 23 = tN) (h25 : w 25 = aN) (h12 : w 12 = k) (h9 : w 9 = 2 ^ P)
(h10 : w 10 = 2 ^ (P + 1)) {S Γ : ℤ} (h3 : w 3 = S) (h4 : w 4 = Γ)
{eJ : Ex HS} (hiJ : InRg eJ) (hpJ : Poly eJ = true) (hdJ : J6Seg.PreT.dg eJ ≤ 40)
(hoJ : eJ.ok (encK s (J6Seg.PreT.RF w cc))) {jv : ℕ} (hJ : eJ.eval (encK s (J6Seg.PreT.RF w cc)) = jv)
(hX : |expNeg P sN jv| ≤ 2 ^ A)
(hF : |S * J6Seg.fmul P (expNeg P sN jv) (J6Seg.fdiv P (2 ^ P) Γ)| ≤ 2 ^ A)
(hS : |S| ≤ 1)
(hq : |expNeg P sN (2 * aN ^ 2 * tN * (k + 1))| ≤ 2 ^ A)
(hG : |J6Seg.fmul P Γ (2 ^ P - max (expNeg P sN (2 * aN ^ 2 * tN * (k + 1))) 0)| ≤ 2 ^ A) :
Sp (clA eJ) (encK s (J6Seg.PreT.RF w cc))
(encK s (J6Seg.PreT.RF (Function.update (Function.update (Function.update (Function.update w 11
(S * J6Seg.fmul P (expNeg P sN jv) (J6Seg.fdiv P (2 ^ P) Γ))) 3 (-S)) 5
(expNeg P sN (2 * aN ^ 2 * tN * (k + 1)))) 4
(J6Seg.fmul P Γ (2 ^ P - max (expNeg P sN (2 * aN ^ 2 * tN * (k + 1))) 0))) cc))
(cClA A eJ) := by sorry