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.Generalized.ReducedGeometry.Exponential |
| 2 | import Mathlib.Topology.Compactness.Compact |
| 3 | |
| 4 | /-! |
| 5 | # Uniform survival and spatial capture for compact initial data |
| 6 | |
| 7 | The topological survival step in Morgan-Tian Corollary 6.79, pp. 144-145. |
| 8 | For a supplied exponential family, a compact set of initial vectors has |
| 9 | one positive survival time within the available time window, with all |
| 10 | branches captured in a specified neighborhood of the basepoint. Stability |
| 11 | and minimizing properties are separate later obligations. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open scoped Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | {T : ℝ} {x : G.Point} |
| 25 | |
| 26 | private theorem zero_mem_interior_survival_image (E : M14ExponentialFamily G T x) |
| 27 | {O : Set G.Point} (hO : IsOpen O) (hx : x ∈ O) (Z : G.Horizontal x) : |
| 28 | (Z, 0) ∈ interior ((M14AdmissibleParameter G T x)ᶜ ∪ |
| 29 | (E.domain ∩ {z | E.gamma z.1 z.2 ∈ O})) := by |
| 30 | obtain ⟨U, hU, hZU, hUD⟩ := E.domain_relative_open (Z, 0) (E.domain_zero Z) |
| 31 | have hD : E.domain ∈ 𝓝[M14AdmissibleParameter G T x] (Z, 0) := |
| 32 | mem_nhdsWithin.mpr ⟨U, hU, hZU, hUD⟩ |
| 33 | have hγ := (E.joint_continuous (Z, 0) (E.domain_zero Z)).mono_of_mem_nhdsWithin hD |
| 34 | have hO' : O ∈ 𝓝 (E.gamma Z 0) := by |
| 35 | rw [E.gamma_at_zero] |
| 36 | exact hO.mem_nhds hx |
| 37 | have hS := Filter.inter_mem hD (hγ.preimage_mem_nhdsWithin hO') |
| 38 | obtain ⟨V, hV, hVS⟩ := mem_nhdsWithin_iff_exists_mem_nhds_inter.mp hS |
| 39 | apply mem_interior_iff_mem_nhds.mpr |
| 40 | apply Filter.mem_of_superset hV |
| 41 | intro z hz |
| 42 | by_cases ha : z ∈ M14AdmissibleParameter G T x |
| 43 | · exact Or.inr (hVS ⟨hz, ha⟩) |
| 44 | · exact Or.inl ha |
| 45 | |
| 46 | /-- Compact initial vectors survive uniformly and remain in the specified |
| 47 | basepoint neighborhood for all sufficiently small nonnegative times. This |
| 48 | is the survival/capture step of Corollary 6.79, pp. 144-145, without a |
| 49 | claim of stable minimality. -/ |
| 50 | theorem compact_initial_survival_and_capture (E : M14ExponentialFamily G T x) |
| 51 | {B : Set (G.Horizontal x)} (hB : IsCompact B) {K : Set G.Point} |
| 52 | (hK : ∃ O : Set G.Point, IsOpen O ∧ x ∈ O ∧ O ⊆ K) |
| 53 | {δ : ℝ} (hδ : 0 < δ) (hwindow : Set.Icc (T - δ) T ⊆ I.domain) : |
| 54 | ∃ τ₀ : ℝ, 0 < τ₀ ∧ τ₀ ≤ δ ∧ |
| 55 | ∀ Z ∈ B, ∀ τ ∈ Set.Icc 0 τ₀, |
| 56 | (Z, Real.sqrt τ) ∈ E.domain ∧ E.gamma Z (Real.sqrt τ) ∈ K := by |
| 57 | obtain ⟨O, hO, hxO, hOK⟩ := hK |
| 58 | let U := interior ((M14AdmissibleParameter G T x)ᶜ ∪ |
| 59 | (E.domain ∩ {z | E.gamma z.1 z.2 ∈ O})) |
| 60 | have hBU : B ×ˢ {(0 : ℝ)} ⊆ U := by |
| 61 | rintro ⟨Z, s⟩ ⟨_, hs⟩ |
| 62 | rcases Set.mem_singleton_iff.mp hs with rfl |
| 63 | exact zero_mem_interior_survival_image E hO hxO Z |
| 64 | obtain ⟨V, W, _, hW, hBV, hzeroW, hVW⟩ := |
| 65 | generalized_tube_lemma hB isCompact_singleton isOpen_interior hBU |
| 66 | have hW0 : W ∈ 𝓝 (0 : ℝ) := hW.mem_nhds (hzeroW (Set.mem_singleton 0)) |
| 67 | obtain ⟨ε, hε, hεW⟩ := Metric.mem_nhds_iff.mp hW0 |
| 68 | let τ₀ := min δ ((ε / 2) ^ 2) |
| 69 | have hτ₀ : 0 < τ₀ := lt_min hδ (sq_pos_of_pos (half_pos hε)) |
| 70 | refine ⟨τ₀, hτ₀, min_le_left _ _, ?_⟩ |
| 71 | intro Z hZ τ hτ |
| 72 | have hτδ : τ ≤ δ := hτ.2.trans (min_le_left _ _) |
| 73 | have hsqrt : Real.sqrt τ ≤ ε / 2 := |
| 74 | Real.sqrt_le_iff.mpr ⟨(half_pos hε).le, hτ.2.trans (min_le_right _ _)⟩ |
| 75 | have hball : Real.sqrt τ ∈ Metric.ball (0 : ℝ) ε := by |
| 76 | simpa only [Metric.mem_ball, Real.dist_eq, sub_zero, |
| 77 | abs_of_nonneg (Real.sqrt_nonneg _)] using hsqrt.trans_lt (half_lt_self hε) |
| 78 | have hU : (Z, Real.sqrt τ) ∈ U := hVW ⟨hBV hZ, hεW hball⟩ |
| 79 | have hA : (Z, Real.sqrt τ) ∈ M14AdmissibleParameter G T x := by |
| 80 | refine ⟨Real.sqrt_nonneg _, hwindow ?_⟩ |
| 81 | rw [Real.sq_sqrt hτ.1] |
| 82 | exact ⟨sub_le_sub_left hτδ T, sub_le_self T hτ.1⟩ |
| 83 | have hgood : (Z, Real.sqrt τ) ∈ E.domain ∩ {z | E.gamma z.1 z.2 ∈ O} := |
| 84 | (interior_subset hU).resolve_left (fun hnot => hnot hA) |
| 85 | exact ⟨hgood.1, hOK hgood.2⟩ |
| 86 | |
| 87 | end PoincareMT.M14 |