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.Smooth.Endpoint |
| 2 | import PoincareLib.Geometry.Riemannian.Distance.ExponentialRays |
| 3 | |
| 4 | /-! |
| 5 | # The smooth normal endpoint map is an actual geodesic family |
| 6 | |
| 7 | Time scaling and uniqueness identify the selected exponential endpoints |
| 8 | with each reference normal geodesic, on its whole open time interval. |
| 9 | Consequently the jointly smooth endpoint map has the exact normal initial |
| 10 | data and geodesic equation through the common unit interval. |
| 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 | /-- Normal exponential endpoints agree with any geodesic carrying their initial normal data, |
| 29 | including negative times in the initial interval. Source/construction: Morgan--Tian Claim |
| 30 | 19.37, printed pp. 468-469. -/ |
| 31 | theorem m64Intrinsic_normal_endpoint_eq_geodesic |
| 32 | (G : RiemannianMetric 2 AnnulusCoordinates) |
| 33 | {normal : ℝ → AnnulusCoordinates} {u : ℝ × ℝ → AnnulusCoordinates} |
| 34 | (hend : ∀ z : ℝ × ℝ, ∃ epsilon : ℝ, 0 < epsilon ∧ |
| 35 | ∃ gamma : ℝ → AnnulusCoordinates, |
| 36 | G.IsGeodesicOn gamma (Ioo (-epsilon) (1 + epsilon)) ∧ |
| 37 | gamma 0 = intrinsicAnnulusBoundary 1 z.1 ∧ |
| 38 | HasDerivAt gamma (z.2 • normal z.1) 0 ∧ gamma 1 = u z) |
| 39 | {a lo hi : ℝ} (hzero : (0 : ℝ) ∈ Ioo lo hi) |
| 40 | {gamma : ℝ → AnnulusCoordinates} (hgamma : G.IsGeodesicOn gamma (Ioo lo hi)) |
| 41 | (hinit : gamma 0 = intrinsicAnnulusBoundary 1 a) |
| 42 | (hderiv : HasDerivAt gamma (normal a) 0) {t : ℝ} (ht : t ∈ Ioo lo hi) : |
| 43 | u (a, t) = gamma t := by |
| 44 | obtain ⟨epsilon, hepsilon, eta, heta, heta0, hetad, heta1⟩ := hend (a, t) |
| 45 | have hscale : G.IsGeodesicOn (fun s => gamma (t * s)) (Icc (0 : ℝ) 1) := by |
| 46 | intro s hs |
| 47 | apply hgamma.comp_mul t s |
| 48 | have hm : (1 - s) • (0 : ℝ) + s • t ∈ Ioo lo hi := |
| 49 | (convex_Ioo lo hi) hzero ht (sub_nonneg.mpr hs.2) hs.1 (by ring) |
| 50 | change (1 - s) * 0 + s * t ∈ Ioo lo hi at hm |
| 51 | simp only [mul_zero, zero_add] at hm |
| 52 | change t * s ∈ Ioo lo hi |
| 53 | simpa only [mul_comm] using hm |
| 54 | have heta' : G.IsGeodesicOn eta (Icc (0 : ℝ) 1) := by |
| 55 | intro s hs |
| 56 | exact heta s ⟨by linarith [hs.1], by linarith [hs.2]⟩ |
| 57 | have hd : HasDerivAt (fun s => gamma (t * s)) (t • normal a) 0 := by |
| 58 | have hd' : HasDerivAt gamma (normal a) (t * 0) := by |
| 59 | simpa only [mul_zero] using hderiv |
| 60 | simpa only [Function.comp_def, id_eq, mul_one] using! |
| 61 | hd'.scomp 0 ((hasDerivAt_id (0 : ℝ)).const_mul t) |
| 62 | have hvel : deriv (fun s => extChartAt (𝓡 2) |
| 63 | (intrinsicAnnulusBoundary 1 a) (gamma (t * s))) 0 = |
| 64 | deriv (fun s => extChartAt (𝓡 2) (intrinsicAnnulusBoundary 1 a) (eta s)) 0 := by |
| 65 | simpa only [extChartAt_model_space_eq_id, PartialEquiv.refl_coe, id_eq] using |
| 66 | hd.deriv.trans hetad.deriv.symm |
| 67 | have heq := hscale.eq_nhds_on_of_initial_data heta' (convex_Icc _ _).isPreconnected |
| 68 | (t₀ := 0) (by simp) (intrinsicAnnulusBoundary 1 a) |
| 69 | (by simp) (by simpa only [mul_zero, hinit] using heta0.symm) hvel |
| 70 | simpa only [mul_one, heta1] using (heq 1 (by simp)).self_of_nhds.symm |
| 71 | |
| 72 | /-- The globally smooth endpoint construction gives actual normal geodesics through the same |
| 73 | unit time interval for every boundary parameter. Source/construction: Morgan--Tian Claim |
| 74 | 19.37, printed pp. 468-469. -/ |
| 75 | theorem m64Intrinsic_exists_smooth_extended_normal_map (N : IntrinsicAnnulus) : |
| 76 | ∃ (G : RiemannianMetric 2 AnnulusCoordinates) |
| 77 | (normal : ℝ → AnnulusCoordinates) (u : ℝ × ℝ → AnnulusCoordinates), |
| 78 | (∀ p ∈ standardAnnulusDomain, |
| 79 | G.euclideanCoefficients =ᶠ[𝓝 p] N.metric.euclideanCoefficients) ∧ |
| 80 | ContDiff ℝ ∞ normal ∧ ContDiff ℝ ∞ u ∧ |
| 81 | (∀ a, N.metric.inner (intrinsicAnnulusBoundary 1 a) (normal a) (normal a) = 1 ∧ |
| 82 | N.metric.inner (intrinsicAnnulusBoundary 1 a) (normal a) |
| 83 | (curveVelocity (n := 2) (intrinsicAnnulusBoundary 1) a) = 0 ∧ |
| 84 | 0 < inner ℝ (intrinsicAnnulusBoundary 1 a) (normal a)) ∧ |
| 85 | (∀ a, u (a, 0) = intrinsicAnnulusBoundary 1 a) ∧ |
| 86 | (∀ a, HasDerivAt (fun t => u (a, t)) (normal a) 0) ∧ |
| 87 | ∀ a, G.IsGeodesicOn (fun t => u (a, t)) (Icc (0 : ℝ) 1) := by |
| 88 | obtain ⟨G, normal, u, hG, hnormal, hu, hn, hend⟩ := |
| 89 | m64Intrinsic_exists_smooth_extended_normal_endpoint N |
| 90 | have hdata (a : ℝ) : |
| 91 | u (a, 0) = intrinsicAnnulusBoundary 1 a ∧ |
| 92 | HasDerivAt (fun t => u (a, t)) (normal a) 0 ∧ |
| 93 | G.IsGeodesicOn (fun t => u (a, t)) (Icc (0 : ℝ) 1) := by |
| 94 | obtain ⟨epsilon, hepsilon, gamma, hgamma, hinit, hderiv, _⟩ := hend (a, 1) |
| 95 | have hderiv' : HasDerivAt gamma (normal a) 0 := by |
| 96 | simpa only [one_smul] using hderiv |
| 97 | have hzero : (0 : ℝ) ∈ Ioo (-epsilon) (1 + epsilon) := ⟨by linarith, by linarith⟩ |
| 98 | have heq : EqOn (fun t => u (a, t)) gamma (Ioo (-epsilon) (1 + epsilon)) := |
| 99 | fun _ ht => m64Intrinsic_normal_endpoint_eq_geodesic G hend hzero hgamma hinit hderiv' ht |
| 100 | have hgerm {t : ℝ} (ht : t ∈ Ioo (-epsilon) (1 + epsilon)) : |
| 101 | (fun r => u (a, r)) =ᶠ[𝓝 t] gamma := by |
| 102 | filter_upwards [isOpen_Ioo.mem_nhds ht] with r hr |
| 103 | exact heq hr |
| 104 | refine ⟨(heq hzero).trans hinit, hderiv'.congr_of_eventuallyEq (hgerm hzero), ?_⟩ |
| 105 | intro t ht |
| 106 | have ht' : t ∈ Ioo (-epsilon) (1 + epsilon) := |
| 107 | ⟨by linarith [ht.1], by linarith [ht.2]⟩ |
| 108 | obtain ⟨p, q, w, hlocal⟩ := hgamma t ht' |
| 109 | refine ⟨p, q, w, ?_⟩ |
| 110 | filter_upwards [hlocal, hgerm ht'] with r hr her |
| 111 | exact ⟨her.trans hr.1, hr.2⟩ |
| 112 | exact ⟨G, normal, u, hG, hnormal, hu, hn, fun a => (hdata a).1, |
| 113 | fun a => (hdata a).2.1, fun a => (hdata a).2.2⟩ |
| 114 | |
| 115 | end PoincareMT |