Documentation

CslibFrontier.Computability.Circuit.Boolean.SuccinctVerifier

Verifying a succinct satisfying assignment by circuit unsatisfiability #

A circuit D on q inputs describes 2 ^ q clauses of three literals on 2 ^ r variables. Its outputs are three consecutive blocks of r + 1 bits: the address of a variable, followed by its sign. toCNF D expands those clauses into the existing CNF representation, with variables of type BitString r. Every address has a clause, so padding addresses must describe tautologies rather than be ignored. Repeated variables and clauses are allowed.

Given a circuit W on r inputs, badClause D W computes whether the clause addressed by its input is false under the assignment fun y => W.eval interpretation y 0. The decoder is used once and the witness circuit three times. The result has exactly the original q input bits and D.size + 3 * W.size + 17 De Morgan gates, constants included. It is unsatisfiable exactly when the truth table of W satisfies the expanded CNF.

This is the witness-verification step in the proof of [Williams2010, Theorem 3.2, p. 10 of the author's May 4, 2010 version]. The source uses a negation bit; here a sign is the value required by a literal, as in Literal.eval. The exact seventeen-gate overhead is a library variant of the source's asymptotic bound. This module proves an actual circuit construction and its semantics and gate count. It does not assert the easy-witness lemma, efficient construction of a tableau decoder, a machine running time, or the resulting separation of complexity classes.

Main definitions #

Main results #

References #

Bit i of literal j's variable address in the interleaved address/sign layout.

Literal j's sign, immediately following its r address bits.

The clause at address x: three variable addresses and their required truth values.

Expand every q-bit clause address, in binary order. This expansion has exponential length; the verification circuit below does not construct it.

@[simp]

Every represented clause has three literals, including repetitions.

@[simp]

The formula contains exactly one clause per input to its decoder.

theorem Cslib.Circuits.Boolean.SuccinctVerifier.eval_clause_eq_true_iff {q r : ℕ} (D : Circuit signature q (3 * (r + 1))) (a : BitString r → Bool) (x : BitString q) :
Logic.PL.Clause.eval a (clause D x) = true ↔ ∃ (j : Fin 3), (a fun (i : Fin r) => D.eval interpretation x (addressWire r j i)) = D.eval interpretation x (signWire r j)

A clause holds precisely when one of its three addressed variables has the decoded sign.

The expanded formula holds exactly when every clause address is satisfied.

On six input wires, the first three are assignment values and the last three are signs. The test returns true exactly when all three values differ from their signs.

@[simp]

The fixed violation test uses seventeen De Morgan gates.

theorem Cslib.Circuits.Boolean.SuccinctVerifier.eval_violationTest (values signs : Fin 3 → Bool) :
violationTest.eval interpretation (Fin.append values signs) = ((values 0 ^^ signs 0) && ((values 1 ^^ signs 1) && (values 2 ^^ signs 2)))

Evaluate the fixed test on the three values followed by the three signs.

The bad-clause circuit. Run the decoder once, query the proposed witness circuit on each decoded variable address, and test whether all three literals are false. Its inputs are the decoder's original clause-address bits.

@[simp]

Exact size of the bad-clause circuit. The decoder is shared by the three witness copies; wire selection and designated outputs cost no gates.

Pointwise correctness. The output is the negation of the addressed clause under the assignment given by the truth table of the proposed witness circuit.

Verification by unsatisfiability. The bad-clause circuit has no satisfying input exactly when the proposed witness's truth table satisfies the entire represented formula.

The size-bounded witness correspondence. There is a satisfying assignment of circuit complexity at most s precisely when a circuit of at most s gates passes verification. This is a finite equivalence and assumes no easy-witness theorem.