Native preparation and encoding of shared matrix bands #
The input is L :: m :: N :: X ++ Y, with both matrices in row-major order and their
signed entries encoded by Signed.encode. The native length header occupies address zero.
The program snapshots the complete initialized input before using the encoder's low workspace,
computes its subset tables, prepares and encodes each band once, and restores the input.
The dense inverse table uses zero for an unselected mask and rank plus one for a selected mask.
The forward table lists the first K0² masks of cardinality m in increasing numeric order.
The shared output catalogue consists of all left bands followed by all right bands, with
10^L consecutive cells per band. A tile refers to its two band entries in this catalogue.
LeftVar.equiv and RightVar.equiv identify the mathematical alphabets with
Fin 3 ⊕ (Fin 2 × Fin 2), and Term.equiv identifies terms with Option (Fin 3 × Fin 3).
The existing native Encoding.leftDigits, Encoding.rightDigits and Encoding.termDigits
also fix the executable flat Fin 7/Fin 10 order: the nine product terms are row-major,
with digit 3*i+j, and P0 has digit 9. This preparation retains that numbering unchanged.
Main definitions #
BandPreparation.program: fixed native code, including the actual shared encoders.BandPreparation.input: flat header and matrix input forState.init.BandPreparation.catalogueAddress: the location of a band's encoding leaf.
References #
Selective adaptation of the band preparation in [AlmanWilliams2026, Section 2.4.1] and
Anthropic's formal-math revision 16a5ce41304fcdaea4e0be7c132e1c361dc26da5,
band-array preparation
and all-band encoding.
The mask scans, dense inverse table, native control and memory layout here are new;
the source's Light machine and execution semantics are not used.
Original initialized input prefix, including the native length header and three parameters.
Instances For
The encoder's low workspace and the original input are both below the snapshot.
Instances For
Dense mask-to-rank inverse table.
Instances For
Forward selected-mask table; 2^L cells are reserved.
Instances For
Shared encoding catalogue, after the snapshot and both tables.
Instances For
One past all allocated memory.
Instances For
Explicit input-parameter bound used to derive every unsigned arithmetic/address fit. The signed magnitude condition is separate. This is an ordinary numerical inequality, without quantification over executions or intermediate states.
Instances For
Row-major signed matrix input; no table, power or encoded band is supplied by the caller.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Low registers are reserved for the existing encoder and copy routines. Persistent parameters and preparation counters occupy registers 32 through 84 of a fixed bank of 96.
Instances For
Register embedding for the unchanged shared encoders.
Instances For
Register embedding for the unchanged seven-register copy program.
Instances For
Embed the five-register native power routine in the caller's chosen scalar registers.
Instances For
The actual native power routine, with register renaming only.
Instances For
Popcount is computed by an explicit fixed-depth loop of divisions and remainders.
Instances For
Load the three actual header parameters and the small constants.
Instances For
Compute all five powers with actual renamed native routines.
Instances For
Compute concrete snapshot, table and catalogue addresses.
Instances For
Compute the three header parameters, powers and addresses with charged native code.
Instances For
Save every original input word, including the actual length header.
Instances For
Visit one mask and update the number of accepted masks.
Instances For
Count every size-m mask.
Instances For
One explicitly squared trial in the integer square-root search.
Instances For
Compute the integer square root by squared comparisons. No square-root instruction is added to the native basis.
Instances For
Compute the ceiling quotient giving the number of bands.
Instances For
Complete scalar band parameters from native mask counting and root computation.
Instances For
Store the two table entries belonging to the current mask and advance both counters.
Instances For
One complete table iteration, including the actual population scan.
Instances For
Materialize both tables, explicitly initializing every inverse-table cell.
Instances For
Initialize the three digit accumulators and their positional weights.
Instances For
One base-seven digit, with only ordinary native arithmetic and control.
Instances For
Decode a base-seven string into its inner mask and compressed base-three/base-four offsets, in increasing level order. Every division, remainder, product and increment is native.
Instances For
Read a real matrix cell only after checking the padded row/column against N.
In particular, the potentially oversized row-major product is inside the guard.
Instances For
Actual header and counter initialization for each band.
Instances For
Decode, guard, load and store one band-array entry.
Instances For
Prepare every entry of one low-workspace band array, including all zero padding.
Instances For
Set up the actual encoder-output copy, including its catalogue address arithmetic.
Instances For
Copy the actual encoder output to this band's shared catalogue entry.
Instances For
Prepare, encode and collect one shared band, then advance its counter.
Instances For
Each row/column band calls the actual unchanged finite native encoder exactly once.
Instances For
Restore the complete original initialized input after all low-workspace calls.
Instances For
One fixed finite native program for the entire band-preparation component. Halt returns
catalogue, the base address of the shared encodings; it is appended by Code.program.