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.Cross.RayTangents |
| 2 | import PoincareLib.Geometry.Riemannian.Surface.Boundary.FanAngles |
| 3 | |
| 4 | /-! Unit tangent alternatives needed at the actual digon corners. |
| 5 | Source: MT Claim 19.41; short-geodesic-digons derivation, Section 5. -/ |
| 6 | |
| 7 | noncomputable section |
| 8 | set_option autoImplicit false |
| 9 | set_option backward.isDefEq.respectTransparency false |
| 10 | |
| 11 | open scoped Manifold Matrix |
| 12 | |
| 13 | namespace PoincareMT |
| 14 | |
| 15 | /-- Two unit vectors which are neither equal nor opposite are independent. Source: MT Claim |
| 16 | 19.41; short-geodesic-digons derivation, Section 5. Source/construction: |
| 17 | proof-work/tasks/M64/derivations/2026-09-27-short-geodesic-digons.md, Section 5. -/ |
| 18 | theorem m64Intrinsic_unit_tangents_independent |
| 19 | (G : RiemannianMetric 2 AnnulusCoordinates) (p v w : AnnulusCoordinates) |
| 20 | (hv : G.inner p v v = 1) (hw : G.inner p w w = 1) |
| 21 | (hne : v ≠ w) (hopp : v ≠ -w) : |
| 22 | LinearIndependent ℝ (![v, w] : Fin 2 → AnnulusCoordinates) := by |
| 23 | have hwn : w ≠ 0 := by |
| 24 | intro hz |
| 25 | simp only [hz, map_zero] at hw |
| 26 | exact zero_ne_one hw |
| 27 | rw [linearIndependent_fin2] |
| 28 | refine ⟨hwn, ?_⟩ |
| 29 | intro c hc |
| 30 | change c • w = v at hc |
| 31 | have hsq : c ^ 2 = 1 := by |
| 32 | rw [← hc] at hv |
| 33 | simp only [map_smul, smul_apply, smul_eq_mul, hw] at hv |
| 34 | nlinarith only [hv] |
| 35 | rcases sq_eq_sq_iff_eq_or_eq_neg.mp |
| 36 | (show c ^ 2 = (1 : ℝ) ^ 2 by simpa only [one_pow] using hsq) with rfl | rfl |
| 37 | · exact hne (by simpa only [one_smul] using hc.symm) |
| 38 | · exact hopp (by simpa only [neg_one_smul] using hc.symm) |
| 39 | |
| 40 | /-- Distinct nonopposite unit tangents have a strictly positive angle strictly less than pi. |
| 41 | Source: MT Claim 19.41; digon derivation Section 5. Source/construction: |
| 42 | proof-work/tasks/M64/derivations/2026-09-27-short-geodesic-digons.md, Section 5. -/ |
| 43 | theorem m64Intrinsic_unit_tangent_angle_bounds |
| 44 | (G : RiemannianMetric 2 AnnulusCoordinates) (p v w : AnnulusCoordinates) |
| 45 | (hv : G.inner p v v = 1) (hw : G.inner p w w = 1) |
| 46 | (hne : v ≠ w) (hopp : v ≠ -w) : |
| 47 | 0 < G.cornerAngle p v w ∧ G.cornerAngle p v w < Real.pi := by |
| 48 | have hminus := G.pos p (v - w) (sub_ne_zero.mpr hne) |
| 49 | have hplus := G.pos p (v + w) (fun h => hopp (eq_neg_of_add_eq_zero_left h)) |
| 50 | simp only [map_sub, sub_apply, map_add, add_apply, hv, hw, G.symm p w v] at hminus hplus |
| 51 | simp only [RiemannianMetric.cornerAngle, hv, hw, Real.sqrt_one, inv_one, one_smul] |
| 52 | exact ⟨Real.arccos_pos.mpr (by linarith only [hminus]), |
| 53 | Real.arccos_lt_pi.mpr (by linarith only [hplus])⟩ |
| 54 | |
| 55 | end PoincareMT |