Deterministic refuter for 4n - 9d circuits #
The refuter refute takes a full-basis circuit C and a Boolean function f and returns an
input. RefuterProofs.lean proves (refute_correct_of_cost_lt, refute_correct) that C and f
disagree on that input whenever C.program.cost binaryB2Cost + 9 * d < 4 * n (and hence whenever
C.size + 9 * d < 4 * n) and f is a d-affine disperser. The poly(n, 2^d) running time is not
formalized here.
refute runs gate elimination from initialState C (ofCircuitBinary C, folding constants and
unary gates into literals at zero gate cost). At each state chooseStep? selects one of the cases
of State.Valid.exists_step, and applyStep performs the concrete successor that the
corresponding lemma proves to be a step (State.deleteConstraint, State.partnersShareChildStep,
State.andOnPairStep, …). None of these needs the disperser property. Where the existence proof
uses it, chooseStep? stops instead: when the output is a constant, a parameter, an auxiliary
variable over no gates, the Case 5a gate (findAndOnPair), or the minimal gate.
findCounterexample then searches the 2^d candidate inputs (candidates) of an affine subspace
of dimension d on which the output is constant (affine representations of auxiliary variables are
computed by dense XORSAT elimination, evaluateAux).
Main definitions #
Cslib.Circuits.Boolean.AffineDisperser4n.chooseStep?,Cslib.Circuits.Boolean.AffineDisperser4n.applyStep: choosing and performing a step.Cslib.Circuits.Boolean.AffineDisperser4n.findReader: the reader search ofapplyStep, the least other gate reading a gate.Cslib.Circuits.Boolean.AffineDisperser4n.pairCandidate,Cslib.Circuits.Boolean.AffineDisperser4n.pairCandidates: a candidate pair by its local index, and the ordered candidate pairs tried byfindPair.Cslib.Circuits.Boolean.AffineDisperser4n.refuterRun,Cslib.Circuits.Boolean.AffineDisperser4n.refuterLoop,Cslib.Circuits.Boolean.AffineDisperser4n.candidateFamily,Cslib.Circuits.Boolean.AffineDisperser4n.candidatePoint,Cslib.Circuits.Boolean.AffineDisperser4n.candidates,Cslib.Circuits.Boolean.AffineDisperser4n.findCounterexample,Cslib.Circuits.Boolean.AffineDisperser4n.refute: the refuter.
The step chosen by the refuter.
- deleteConstantGate (J : ℕ) : StepChoice
(D1): delete the degenerate gateJ. - deleteDeadGate (J : ℕ) : StepChoice
(D2): delete the gateJ, which nothing reads. - deleteShortEqn (e : ℕ) : StepChoice
(D3): delete the equationeof at most two terms. - deleteUnitParam (x e : ℕ) : StepChoice
(D4): unit-delete the parameterx, whose only child is the equatione. - moveAffine (J : ℕ) : StepChoice
Move the affine gate
Jinto the affine system. - degeneratePair (p : ℕ) : StepChoice
Case 2: the paired parameter
phas degree0or at least2. - pairInSystem (p : ℕ) : StepChoice
Case 4: the paired parameter
poccurs in an equation. - andOnPair (G p : ℕ) : StepChoice
Case 5a: the non-affine gate
Greads the paired parameterpand another parameter. - swapAuxIn (G : ℕ) : StepChoice
Case 5b, preparation: swap an auxiliary argument of the minimal gate
G. - pairCreation (G : ℕ) : StepChoice
Case 5b: pair creation on the minimal gate
G.
Whether an argument is a gate of S.
Whether a gate is degenerate (Gate.Degenerate): it has a constant argument or two equal
arguments.
The step taken by the refuter in S, or none when S is terminal.
The dense XORSAT row of width m of the equation ∑ terms = c.
A strict upper bound on the names of the parameters and auxiliary variables of S: the width
of the dense XORSAT systems built by evaluateAux.
The affine representation (c, T) of a in the parameters, read off from evaluateAux at
the zero assignment and at the unit assignments.
Candidate t of the pairs of p with the partner r, by the low bits of t: bit 2 puts
r first, bits 1 and 0 are the biases of the first and the second name.
The argument of g other than p.
A value b of the argument w of a non-affine gate g making g constant, with that
constant.
An auxiliary argument a of g with the other argument b.
Apply the step choice to S.
The parameter values of a terminal state used by findCounterexample: first members of pairs
take their bias, the parameters of d_params read A, and the others are false.
The measure decreased by every step of the refuter.
The candidate inputs of the final search of a terminal state: candidatePoint of each of the
2^d parameter assignments of candidateFamily, in the order of allAssignments d. This list is
the specification of the search; findCounterexample does not build it.
The first candidate of a terminal state on which C and f disagree. Each candidate is built
only when it is tried, and the search stops at the first disagreement.
The refuter: run gate elimination from the initial state of C, then search the terminal state
for an input on which C and f disagree.