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.Blowup.Controlled.Geometry |
| 2 | import Mathlib.Topology.Order.IsLUB |
| 3 | import Mathlib.Topology.Order.Compact |
| 4 | import Mathlib.Topology.Instances.ENNReal.Lemmas |
| 5 | |
| 6 | /-! |
| 7 | # Strictly buffered time slabs below a backward horizon |
| 8 | |
| 9 | One positive increasing real sequence exhausts every compact subset of |
| 10 | the actual backward time domain, for both finite and infinite horizons. |
| 11 | The construction uses order convergence in the extended nonnegative reals |
| 12 | and converts only finite sequence values to real numbers. |
| 13 | |
| 14 | Morgan--Tian Definition 5.12, p. 90, and Theorem 11.8, pp. 272-279. |
| 15 | See the independently reviewed horizon-time-exhaustion derivation. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped ENNReal Topology |
| 22 | |
| 23 | namespace PoincareMT.M30 |
| 24 | |
| 25 | /-- A positive backward horizon admits strictly increasing closed slabs |
| 26 | which eventually contain every compact time set (Definition 5.12, p. 90; |
| 27 | Theorem 11.8, pp. 272-279). The same sequence works at an infinite horizon. -/ |
| 28 | theorem exists_strictMono_backward_time_exhaustion |
| 29 | {T0 : ℝ≥0∞} (hT0 : 0 < T0) : |
| 30 | ∃ T : ℕ → ℝ, StrictMono T ∧ |
| 31 | (∀ k, 0 < T k ∧ ENNReal.ofReal (T k) < T0) ∧ |
| 32 | (∀ r : ℝ, ENNReal.ofReal r < T0 → ∀ᶠ k : ℕ in atTop, r < T k) ∧ |
| 33 | ∀ K : Set ℝ, IsCompact K → K ⊆ blowupBackwardInterval T0 → |
| 34 | ∀ᶠ k : ℕ in atTop, K ⊆ Icc (-(T k)) 0 := by |
| 35 | obtain ⟨U, hU, hmem, hlim⟩ := exists_seq_strictMono_tendsto' hT0 |
| 36 | have hfinite (k : ℕ) : U k ≠ ⊤ := ((hmem k).2.trans_le le_top).ne |
| 37 | let T (k : ℕ) : ℝ := (U k).toReal |
| 38 | have hpos (k : ℕ) : 0 < T k := ENNReal.toReal_pos (hmem k).1.ne' (hfinite k) |
| 39 | have hvalue (k : ℕ) : ENNReal.ofReal (T k) = U k := |
| 40 | ENNReal.ofReal_toReal (hfinite k) |
| 41 | have hcofinal (r : ℝ) (hr : ENNReal.ofReal r < T0) : |
| 42 | ∀ᶠ k : ℕ in atTop, r < T k := by |
| 43 | filter_upwards [hlim.eventually (Ioi_mem_nhds hr)] with k hk |
| 44 | rw [← hvalue k] at hk |
| 45 | exact (ENNReal.ofReal_lt_ofReal_iff (hpos k)).mp hk |
| 46 | refine ⟨T, ?_, ?_, hcofinal, ?_⟩ |
| 47 | · intro i j hij |
| 48 | exact (ENNReal.toReal_lt_toReal (hfinite i) (hfinite j)).mpr (hU hij) |
| 49 | · intro k |
| 50 | exact ⟨hpos k, (hvalue k).trans_lt (hmem k).2⟩ |
| 51 | · intro K hK hKJ |
| 52 | rcases K.eq_empty_or_nonempty with rfl | hKne |
| 53 | · exact Eventually.of_forall fun _ => empty_subset _ |
| 54 | obtain ⟨a, haK, ha⟩ := hK.exists_isLeast hKne |
| 55 | filter_upwards [hcofinal (-a) (hKJ haK).2] with k hk t ht |
| 56 | exact ⟨(by linarith [ha ht]), (hKJ ht).1⟩ |
| 57 | |
| 58 | end PoincareMT.M30 |