Euler's Gem
Lean 4 (+ archived Isabelle) formalization of Euler's polyhedron formula and the Euler–Poincaré characteristic for convex polytopes (popularized in David Richeson's Euler's Gem).
Read it in plain English
Every Results theorem and the definitions it rests on, read back into English: quizzes with answer keys, sign-offs, a proof graph, comments, and interactive polyhedra and lattice polygons.
Browsable Results.lean
Syntax-highlighted, cross-linked Lean sources — start at the paper-facing results; identifier links fall through to Mathlib docs.
Lean ↔ AFP map
Cross-reference between Results.lean theorems and Paulson's AFP entry.
Build notes
Lean (lake) and Isabelle recipes. Isabelle2025-2 is installed on this box; vendored AFP session checks green.
Source on GitHub
Active Lean under lean/; vendored AFP under isabelle/.
What's proved (Lean)
All twelve paper-facing theorems of lean/Results.lean, described by what their statements say, hypotheses included. Each depends only on [propext, Classical.choice, Quot.sound]. What each does and does not prove →
| Theorem | Meaning |
|---|---|
results_euler_characteristic | Euler–Poincaré: a full-dimensional convex polytope (convex hull of finitely many points) has Euler characteristic 1 plain English → |
results_euler_relation_dimension_three | Euler's polyhedron formula V − E + F = 2 for a 3-dimensional convex polytope in a 3-dimensional real inner product space, proved from that characteristic plain English → |
results_euler_polyhedron | The same in ℝ³, with exactly two hypotheses: p is a finite convex hull and has affine dimension 3 plain English → |
results_five_platonic_solids | Schläfli-pair classification: a combinatorially regular convex 3-polytope (every face an s-gon, m edges at each vertex, and — assumed, not yet proved in general — every edge in exactly two faces) has (s, m) ∈ {(3,3), (4,3), (3,4), (5,3), (3,5)}; plus the (V, E, F) numbers of those five pairs. Not a construction of the five solids, and no metric regularity plain English → |
results_five_platonic_solids_constructed | The five Platonic solids exist: explicit convex hulls in ℝ³ with coordinates in ℤ[φ] (φ the golden ratio), each proved a regular polyhedron (its isometries act transitively on flags) with the classical V, E, F and face type; face lattices computed by the kernel plain English → |
results_regular_polyhedron_face_data | Conditional. A regular polyhedron that satisfies the standard face-lattice facts of 3-polytopes (FaceLatticeFacts — assumed, not yet proved in general) has the (V, E, F, s, m) of one of the five solids. Not uniqueness up to similarity: that is stated in lean/PlatonicGaps.lean with two isolated sorry gaps plain English → |
results_platonic_solids_not_similar | The five constructed solids are pairwise non-similar plain English → |
results_picks_theorem | Pick's formula: area = |S| + B/2 − 1 for a strictly convex counter-clockwise lattice polygon with distinct listed vertices, for any finite set S equal to its interior lattice points (that such a finite S exists is not yet proved here) plain English → |
results_picks_of_empty_primitive_fan | Area = B/2 − 1 for a strictly convex lattice polygon with distinct listed vertices, primitive edges and no interior lattice points plain English → |
results_pick_count_of_euler | Bookkeeping arithmetic: from V = I + B, F = T + 1, V − E + F = 2, 2E = 3T + B, A = T/2 (all hypotheses), A = I + B/2 − 1 plain English → |
results_fan_pick_of_euler | Arithmetic identity (n − 2)/2 = n/2 − 1 for n ≥ 3 (its proof is routed through the disk Euler number of a fan) plain English → |
results_disk_pick_of_euler | Arithmetic: if A = (2I + B − 2)/2 (a hypothesis) and 3 ≤ n ≤ B, then A = I + B/2 − 1 (its proof is routed through disk-Euler-preserving moves) plain English → |
Strategy
Lean (primary): follow Lawrence C. Paulson's AFP
Euler's Polyhedron Formula
(2023; HOL Light port, credited to Jim Lawrence) — hyperplane arrangements +
cell complexes + Euler-characteristic invariance. Target: Euler–Poincaré for
full-dimensional convex polytopes, then V − E + F = 2 in dimension 3.
Isabelle (comparison base): the same AFP entry is vendored under
isabelle/afp-Euler_Polyhedron_Formula/. See the
Plain English
Lean ↔ AFP map. Do not invent a fresh Isabelle development.
Historical: isabelle/Poly100.thy is an earlier unfinished Isabelle attempt
(Tverberg triangulation) predating the AFP entry — kept for provenance only.
Layout
lean/ Lean 4 project (active) — Lake / Mathlib / Results.lean
isabelle/ Vendored AFP Euler_Polyhedron_Formula + Poly100 archive
scripts/ Comparator helpers (list Results.lean theorems)
site/ This documentation site (GitHub Pages)
docs/ Browsable Lean sources (built in CI from lean/)
learn/ Plain-English reading of the Lean (built in CI from learn/)
Phase B (#1535)
- Paper-facing: the Euler characteristic,
V − E + F = 2in dimension 3, Pick's formula for a strictly convex lattice polygon (finiteness of the interior points still a hypothesis), and the Schläfli-pair classification of combinatorially regular convex 3-polytopes ({3,3}, {4,3}, {3,4}, {5,3}, {3,5}).