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.Extension.Balls |
| 2 | import PoincareLib.Geometry.Riemannian.Coordinates.Exponential.SmoothExtension |
| 3 | |
| 4 | /-! |
| 5 | # Smooth continued normal exponential endpoints |
| 6 | |
| 7 | The positive metric extension supplies geodesics for every initial normal |
| 8 | vector through the same unit interval. M07's smooth dependence theorem |
| 9 | therefore constructs a jointly smooth normal exponential endpoint map, |
| 10 | without assuming a smooth choice of the geodesics. |
| 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 | open RiemannianMetric |
| 27 | |
| 28 | /-- A smooth endpoint map of actual geodesics is produced simultaneously for every boundary |
| 29 | position and every scaled normal initial vector. Source/construction: Morgan--Tian Claim |
| 30 | 19.37, printed pp. 468-469. -/ |
| 31 | theorem m64Intrinsic_exists_smooth_extended_normal_endpoint (N : IntrinsicAnnulus) : |
| 32 | ∃ (G : RiemannianMetric 2 AnnulusCoordinates) |
| 33 | (normal : ℝ → AnnulusCoordinates) (u : ℝ × ℝ → AnnulusCoordinates), |
| 34 | (∀ p ∈ standardAnnulusDomain, |
| 35 | G.euclideanCoefficients =ᶠ[𝓝 p] N.metric.euclideanCoefficients) ∧ |
| 36 | ContDiff ℝ ∞ normal ∧ ContDiff ℝ ∞ u ∧ |
| 37 | (∀ a, N.metric.inner (intrinsicAnnulusBoundary 1 a) (normal a) (normal a) = 1 ∧ |
| 38 | N.metric.inner (intrinsicAnnulusBoundary 1 a) (normal a) |
| 39 | (curveVelocity (n := 2) (intrinsicAnnulusBoundary 1) a) = 0 ∧ |
| 40 | 0 < inner ℝ (intrinsicAnnulusBoundary 1 a) (normal a)) ∧ |
| 41 | ∀ z : ℝ × ℝ, ∃ epsilon : ℝ, 0 < epsilon ∧ ∃ gamma : ℝ → AnnulusCoordinates, |
| 42 | G.IsGeodesicOn gamma (Ioo (-epsilon) (1 + epsilon)) ∧ |
| 43 | gamma 0 = intrinsicAnnulusBoundary 1 z.1 ∧ |
| 44 | HasDerivAt gamma (z.2 • normal z.1) 0 ∧ gamma 1 = u z := by |
| 45 | classical |
| 46 | obtain ⟨G, hG, hex⟩ := m64Intrinsic_exists_extension_with_geodesic_initial_data N |
| 47 | obtain ⟨normal, hnormal, hn⟩ := |
| 48 | m64Intrinsic_exists_smooth_inward_boundary_normal N (by norm_num : (1 : ℝ) ≠ 0) |
| 49 | choose epsilon hepsilon Gamma hGamma using fun z : ℝ × ℝ => |
| 50 | hex (intrinsicAnnulusBoundary 1 z.1) (z.2 • normal z.1) |
| 51 | let u : ℝ × ℝ → AnnulusCoordinates := fun z => Gamma z 1 |
| 52 | have hu : ContDiff ℝ ∞ u := by |
| 53 | apply contMDiff_iff_contDiff.mp |
| 54 | intro z |
| 55 | have hgeo : ∀ᶠ w in 𝓝 z, G.IsGeodesicOn (Gamma w) (Icc (0 : ℝ) 1) := by |
| 56 | apply Eventually.of_forall |
| 57 | intro w t ht |
| 58 | exact (hGamma w).1 t ⟨by linarith [hepsilon w, ht.1], |
| 59 | by linarith [hepsilon w, ht.2]⟩ |
| 60 | apply contMDiffAt_geodesic_endpoint hgeo (convex_Icc (0 : ℝ) 1) |
| 61 | (a := 0) (b := 1) (by norm_num) (by norm_num) |
| 62 | · have heq : (fun w => Gamma w 0) = fun w => intrinsicAnnulusBoundary 1 w.1 := |
| 63 | funext (fun w => (hGamma w).2.1) |
| 64 | rw [heq] |
| 65 | exact contMDiffAt_iff_contDiffAt.mpr |
| 66 | ((m64Intrinsic_contDiff_boundary 1).contDiffAt.comp z contDiffAt_fst) |
| 67 | · have heq : (fun w => deriv (fun t => extChartAt (𝓡 2) (Gamma z 0) (Gamma w t)) 0) = |
| 68 | fun w => w.2 • normal w.1 := by |
| 69 | funext w |
| 70 | simpa only [extChartAt_model_space_eq_id, PartialEquiv.refl_coe, id_eq] using |
| 71 | (hGamma w).2.2.deriv |
| 72 | rw [heq] |
| 73 | exact contDiffAt_snd.smul (hnormal.contDiffAt.comp z contDiffAt_fst) |
| 74 | refine ⟨G, normal, u, hG, hnormal, hu, hn, ?_⟩ |
| 75 | intro z |
| 76 | exact ⟨epsilon z, hepsilon z, Gamma z, (hGamma z).1, |
| 77 | (hGamma z).2.1, (hGamma z).2.2, rfl⟩ |
| 78 | |
| 79 | end PoincareMT |