Logical instance cursor independent of physical storage #
The native metadata records the computed catalogue and matrix geometry. The logical progress counter and heap pointer are deliberately separate: a visit increments both, and a charged reset restores only the heap. This assertion does not describe any materialized record.
structure Cslib.Algorithms.WordRAM.ExactTriangle.StreamingFixedPrime.Cursor (n D g p : ℕ) (values : ℕ → ℤ) (x : WordRAM.Data 64) :
Stable metadata shared by consecutive physical-slot visits. Neither the logical counter nor the heap is fixed by this predicate.
- chunks : x.regs Instances.chunks = ChunkCatalogue.before (fun (rho : ℕ) => Nat.count (fun (q : ℕ) => (values q % ↑p).toNat = rho) (n * n)) (ExactTriangle.queryCap n D) p
theorem Cslib.Algorithms.WordRAM.ExactTriangle.StreamingFixedPrime.Cursor.transfer {n D g p : ℕ} {values : ℕ → ℤ} {x y : WordRAM.Data 64} (h : Cursor n D g p values x) (hr : ∀ (j : Fin 64), 32 ≤ ↑j → ↑j < 50 → j ≠ Instances.produced → j ≠ Instances.heap → y.regs j = x.regs j) :
Cursor n D g p values y
Stable metadata is retained by any change confined outside its native register bank, and by the two progressing counters.
theorem Cslib.Algorithms.WordRAM.ExactTriangle.StreamingFixedPrime.Cursor.after_visit {w T n D g p : ℕ} {values : ℕ → ℤ} {x y : WordRAM.Data 64} (h : Cursor n D g p values x) (he : WordRAM.ExecWithin w Instances.visit x y T) :
Cursor n D g p values y
The existing charged writer advances logical identity and allocation without changing any stable cursor metadata. It need not preserve earlier physical records.