Gate counts for sorting and detecting records #
A family of records is available when every bit of every encoded record is (Record.wireSet).
Sorting an available array inserts one Batcher circuit (Record.synthesis_sorted); its native
gate count is at most 18 * d ^ 2 * 2 ^ d per record bit and comparison layer. Testing every
adjacent pair for a collision and selecting one costs linearly in the array
(Record.synthesis_detect).
Main definitions #
Cslib.Circuits.Boolean.Iteration.wires: the coordinate functions of a family of bit strings.Cslib.Circuits.Boolean.Iteration.Record.wireSet,Cslib.Circuits.Boolean.Iteration.Record.pairEncode,Cslib.Circuits.Boolean.Iteration.Record.pairWires,Cslib.Circuits.Boolean.Iteration.Record.recordsWires: available records, record pairs, and record arrays.
Main results #
Cslib.Circuits.Boolean.Iteration.Record.size_sortCircuit_le: the native sorter's size.Cslib.Circuits.Boolean.Iteration.Record.synthesis_sorted: sorting an available array.Cslib.Circuits.Boolean.Iteration.Record.synthesis_detect: detecting a colliding pair.
References #
- Adapted from lean/Proofs/{RecordCircuits,Construction}.lean in S. Schlesinger, Square-root circuit bounds for iterated functions.
The coordinate functions of a family of bit strings.
Instances For
Equality of two available bit strings, by the native equality formula.
Multiplexing two m-bit strings by an available Boolean flag costs 4 * m gates.
Choosing between two constructions by a third adds four gates per output bit.
The bits of an available family of records.
Instances For
The checkpoint bit of an available record belongs to s.
The bits of an available family of pairs of records.
Instances For
Testing all adjacent pairs and selecting a colliding one.
The bits of every record of an available array.
Instances For
The wire set of the j-th record in an array is contained in recordsWires records.
Sorting an available array inserts one native sorting circuit.