A Variant of Wagner’s Theorem
Based on Combinatorial Hypermaps

Christian Doczkal

Abstract Wagner's theorem states that a graph is planar (i.e., it can be embedded in the real plane without crossing edges) iff it contains neither K5 nor K3,3 as a minor. We provide a combinatorial representation of embeddings in the plane that abstracts from topological properties of plane embeddings (e.g., angles or distances), representing only the combinatorial properties (e.g., arities of faces or the clockwise order of the outgoing edges of a vertex). The representation employs combinatorial hypermaps as used by Gonthier in the proof of the four-color theorem. We then give a formal proof that for every simple graph containing neither K5 nor K3,3 as a minor, there exists such a combinatorial plane embedding. Together with the formal proof of the four-color theorem, we obtain a formal proof that all graphs without K5 and K3,3 minors are four-colorable. The development is carried out in Coq, building on the mathematical components library, the formal proof of the four-color theorem, and a general-purpose graph library developed previously.

The formal development has been developed as a branch of the graph-theory project, and this branch has not yet beein integrated. The graph on the right highlights the new libraris (orange) and those that received substantial additions (yellow).

The nodes of the graph are hyperlinked to the coqdoc documentation. Alternatively, you can view the branch and the corresponding pull request on GitHub or download a snapshot

In order to check the development, you need:

The easiest way to build and investigate the sources locally is to install all dependencies (and their dependencies) using OPAM by executing:
  1. opam switch create graph-theory ocaml-variants.4.09.1+flambda
  2. eval $(opam env)
  3. opam repo add coq-released https://coq.inria.fr/opam/released
  4. opam update
  5. wget https://github.com/coq-community/graph-theory/archive/wagner.zip
  6. unzip wagner.zip; cd graph-theory-wagner
  7. opam pin add -n -k path coq-graph-theory .
  8. opam install coq-graph-theory --deps-only
  9. make -j9 all
Note that coq-hierarchy-builder has quite a few dependencies (dune, elpi, etc.) while coq-fourcolor can easily take more than 30 minutes to compile, even on recent hardware.