The packed row addition is the selected-bit address map of rowAddr
ProvedNLogN.KFR.encode_rowAddAddrThe packed row addition is the selected-bit address map of rowAddr.
The following holds (Lean statement, in the scope of module Solutions.KFRAddr):
theorem NLogN.KFR.encode_rowAddAddr (hK : 1 ≤ K) {q : ℕ} (hq : q < B * 2 ^ t * S0) {px py : Fin 3}
{i j : Fin m} (hi : σ px = i) (hj : σ py = j) (hij : i ≠ j) :
((encode (NLogN.KFR.shR K (m ^ k) e t S0 B σ)
(rowAddAddr K (e % K) (m ^ k) px py (decode (NLogN.KFR.shR K (m ^ k) e t S0 B σ) q)) : ℕ) : ℤ) =
fsetZ (fun p => 2 ^ pos p * S0) q (rowAddr i j (fbit (fun p => 2 ^ pos p * S0) q))
Context. The lemma belongs to the part KFR: the packed rectangle of three rows, and the row addition as rowAddAddr: For a stride-K family pos (pos (r, c) + K (c + f r) = e, f = m^k) and three rows
σ 0 < σ 1 < σ 2, shR is the rectangle rect N0 N1 N2 N3 (fK) whose chunk slot τ is the
field of row σ τ (weight 2^{sR (σ τ)} S₀). encode_rowAddAddr: on this rectangle, the
address map rowAddAddr K (e mod K) f px py is fset (rowAddr (σ px) (σ py)).
Formalization Note. This lemma belongs to the item-language (IL) layer of the integer-multiplication-kappa campaign: tape-level programs (register programs over 64 item stacks of the NLogN multitape framework, definition bundles IntMul_HvdH_M_Defs1–IntMul_HvdH_M_Defs8) that implement the data-movement primitives of the OpenAI preprint Integer multiplication below (field moves, row split/merge, shifts, the uniform Proposition 11 interchange, Lemma 12 with fine -per-element costs, Gaussian record primitives, Proposition 14 pieces) with exact list denotations from the array-model bundles IntMul_Kappa_K_Defs* and explicit cost bounds. All names refer to the definition bundles up to IntMul_Kappa_K_Defs22.
-- OpenAI-preprint / κ-improvement development (integer-multiplication-kappa), generated by skeleton subtraction.
import Definitions.Def_IntMul_Kappa_K_Defs22
set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 1000000
set_option linter.unusedSimpArgs false
set_option linter.unusedVariables false
set_option linter.unusedSectionVars false
open NLogN
open NLogN.KFR
open IntMul RS AModel KIL KFD KFB KFG KFH Complex P8Lift Butterfly KFN
variable {K m k e : ℕ} {pos : Fin m × Fin (m ^ k) → ℕ}
variable {t S0 B : ℕ} {σ : Fin 3 → Fin m}
(he : ∀ p, pos p + K * (p.2.val + m ^ k * p.1.val) = e) (htop : e - e % K + K ≤ t)
(hσ : σ 0 < σ 1 ∧ σ 1 < σ 2)
include he htop hσ
theorem NLogN.KFR.encode_rowAddAddr (hK : 1 ≤ K) {q : ℕ} (hq : q < B * 2 ^ t * S0) {px py : Fin 3}
{i j : Fin m} (hi : σ px = i) (hj : σ py = j) (hij : i ≠ j) :
((encode (NLogN.KFR.shR K (m ^ k) e t S0 B σ)
(rowAddAddr K (e % K) (m ^ k) px py (decode (NLogN.KFR.shR K (m ^ k) e t S0 B σ) q)) : ℕ) : ℤ) =
fsetZ (fun p => 2 ^ pos p * S0) q (rowAddr i j (fbit (fun p => 2 ^ pos p * S0) q)) := by sorry