Slab passes on representations (round six, `LRep_slabPass`)
ProvedJ6Seg.LRep_slabPassSlab passes on representations.
The following holds (Lean statement, in the scope of module Solutions.J6SegSw2):
theorem J6Seg.LRep_slabPass {pre n n' post : ℕ} (hn : 0 < n) (hp : 0 < post) {L : List α}
{φ : ℕ → ℕ → List α} (hL : LRep pre n post L φ) (src : ℕ → Option ℕ) (h : ℕ → α → β)
(hsrc : ∀ l < n', ∀ k, src l = some k → k < n) :
LRep pre n' post (slabPass n n' post src h L) (fun b c => slabLine n' src h (φ b c))
Context. B-line machine, sweep 2: the per-axis passes on line representations
A (pre, n, post) array L represents the lines φ b c (LRep pre n post L φ) when
L[b (n·post) + a·post + c] = (φ b c)[a]. The machine's passes act on representations:
LRep_axisL: the in-place axis map appliesfto every line;LRep_slabPass: a monotone slab pass (output slabl=h lof input slabsrc l, or zeros) appliesslabLineto every line (selection,Jgather and scatter, output);LRep_kerPass: expose(A, m, post) → (A, post, m)(blkTg), apply a kernel to each contiguousm-row (indexed by its block), expose back;LRep_split/LRep_join:(pre, nc·λ, post)is(pre·nc, λ, post);LRep_chunkPass: the chunk kernelchunksG g λ ncon every line, by oneλ-exposure.
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_Defs62
set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 1000000
open J6Seg
open IntMul.HvdH IntMul.HvdH.Ref NLogN.KFM NLogN.KFY
variable {α β : Type*} [Inhabited α] [Inhabited β]
theorem J6Seg.LRep_slabPass {pre n n' post : ℕ} (hn : 0 < n) (hp : 0 < post) {L : List α}
{φ : ℕ → ℕ → List α} (hL : LRep pre n post L φ) (src : ℕ → Option ℕ) (h : ℕ → α → β)
(hsrc : ∀ l < n', ∀ k, src l = some k → k < n) :
LRep pre n' post (slabPass n n' post src h L) (fun b c => slabLine n' src h (φ b c)) := by sorry