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.Curvature.Calculus |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.Cylinders.TimeBuffer |
| 3 | import PoincareLib.Geometry.RicciFlow.Rescaling.Cylinders |
| 4 | |
| 5 | /-! |
| 6 | # Time buffers in curvature-scale cylinders |
| 7 | |
| 8 | Parabolic rescaling on the affine preimage of the original time domain keeps |
| 9 | the terminal time interior. The normalized time-buffer theorem therefore |
| 10 | applies without extending a flow beyond its given domain. |
| 11 | Reference: Kleiner--Lott, Corollary 44.1, pp. 2682--2683, and Appendix E, |
| 12 | pp. 2848--2849. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff Bundle ENNReal |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.RicciFlow |
| 24 | |
| 25 | /-- A fixed terminal scalar cylinder controls full curvature on balls measured |
| 26 | at any earlier slice, including when curvature is evaluated at another time. -/ |
| 27 | theorem curvatureTensorNorm_le_on_two_time_ball_of_terminal_cylinder |
| 28 | {n : ℕ} {M : Type u} [TopologicalSpace M] [T3Space M] |
| 29 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 30 | {J : Set ℝ} (hC : RicciFlowCurvatureCalculus.{u}) (F : RicciFlow n M J) |
| 31 | {a b L S : ℝ} (hJ : Icc a b ⊆ interior J) |
| 32 | (hoperator : ∀ t ∈ Icc a b, ∀ x : M, |
| 33 | (F.connection t).NonnegativeCurvatureOperator x) |
| 34 | (p : M) |
| 35 | (hscalar : ∀ t ∈ Icc a b, ∀ x ∈ (F.metric b).ball p L, |
| 36 | (F.connection t).scalarCurvature x ≤ S) |
| 37 | {s t ρ : ℝ} (hs : s ∈ Icc a b) (ht : t ∈ Icc a b) (hρ : ρ ≤ L) |
| 38 | (x : M) (hx : x ∈ (F.metric s).ball p ρ) : |
| 39 | (F.connection t).curvatureTensorNorm x ≤ (n : ℝ) ^ 2 * S := by |
| 40 | have hRic (q : ℝ) (hq : q ∈ Icc a b) (y : M) (v : TangentSpace (𝓡 n) y) : |
| 41 | 0 ≤ (F.connection q).ricci y v v := |
| 42 | ((F.connection q).ricci_bounds_of_nonnegative_curvatureOperator |
| 43 | (hC.tensor_calculus n M (F.metric q) (F.connection q)) y (hoperator q hq y) v).1 |
| 44 | have hxterminal := F.ball_subset_ball_of_ricci_nonneg hJ p ρ hs |
| 45 | ⟨hs.1.trans hs.2, le_rfl⟩ hs.2 (fun q hq y _ v => hRic q hq y v) hx |
| 46 | have hxL : x ∈ (F.metric b).ball p L := |
| 47 | hxterminal.trans_le (ENNReal.ofReal_le_ofReal hρ) |
| 48 | exact ((F.connection t).curvatureTensorNorm_le_scalarCurvature |
| 49 | (hC.tensor_calculus n M (F.metric t) (F.connection t)) x (hoperator t ht x)).trans |
| 50 | (mul_le_mul_of_nonneg_left (hscalar t ht x hxL) (sq_nonneg _)) |
| 51 | |
| 52 | /-- The normalized positive-scalar time buffer in the original curvature |
| 53 | scale, using an actual parabolic rescaling of the given flow. -/ |
| 54 | theorem exists_terminal_scalar_positive_scale_buffer |
| 55 | {m : ℕ} (hC : RicciFlowCurvatureTheory.{u}) (hm : 0 < m) : |
| 56 | ∃ δ : ℝ, 0 < δ ∧ δ < 1 ∧ |
| 57 | ∀ (M : Type u) [TopologicalSpace M] [T3Space M] [SecondCountableTopology M] |
| 58 | [ChartedSpace (EuclideanSpace ℝ (Fin (m + 1))) M] |
| 59 | [IsManifold (𝓡 (m + 1)) ∞ M] (J : Set ℝ) |
| 60 | (F : RicciFlow (m + 1) M J) (Q τ : ℝ), |
| 61 | 0 < Q → Icc (τ - 2 / Q) τ ⊆ interior J → |
| 62 | (∀ t ∈ Icc (τ - 2 / Q) τ, MetricComplete (F.metric t)) → |
| 63 | (∀ t ∈ Icc (τ - 2 / Q) τ, ∀ x : M, |
| 64 | (F.connection t).NonnegativeCurvatureOperator x) → |
| 65 | ∀ p : M, |
| 66 | (∀ t ∈ Icc (τ - 2 / Q) τ, |
| 67 | ∀ x ∈ (F.metric τ).ball p (64 * (((m + 1 : ℕ) : ℝ) + 8) / Real.sqrt Q), |
| 68 | (F.connection t).scalarCurvature x ≤ 4 * Q) → |
| 69 | (F.connection τ).scalarCurvature p = Q → |
| 70 | ∀ t ∈ Icc (τ - δ / Q) τ, |
| 71 | Q / 2 ≤ (F.connection t).scalarCurvature p := by |
| 72 | obtain ⟨δ, hδ, hδone, hbuffer⟩ := exists_terminal_scalar_positive_time_buffer hC hm |
| 73 | refine ⟨δ, hδ, hδone, ?_⟩ |
| 74 | intro M _ _ _ _ _ J F Q τ hQ hJ hcomplete hoperator p hscalar hnormalize t ht |
| 75 | let K : Set ℝ := (fun s : ℝ => τ + s / Q) ⁻¹' J |
| 76 | have hmap (s : ℝ) (hs : s ∈ Icc (-2 : ℝ) 0) : |
| 77 | τ + s / Q ∈ Icc (τ - 2 / Q) τ := rescalingTime_mem_Icc hQ τ 2 hs |
| 78 | have hK : K.OrdConnected := F.interval.preimage_mono |
| 79 | (fun _ _ h => _root_.add_le_add le_rfl (div_le_div_of_nonneg_right h hQ.le)) |
| 80 | have hsub : Icc (-2 : ℝ) 0 ⊆ K := fun s hs => |
| 81 | (show τ + s / Q ∈ J from interior_subset (hJ (hmap s hs))) |
| 82 | have hne : K.Nontrivial := |
| 83 | ⟨-2, hsub (by norm_num), 0, hsub (by norm_num), by norm_num⟩ |
| 84 | let G := F.parabolicRescale Q hQ τ (K := K) (fun _ hs => hs) hK hne |
| 85 | have hGJ : Icc (-2 : ℝ) 0 ⊆ interior K := by |
| 86 | intro s hs |
| 87 | apply preimage_interior_subset_interior_preimage |
| 88 | (show Continuous (fun s : ℝ => τ + s / Q) by fun_prop) |
| 89 | exact hJ (hmap s hs) |
| 90 | have hGcomplete (s : ℝ) (hs : s ∈ Icc (-2 : ℝ) 0) : MetricComplete (G.metric s) := |
| 91 | F.parabolicRescale_metricComplete Q hQ τ _ hK hne s (hcomplete _ (hmap s hs)) |
| 92 | have hGoperator (s : ℝ) (hs : s ∈ Icc (-2 : ℝ) 0) (x : M) : |
| 93 | (G.connection s).NonnegativeCurvatureOperator x := |
| 94 | F.parabolicRescale_nonnegativeCurvatureOperator Q hQ τ _ hK hne s x |
| 95 | (hoperator _ (hmap s hs) x) |
| 96 | have hGscalar (s : ℝ) (hs : s ∈ Icc (-2 : ℝ) 0) (x : M) |
| 97 | (hx : x ∈ (G.metric 0).ball p (64 * (((m + 1 : ℕ) : ℝ) + 8))) : |
| 98 | (G.connection s).scalarCurvature x ≤ 4 := by |
| 99 | change x ∈ (rescaledMetric (F.metric (τ + 0 / Q)) Q hQ).ball p _ at hx |
| 100 | rw [rescaledMetric_ball_allDimensions, zero_div, add_zero] at hx |
| 101 | change (rescaledMetric_connection _ _ Q hQ).scalarCurvature x ≤ 4 |
| 102 | rw [rescaledMetric_scalarCurvature] |
| 103 | have h := mul_le_mul_of_nonneg_left (hscalar _ (hmap s hs) x hx) |
| 104 | (inv_nonneg.mpr hQ.le) |
| 105 | calc |
| 106 | Q⁻¹ * (F.connection (τ + s / Q)).scalarCurvature x ≤ Q⁻¹ * (4 * Q) := h |
| 107 | _ = 4 := by field_simp |
| 108 | have hGnormalize : (G.connection 0).scalarCurvature p = 1 := by |
| 109 | change (rescaledMetric_connection _ _ Q hQ).scalarCurvature p = 1 |
| 110 | rw [rescaledMetric_scalarCurvature, zero_div, add_zero, hnormalize, inv_mul_cancel₀ hQ.ne'] |
| 111 | have hs : Q * (t - τ) ∈ Icc (-δ) 0 := by |
| 112 | constructor |
| 113 | · have h := (le_div_iff₀ hQ).mp (show τ - t ≤ δ / Q by linarith [ht.1]) |
| 114 | nlinarith |
| 115 | · exact mul_nonpos_of_nonneg_of_nonpos hQ.le (sub_nonpos.mpr ht.2) |
| 116 | have h := hbuffer M K G hGJ hGcomplete hGoperator p hGscalar hGnormalize _ hs |
| 117 | change (1 : ℝ) / 2 ≤ (rescaledMetric_connection _ _ Q hQ).scalarCurvature p at h |
| 118 | rw [rescaledMetric_scalarCurvature] at h |
| 119 | have htime : τ + Q * (t - τ) / Q = t := by field_simp; ring |
| 120 | rw [htime, ← div_eq_inv_mul] at h |
| 121 | have h' := (le_div_iff₀ hQ).mp h |
| 122 | linarith |
| 123 | |
| 124 | end PoincareMT.RicciFlow |