Block-valued circuit translations #
A width-k block translation implements each scalar source operation by a
target circuit with k output wires and one k-wire block for every source
argument. Compilation maps n source inputs to n * k target inputs and m
source outputs to m * k target outputs while retaining one shared gadget per
source gate.
Flatten an indexed family of width-k blocks.
Equations
- Algebraic.Block.flatten values index = values (finProdFinEquiv.symm index).1 (finProdFinEquiv.symm index).2
Instances For
Split a flat vector into width-k blocks.
Equations
- Algebraic.Block.unflatten values block component = values (finProdFinEquiv (block, component))
Instances For
The target input wire carrying one component of one source input.
Equations
- Algebraic.Block.inputWire input component = Cslib.Circuits.Wire.input (finProdFinEquiv (input, component))
Instances For
An implementation of every source operation by a width-k, multi-output
target circuit.
A gadget receives one target block per source argument and returns one target block.
Instances For
Pull a target interpretation back to an interpretation on width-k
blocks.
Equations
- translation.pull interpretation op input = (translation.operation op).eval interpretation (Algebraic.Block.flatten input)
Instances For
Charge each source operation by the exact target cost of its block gadget.
Instances For
A compiled target program together with the target block representing every source wire.
- gateCount : ℕ
The number of target gates in the compiled program.
The compiled target program, over
ktarget inputs per source input.The block of
ktarget wires representing each source wire.
Instances For
Compile a source program through a block translation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Number of target gates produced by block compilation.
Equations
- translation.compiledGateCount circuit = (translation.compileProgram circuit.program).gateCount
Instances For
Compile a source circuit, flattening its input and output blocks.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Program compilation preserves every component of every source wire.
Block compilation preserves evaluation exactly after flattening.
Block program compilation preserves pulled-back weighted cost exactly.
Block circuit compilation preserves pulled-back weighted cost exactly.
Block compilation has the exact size obtained by charging every source operation by its gadget gate count.
A uniform local gadget bound gives the usual multiplicative size bound for block compilation.
A block simulation is a homomorphism into the block interpretation pulled back through a block translation.
Equations
- Algebraic.BlockSimulation translation source target = Cslib.Circuits.Homomorphism source (translation.pull target)
Instances For
Construct a block simulation from its operation-gadget preservation law.
Equations
- Algebraic.BlockSimulation.ofPreserves map preserves = { map := map, homomorphic := preserves }
Instances For
The homomorphism law exposed directly in block-gadget form.
Evaluation commutes with block compilation and encoding.