The copy `0 → rZ` (round six, `copyAx_ok`)
ProvedJ6Seg.AxC.copyAx_okThe copy 0 → rZ as a two-array step (g A _ = (A, A)).
The following holds (Lean statement, in the scope of module Solutions.J6SegAxCopy):
theorem J6Seg.AxC.copyAx_ok {dA : Fin HS} (hA : DAok dA) (P : Prm) (n : ℕ) (src : ℕ → ℕ) (D k B w : ℕ)
(hk : k ≤ D) (hB : DescB P n src D k B) (hw : w ≤ B) :
Ax.Pass2OK Isym tbl (copyRS dA).code dA (descAx6 P n src D k)
(fun A Bl => Bl = [] ∧ A.length = (List.ofFn (tD6 P n D)).prod ∧ GB w A)
(fun A _ => (A, A)) (cCopy (2 * (List.ofFn (tD6 P n D)).prod) B)
Context. The axis program: the copy 0 → rZ (after pass 2) and the swap 0 ↔ rZ (before pass 7)
Both read the count 2·pre·t·post (the number of integers of an axis array) off the axis
descriptor descAx6 = [k, pre, post, s, t, …] on dA (restored), on the scratch stacks 1 … 7.
cntRS dA: pushes2·(pre·(t·post))onCN = 5(sp_cnt);copyAx dA:gflat L ++ lon0andl₂onrZ↦gflat L ++ l₂onrZ, stack0unchanged (copyAx_runs);swapAx dA:gflat A ++ lon0,gflat B ++ l₂onrZ↦gflat B ++ lon0,gflat A ++ l₂onrZ(swapAx_runs).
Convention (FineBody6): every stack other than 0, dA, rZ empty; dA ∉ {0, …, 7, 53},
dA < 56.
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_Defs67
set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 1000000
open J6Seg J6Seg.AxC
open IntMul NLogN NLogN.KIL NLogN.KFB IntMul.Kappa.R6 Function
open J6Seg.Slab (rZ)
variable {Pp : ℕ} {Isym : List Sym} {tbl : Fin Pp → IStmt HS Pp}
theorem J6Seg.AxC.copyAx_ok {dA : Fin HS} (hA : DAok dA) (P : Prm) (n : ℕ) (src : ℕ → ℕ) (D k B w : ℕ)
(hk : k ≤ D) (hB : DescB P n src D k B) (hw : w ≤ B) :
Ax.Pass2OK Isym tbl (copyRS dA).code dA (descAx6 P n src D k)
(fun A Bl => Bl = [] ∧ A.length = (List.ofFn (tD6 P n D)).prod ∧ GB w A)
(fun A _ => (A, A)) (cCopy (2 * (List.ofFn (tD6 P n D)).prod) B) := by sorry