Poincaré conjecture: the Lean proof, cleaned up together
The 2026 Lean proof of the Poincaré conjecture after Morgan and Tian, 3 million lines, cleaned up together: smaller, faster to build, more readable, the theorems unchanged

| 1 | import PoincareLib.Geometry.RicciFlow.Surgery.Control.Basic |
| 2 | |
| 3 | /-! |
| 4 | # Coverage by the prescribed surgery epochs |
| 5 | |
| 6 | Definition 15.7 assigns entry zero to [0,1/32) and the later entries to |
| 7 | successive dyadic intervals. Their half-open convention includes every |
| 8 | nonnegative time, including the dyadic endpoints. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | namespace PoincareMT |
| 14 | |
| 15 | theorem exists_surgeryEpochEntry {t : ℝ} (ht : 0 ≤ t) : |
| 16 | ∃ j : ℕ, t ∈ surgeryEpochEntry j := by |
| 17 | by_cases hsmall : t < 1 / 32 |
| 18 | · exact ⟨0, by simpa [surgeryEpochEntry, surgeryEpochStart] using And.intro ht hsmall⟩ |
| 19 | · have hlarge : 1 ≤ 32 * t := by linarith |
| 20 | obtain ⟨j, hlo, hhi⟩ := exists_nat_pow_near hlarge (by norm_num : (1 : ℝ) < 2) |
| 21 | refine ⟨j + 1, ?_⟩ |
| 22 | simp only [surgeryEpochEntry, Nat.add_one_ne_zero, if_false, |
| 23 | Nat.add_sub_cancel, surgeryEpochStart, Set.mem_Ico] |
| 24 | constructor <;> linarith |
| 25 | |
| 26 | end PoincareMT |