Skip to content

mo271/formal_book

Repository files navigation

Formal BOOK

A collaborative, work-in-progress attempt to formalize Proofs from THE BOOK using Lean4.

Formal Proofs from THE BOOK

Structure

For each chapter in the book (we follow the latest, sixth edition), there is a lean source file containing as many formalized definitions, lemmas, theorems and proofs as we can reasonably currently formalize using Lean's mathlib4.

The goal is to make the formalizations of the proofs as close as possible to the proofs in the book, even if a different proof for a theorem might already be present in mathlib or is more suitable for formalization.

We follow the naming conventions and code style of mathlib4.

Installation

This project uses Lean 4. You first need to install elan and lean and then run

lake exe cache get
lake build
code .

The last step only opens vscode in case you want to use that.

Chapters

Status of the chapters:

  • ❌ chapter is just a stub
  • 💭 work in progress, formalization of some statements still missing
  • 💬 work in progress, all statements formalized, some proofs still missing
  • 🎉 chapter is completely formalized (possibly excluding the Appendix)

Number Theory

  1. 💬 Six proofs of the infinity of primes
  2. 💬 Bertrand's postulate
  3. 💬 Binomial coefficients are (almost) never powers
  4. Representing numbers as sums of two squares
  5. 💭 The law of quadratic reciprocity
  6. 💭 Every finite division ring is a field
  7. 💭 The spectral theorem and Hadamard's determinant problem
  8. 💭 Some irrational numbers
  9. Four times

Geometry

  1. Hilbert's third problem: decomposing polyhedra
  2. Lines in the plane and decompositions of graphs
  3. The slope problem
  4. Three applications of Euler's formula
  5. Cauchy's rigidity theorem
  6. The Borromean rings don't exist
  7. Touching simplices
  8. Every large point set has an obtuse angle
  9. Borsuk's conjecture

Analysis

  1. Sets, functions, and the continuum hypothesis
  2. 💭 In praise of inequalities
  3. 💭 The fundamental theorem of algebra
  4. One square and an odd number of triangles
  5. A theorem of Pólya on polynomials
  6. Van der Waerden's permanent conjecture
  7. On a lemma of Littlewook and Offord
  8. Cotangent and the Herglotz trick
  9. Buffon's needle problem

Combinatorics

  1. Pigeon-hole and double counting
  2. Tiling rectangles
  3. Three famous theorems on finite sets
  4. Shuffling cards
  5. 💭 Lattice paths and determinants
  6. Cayley's formula for the number of trees
  7. Identities versus bijections
  8. The finite Kakeya problem
  9. Completing Latin squares

Graph Theory

  1. Permanents and the power of entropy
  2. The Dinitz problem
  3. Five-coloring plane graphs
  4. How to guard a museum
  5. Turán's graph theorem
  6. Communicating without errors
  7. The chromatic number of Kneser graphs
  8. 💬 Of friends and politicians
  9. 💭 Probability makes counting (sometimes) easy

Contributing

Contributions are most welcome! Feel free to

  • grab a chapter that is not yet formalized and formalize
    • definitions, (if not yet in mathlib)
    • statements and
    • proofs
  • fill in sorrys
  • suggest improvements to proofs/code golf
  • correct typos/formatting/linting

See CONTRIBUTING.md for details.

Authors

License

Apache 2.0; see LICENSE for details.

Disclaimer

This project is not an official Google project. It is not supported by Google and Google specifically disclaims all warranties as to its quality, merchantability, or fitness for a particular purpose.

Releases

No releases published

Packages

No packages published

Languages