Documentation

CslibFrontier.Algorithms.WordRAM.MatrixMultiplication.Schonhage.BoxTable.Program

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 #

@[reducible, inline]

A fixed bank containing the existing nine-register signed-arithmetic workspace.

@[reducible, inline]

Computed maximum combined P0/star count.

@[reducible, inline]

Computed encoding length, ten to the depth.

@[reducible, inline]

Compact signed value-table base.

@[reducible, inline]

Left canonical signed encoding-array base.

@[reducible, inline]

Right canonical signed encoding-array base.

@[reducible, inline]

Number of emitted catalogue records.

@[reducible, inline]

Star count of the current record.

@[reducible, inline]

Completed leaf code of the current record.

@[reducible, inline]

P0 population of the processed prefix.

@[reducible, inline]

Place value of the current level.

@[reducible, inline]

Place value of the highest star, or zero when there are no stars.

@[reducible, inline]

Constant three, the catalogue record width.

@[reducible, inline]

Current replacement term, from zero through nine.

@[reducible, inline]

Completed leaf code after replacing the highest star.

@[reducible, inline]

Child's compact value-table index, initially stored with offset one.

@[reducible, inline]

Constant zero outside the signed workspace.

@[reducible, inline]

Input pointer to a raw cube's digits for lookup.

@[reducible, inline]

A fixed P0 term has already appeared below this level.

@[reducible, inline]

Lookup's canonical signed returned value.

Reuse the existing power routine without introducing a second exponentiation loop.

Count a P0 digit and remember precisely the requested occurrence's place value.

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 shared geometry, returning its actual compact count and value-table base.

Compute a child's directory index and load its already written signed value.

Compute one child's actual directory index, read its stored value, and add it.

Read one cube digit, rejecting out-of-alphabet and star-after-fixed-P0 forms.

Read the actual table entry for a valid canonical cube; return raw found and signed answer.

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.