Documentation

CslibFrontier.Algorithms.WordRAM.ThreeSum.ChanHe.TraversalLocalEmission

Actual Chan–He emissions for an in-place consumer #

The complete native modulus and node kernels enter the local delivery block without writing an output-pointer table. Semantic readback and all three child descriptors reuse the same emission API as catalogue production, with publication explicitly disabled.

Main results #

This local theorem does not supply a solver execution or a complete initialized decision result.

theorem Cslib.Algorithms.WordRAM.ThreeSum.ChanHe.Traversal.emit_local_entry {w n : ℕ} (x : WordRAM.Data 128) (e : Entry) (hl : e.Loaded x) (hv : e.Valid n (x.regs magnitude)) (hs : e.Stored x.mem) (hm : 2 ≤ x.regs limit) (hmod : GenericRAM.Signed.Fits w ↑(x.regs limit ^ 2)) (hbudget : WordRAM.Fits (w + 2) (Modulus.budget (WordRAM.Data.comap kernel (modulusState x)))) (hnode : ∀ (M : ℕ), 1 ≤ M → M ≤ x.regs limit ^ 2 → GenericRAM.Signed.Fits w ↑(recordLayout x M).budget) (hN : 2 * x.regs limit ^ 2 ≤ x.regs groups) (hcard : x.regs primeCount = (x.regs limit).primesLE.card) (hbefore : x.regs bitmap + x.regs limit < x.regs heap) (hbitmap : ∀ q ≤ x.regs limit, x.mem (x.regs bitmap + q) = if Nat.Prime q then 1 else 0) (hvalues : ∀ (j : Fin 3), ∀ i < (e.data j).length, GenericRAM.Signed.Fits w (e.read j i)) (hsrc : ∀ (j : Fin 3), e.source j + (e.data j).length ≤ x.regs heap) (hone : x.regs one = 1) :

Execute the complete kernels and local delivery, with no table or counter premise.

theorem Cslib.Algorithms.WordRAM.ThreeSum.ChanHe.Traversal.emit_with_publication {w n : ℕ} (published : Bool) (x : WordRAM.Data 128) (e : Entry) (hl : e.Loaded x) (hv : e.Valid n (x.regs magnitude)) (hs : e.Stored x.mem) (hm : 2 ≤ x.regs limit) (hmod : GenericRAM.Signed.Fits w ↑(x.regs limit ^ 2)) (hbudget : WordRAM.Fits (w + 2) (Modulus.budget (WordRAM.Data.comap kernel (modulusState x)))) (hnode : ∀ (M : ℕ), 1 ≤ M → M ≤ x.regs limit ^ 2 → GenericRAM.Signed.Fits w ↑(recordLayout x M).budget) (hN : 2 * x.regs limit ^ 2 ≤ x.regs groups) (hcard : x.regs primeCount = (x.regs limit).primesLE.card) (hbefore : x.regs bitmap + x.regs limit < x.regs heap) (hbitmap : ∀ q ≤ x.regs limit, x.mem (x.regs bitmap + q) = if Nat.Prime q then 1 else 0) (hvalues : ∀ (j : Fin 3), ∀ i < (e.data j).length, GenericRAM.Signed.Fits w (e.read j i)) (hsrc : ∀ (j : Fin 3), e.source j + (e.data j).length ≤ x.regs heap) (hone : x.regs one = 1) (htable : published = true → x.regs outputs + x.regs outputCount < x.regs heap) :
∃ (y : WordRAM.Data 128), WordRAM.ExecWithin (w + 2) (if published = true then visit else localVisit) x y (visitTime n (x.regs limit) (x.regs groups)) ∧ Nonempty (Emission (x.regs limit).primesLE (x.regs digits) e x y published)

One admission interface for the fixed catalogue and local-consumer programs. Only the catalogue specialization needs a table-address fit. The flag selects fixed code before input.

theorem Cslib.Algorithms.WordRAM.ThreeSum.ChanHe.Traversal.Emission.local_prefix {Q : Finset ℕ} {Λ : ℕ} {e : Entry} {x y : WordRAM.Data 128} (h : Emission Q Λ e x y false) (p : ℕ) (hp : p < x.regs heap) :
y.mem p = x.mem p

Local delivery preserves every old prefix cell, with no excluded table address.