Documentation

CslibFrontier.Computability.MCSP.Multi.NP

Multi-output MCSP is in NP #

Multi-output MCSP [IlangoLoffOliveira2020, Definition 1, p. 22:3] is in NP for the encoding Cslib.MultiMCSP.encInstance, which writes n, m and s in unary and then the m · 2^n table bits. A certificate is a De Morgan circuit with at most s gates in the format of Cslib.Circuits.Boolean.readCertificate, followed by m fields of n + s bits, the output wire of each component in unary (Cslib.MultiMCSP.multiCertificate). The verifier checks that the gates form a circuit, that every output wire exists, and that output i agrees with component i on all 2 ^ n inputs. Since s is unary, certificates need no cap and are polynomially long.

Cslib.MultiMCSP.mem_NP is the statement over the constant-free basis of Cslib.Boolean.DeMorgan, Definition 1 exactly; its verifier also rejects constant gates. Cslib.MultiMCSP.mem_NP_boolean is the library variant over Boolean.interpretation.

Main definitions #

Main results #

References #

The verifier #

The number of inputs on which the verifier compares outputs with the table: n when there is a component, 0 when there is none. With no component there is nothing to compare, and the guard keeps the enumeration of 2 ^ n inputs polynomial in the encoding, which then has no table bits.

theorem Cslib.MultiMCSP.testArity_of_pos {n m : ℕ} (hm : 0 < m) :
testArity n m = n

The m output wires read from the bits that follow a single-output certificate for n inputs and at most s gates: m fields of n + s bits, each read as its number of ones.

def Cslib.MultiMCSP.accepts (n m : ℕ) (bits : List Bool) (gates : List (Circuits.Boolean.Op × List ℕ)) (outs : List ℕ) :

Whether the gates gates and output wires outs describe a circuit on n inputs whose output i agrees with row i of bits on all inputs; the rows have 2 ^ n bits, in the order of MCSP.truthTable.

The verifier over cslib's basis with constants: the certificate must describe at most threshold gates and one output wire per component (readOutputs) that agree with the table.

Whether an operation of cslib's basis is not a constant.

The verifier over the constant-free basis [IlangoLoffOliveira2020, Definition 1]: booleanVerifier, and no gate is a constant.

Rows of the table #

Row i of the table bits is the truth table of component i.

Soundness #

Soundness over the basis with constants. An accepted certificate describes a circuit with at most threshold gates that computes the function of the instance, and its gate list is the one read from the certificate.

Completeness #

The certificate of a circuit with at most s gates and m outputs: its single-output certificate (Circuits.Boolean.certificate, with output field 0), then the output wire of each component in a field of n + s bits.

The certificate of a circuit with at most s gates has length certLength n s + m (n + s).

Completeness over the basis with constants. A circuit with at most threshold gates that computes the function of the instance has a certificate of length certLength n s + m (n + s), accepted whatever bits follow it.

The constant-free basis #

Soundness over the constant-free basis. An accepted certificate describes a constant-free circuit with at most threshold gates that computes the function of the instance.

Completeness over the constant-free basis. A constant-free circuit with at most threshold gates that computes the function of the instance has a certificate, accepted whatever bits follow it: that of its image in cslib's basis.

Certificates are polynomially long #

The polynomial bounding the length of certificates.

Polynomial time #

Membership in NP #

Multi-output MCSP is in NP [IlangoLoffOliveira2020, Definition 1]: over the constant-free basis of fan-in-two AND and OR and NOT, for the encoding encInstance.

The library variant over cslib's basis with constants is in NP.