Native enumeration of all query chunks #
The controller reads the actual class-count table produced by Classes.program and calls the
existing native chunk writer for each class. Descriptors are concatenated without padding;
their query pointers refer to the original disjoint class arrays. No descriptor layout or
prefix table is supplied by the caller.
This composes the class and chunk loops in the pinned Theorem 17 construction.
Main definitions #
ChunkCatalogue.program: fixed thirty-two-register descriptor controller.ChunkCatalogue.before: the mathematical number of descriptors preceding a class.
Main results #
ChunkCatalogue.exec: charged enumeration of the actual class counts, exact descriptor readback and preservation outside the concatenated output.ChunkCatalogue.before_index: unique class/chunk coordinates for every occupied output slot, using Mathlib's existing finite sigma enumeration.ChunkCatalogue.before_le,ChunkCatalogue.before_add_lt: descriptor allocation bounds.
Class-count table pointer.
Base of the class query blocks, each of capacity 2n² words.
Matrix side length.
Number of residue classes.
Beginning of the contiguous output descriptor array.
Positive maximum pairs per chunk.
Current class.
Total number of descriptors written so far.
First free descriptor address.
Constant one.
Number of words per descriptor.
Current count-table address.
Capacity of one class query block, in words.
Descriptor-length temporary.
Query pointer passed to the chunk writer.
Output pointer passed to the chunk writer.
Loaded class count passed to the chunk writer.
Chunk capacity passed to the chunk writer.
Residue passed to the chunk writer.
Number of descriptors returned by the chunk writer.
Call the existing native chunk writer in the lower register bank.
Read the current count and deliver its actual query pointer to the chunk writer.
Advance the output heap by the number of descriptors actually written.
One class, including empty classes.
Initialize the concatenation cursor and run every residue class.
The complete controller is fixed code and does not inspect physical width.
Every occupied descriptor slot names exactly one class and one chunk. This is the existing
finSigmaFinEquiv, expressed with the same prefix sum as the native concatenation loop.
At most N queries per class give at most rho * N occupied descriptors, since every
nonempty chunk contains at least one query. This bounds the actual allocation before matrix
preparation as well as the descriptor controller's own arithmetic.
Read the actual count table and concatenate every class's nonempty chunks. The controller
receives no prefix sums. Both source blocks lie before dst; all other memory is preserved.
The charged bound excludes halt.