A verifier for a constraint graph #
The verifier of a constraint graph picks an edge at random, reads the symbols its two endpoints carry, and checks the constraint. The proof is the assignment, written as one fixed-width block per vertex, so the queries are the two blocks.
This module packages the algorithmic content a graph must supply — how many
edges, the endpoints of an edge, and the constraint — and turns it into a
PCPVerifier. Nothing here is about the graph's quality: completeness and
soundness are hypotheses on the supplied data, discharged elsewhere by Dinur's
amplification.
Main definitions #
Complexity.AlgCSP— a constraint graph presented algorithmically
Main results #
Complexity.AlgCSP.cntU_mem_FP,Complexity.AlgCSP.posU_mem_FP— the query list is polynomial-time describableComplexity.AlgCSP.verifier— the verifier itselfComplexity.mem_PCP_of_algCSP— a constraint graph with a gap puts its language inPCP
A constraint graph presented the way an algorithm sees it: a count of edges, the endpoints of each edge, and a decidable constraint. Indices are handled in unary, which is what a polynomial-time loop can carry.
How many edges the graph on this input has.
The edge count is polynomial-time computable in unary.
- width : ℕ
The number of bits a symbol occupies.
A symbol occupies at least one bit.
The endpoints of an edge:
falsefor the first,truefor the second.- vert_mem (b : Bool) : (fun (w : List Bool) => List.replicate (self.vert b (pairFst w) (pairSnd w).length) true) ∈ FP
The endpoints are polynomial-time computable in unary.
- ok : Language
The constraint, on
pair (pair x (unary e)) (the two symbol blocks). The constraint is polynomial-time decidable.
Instances For
The edge a coin string names.
Equations
Instances For
That index in unary, as far as the clamp allows.
Equations
Instances For
Is the named edge a real one?
Equations
- A.inRange p z = Complexity.Cobham.lenLeFlag (List.replicate (A.numEdges (Complexity.pairFst z)) true) (true :: Complexity.AlgCSP.edgeU p z)
Instances For
How many queries the verifier makes: both symbol blocks, or none when the coin string names no edge.
Equations
- A.cntU p z = Complexity.Cobham.selectHead (A.inRange p z) (List.replicate (2 * A.width) true) []
Instances For
Where the verifier looks #
The endpoint a query index refers to: the first for the low half of the queries, the second for the high half.
Equations
- A.vertU p b w = List.replicate (A.vert b (Complexity.pairFst (Complexity.pairFst w)) (Complexity.AlgCSP.edgeU p (Complexity.pairFst w)).length) true
Instances For
Is this query in the low half?
Equations
Instances For
The offset inside the symbol block.
Equations
- A.offU w = Complexity.Cobham.selectHead (A.lowFlag w) (Complexity.pairSnd w) (List.drop A.width (Complexity.pairSnd w))
Instances For
The position a query reads, in unary.
Equations
Instances For
The verifier #
The i-th query position, as a number.
Equations
- A.pos p z i = (A.posU p (Complexity.pair z (List.replicate i true))).length
Instances For
The argument the constraint is asked about.
Equations
Instances For
The verdict: accept unless the coin string names a real edge whose constraint fails.
Equations
Instances For
The verifier of a constraint graph.
Equations
- One or more equations did not get rendered due to their size.
Instances For
What the verifier reads and decides #
Edge e is satisfied by the proof π.
Equations
- A.Sat x π e = (Complexity.pair (Complexity.pair x (List.replicate e true)) (Complexity.PCPVerifier.answers π (List.map (A.posVal x e) (List.range (2 * A.width)))) ∈ A.ok)
Instances For
What the verifier decides. It accepts unless the coin string names a real edge that the proof fails to satisfy.
How often the verifier accepts #
Perfect completeness. A proof satisfying every edge is always accepted.
Soundness. If no proof satisfies more than a 1 - gap fraction of the
edges, the verifier accepts with probability at most 1 - gap / 2.
A constraint graph with a gap puts its language in PCP. Completeness
and soundness are hypotheses on the graph: a member has an assignment satisfying
every edge, and a non-member has none satisfying more than a 1 - gap
fraction.