Documentation

CslibFrontier.Computability.Complexity.Problems.QUADEQ

QUADEQ is NP-complete #

QUADEQ is the language of satisfiable systems of quadratic equations $\sum_{i,j} a_{ij} u_i u_j = b$ over 𝔽₂ in 0/1 variables Arora and Barak, draft, Exercise 2§18. An instance is a list of Cslib.Logic.PL.QuadEquations whose variables are natural-number labels written in binary (encNat), as in SAT and XORSAT; an equation lists the monomials (i, j) with $a_{ij} = 1$, repeated monomials cancelling in pairs. No bound on the labels is imposed, so the number of variables n of the source is the number of distinct labels that occur.

Membership in NP checks the equations under the assignment that reads each variable at its first occurrence, as SAT.assignment does, so certificates are no longer than the encoded instance. Hardness follows the hint of the exercise and reduces SAT: toQUADEQ writes, for each clause, the chain of products $z_{t+1} = z_t \cdot \lnot\ell_t$ of Cslib.Logic.PL.CNF.toQuadSystem and numbers its variables with splitVarToNat. Chapter 18's Walsh–Hadamard PCP starts from this language.

Main definitions #

Main results #

References #

theorem Cslib.Complexity.encQuadEquation_rhs_polyTime {V : Type} (encV : V ↪ List Bool) {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → Logic.PL.QuadEquation V} :
theorem Cslib.Complexity.encQuadEquation_mk_deg {V : Type} (encV : V ↪ List Bool) :
Turing.MultiTapeTM.ComputableInDegree (fun (p : List (V × V) × Bool) => { terms := p.1, rhs := p.2 }) (encQuadEquationFields encV) (encQuadEquation encV) 1 1
@[reducible, inline]

The tuple of the fields of encQuadEquation.

theorem Cslib.Complexity.encQuadEquation_mk_polyTime {V : Type} (encV : V ↪ List Bool) {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → List (V × V)} {x1 : γ → Bool} (h0 : Turing.MultiTapeTM.ComputableInPolyTime x0 encIn (Turing.MultiTapeTM.encList (Turing.MultiTapeTM.encPair encV encV))) (h1 : Turing.MultiTapeTM.ComputableInPolyTime x1 encIn Turing.MultiTapeTM.encBool) :
Turing.MultiTapeTM.ComputableInPolyTime (fun (x : γ) => { terms := x0 x, rhs := x1 x }) encIn (encQuadEquation encV)
theorem Cslib.Complexity.encQuadEquation_mk_budget {V : Type} (encV : V ↪ List Bool) {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 : γ → List (V × V)} {x1 : γ → Bool} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn (Turing.MultiTapeTM.encList (Turing.MultiTapeTM.encPair encV encV)) budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn Turing.MultiTapeTM.encBool budget) :
Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { terms := x0 x, rhs := x1 x }) encIn (encQuadEquation encV) budget
theorem Cslib.Complexity.encQuadEquation_mk_inO {V : Type} (encV : V ↪ List Bool) {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → List (V × V)} {T0 S0 : γ → ℕ} {x1 : γ → Bool} {T1 S1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn (Turing.MultiTapeTM.encList (Turing.MultiTapeTM.encPair encV encV)) T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn Turing.MultiTapeTM.encBool T1 S1) :
Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { terms := x0 x, rhs := x1 x }) encIn (encQuadEquation encV) (fun (x : γ) => T0 x + T1 x) fun (x : γ) => S0 x + S1 x
theorem Cslib.Complexity.encQuadEquation_terms_budget {V : Type} (encV : V ↪ List Bool) {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Logic.PL.QuadEquation V} :
theorem Cslib.Complexity.encQuadEquation_rhs_budget {V : Type} (encV : V ↪ List Bool) {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → Logic.PL.QuadEquation V} :
Turing.MultiTapeTM.ComputableInSpace g✝ encIn✝ (encQuadEquation encV) S✝ → Turing.MultiTapeTM.ComputableInSpace (fun (c : γ✝) => (g✝ c).rhs) encIn✝ Turing.MultiTapeTM.encBool S✝

Encoding of a quadratic equation: its framed list of monomials, each a pair of variables, then its right-hand side bit.

Systems of quadratic equations over binary natural-number labels, as framed lists of equations.

QUADEQ: the satisfiable systems of quadratic equations over 𝔽₂ in 0/1 variables Arora and Barak, draft, Exercise 2§18.

A system is in QUADEQ exactly when it is satisfiable.

The verifier #

The assignment described by a certificate w for F: each variable takes the bit of w at the position of its first occurrence in F.

Evaluate an equation under an assignment: the exclusive or of the monomials, compared with the right-hand side.

The verifier for QUADEQ: every equation holds under the assignment the certificate describes.

The verifier accepts exactly when the certificate's assignment satisfies the system.

The values of a listed along the occurrences of F, followed by any bits, describe a on the variables of F.

A system has no more variable occurrences than its encoding has bits: each monomial names two variables, and its framed encoding takes at least two bits.

QUADEQ.verifier verifies QUADEQ with certificates as long as the encoded system: a satisfying assignment, listed along the occurrences, is a prefix the verifier accepts whatever padding follows it.

The reduction from SAT #

The reduction from SAT to QUADEQ: the chained clause equations of Cslib.Logic.PL.CNF.toQuadSystem, with variables numbered by splitVarToNat.

Correctness of the reduction: toQUADEQ φ is in QUADEQ exactly when φ is in SAT.

@[reducible, inline]

Encoding of the variables of Cslib.Logic.PL.CNF.toQuadSystem: a tag bit, then either a formula variable in binary or a framed pair of unary clause and position indices.