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.Metric.Germ |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.IntrinsicComparison.Regular.Exponential |
| 3 | |
| 4 | /-! Identifying an actual short unit geodesic with a normalized exponential. |
| 5 | Source: MT Remark 19.42; normal-collision-transversality derivation, |
| 6 | Section 18. This is initial-value uniqueness, not endpoint uniqueness. -/ |
| 7 | |
| 8 | noncomputable section |
| 9 | set_option autoImplicit false |
| 10 | set_option backward.isDefEq.respectTransparency false |
| 11 | |
| 12 | open Set Filter Metric |
| 13 | open scoped Topology ContDiff Manifold |
| 14 | |
| 15 | namespace PoincareMT |
| 16 | |
| 17 | /-- A unit geodesic shorter than the defining radius is the actual radial curve of the |
| 18 | normalized exponential with its scaled initial velocity. Its radial vector has norm exactly |
| 19 | the original length. Source: MT Remark 19.42; normal-collision-transversality derivation, |
| 20 | Section 18. Source/construction: |
| 21 | proof-work/tasks/M64/derivations/2026-09-27-normal-collision-transversality.md, Section 18. -/ |
| 22 | theorem m64Intrinsic_unit_geodesic_radial_realization |
| 23 | (G : RiemannianMetric 2 AnnulusCoordinates) |
| 24 | (L : AnnulusCoordinates ≃L[ℝ] AnnulusCoordinates) |
| 25 | {e : AnnulusCoordinates → AnnulusCoordinates} {p : AnnulusCoordinates} {R : ℝ} |
| 26 | (hL : ∀ v w, G.inner p (L v) (L w) = inner ℝ v w) |
| 27 | (he0 : e 0 = p) (hed : HasFDerivAt e L.toContinuousLinearMap 0) |
| 28 | (hradial : ∀ v ∈ ball 0 R, G.IsGeodesicOn (fun t : ℝ => e (t • v)) |
| 29 | {t : ℝ | t • v ∈ ball 0 R}) |
| 30 | {q : ℝ → AnnulusCoordinates} (hq : ContDiff ℝ ∞ q) {T : ℝ} |
| 31 | (hT : 0 < T) (hTR : T < R) (hq0 : q 0 = p) |
| 32 | (hgeo : G.IsGeodesicOn q (Icc 0 T)) |
| 33 | (hunit : G.inner (q 0) (deriv q 0) (deriv q 0) = 1) : |
| 34 | ∃ v : AnnulusCoordinates, ‖v‖ = T ∧ v ∈ ball 0 R ∧ |
| 35 | ∀ t ∈ Icc (0 : ℝ) 1, e (t • v) = q (T * t) := by |
| 36 | let v : AnnulusCoordinates := L.symm (T • deriv q 0) |
| 37 | have hLv : L v = T • deriv q 0 := L.apply_symm_apply _ |
| 38 | have hnorm : ‖v‖ = T := by |
| 39 | have h := hL v v |
| 40 | rw [← hq0, hLv] at h |
| 41 | simp only [map_smul, smul_apply, smul_eq_mul, hunit, |
| 42 | real_inner_self_eq_norm_sq] at h |
| 43 | nlinarith [norm_nonneg v] |
| 44 | have hv : v ∈ ball 0 R := by simpa only [mem_ball, dist_zero_right, hnorm] using hTR |
| 45 | have hrad : G.IsGeodesicOn (fun t : ℝ => e (t • v)) (Icc 0 1) := by |
| 46 | intro t ht |
| 47 | apply hradial v hv t |
| 48 | rw [mem_ofPred_eq, mem_ball, dist_zero_right, norm_smul, Real.norm_of_nonneg ht.1] |
| 49 | exact (mul_le_mul_of_nonneg_right ht.2 (norm_nonneg v)).trans_lt |
| 50 | (by simpa only [one_mul, hnorm] using hTR) |
| 51 | have hscaled : G.IsGeodesicOn (fun t : ℝ => q (T * t)) (Icc 0 1) := by |
| 52 | intro t ht |
| 53 | apply hgeo.comp_mul T t |
| 54 | exact ⟨mul_nonneg hT.le ht.1, |
| 55 | (mul_le_mul_of_nonneg_left ht.2 hT.le).trans_eq (mul_one T)⟩ |
| 56 | have hdr : HasDerivAt (fun t : ℝ => e (t • v)) (L v) 0 := by |
| 57 | have hs : HasDerivAt (fun t : ℝ => t • v) v 0 := by |
| 58 | simpa only [one_smul, id_eq] using! (hasDerivAt_id (0 : ℝ)).smul_const v |
| 59 | exact (show HasFDerivAt e L.toContinuousLinearMap ((0 : ℝ) • v) from |
| 60 | by simpa only [zero_smul] using hed).comp_hasDerivAt 0 hs |
| 61 | have hdq : HasDerivAt (fun t : ℝ => q (T * t)) (T • deriv q 0) 0 := by |
| 62 | have hs : HasDerivAt (fun t : ℝ => T * t) T 0 := by |
| 63 | simpa only [mul_one, id_eq] using! (hasDerivAt_id (0 : ℝ)).const_mul T |
| 64 | simpa only [mul_zero, Function.comp_apply] using! |
| 65 | ((hq.differentiable (by simp) (T * 0)).hasDerivAt.scomp 0 hs) |
| 66 | have hvel : deriv (fun t : ℝ => e (t • v)) 0 = |
| 67 | deriv (fun t : ℝ => q (T * t)) 0 := hdr.deriv.trans (hLv.trans hdq.deriv.symm) |
| 68 | have heq := hrad.eq_nhds_of_initial_data hscaled |
| 69 | (show (0 : ℝ) ∈ Icc 0 1 from by norm_num) p (by simp) |
| 70 | (by simpa only [zero_smul, mul_zero] using he0.trans hq0.symm) |
| 71 | (by simpa only [extChartAt_model_space_eq_id, PartialEquiv.refl_coe, id_eq] using hvel) |
| 72 | exact ⟨v, hnorm, hv, fun t ht => hrad.eqOn_of_eq_nhds hscaled |
| 73 | (convex_Icc (0 : ℝ) 1).isPreconnected (by norm_num) heq ht⟩ |
| 74 | |
| 75 | end PoincareMT |