Documentation

Complexity.Logics.FirstOrder.Problems.Coloring

Colorability of graph structures #

A structure for Mathlib's language of graphs FirstOrder.Language.graph is a directed graph, possibly with loops. It is n-colorable (graph.Colorable) when its vertices can be colored with n colors so that the two ends of every edge have different colors; a loop makes it uncolorable, and on simple graphs this is SimpleGraph.Colorable. The classes graph.ThreeColorable of three-colorable finite graph structures (3COL, loops allowed) and graph.SimpleThreeColorable of three-colorable finite simple graphs (classical 3COL) are closed under isomorphism and invariant under disjoint copies. Their existential second-order definability is in Complexity.Logics.SecondOrder.Coloring, and the machine-level problem, on graphs encoded as lists of vertices and edges, is Cslib.Complexity.ThreeColoring.

Main definitions #

Main results #

References #

A graph structure is n-colorable when its vertices can be colored with n colors so that the two ends of every edge have different colors.

Instances For

    3COL: the class of three-colorable graph structures, loops allowed.

    Instances For

      Classical 3COL: the class of three-colorable simple graphs.

      Instances For

        Colorability is invariant under isomorphism.

        The empty graph is colorable.

        A positive number of disjoint copies of a graph is n-colorable exactly when the graph is.