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.Noncollapse.Calculus.CurveExtension |
| 2 | import PoincareLib.Geometry.Riemannian.Distance.MinimizingGeodesic |
| 3 | import PoincareLib.Geometry.Riemannian.Distance.SegmentSpeed |
| 4 | import PoincareLib.Geometry.Riemannian.Comparison.Volume.Conjugate.Realization.Junction |
| 5 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Basic |
| 6 | |
| 7 | /-! Adapted from Mapher `PoincareMT/Proofs/M15/Thm8_10_ShortCurve.lean` at |
| 8 | `0c5d5c4e1ecbc12703b1994e226df1b15d2e8d39`. See the source mapping in |
| 9 | `references/ricci-flow/mapher/noncollapse/import.json`. -/ |
| 10 | |
| 11 | /-! |
| 12 | # Smooth short curves in an initial metric ball |
| 13 | |
| 14 | Morgan-Tian Theorem 8.10, p. 177, uses a bounded-speed initial-metric |
| 15 | geodesic. The M07 minimizing geodesic is smooth and has speed equal to |
| 16 | its endpoint distance. Extending from a larger interval preserves its |
| 17 | germs, including the two endpoints of the unit interval. |
| 18 | See `references/ricci-flow/mapher/noncollapse/derivations/2026-09-21-short-tail.md`. |
| 19 | -/ |
| 20 | |
| 21 | set_option autoImplicit false |
| 22 | |
| 23 | open Set Filter |
| 24 | open scoped Manifold ContDiff Topology |
| 25 | |
| 26 | universe u |
| 27 | |
| 28 | namespace PoincareMT.RiemannianMetric |
| 29 | |
| 30 | /-- Points in a precompact metric ball are joined by a globally smooth |
| 31 | curve whose speed on the unit interval is bounded by the radius. |
| 32 | Source: the short path in Morgan-Tian Theorem 8.10, p. 177. -/ |
| 33 | theorem exists_smooth_short_curve |
| 34 | {n : ℕ} {M : Type u} [TopologicalSpace M] [T2Space M] |
| 35 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 36 | (g : RiemannianMetric n M) (p q : M) {R : ℝ} (hR : 0 < R) |
| 37 | (hcompact : IsCompact (closure (g.ball p R))) (hq : q ∈ g.ball p R) : |
| 38 | ∃ γ : ℝ → M, ContMDiff 𝓘(ℝ) (𝓡 n) ∞ γ ∧ |
| 39 | γ 0 = p ∧ γ 1 = q ∧ |
| 40 | ∀ t ∈ Icc (0 : ℝ) 1, |
| 41 | g.tangentNorm (γ t) (curveVelocity γ t) ≤ R := by |
| 42 | obtain ⟨ε, hε, η, hη, hη0, hη1, hmin⟩ := |
| 43 | g.exists_minimizing_geodesic_of_precompact_ball p q hR hcompact hq |
| 44 | have hηsmooth : ContMDiffOn 𝓘(ℝ) (𝓡 n) ∞ η (Ioo (-ε) (1 + ε)) := |
| 45 | fun t ht => (Conjugate.Realization.contMDiffAt_of_isGeodesicOn hη ht).contMDiffWithinAt |
| 46 | obtain ⟨C, hC⟩ := hη.exists_constant_tangentNorm (by linarith) |
| 47 | have hCdist : ENNReal.ofReal (C : ℝ) = g.edist p q := by |
| 48 | have hlength := g.pathELength_eq_of_tangentNorm_eq (C := (C : ℝ)) |
| 49 | (fun t (ht : t ∈ Icc (0 : ℝ) 1) => |
| 50 | hC t ⟨by linarith [ht.1], by linarith [ht.2]⟩) |
| 51 | have hlength' := hη.pathELength_eq_of_edist_segment hε hη0 hmin |
| 52 | simpa only [sub_zero, ENNReal.ofReal_one, mul_one] using hlength.symm.trans hlength' |
| 53 | have hCR : (C : ℝ) < R := by |
| 54 | have hd : ENNReal.ofReal (C : ℝ) < ENNReal.ofReal R := by |
| 55 | rw [hCdist] |
| 56 | exact hq |
| 57 | simpa only [ENNReal.toReal_ofReal C.coe_nonneg] using |
| 58 | ENNReal.toReal_lt_of_lt_ofReal hd |
| 59 | have hsub : Icc (-ε / 2) (1 + ε / 2) ⊆ Ioo (-ε) (1 + ε) := by |
| 60 | intro t ht |
| 61 | constructor <;> linarith [ht.1, ht.2] |
| 62 | obtain ⟨γ, hγ, heq⟩ := hηsmooth.exists_global_extension_Icc |
| 63 | (by linarith : -ε / 2 ≤ 1 + ε / 2) isOpen_Ioo hsub |
| 64 | refine ⟨γ, hγ, (heq (by constructor <;> linarith)).trans hη0, |
| 65 | (heq (by constructor <;> linarith)).trans hη1, ?_⟩ |
| 66 | intro t ht |
| 67 | have hnear : γ =ᶠ[𝓝 t] η := |
| 68 | Filter.eventually_of_mem (Ioo_mem_nhds (by linarith [ht.1] : -ε / 2 < t) |
| 69 | (by linarith [ht.2] : t < 1 + ε / 2)) |
| 70 | (fun _ hu => heq (Ioo_subset_Icc_self hu)) |
| 71 | change g.tangentNorm (γ t) (mfderiv 𝓘(ℝ) (𝓡 n) γ t 1) ≤ R |
| 72 | rw [hnear.mfderiv_eq, hnear.self_of_nhds, |
| 73 | hC t ⟨by linarith [ht.1], by linarith [ht.2]⟩] |
| 74 | exact hCR.le |
| 75 | |
| 76 | end PoincareMT.RiemannianMetric |