Skip to content
Oeiuwq Faith Blog OpenSource Porfolio

rocq-community/fourcolor

Formal proof of the Four Color Theorem [maintainer=@ybertot]

rocq-community/fourcolor.json
{
"createdAt": "2018-11-06T17:43:35Z",
"defaultBranch": "master",
"description": "Formal proof of the Four Color Theorem [maintainer=@ybertot]",
"fullName": "rocq-community/fourcolor",
"homepage": "",
"language": "Rocq Prover",
"name": "fourcolor",
"pushedAt": "2025-10-14T07:16:36Z",
"stargazersCount": 223,
"topics": [
"coq",
"coq-ci",
"four-color-theorem",
"mathcomp",
"ssreflect"
],
"updatedAt": "2025-11-20T08:10:39Z",
"url": "https://github.com/rocq-community/fourcolor"
}

[![Docker CI][docker-action-shield]][docker-action-link] [![Contributing][contributing-shield]][contributing-link] [![Code of Conduct][conduct-shield]][conduct-link] [![Zulip][zulip-shield]][zulip-link]

[docker-action-shield] !: https://github.com/coq-community/fourcolor/actions/workflows/docker-action.yml/badge.svg?branch=master [docker-action-link] !: https://github.com/coq-community/fourcolor/actions/workflows/docker-action.yml

[contributing-shield] !: https://img.shields.io/badge/contributions-welcome-%23f7931e.svg [contributing-link] !: https://github.com/coq-community/manifesto/blob/master/CONTRIBUTING.md

[conduct-shield] !: https://img.shields.io/badge/%E2%9D%A4-code%20of%20conduct-%23f15a24.svg [conduct-link] !: https://github.com/coq-community/manifesto/blob/master/CODE_OF_CONDUCT.md

[zulip-shield] !: https://img.shields.io/badge/chat-on%20zulip-%23c1272d.svg [zulip-link] !: https://coq.zulipchat.com/#narrow/stream/237663-coq-community-devs.20.26.20users

This library contains a formal proof of the Four Color Theorem in Coq, along with the theories needed to support stating and then proving the Theorem. This includes an axiomatization of the setoid of classical real numbers, basic plane topology definitions, and a theory of combinatorial hypermaps.

The easiest way to install the latest released version of The Four Color Theorem is via opam:

Terminal window
opam repo add coq-released https://coq.inria.fr/opam/released
opam install coq-fourcolor

If you are only interested in the formalization of real numbers, you can install it separately:

Terminal window
opam repo add coq-released https://coq.inria.fr/opam/released
opam install coq-fourcolor-reals

To instead build and install the whole project manually from the repository, do:

Terminal window
git clone https://github.com/coq-community/fourcolor.git
cd fourcolor
make # or make -j <number-of-cores-on-your-machine>
make install

The Four Color Theorem (Appel & Haken, 1976) is a landmark result of graph theory.

The formal proof is based on the Mathematical Components library.