Polynomial-size projective normalization circuits #
This file realizes first-nonzero projective normalization as an explicit shared De Morgan circuit. It first computes one nonzero flag per field coordinate, selects the first nonzero coordinate once, applies the shared binary-field inverse circuit once, and then multiplies every coordinate by that inverse in parallel.
Direct OR expression testing whether one packed field coordinate has a
true bit.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Semantic nonzero flags for every coordinate of a packed field vector.
Equations
- Algebraic.MassProduction.vectorCoordinateNonzeroFlags input coordinate = Algebraic.DeMorgan.Expression.finOrValue width fun (bit : Fin width) => input (finProdFinEquiv (coordinate, bit))
Instances For
Gate count of one compiled coordinate nonzero test.
Equations
- Algebraic.MassProduction.vectorCoordinateNonzeroGateCount dimension width coordinate = (Algebraic.MassProduction.vectorCoordinateNonzeroExpression dimension width coordinate).gateCount
Instances For
Compute and share all coordinate nonzero flags.
Equations
- One or more equations did not get rendered due to their size.
Instances For
All coordinate nonzero tests together cost exactly dimension * width.
Original packed vector followed by its shared coordinate nonzero flags.
Equations
Instances For
Circuit retaining the original vector and appending all nonzero flags.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The exact gate count of normalizationFlaggedCircuit.
Index of an original vector bit in the flagged intermediate layout.
Equations
- Algebraic.MassProduction.normalizationVectorBitIndex index = Fin.castAdd dimension index
Instances For
Index of one nonzero flag in the flagged intermediate layout.
Equations
- Algebraic.MassProduction.normalizationFlagIndex coordinate = Fin.natAdd (dimension * width) coordinate
Instances For
Expression computing one first-nonzero one-hot flag from the shared coordinate flags.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Expression for one bit of the selected first nonzero coordinate.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Gate count of one compiled pivot-output expression.
Equations
- Algebraic.MassProduction.normalizationPivotBitGateCount dimension width bit = (Algebraic.MassProduction.normalizationPivotBitExpression dimension width bit).gateCount
Instances For
Select the first nonzero field coordinate from a flagged vector.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Select the first nonzero coordinate directly from a packed vector.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The exact gate count of normalizationPivotCircuit.
On a nonzero field vector, pivot selection returns the encoding of its least nonzero coordinate.
Preserve the packed vector while appending its selected pivot.
Equations
Instances For
Shared vector-and-pivot circuit.
Equations
- One or more equations did not get rendered due to their size.
Instances For
normalizationVectorAndPivotCircuit has exactly the gates of normalizationPivotCircuit; the
surrounding wiring adds none.
Preserve the vector block and replace the pivot block by the output of the shared inverse circuit.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Apply one shared pivot inversion while retaining the original vector.
Equations
- One or more equations did not get rendered due to their size.
Instances For
normalizationInversePreparationCircuit has exactly the gates of
binaryExtensionInverseCircuit; the surrounding wiring adds none.
Vector together with the inverse of its selected pivot.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The exact gate count of normalizationVectorAndInverseCircuit.
Wiring from one vector coordinate and the shared inverse block into a binary-field multiplication circuit.
Equations
- One or more equations did not get rendered due to their size.
Instances For
One coordinate times the shared inverse pivot.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The exact gate count of normalizationCoordinateMultiplicationCircuit.
Gate count of one coordinate multiplication.
Equations
- Algebraic.MassProduction.normalizationCoordinateMultiplicationGateCount widthPositive = ∑ output : Fin width, Algebraic.MassProduction.multiplicationCoordinateGateCount widthPositive output
Instances For
Multiply every vector coordinate by the same shared inverse pivot.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Complete shared circuit for canonical projective normalization.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The exact gate count of normalizeBinaryExtensionVectorCircuit.
On an encoded nonzero vector, the shared inverse stage preserves the vector and appends the encoding of the inverse pivot.
The explicit normalization circuit computes the packed canonical normalization of every nonzero field vector.
Consequently the normalization circuit computes the canonical key of any supplied projective representative.
A first-nonzero flag expression has quadratic-free, linear cost in the number of field coordinates.
One selected-pivot output bit has quadratic cost in the vector dimension.
Cost bound for selecting one shared pivot after the coordinate flags have been computed.
Full pivot selection includes the linear coordinate-zero tests.
The final coordinatewise scaling performs one field multiplication per coordinate.
A concrete polynomial ledger for the complete projective normalizer.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The complete canonical-normalization circuit satisfies the displayed polynomial bound.