Documentation

CslibFrontier.Computability.PCP.Approximation.ThreeXOR

The four-clause reduction from three-variable XOR constraints to exact three-CNF #

An existing CSP Bool V represents a system of parity equations: (b, [x, y, z]) asks that σ x ^^ σ y ^^ σ z = b. Specializing the existing forbidden-pattern compiler produces exactly four clauses per equation. Every assignment falsifies exactly one clause for each equation it violates, so the unsatisfied fraction falls by exactly a factor of four. No auxiliary variables are introduced. Repeated variables are allowed; distinct scopes give three distinct variables in each output clause.

This is the elementary reduction in the proof of Håstad, Theorem 6.1, p. 831. His sign-product equation xyz = 1 corresponds to XOR false here. The local counting argument is applied to entire systems, with a plain polynomial-time certificate over framed encodings. This module does not establish hardness of MAX-E3LIN or the perfect-completeness hardness theorem for MAX-E3SAT; small-soundness Label Cover is in CslibFrontier.Computability.PCP.Approximation.LabelCover.SmallSoundness.

The parity equations are the relation alphabet Cslib.Logic.PL.CSP.paritySem of CslibFrontier.Logics.Propositional.CSP.Boolean.

Main results #

References #

A system of three-variable parity equations produces exactly four clauses per equation.

theorem Cslib.Logic.PL.CSP.length_clause_mem_toCNFBounded_parity {V : Type u_1} {F : CSP Bool V} (hF : ∀ c ∈ F, c.scope.length = 3) {cl : Clause V} (hcl : cl ∈ toCNFBounded 3 paritySem F) :

Every clause produced from a three-variable parity system has exactly three literals.

Three distinct variables in every input scope give three distinct variables in every output clause.

The compiler preserves satisfiability, including the empty system and repeated variables.

theorem Cslib.Logic.PL.CSP.proportion_countUnsat_toCNFBounded_parity {V : Type u_1} {F : CSP Bool V} (hF : ∀ c ∈ F, c.scope.length = 3) (σ : V → Bool) :

For each assignment, the fraction of falsified output clauses is exactly one quarter of the fraction of violated input equations. Both fractions are zero for the empty system.

theorem Cslib.Logic.PL.CSP.le_unsatVal_toCNFBounded_parity_iff {V : Type u_1} {F : CSP Bool V} (hF : ∀ c ∈ F, c.scope.length = 3) (ε : ℝ) :
ε / 4 ≤ (toCNFBounded 3 paritySem F).unsatVal ↔ ∀ (σ : V → Bool), ε ≤ ↑(List.countP (fun (c : Constraint Bool V) => !Constraint.eval paritySem σ c) F) / ↑(List.length F)

A universal lower bound on the fraction of violated equations transfers with the exact factor four. No nonempty-system assumption is hidden in this equivalence.

Three-variable XOR-to-CNF compilation is polynomial-time under the existing framed CSP and CNF encodings. The total compiler discards scopes longer than three; the semantic guarantees above assume that every scope has exactly three entries.