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.Induction.Noncollapse.LGeometry.Variation.PhaseCluster |
| 2 | import Mathlib.Topology.Connected.Clopen |
| 3 | import Mathlib.Topology.Order.IntermediateValue |
| 4 | import Mathlib.Topology.Sequences |
| 5 | |
| 6 | /-! |
| 7 | # Compact actual phase bounds close the survival domain |
| 8 | |
| 9 | Proposition 16.4 and Corollary 6.67, pp. 389-391 and 140-141. |
| 10 | A fixed actual point-and-velocity cage makes survival sequentially |
| 11 | closed in a compact physical time interval. Relative openness and |
| 12 | connectedness then give survival on the entire interval. In particular, |
| 13 | uniformly confined exponential branches survive at limiting initial data. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | -- Actual phases use the same horizontal metric and selected square paths. |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter Bundle |
| 21 | open scoped Topology Manifold ContDiff |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.Proofs.M46 |
| 26 | |
| 27 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 28 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 29 | {T : ℝ} {x : G.Point} |
| 30 | |
| 31 | /-- Uniform compact bounds on every surviving actual phase force |
| 32 | survival through the full admissible target time. Source: Proposition |
| 33 | 16.4 and Corollary 6.67, pp. 389-391 and 140-141. -/ |
| 34 | theorem exponential_survival_of_confined_phase |
| 35 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 36 | (E : M14ExponentialFamily G T x) (Z : G.Horizontal x) |
| 37 | {b : ℝ} (hb : 0 < b) (hbtime : T - b ^ 2 ∈ I.domain) |
| 38 | {K : Set G.Point} (hK : IsCompact K) (C : ℝ) |
| 39 | (hbound : ∀ s ∈ Ioc 0 b, (Z, s) ∈ E.domain → |
| 40 | (exponentialPhase E Z s).proj ∈ K ∧ |
| 41 | G.spacetime.horizontalMetric.inner (exponentialPhase E Z s).proj |
| 42 | (exponentialPhase E Z s).2 (exponentialPhase E Z s).2 ≤ C) : |
| 43 | (Z, b) ∈ E.domain := by |
| 44 | let S : Set (Icc (0 : ℝ) b) := {s | (Z, s.val) ∈ E.domain} |
| 45 | have hT : T ∈ I.domain := by |
| 46 | rw [← G.spacetime.time_range] |
| 47 | exact ⟨x, E.base_time⟩ |
| 48 | have htime := M14.squareClock_admissible_prefix hT hb.le hbtime |
| 49 | have hopen : IsOpen S := by |
| 50 | rw [isOpen_iff_mem_nhds] |
| 51 | intro s hs |
| 52 | obtain ⟨U, hU, hsU, hsub⟩ := E.domain_relative_open (Z, s.val) hs |
| 53 | have hnear : {t : Icc (0 : ℝ) b | (Z, t.val) ∈ U} ∈ 𝓝 s := |
| 54 | (hU.preimage (continuous_const.prodMk continuous_subtype_val)).mem_nhds hsU |
| 55 | apply mem_of_superset hnear |
| 56 | intro t ht |
| 57 | exact hsub ⟨ht, t.property.1, htime t.val t.property⟩ |
| 58 | have hclosed : IsClosed S := by |
| 59 | apply IsSeqClosed.isClosed |
| 60 | intro u s hu hlimit |
| 61 | by_cases hs0 : s.val = 0 |
| 62 | · change (Z, s.val) ∈ E.domain |
| 63 | rw [hs0] |
| 64 | exact E.domain_zero Z |
| 65 | have hs : 0 < s.val := lt_of_le_of_ne s.property.1 (Ne.symm hs0) |
| 66 | by_cases hlater : ∃ k, s.val ≤ (u k).val |
| 67 | · obtain ⟨k, hk⟩ := hlater |
| 68 | exact (E.maximal_lifetime Z).out (E.domain_zero Z) (hu k) ⟨s.property.1, hk⟩ |
| 69 | have hbefore (k : ℕ) : (u k).val < s.val := |
| 70 | lt_of_not_ge (fun hk => hlater ⟨k, hk⟩) |
| 71 | have hsk : Tendsto (fun k => (u k).val) atTop (𝓝 s.val) := |
| 72 | continuous_subtype_val.continuousAt.tendsto.comp hlimit |
| 73 | have hbelow : ∀ᶠ k in atTop, 0 < (u k).val ∧ (u k).val < s.val := |
| 74 | (hsk.eventually (Ioi_mem_nhds hs)).and (Eventually.of_forall hbefore) |
| 75 | have hphase : ∀ᶠ k in atTop, |
| 76 | (exponentialPhase E Z (u k).val).proj ∈ K ∧ |
| 77 | G.spacetime.horizontalMetric.inner (exponentialPhase E Z (u k).val).proj |
| 78 | (exponentialPhase E Z (u k).val).2 (exponentialPhase E Z (u k).val).2 ≤ C := by |
| 79 | filter_upwards [hbelow] with k hk |
| 80 | exact hbound (u k).val ⟨hk.1, (u k).property.2⟩ (hu k) |
| 81 | obtain ⟨z, _, hcluster⟩ := (isCompact_horizontalDisk G hK C).exists_mapClusterPt |
| 82 | (tendsto_principal.mpr hphase) |
| 83 | obtain ⟨r, hsr, _, hsurv⟩ := exponential_survival_of_phase_cluster hM04 hM12 E Z |
| 84 | hs hsk (fun k => hu k) hbelow z hcluster |
| 85 | exact (E.maximal_lifetime Z).out (E.domain_zero Z) hsurv ⟨s.property.1, hsr⟩ |
| 86 | let : PreconnectedSpace (Icc (0 : ℝ) b) := Subtype.preconnectedSpace isPreconnected_Icc |
| 87 | have hSuniv : S = univ := (show IsClopen S from ⟨hclosed, hopen⟩).eq_univ |
| 88 | ⟨⟨0, le_rfl, hb.le⟩, E.domain_zero Z⟩ |
| 89 | exact (Set.ext_iff.mp hSuniv ⟨b, hb.le, le_rfl⟩).mpr (mem_univ _) |
| 90 | |
| 91 | /-- The actual short-prefix derivative agrees with the selected |
| 92 | long square-path velocity at every positive time of that prefix. |
| 93 | Source: Proposition 16.4 and Lemma 6.18, pp. 389-391 and 113-114. -/ |
| 94 | theorem exponentialPhase_eq_squarePath_of_le (E : M14ExponentialFamily G T x) |
| 95 | {Z : G.Horizontal x} {b s : ℝ} (hZ : (Z, b) ∈ E.domain) (hb : 0 < b) |
| 96 | (hs : 0 < s) (hsb : s ≤ b) : |
| 97 | exponentialPhase E Z s = TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) |
| 98 | (E := G.Horizontal) ((E.square_path Z b hZ hb).curve s) |
| 99 | ((E.square_path Z b hZ hb).horizontal_velocity s) := by |
| 100 | let R := E.square_path Z b hZ hb |
| 101 | have hC : M14SqrtParameterInterval 0 (b ^ 2) = Icc 0 b := by |
| 102 | rw [M14SqrtParameterInterval, Real.sqrt_zero, Real.sqrt_sq hb.le] |
| 103 | have hsub : Icc 0 s ⊆ M14SqrtParameterInterval 0 (b ^ 2) := by |
| 104 | rw [hC] |
| 105 | exact Icc_subset_Icc_right hsb |
| 106 | have hpoint : EqOn (E.gamma Z) R.curve (Icc 0 s) := by |
| 107 | intro r hr |
| 108 | exact (M14.exponential_square_curve_eq E Z hZ hb (hsub hr)).symm |
| 109 | have hsC : s ∈ Icc 0 s := ⟨hs.le, le_rfl⟩ |
| 110 | have hvel := M14.projectedCurveVelocityWithin_congrOn (G := G) hpoint hsC |
| 111 | rw [M14.squareRoot_projectedVelocityWithin_subset R hsub hsC |
| 112 | (uniqueDiffOn_Icc hs s hsC)] at hvel |
| 113 | exact TotalSpace.ext (hpoint hsC) hvel |
| 114 | |
| 115 | /-- Uniform compact actual curve and square-speed bounds pass survival |
| 116 | to the limiting initial vector. No minimizing hypothesis is used. |
| 117 | This is the compact-phase endpoint required by Corollary 6.67 and |
| 118 | Proposition 16.4, pp. 140-141 and 389-391. -/ |
| 119 | theorem exponential_survival_of_uniform_phase_limit |
| 120 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 121 | (E : M14ExponentialFamily G T x) {b : ℝ} (hb : 0 < b) |
| 122 | {Zk : ℕ → G.Horizontal x} {Z : G.Horizontal x} (hZk : Tendsto Zk atTop (𝓝 Z)) |
| 123 | (hsurv : ∀ k, (Zk k, b) ∈ E.domain) |
| 124 | {K : Set G.Point} (hK : IsCompact K) (C : ℝ) |
| 125 | (hcurve : ∀ k s, s ∈ Icc 0 b → E.gamma (Zk k) s ∈ K) |
| 126 | (hspeed : ∀ k s, s ∈ Icc 0 b → |
| 127 | G.spacetime.horizontalMetric.inner ((E.square_path (Zk k) b (hsurv k) hb).curve s) |
| 128 | ((E.square_path (Zk k) b (hsurv k) hb).horizontal_velocity s) |
| 129 | ((E.square_path (Zk k) b (hsurv k) hb).horizontal_velocity s) ≤ C) : |
| 130 | (Z, b) ∈ E.domain := by |
| 131 | apply exponential_survival_of_confined_phase hM04 hM12 E Z hb |
| 132 | (E.domain_admissible (hsurv 0)).2 hK C |
| 133 | intro s hs hZ |
| 134 | have hprefix (k : ℕ) : (Zk k, s) ∈ E.domain := |
| 135 | (E.maximal_lifetime (Zk k)).out (E.domain_zero (Zk k)) (hsurv k) ⟨hs.1.le, hs.2⟩ |
| 136 | apply exponentialPhase_mem_compactDisk_of_tendsto E hK C hZk hs.1 hZ hprefix |
| 137 | intro k |
| 138 | rw [exponentialPhase_eq_squarePath_of_le E (hsurv k) hb hs.1 hs.2] |
| 139 | refine ⟨?_, hspeed k s ⟨hs.1.le, hs.2⟩⟩ |
| 140 | change (E.square_path (Zk k) b (hsurv k) hb).curve s ∈ K |
| 141 | rw [M14.exponential_square_curve_eq E (Zk k) (hsurv k) hb |
| 142 | (by simpa only [M14SqrtParameterInterval, Real.sqrt_zero, Real.sqrt_sq hb.le] |
| 143 | using (show s ∈ Icc 0 b from ⟨hs.1.le, hs.2⟩))] |
| 144 | exact hcurve k s ⟨hs.1.le, hs.2⟩ |
| 145 | |
| 146 | end PoincareMT.Proofs.M46 |