Circuits as certificates #
A verifier that guesses a circuit reads it from a certificate of a fixed length. This file fixes
such a format for De Morgan circuits with n inputs, one output and at most s gates, of length
certLength n s, monotone in the number of inputs (certLength_mono_left). Wire numbers are
below w = n + s and are written in unary in fields of w
bits (unaryField); an operation takes three bits (Op.bits). A certificate lists the number of
gates in a field of s bits, the output wire, and then s rows of 3 + 2 w bits, the first of
which hold the gates (certificate).
Every bit string reads as a list of gates and an output wire (readCertificate): a field is read
as its number of ones, any three bits as an operation, and the arguments of a gate are cut to the
arity of its operation. Reading is polynomial-time
(Cslib.Circuits.Boolean.computableInPolyTime_readCertificate), and the certificate of a
circuit, followed by any bits, reads as its code (readCertificate_certificate_append). A string
that is not the certificate of a circuit may read as gates that read wires not yet computed; the
polynomial-time test codeCheck tells the codes of circuits apart (codeCheck_eq_true_iff).
Main definitions #
Cslib.Circuits.Boolean.certLength: the length of certificates.Cslib.Circuits.Boolean.certificate: the certificate of a circuit code.Cslib.Circuits.Boolean.readCertificate: the gates and the output wire read from a certificate.Cslib.Circuits.Boolean.codeCheck: the test for codes of circuits.
Main results #
Cslib.Circuits.Boolean.certLength_mono_left: certificate length is monotone in the input count.Cslib.Circuits.Boolean.length_certificate: certificates have lengthcertLength n s.Cslib.Circuits.Boolean.readCertificate_certificate_append: a certificate reads as the code of its circuit.Cslib.Circuits.Boolean.codeCheck_eq_true_iff:codeChecktestsProgram.IsCodeFrom.Cslib.Circuits.Boolean.computableInPolyTime_readCertificate,Cslib.Circuits.Boolean.computableInPolyTime_codeCheck: reading certificates and checking codes are polynomial-time.
References #
Fields and rows #
The number a in a field of width bits: a ones, then zeros.
Instances For
Certificates #
The length of the certificates of circuits with n inputs and at most s gates.
Instances For
Certificate length is monotone in the number of inputs.
The certificate of a circuit with n inputs and at most s gates, given by its gate list and
its output wire: the number of gates and the output wire in fields of s and n + s bits, the
rows of the gates, and rows of zeros up to s rows.
Instances For
A certificate reads as at most s gates.
A certificate reads as the code of its circuit, whatever bits follow it.
The certificate of a circuit with at most s gates has length certLength n s.
Checking codes #
Reading certificates in polynomial time #
Reading a gate from a row is polynomial-time, for the field width in unary.
Checking that a list of gates is a code is polynomial-time, with the number of inputs in unary.
Reading certificates is polynomial-time, for the number of inputs and the number of gates in unary.