Moving and rewiring gates #
Two changes of the gates of a fair semi-circuit that keep its parameters and the function it computes, as in Mishra and Santhanam, Sections 2.3 and 4.2:
SemiCircuit.moveAffine: an affine gate reading no gates becomes an auxiliary variable, with its equationSemiCircuit.affEqnadded to the affine system; this does not increase the degree of any parameter (SemiCircuit.deg_moveAffine_le);SemiCircuit.rewire: a gate is replaced by a gate reading only parameters that computes the same value whenever the other gates take their values.
Both preserve well-formedness, and every consistent assignment of the result is consistent for
the original semi-circuit (SemiCircuit.MoveOK.liftsTo, SemiCircuit.RewireOK.liftsTo).
Main definitions #
Main results #
Cslib.Circuits.Boolean.SemiCircuit.WellFormed.moveAffine,Cslib.Circuits.Boolean.SemiCircuit.WellFormed.rewire: well-formedness is preserved.
References #
Moving an affine gate into the affine system #
Move the affine gate J into the affine system as the auxiliary variable J with the new
equation e.
Instances For
The hypotheses of moving a gate into the affine system: J is an affine gate reading no
gates and e is a fresh equation name.
- fresh : e ∉ C.eqns
- affine : IsAffineOp (C.gate J).op
Instances For
The solutions of the new affine system are those of the old one on which the moved gate takes its value.
Moving an affine gate reading no gates into the affine system preserves well-formedness.
A consistent assignment after moving a gate into the affine system is consistent for the original semi-circuit.
Moving a gate into the affine system does not increase the degree of any value other than the gate.
Rewiring a gate #
Replace the gate J by the gate g.
Instances For
The hypotheses of rewiring: g reads only parameters and computes the value of J
whenever all other gates take their values.
Instances For
Rewiring a gate to read only parameters preserves well-formedness.
A consistent assignment of a rewired semi-circuit is consistent for the original one.