Runtime canonical prefix packing #
This module computes the manuscript's canonical placement from runtime prefix
bits. It first divides the represented prefix index by the field-basis width,
retaining the one-hot remainder j. It then performs dimension repeated
divisions by the tensor-grid width and encodes each one-hot base digit in the
fixed binary field basis.
The output is the row-major target point followed by the one-hot selected basis coordinate. The construction uses no new type-class instances.
Runtime prefix source under the explicit little-endian Boolean encoding.
Equations
Instances For
Output width before one-hot digits are encoded as field bits.
Equations
- Algebraic.MassProduction.RuntimePacking.coreOutputCount prefixWidth dimension width = prefixWidth + dimension * Algebraic.MassProduction.CanonicalPacking.gridWidth dimension width + width
Instances For
Feed only the current quotient block to repeated base conversion.
Equations
- Algebraic.MassProduction.RuntimePacking.conversionInputIndex prefixWidth width = Fin.castAdd width
Instances For
Retain the first division's one-hot basis-coordinate remainder.
Equations
- Algebraic.MassProduction.RuntimePacking.selectorInputIndex prefixWidth width = Fin.natAdd prefixWidth
Instances For
Repeated grid-base conversion alongside the retained selector. It has exactly
BaseConversion.gateCount gates (conversionStageCircuit_size).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The conversion stage has exactly the gates of the repeated grid-base conversion; carrying the one-hot selector alongside it is pure wiring.
Divide by width, convert the quotient to base gridWidth, and retain
the one-hot width remainder.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Core output index of one one-hot tensor-grid digit.
Equations
- Algebraic.MassProduction.RuntimePacking.coreDigitIndex prefixWidth dimension width coordinate candidate = Fin.castAdd width (Fin.natAdd prefixWidth (finProdFinEquiv (coordinate, candidate)))
Instances For
Core output index of one retained basis-coordinate selector bit.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Encoding one-hot grid digits as target-point bits #
Input wire for one grid candidate in one coordinate block.
Equations
- One or more equations did not get rendered due to their size.
Instances For
One target-point bit, obtained by selecting the hardwired binary encoding of the active grid digit.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Emitted gate count of all encoded target-point bits.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Encode all one-hot grid digits in row-major fixed-width binary form.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Retain the one-hot selected field coordinate after target encoding.
Equations
- One or more equations did not get rendered due to their size.
Instances For
selectorCircuit is pure wiring: it has no gates.
Final output width: target point followed by one-hot basis selector.
Equations
- Algebraic.MassProduction.RuntimePacking.outputCount dimension width = dimension * width + width
Instances For
Runtime canonical packing circuit for one prefix.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Runtime target bits agree exactly with the canonical packed point.
Runtime selector bits are one-hot at the canonical basis coordinate.
Cost #
Explicit linear-in-grid packing cost.