Geometry digits for the shared native box table #
The flat leaf numbering is exactly the existing native encoder's numbering, with
level zero least significant and P0 digit nine. population and starStride describe
the scalar results of the native digit loop. Neither definition contains execution,
time, rank, layout or table hypotheses.
The canonical boxes are those of [AlmanWilliams2026, Section 4.2], already adapted in
BoxValues. The shared dense directory and compact enumeration are a new native
representation; their one-time setup is distinct from the source's per-tile trie.
Decode a complete leaf using the existing native encoder's finite digit dictionary.
Decoding and re-encoding uses the same actual flat array position.
Decoding an existing leaf index recovers every original term.
The raw decimal digit at a level, in the existing least-significant-first layout.
Number of P0 digits in the first k levels.
The e-th P0 place value found by the scan; zero until that occurrence has been found.
A prefix scan counts precisely the P0 coordinates below its native level.
The scan's population is the existing finite P0-coordinate cardinality.
No scan prefix contains more P0 digits than scanned levels.
Extend the ordinary Mathlib count by the next native digit test.
A recorded stride fits below the final power used by the scan.
Once the e-th P0 coordinate is reached, later digits preserve its exact place value.