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.Soliton.ThreeDimensional.Noncompact.Rigidity.FactorNoncollapse |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.AncientVolume.Splitting.TerminalFactor |
| 3 | import PoincareLib.Geometry.Riemannian.Splitting.Busemann.Main |
| 4 | import PoincareLib.Geometry.Riemannian.Curvature.Scalar.SharpBounds |
| 5 | import PoincareLib.Geometry.RicciFlow.Soliton.ThreeDimensional.Classification |
| 6 | import PoincareLib.Geometry.RicciFlow.Soliton.Homothety |
| 7 | import PoincareLib.Geometry.RicciFlow.TimeTranslation |
| 8 | |
| 9 | /-! |
| 10 | # Round surface factors on each ancient time slice |
| 11 | |
| 12 | A minimizing line at a selected time gives a terminal Busemann function. |
| 13 | Backward persistence constructs its actual induced ancient surface flow, |
| 14 | to which the frozen two-dimensional classification applies. Time translation |
| 15 | then gives a compact round factor separately on every slice before time one. |
| 16 | |
| 17 | Reference: Morgan--Tian, Proposition 9.46, pp. 209-213, and Corollary 9.50, |
| 18 | pp. 214-215. |
| 19 | -/ |
| 20 | |
| 21 | noncomputable section |
| 22 | set_option autoImplicit false |
| 23 | set_option backward.isDefEq.respectTransparency false |
| 24 | set_option maxSynthPendingDepth 8 |
| 25 | |
| 26 | open Set TopologicalSpace |
| 27 | open Poincare.Geometry.Manifold.RegularLevel |
| 28 | open scoped Manifold ContDiff Bundle ENNReal |
| 29 | |
| 30 | universe u |
| 31 | |
| 32 | namespace PoincareMT |
| 33 | |
| 34 | open RiemannianMetric |
| 35 | |
| 36 | variable {M : Type u} [TopologicalSpace M] [T3Space M] [SecondCountableTopology M] |
| 37 | [ConnectedSpace M] [MeasurableSpace M] [BorelSpace M] |
| 38 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 39 | |
| 40 | /-- A compact round factor realized by the induced metric of an actual |
| 41 | unit parallel potential's zero level. -/ |
| 42 | def RiemannianMetric.HasCompactRoundParallelFactor (g : RiemannianMetric 3 M) |
| 43 | (D : LeviCivitaData g) : Prop := |
| 44 | ∃ (f : M → ℝ) (hf : ContMDiff (𝓡 3) 𝓘(ℝ, ℝ) ∞ f) |
| 45 | (hu : HasUnitGradient D f) (_hz : HasZeroHessian D f), |
| 46 | letI : Fact (Module.finrank ℝ (EuclideanSpace ℝ (Fin 3)) = 3) := |
| 47 | ⟨finrank_euclideanSpace_fin⟩ |
| 48 | letI := openLevelSetChartedSpace hf (⊤ : Opens M) |
| 49 | (fun x _ => regular_of_hasUnitGradient hu x) 2 0 |
| 50 | letI := isManifold_openLevelSet hf (⊤ : Opens M) |
| 51 | (fun x _ => regular_of_hasUnitGradient hu x) 2 0 |
| 52 | let h := regularLevelMetric hf (⊤ : Opens M) |
| 53 | (fun x _ => regular_of_hasUnitGradient hu x) 0 g |
| 54 | CompactSpace (zeroLevelSet f) ∧ ConstantPositiveSectionalCurvature h h.leviCivitaData |
| 55 | |
| 56 | namespace RicciFlow |
| 57 | |
| 58 | /-- The actual induced zero level of a terminal Busemann function is compact |
| 59 | and round, by classification of its constructed ancient kappa-solution. -/ |
| 60 | theorem exists_compact_round_parallel_factor_of_ancient_line |
| 61 | (hP : ThreeDimensionalClassificationPredecessors.{u}) |
| 62 | (F : RicciFlow 3 M (Iic 0)) |
| 63 | (hc : ∀ t ≤ 0, MetricComplete (F.metric t)) |
| 64 | (hop : ∀ t ≤ 0, ∀ x, (F.connection t).NonnegativeCurvatureOperator x) |
| 65 | (hb : ∃ K : ℝ, 0 ≤ K ∧ ∀ t ≤ 0, ∀ x, |
| 66 | (F.connection t).curvatureTensorNorm x ≤ K) |
| 67 | {κ : ℝ} (hκ : ∀ t ≤ 0, |
| 68 | MetricKappaNoncollapsed (F.metric t) (F.connection t) κ) |
| 69 | (hpos : ∀ t ≤ 0, ∀ x, 0 < (F.connection t).scalarCurvature x) |
| 70 | (hline : ∃ γ : ℝ → M, ∀ s t : ℝ, |
| 71 | (F.metric 0).edist (γ s) (γ t) = ENNReal.ofReal |s - t|) : |
| 72 | (F.metric 0).HasCompactRoundParallelFactor (F.connection 0) := by |
| 73 | obtain ⟨γ, hγ⟩ := hline |
| 74 | have hRic : (F.connection 0).NonnegativeRicciCurvature := by |
| 75 | intro x v |
| 76 | exact ((F.connection 0).ricci_bounds_of_nonnegative_curvatureOperator |
| 77 | (hP.curvature.tensor_calculus 3 M (F.metric 0) (F.connection 0)) x |
| 78 | (hop 0 le_rfl x) v).1 |
| 79 | obtain ⟨hf, hu, _, hz, _⟩ := (F.metric 0).busemann_parallel_unit_gradient |
| 80 | (F.connection 0) (hc 0 le_rfl) hRic hγ |
| 81 | let f := (F.metric 0).busemann γ |
| 82 | refine ⟨f, hf, hu, hz, ?_⟩ |
| 83 | let : Fact (Module.finrank ℝ (EuclideanSpace ℝ (Fin 3)) = 3) := |
| 84 | ⟨finrank_euclideanSpace_fin⟩ |
| 85 | let := openLevelSetChartedSpace hf (⊤ : Opens M) |
| 86 | (fun x _ => regular_of_hasUnitGradient hu x) 2 0 |
| 87 | let := isManifold_openLevelSet hf (⊤ : Opens M) |
| 88 | (fun x _ => regular_of_hasUnitGradient hu x) 2 0 |
| 89 | have hp := F.ancient_backward_persistence_of_parallel_gradient hP.curvature |
| 90 | (by norm_num) hc hop hb f hf hu hz |
| 91 | let hu' := fun t ht => (hp t ht).2.1 |
| 92 | let hz' := fun t ht => (hp t ht).2.2 |
| 93 | let H := F.parallelGradientFactor hf (show (0 : ℝ) ∈ Iic 0 by simp) hu' hz' |
| 94 | obtain ⟨K, hK, hbound⟩ := hb |
| 95 | have hg := F.parallelGradientFactor_geometry hf (show (0 : ℝ) ∈ Iic 0 by simp) |
| 96 | hu' hz' hc hop hbound |
| 97 | let : ConnectedSpace (zeroLevelSet f) := hg.2.1 |
| 98 | have hk := F.parallelGradientFactor_kappaNoncollapsed hf |
| 99 | (show (0 : ℝ) ∈ Iic 0 by simp) hu' hz' hc hκ |
| 100 | let A : AncientKappaSolution 2 (zeroLevelSet f) := { |
| 101 | flow := H |
| 102 | kappa := κ / 2 |
| 103 | kappa_pos := div_pos (hκ 0 le_rfl).1 (by norm_num) |
| 104 | complete := hg.2.2.1 |
| 105 | nonnegative_curvature_operator := hg.2.2.2.1 |
| 106 | bounded_curvature := by |
| 107 | intro t ht |
| 108 | refine ⟨K, hK, fun y => ?_⟩ |
| 109 | rw [abs_of_nonneg (show 0 ≤ (H.connection t).curvatureTensorNorm y |
| 110 | from Real.sqrt_nonneg _)] |
| 111 | exact hg.2.2.2.2.1 t ht y |
| 112 | nonflat := by |
| 113 | intro t ht |
| 114 | obtain ⟨y, hy⟩ := hg.2.2.2.2.2 t ht (γ 0) (hpos t ht (γ 0)) |
| 115 | refine ⟨y, fun hzero => ?_⟩ |
| 116 | have hsharp := (H.connection t).scalarCurvature_le_curvatureTensorNorm_sharp y |
| 117 | rw [hzero, mul_zero] at hsharp |
| 118 | exact (not_le_of_gt hy) hsharp |
| 119 | noncollapsed := by |
| 120 | intro r₀ hr₀ t ht y r hr hrr₀ hcurv |
| 121 | apply (hk t ht).2 y r hr |
| 122 | exact hcurv t ⟨by nlinarith [sq_pos_of_pos hr], le_rfl⟩ } |
| 123 | obtain ⟨C⟩ := hP.two_dimensional.ancient_classification A |
| 124 | exact ⟨C.compact, C.round_at_all_times 0 le_rfl⟩ |
| 125 | |
| 126 | /-- Applying the ancient construction after translating a chosen terminal |
| 127 | time yields compact round induced surface factors on every slice. -/ |
| 128 | theorem exists_compact_round_parallel_factor_of_line_at_each_time |
| 129 | (hP : ThreeDimensionalClassificationPredecessors.{u}) |
| 130 | (F : RicciFlow 3 M (Iio 1)) |
| 131 | (hc : ∀ t < 1, MetricComplete (F.metric t)) |
| 132 | (hop : ∀ t < 1, ∀ x, (F.connection t).NonnegativeCurvatureOperator x) |
| 133 | (hb : ∀ T < 1, ∃ K : ℝ, 0 ≤ K ∧ ∀ t ≤ T, ∀ x, |
| 134 | (F.connection t).curvatureTensorNorm x ≤ K) |
| 135 | {κ : ℝ} (hκ : ∀ t < 1, |
| 136 | MetricKappaNoncollapsed (F.metric t) (F.connection t) κ) |
| 137 | (hpos : ∀ t < 1, ∀ x, 0 < (F.connection t).scalarCurvature x) |
| 138 | (hline : ∀ t < 1, ∃ γ : ℝ → M, ∀ s r : ℝ, |
| 139 | (F.metric t).edist (γ s) (γ r) = ENNReal.ofReal |s - r|) |
| 140 | (t : ℝ) (ht : t < 1) : |
| 141 | (F.metric t).HasCompactRoundParallelFactor (F.connection t) := by |
| 142 | have hmap : (fun s : ℝ => s + t) '' Iic 0 ⊆ Iio 1 := by |
| 143 | rintro _ ⟨s, hs, rfl⟩ |
| 144 | exact lt_of_le_of_lt (by linarith [show s ≤ 0 from hs]) ht |
| 145 | let G := F.translate t hmap ordConnected_Iic |
| 146 | ⟨-1, by norm_num, 0, by norm_num, by norm_num⟩ |
| 147 | have hGtime (s : ℝ) (hs : s ≤ 0) : s + t < 1 := by linarith |
| 148 | have hGb : ∃ K : ℝ, 0 ≤ K ∧ ∀ s ≤ 0, ∀ x, |
| 149 | (G.connection s).curvatureTensorNorm x ≤ K := by |
| 150 | obtain ⟨K, hK, hbound⟩ := hb t ht |
| 151 | exact ⟨K, hK, fun s hs x => hbound (s + t) (by linarith) x⟩ |
| 152 | have h := G.exists_compact_round_parallel_factor_of_ancient_line hP |
| 153 | (fun s hs => hc (s + t) (hGtime s hs)) |
| 154 | (fun s hs => hop (s + t) (hGtime s hs)) hGb |
| 155 | (fun s hs => hκ (s + t) (hGtime s hs)) |
| 156 | (fun s hs => hpos (s + t) (hGtime s hs)) |
| 157 | (by simpa only [G, translate_metric, zero_add] using hline t ht) |
| 158 | change (F.metric (0 + t)).HasCompactRoundParallelFactor (F.connection (0 + t)) at h |
| 159 | exact (congrArg (fun s => (F.metric s).HasCompactRoundParallelFactor (F.connection s)) |
| 160 | (zero_add t)).mp h |
| 161 | |
| 162 | /-- The ambient scalar is spatially constant on every slice with a |
| 163 | classified round surface factor. -/ |
| 164 | theorem scalarCurvature_spatially_constant_of_line_at_each_time |
| 165 | (hP : ThreeDimensionalClassificationPredecessors.{u}) |
| 166 | (F : RicciFlow 3 M (Iio 1)) |
| 167 | (hc : ∀ t < 1, MetricComplete (F.metric t)) |
| 168 | (hop : ∀ t < 1, ∀ x, (F.connection t).NonnegativeCurvatureOperator x) |
| 169 | (hb : ∀ T < 1, ∃ K : ℝ, 0 ≤ K ∧ ∀ t ≤ T, ∀ x, |
| 170 | (F.connection t).curvatureTensorNorm x ≤ K) |
| 171 | {κ : ℝ} (hκ : ∀ t < 1, |
| 172 | MetricKappaNoncollapsed (F.metric t) (F.connection t) κ) |
| 173 | (hpos : ∀ t < 1, ∀ x, 0 < (F.connection t).scalarCurvature x) |
| 174 | (hline : ∀ t < 1, ∃ γ : ℝ → M, ∀ s r : ℝ, |
| 175 | (F.metric t).edist (γ s) (γ r) = ENNReal.ofReal |s - r|) |
| 176 | (t : ℝ) (ht : t < 1) (x y : M) : |
| 177 | (F.connection t).scalarCurvature x = (F.connection t).scalarCurvature y := by |
| 178 | obtain ⟨f, hf, hu, hz, _, hround⟩ := |
| 179 | F.exists_compact_round_parallel_factor_of_line_at_each_time hP hc hop hb hκ hpos hline t ht |
| 180 | let : Fact (Module.finrank ℝ (EuclideanSpace ℝ (Fin 3)) = 3) := |
| 181 | ⟨finrank_euclideanSpace_fin⟩ |
| 182 | let := openLevelSetChartedSpace hf (⊤ : Opens M) |
| 183 | (fun z _ => regular_of_hasUnitGradient hu z) 2 0 |
| 184 | let := isManifold_openLevelSet hf (⊤ : Opens M) |
| 185 | (fun z _ => regular_of_hasUnitGradient hu z) 2 0 |
| 186 | obtain ⟨_, _, _, Φ, e, _, _, _, _, _, hscalar, _⟩ := |
| 187 | exists_parallelGradient_productIsometry_curvature (hc t ht) hf hu hz |
| 188 | obtain ⟨R, _, hR⟩ := |
| 189 | (constantPositiveSectionalCurvature_iff_scalarCurvature _).mp hround |
| 190 | exact (hscalar x).symm.trans ((hR (e.symm x).1).trans |
| 191 | ((hR (e.symm y).1).symm.trans (hscalar y))) |
| 192 | |
| 193 | end RicciFlow |
| 194 | |
| 195 | end PoincareMT |