Native shared box geometry and compact value tables #
The geometry stage assigns every slot of a shared (m-t+1) * 10^L directory,
including invalid slots. It emits only valid canonical boxes into a compact three-word
catalogue: completed leaf code, number of stars, and highest-star place value.
The catalogue is ordered by star count. Each tile writes one signed value per catalogue
entry, reading only values for smaller star counts. No scratch region must start zero.
Level zero is the least significant decimal digit, as in the existing native encodings; the P0 digit is nine. The per-tile stage does not rebuild or clear the geometry. This is an original representation alternative to the trie in [AlmanWilliams2026, Section 4.3]. Its one-time geometry charge and allocation must remain separate from per-tile work. Definitions here are code only; execution and resource proofs belong to the stage modules.
Main definitions #
BoxTable.geometry: compute the shared directory and compact catalogue.BoxTable.tile: compute the compact value table from two encoded leaf arrays.BoxTable.lookup: read a cube's actual stored value after checking its raw digit form.BoxTable.program: ordinary initialized-input constructor for one tile.
A fixed bank containing the existing nine-register signed-arithmetic workspace.
Original depth.
Original inner-level count.
Original order threshold.
Computed maximum combined P0/star count.
Computed encoding length, ten to the depth.
Shared directory base.
Three-word catalogue base.
Compact signed value-table base.
Left canonical signed encoding-array base.
Right canonical signed encoding-array base.
Number of directory slots.
Current directory slot.
Number of emitted catalogue records.
Star count of the current record.
Completed leaf code of the current record.
Unprocessed decimal suffix.
Current level in a digit scan.
P0 population of the processed prefix.
Place value of the current level.
Place value of the highest star, or zero when there are no stars.
Raw digit temporary.
Load/store address temporary.
Scalar arithmetic temporary.
Constant one.
Constant ten.
Constant nine, the P0 digit.
Constant three, the catalogue record width.
Current compact record index.
Canonical signed partial sum.
Current replacement term, from zero through nine.
Completed leaf code after replacing the highest star.
Child's shared directory slot.
Child's compact value-table index, initially stored with offset one.
Constant zero outside the signed workspace.
Input pointer to a raw cube's digits for lookup.
Lookup-invalid flag.
A fixed P0 term has already appeared below this level.
Lookup-found flag.
Lookup's canonical signed returned value.
Initialize every reused scalar constant explicitly.
Reuse the existing power routine without introducing a second exponentiation loop.
Count a P0 digit and remember precisely the requested occurrence's place value.
Initialize a scan from the current raw directory slot.
Complete one actual digit scan; the loop is over the original depth.
Write one compact record and its offset-one directory entry.
Assign one directory slot and emit a compact record when both tests succeed.
Every directory slot is assigned, including slots rejected by either population test.
Compute the slot range and initialize the actual compact count.
Place the value table immediately after the actual compact records.
Compute the shared geometry, returning its actual compact count and value-table base.
Load the three actual catalogue words.
Read both encoded leaf operands from their actual array positions.
Retain the actual signed arithmetic result outside its scratch bank.
Multiply the two encoded words of a fully fixed cube.
Compute a child's directory index and load its already written signed value.
Save the signed partial sum and advance the actual ten-child loop.
Compute one child's actual directory index, read its stored value, and add it.
Reset the accumulator and term counter before the ten-child loop.
Accumulate all ten earlier child values.
Evaluate a leaf product or the sum of its ten earlier children.
Store the completed signed value and advance its compact index.
Evaluate one compact box and store it before advancing the compact index.
Initialize every per-tile scalar that is read before being written.
Fill exactly one compact value table, reusing the shared geometry.
Read one cube digit, rejecting out-of-alphabet and star-after-fixed-P0 forms.
Initialize the raw lookup prefix and both returned flags explicitly.
Validate the completed population and read the actual compact-table word.
Read the actual table entry for a valid canonical cube; return raw found and signed answer.
Read the three original scalar input headers.
Locate both leaf arrays and the shared directory after the original input.
Original scalar headers followed by both leaf arrays; address zero is State.init's header.
Complete one-tile constructor, retaining separate shared-geometry and per-tile routines.