Documentation

CslibFrontier.Computability.Circuit.Boolean.IncidenceCNF

The incidence-graph 2-CNF #

Mark the vertices and edges of the complete graph on a finite set V. The incidence-graph 2-CNF H_V accepts when every unmarked edge has both endpoints marked: it has a clause x_v ∨ y_e for each vertex v of each edge e, so it accepts exactly the vertex covers of the incidence graph of the complete graph. On V = Fin n it has N = n + n (n - 1) / 2 inputs (Cslib.Circuits.IncidenceCNF.card_var). The manuscript of #8623 Anonymous, Section 1 proves its lower bounds for this function.

P_V is its multilinear representative over a commutative ring R (Cslib.Circuits.IncidenceCNF.P). Fixing the vertex bits to the indicator of a set I leaves the product of the edge bits outside I Anonymous, Equation (3.1). By multilinearity this gives P_V at every point (Cslib.Circuits.IncidenceCNF.eval_P): P_V(ρ) = ∑ x, ∏ v, (ρ_v or 1 - ρ_v) · ∏ e ⊄ x, ρ_e, the sum over the vertex sets x. All the reductions of the manuscript are specializations of this formula. Pinning the vertex and edge bits outside a subset to one restricts P_W to P_V, so P_V is an affine projection of P_W for every embedding V ↪ W (Cslib.Circuits.IncidenceCNF.isProjection_P).

Main definitions #

Main results #

References #

@[reducible, inline]

The edges of the complete graph on V: the unordered pairs of distinct vertices.

@[reducible, inline]

The variables of the incidence-graph 2-CNF: a bit for each vertex and a bit for each edge.

@[reducible, inline]
abbrev Cslib.Circuits.IncidenceCNF.Inside {V : Type u_2} (x : V → Bool) (e : Edge V) :

An edge lies inside a set x of vertices when both of its endpoints are in x.

The incidence-graph 2-CNF: the clause x_v ∨ y_e for each vertex v of each edge e.

theorem Cslib.Circuits.IncidenceCNF.H_eq_true_iff {V : Type u_1} [Fintype V] [DecidableEq V] (z : Var V → Bool) :
H V z = true ↔ ∀ (e : Edge V), z (Sum.inr e) = true ∨ Inside (fun (v : V) => z (Sum.inl v)) e

The incidence-graph 2-CNF accepts exactly when every edge is marked or has both endpoints marked: the marked vertices and edges form a vertex cover of the incidence graph.

noncomputable def Cslib.Circuits.IncidenceCNF.P (V : Type u_1) [Fintype V] [DecidableEq V] (R : Type u_2) [CommRing R] :

The multilinear representative of the incidence-graph 2-CNF over R.

The variables of the incidence-graph 2-CNF on Fin n: n vertex bits and n (n - 1) / 2 edge bits.

The value at every point #

theorem Cslib.Circuits.IncidenceCNF.eval_P {V : Type u_1} [Fintype V] [DecidableEq V] {R : Type u_2} [CommRing R] (ρ : Var V → R) :
(MvPolynomial.eval ρ) (P V R) = ∑ x : V → Bool, (∏ v : V, if x v = true then ρ (Sum.inl v) else 1 - ρ (Sum.inl v)) * ∏ e : Edge V, if Inside x e then 1 else ρ (Sum.inr e)

The value of P at every point. It is the sum, over the sets x of marked vertices, of the product of ρ_v over the marked vertices, of 1 - ρ_v over the others, and of ρ_e over the edges not inside x.

theorem Cslib.Circuits.IncidenceCNF.map_P {V : Type u_1} [Fintype V] [DecidableEq V] {R : Type u_2} {S : Type u_3} [CommRing R] [CommRing S] (f : R →+* S) :
(MvPolynomial.map f) (P V R) = P V S

P over R maps to P over S under every ring homomorphism.

theorem Cslib.Circuits.IncidenceCNF.aeval_P {V : Type u_1} [Fintype V] [DecidableEq V] {R : Type u_2} {S : Type u_3} [CommRing R] [CommRing S] [Algebra R S] (ρ : Var V → S) :
(MvPolynomial.aeval ρ) (P V R) = ∑ x : V → Bool, (∏ v : V, if x v = true then ρ (Sum.inl v) else 1 - ρ (Sum.inl v)) * ∏ e : Edge V, if Inside x e then 1 else ρ (Sum.inr e)

The value of P at every point of an algebra, by Cslib.Circuits.IncidenceCNF.eval_P.

Restriction to a subset of the vertices #

def Cslib.Circuits.IncidenceCNF.Edge.map {V : Type u_1} {W : Type u_2} (f : V ↪ W) (e : Edge V) :

The edge of W given by an edge of V along an embedding.

Mapping edges along an embedding is injective.

theorem Cslib.Circuits.IncidenceCNF.inside_map_iff {V : Type u_1} {W : Type u_2} (f : V ↪ W) (y : W → Bool) (e : Edge V) :
Inside y (Edge.map f e) ↔ Inside (fun (v : V) => y (f v)) e

An edge lies inside a vertex set of W exactly when its preimage lies inside the pulled-back set.

noncomputable def Cslib.Circuits.IncidenceCNF.restrictMap {V : Type u_1} {W : Type u_2} (R : Type u_3) (f : V ↪ W) [One R] :
Var W → Var V ⊕ R

The projection restricting P_W to P_V along an embedding f: the bits of V go to their variables, every other bit to the constant one.

noncomputable def Cslib.Circuits.IncidenceCNF.restrict {V : Type u_1} {W : Type u_2} (R : Type u_3) [CommRing R] (f : V ↪ W) (y : Var W) :

The substitution of Cslib.Circuits.IncidenceCNF.restrictMap.

@[simp]
theorem Cslib.Circuits.IncidenceCNF.restrict_inl {V : Type u_1} {W : Type u_2} {R : Type u_3} [CommRing R] (f : V ↪ W) (v : V) :

The restriction keeps the vertex bits of V.

theorem Cslib.Circuits.IncidenceCNF.restrict_inl_of_notMem {V : Type u_1} {W : Type u_2} {R : Type u_3} [CommRing R] (f : V ↪ W) {w : W} (h : ¬∃ (v : V), f v = w) :
restrict R f (Sum.inl w) = 1

The restriction sets the vertex bits outside V to one.

@[simp]
theorem Cslib.Circuits.IncidenceCNF.restrict_inr {V : Type u_1} {W : Type u_2} {R : Type u_3} [CommRing R] (f : V ↪ W) (e : Edge V) :

The restriction keeps the edge bits of V.

theorem Cslib.Circuits.IncidenceCNF.restrict_inr_of_notMem {V : Type u_1} {W : Type u_2} {R : Type u_3} [CommRing R] (f : V ↪ W) {e : Edge W} (h : ¬∃ (e' : Edge V), Edge.map f e' = e) :
restrict R f (Sum.inr e) = 1

The restriction sets the edge bits outside V to one.

theorem Cslib.Circuits.IncidenceCNF.aeval_restrict_P {V : Type u_1} [Fintype V] [DecidableEq V] {W : Type u_2} [Fintype W] [DecidableEq W] (R : Type u_4) [CommRing R] (f : V ↪ W) :
(MvPolynomial.aeval (restrict R f)) (P W R) = P V R

Restriction to a subset of the vertices. For an embedding f : V ↪ W, setting the vertex and edge bits of P_W outside the image of f to one gives P_V.

theorem Cslib.Circuits.IncidenceCNF.isProjection_P {V : Type u_1} [Fintype V] [DecidableEq V] {W : Type u_2} [Fintype W] [DecidableEq W] {K : Type u_4} [CommRing K] (f : V ↪ W) :

P_V is a projection of P_W for every embedding V ↪ W: the variables of V stay, every other variable is set to one.

P_V is an affine projection of P_W for every embedding V ↪ W.

A circuit for P_W gives one for P_V, for every embedding V ↪ W, with at most five times as many nodes. This is the model of Cslib.Circuits.Arithmetic.ComputedWithin: arbitrary arithmetic circuits, counting nodes. The manuscript's Theorem 1 concerns syntactically multilinear circuits and counts wires; the specializations of later steps are applied to such circuits directly.