In the Lean 4 proof assistant and programming language, we formalize the basics of graph theory, colorings, and chromatic numbers. We also implement a proven correct algorithm for computing the chromatic number and analyze its running time. Finally, we implement and prove the correctness of an algorithm for checking 2-colorability in polynomial time.
|