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.CurveShortening.Comparison.IntrinsicComparison.Local.Strip |
| 2 | import PoincareLib.Geometry.Riemannian.Coordinates.Precompact |
| 3 | |
| 4 | /-! |
| 5 | # Continuing normal geodesics at a finite annulus endpoint |
| 6 | |
| 7 | The closed coordinate annulus is compact. Energy conservation therefore |
| 8 | prevents the geodesic phase from escaping while its position stays in the |
| 9 | annulus, and the M07 compact-trajectory argument supplies the terminal |
| 10 | point and continuation. Completeness of the global metric is not assumed. |
| 11 | |
| 12 | Morgan--Tian context: Claim 19.37, printed pp. 468-469, in the proof of Proposition |
| 13 | 19.35. This module supplies actual normal-geodesic data or its coordinate and measure |
| 14 | transport. |
| 15 | -/ |
| 16 | |
| 17 | noncomputable section |
| 18 | set_option autoImplicit false |
| 19 | set_option backward.isDefEq.respectTransparency false |
| 20 | |
| 21 | open Set Filter |
| 22 | open scoped Topology Manifold ContDiff Bundle |
| 23 | |
| 24 | namespace PoincareMT |
| 25 | |
| 26 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 27 | normedSpaceTangentSpaceVectorSpace |
| 28 | |
| 29 | /-- The exact closed annulus in the frozen intrinsic definition is compact. |
| 30 | Source/construction: Morgan--Tian Claim 19.37, printed pp. 468-469. -/ |
| 31 | theorem m64Intrinsic_standardAnnulus_isCompact : IsCompact standardAnnulusDomain := by |
| 32 | have hclosed : IsClosed standardAnnulusDomain := |
| 33 | (isClosed_le continuous_const continuous_norm).inter |
| 34 | (isClosed_le continuous_norm continuous_const) |
| 35 | apply (isCompact_closedBall (0 : AnnulusCoordinates) 2).of_isClosed_subset hclosed |
| 36 | intro p hp |
| 37 | simpa only [Metric.mem_closedBall, dist_zero_right] using hp.2 |
| 38 | |
| 39 | /-- An intrinsic geodesic confined to the actual annulus extends through every finite |
| 40 | endpoint, and the terminal point remains in the annulus. Source/construction: Morgan--Tian |
| 41 | Claim 19.37, printed pp. 468-469. -/ |
| 42 | theorem m64Intrinsic_annulus_geodesic_continuation |
| 43 | (N : IntrinsicAnnulus) {a b : ℝ} (hab : a < b) |
| 44 | {q : ℝ → AnnulusCoordinates} (hgeo : N.metric.IsGeodesicOn q (Ioo a b)) |
| 45 | (hmap : MapsTo q (Ioo a b) standardAnnulusDomain) : |
| 46 | ∃ epsilon : ℝ, 0 < epsilon ∧ ∃ eta : ℝ → AnnulusCoordinates, |
| 47 | EqOn eta q (Ioo a b) ∧ eta b ∈ standardAnnulusDomain ∧ |
| 48 | N.metric.IsGeodesicOn eta (Ioo a (b + epsilon)) := by |
| 49 | let p : AnnulusCoordinates := 0 |
| 50 | have hcoeff : N.metric.pullbackCoefficients (extChartAt (𝓡 2) p).symm = |
| 51 | N.metric.euclideanCoefficients := by |
| 52 | ext x v w |
| 53 | simp only [extChartAt_model_space_eq_id, PartialEquiv.refl_symm, PartialEquiv.refl_coe] |
| 54 | change N.metric.inner x (mfderiv (𝓡 2) (𝓡 2) id x v) |
| 55 | (mfderiv (𝓡 2) (𝓡 2) id x w) = N.metric.inner x v w |
| 56 | rw [mfderiv_id] |
| 57 | rfl |
| 58 | have hfixed := hgeo.hasDerivAt_in_chart isOpen_Ioo p (fun _ _ => by simp) |
| 59 | have hq (t : ℝ) (ht : t ∈ Ioo a b) : HasDerivAt q (deriv q t) t := by |
| 60 | simpa only [extChartAt_model_space_eq_id, PartialEquiv.refl_coe, id_eq] using |
| 61 | (hfixed t ht).1 |
| 62 | have hw (t : ℝ) (ht : t ∈ Ioo a b) : HasDerivAt (deriv q) |
| 63 | (-coordinateChristoffel |
| 64 | (N.metric.pullbackCoefficients (extChartAt (𝓡 2) p).symm) |
| 65 | (q t) (deriv q t) (deriv q t)) t := by |
| 66 | simpa only [extChartAt_model_space_eq_id, PartialEquiv.refl_coe, id_eq] using |
| 67 | (hfixed t ht).2 |
| 68 | obtain ⟨epsilon, hepsilon, eta, v, heq, _, hend, hflow⟩ := |
| 69 | N.metric.exists_chart_geodesic_continuation p m64Intrinsic_standardAnnulus_isCompact |
| 70 | (fun _ _ => by simp) hab (fun t ht => hmap ht) hq hw |
| 71 | refine ⟨epsilon, hepsilon, eta, heq, hend, ?_⟩ |
| 72 | have hphase (t : ℝ) (ht : t ∈ Ioo a (b + epsilon)) : |
| 73 | HasDerivAt (fun s => (eta s, v s)) |
| 74 | (coordinateGeodesicField N.metric.euclideanCoefficients (eta t, v t)) t := by |
| 75 | have h := (hflow t ht).2.1.prodMk (hflow t ht).2.2 |
| 76 | rw [hcoeff] at h |
| 77 | exact h |
| 78 | exact m64Intrinsic_isGeodesicOn_of_phase N isOpen_Ioo hphase |
| 79 | |
| 80 | end PoincareMT |