Documentation

Complexitylib.DescriptiveComplexity.Problems.Coloring

Bipartiteness as an existential second-order query #

The graph vocabulary describes arbitrary directed graphs, including loops. A bipartition assigns a Boolean color to each vertex, with different colors at the ends of every directed edge. Symmetry is not required; a loop prevents a coloring.

The sentence ∃X ∀x ∀y (E(x,y) → (X(x) ↔ ¬X(y))) defines this query. This is the example in Senellart and Gnatenko (2026), Section 2.1, https://arxiv.org/abs/2609.18261. We prove agreement with an ordinary Boolean coloring, rather than defining the query as satisfaction of its witness. No NP membership or hardness statement is claimed here. checkBipartition executes the matrix on a supplied Boolean coloring and is proved to accept exactly the colorings separating every directed edge. The general binary certificate checker agrees with it when the certificate lists the vertex colors, one bit per vertex.

There is an edge from x to y in a graph structure.

Equations
Instances For

    A Boolean coloring separates the endpoints of every directed edge.

    Equations
    Instances For

      A graph without edges has a constant Boolean coloring.

      A self-loop rules out a Boolean bipartition.

      The open FO matrix: adjacent vertices disagree on the unary relation variable.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Complexity.DescriptiveComplexity.GraphQuery.bipartiteMatrix_sat (A : FinStruct Vocabulary.graph) (σ : Env A.card 2) (S : (Fin 1 → Fin A.card) → Prop) :
        SOFormula.Sat A σ (rCons S (emptyREnv A.card)) bipartiteMatrix ↔ Edge A (σ 0) (σ 1) → ((S fun (x : Fin 1) => σ 0) ↔ ¬S fun (x : Fin 1) => σ 1)

        Semantics of the open matrix, independent of the choice of variable environment.

        Check a supplied Boolean bipartition by evaluating the sentence's FO matrix.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          The executable witness checker accepts exactly the proper Boolean colorings.

          A graph is bipartite exactly when the executable checker accepts some coloring.

          The binary certificate checker characterizes the ordinary bipartite-graph language.

          Every query FO-reducible to bipartiteness has an existential SO witness.