Alternating buffers for the shared native encoder #
Main definitions #
Encoding.destination,Encoding.source: the alternating buffer addresses.Encoding.Progress: the mixed-radix array and frame invariant after a stage.
References #
The shared encodings are from [AlmanWilliams2026, Section 2.4.1]; see Encoding for provenance.
Destination of the next coordinate transform; always one of the two fixed buffers.
Instances For
Source of the next coordinate transform; initially the preserved input segment.
Instances For
A destination is either the fixed output block or the scratch block.
After the initial transform, the source is also one of the two buffers.
The two alternating buffer addresses differ at every stage.
The shared-array invariant at depth j. All fields describe ordinary registers or
mathematical memory values. Execution, timing and width are proved separately.
- fixed : y.regs depth = L ∧ y.regs capacity = 10 ^ L ∧ y.regs output = outputBase L ∧ y.regs scratch = scratchBase L ∧ y.regs one = 1 ∧ y.regs seven = 7 ∧ y.regs ten = 10
Fixed parameters retained across coordinate stages.
Number of transformed coordinates.
Number of transformed prefixes.
Original suffix length in the current source.
Current source address.
Current destination address.
- values (p : ℕ) : p < 10 ^ j → ∀ r < 7 ^ (L - j), y.mem (source L j + p * 7 ^ (L - j) + r) = WordRAM.Signed.encode (MatrixMultiplication.Schonhage.CoordinateTransform.value (MatrixMultiplication.Schonhage.CoordinateTransform.table (coefficients side)) j (L - j) arr p r)
The source holds exactly the shared prefix sums.
Input, headers and all cells outside both work buffers are preserved.
Instances For
The actual header initialization establishes the zero-stage invariant from the original flat input segment. No scratch values or preinitialized coefficient tables are required.
One proved native stage advances the mixed-radix invariant. The signed magnitude bound comes from the original input and the number of coordinates already transformed.