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.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.RawFlow.MetricComparison |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.RawFlow.MetricSpace |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Mathlib.Completeness |
| 5 | import PoincareLib.Geometry.Riemannian.MetricComparison |
| 6 | |
| 7 | /-! |
| 8 | # Completeness of every raw partial standard flow |
| 9 | |
| 10 | Morgan-Tian, Lemma 12.6, printed p. 297: a uniform comparison with the |
| 11 | complete initial metric transfers Cauchy sequences and their limits. All |
| 12 | distances and completeness assertions use the selected Riemannian metric. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Filter Set |
| 18 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 19 | |
| 20 | namespace PoincareMT.RiemannianMetric |
| 21 | |
| 22 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 24 | |
| 25 | /-- Lemma 12.6, p. 297: a global tangent-norm comparison controls the |
| 26 | extended path distance, including infinite distances between components. -/ |
| 27 | theorem edist_le_mul_edist_of_tangentNorm_le |
| 28 | (g h : RiemannianMetric n M) {C : ℝ} (hC : 0 < C) |
| 29 | (hbound : ∀ x : M, ∀ v : TangentSpace (𝓡 n) x, |
| 30 | h.tangentNorm x v ≤ C * g.tangentNorm x v) (x y : M) : |
| 31 | h.edist x y ≤ ENNReal.ofReal C * g.edist x y := by |
| 32 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 33 | ⟨g.toRiemannianMetric⟩ |
| 34 | have hdiv : h.edist x y / ENNReal.ofReal C ≤ g.edist x y := by |
| 35 | apply le_of_forall_gt_imp_ge_of_dense |
| 36 | intro b hb |
| 37 | obtain ⟨γ, hγ0, hγ1, hγsmooth, hγlength⟩ := |
| 38 | Manifold.exists_lt_of_riemannianEDist_lt hb |
| 39 | have hlength := pathELength_le_of_tangentNorm_le g h γ 0 1 C hC.le |
| 40 | (fun u _ => hbound (γ u)) |
| 41 | have hdist : h.edist x y ≤ h.pathELength γ 0 1 := by |
| 42 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 43 | ⟨h.toRiemannianMetric⟩ |
| 44 | exact Manifold.riemannianEDist_le_pathELength hγsmooth hγ0 hγ1 zero_le_one |
| 45 | apply (ENNReal.div_le_iff (ENNReal.ofReal_pos.mpr hC).ne' |
| 46 | ENNReal.ofReal_ne_top).mpr |
| 47 | exact (hdist.trans hlength).trans |
| 48 | ((mul_le_mul_right hγlength.le _).trans_eq (mul_comm _ _)) |
| 49 | simpa only [mul_comm] using (ENNReal.div_le_iff |
| 50 | (ENNReal.ofReal_pos.mpr hC).ne' ENNReal.ofReal_ne_top).mp hdiv |
| 51 | |
| 52 | /-- Lemma 12.6, p. 297: domination of a complete metric's tangent norms |
| 53 | transfers completeness. Both induced metrics have the manifold topology. -/ |
| 54 | theorem metricComplete_of_tangentNorm_le [T3Space M] |
| 55 | (g h : RiemannianMetric n M) (hg : MetricComplete g) |
| 56 | {C : ℝ} (hC : 0 < C) |
| 57 | (hbound : ∀ x : M, ∀ v : TangentSpace (𝓡 n) x, |
| 58 | g.tangentNorm x v ≤ C * h.tangentNorm x v) : MetricComplete h := by |
| 59 | have hdist := edist_le_mul_edist_of_tangentNorm_le h g hC hbound |
| 60 | rw [metricComplete_iff_toEMetricSpace] at hg ⊢ |
| 61 | refine EMetricSpace.completeSpace_of_topology_eq_edist_le (C := C) |
| 62 | g.toEMetricSpace h.toEMetricSpace hg |
| 63 | (g.toEMetricSpace_topology.trans h.toEMetricSpace_topology.symm) ?_ |
| 64 | intro x y |
| 65 | simpa only [toEMetricSpace_edist] using hdist x y |
| 66 | |
| 67 | end PoincareMT.RiemannianMetric |
| 68 | |
| 69 | namespace PoincareMT.PartialStandardCapFlow |
| 70 | |
| 71 | /-- Lemma 12.6, p. 297: each valid slice of an arbitrary partial standard |
| 72 | flow is complete, using only its raw curvature bound and the M04 comparison. -/ |
| 73 | theorem complete (P : RicciFlowCurvatureTheory.{0}) {g₀ : StandardInitialMetric} |
| 74 | (G : PartialStandardCapFlow g₀) {t : ℝ} (ht : t ∈ Set.Ico 0 G.lifetime) : |
| 75 | MetricComplete (G.flow.metric t) := by |
| 76 | obtain ⟨K, _, hcompare⟩ := G.exists_metric_comparison P ht.1 ht.2 |
| 77 | let A : ℝ := Real.exp (-6 * K * t) |
| 78 | have hA : 0 < A := Real.exp_pos _ |
| 79 | apply RiemannianMetric.metricComplete_of_tangentNorm_le |
| 80 | g₀.metric (G.flow.metric t) g₀.complete (inv_pos.mpr (Real.sqrt_pos.mpr hA)) |
| 81 | intro x v |
| 82 | have hquad := (hcompare t ⟨ht.1, le_rfl⟩ x v).1 |
| 83 | have hsqrt := Real.sqrt_le_sqrt hquad |
| 84 | rw [Real.sqrt_mul hA.le] at hsqrt |
| 85 | change Real.sqrt A * g₀.metric.tangentNorm x v ≤ |
| 86 | (G.flow.metric t).tangentNorm x v at hsqrt |
| 87 | exact (le_inv_mul_iff₀ (Real.sqrt_pos.mpr hA)).2 hsqrt |
| 88 | |
| 89 | end PoincareMT.PartialStandardCapFlow |