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.Collision.Focusing |
| 2 | import Mathlib.Analysis.Real.Pi.Bounds |
| 3 | |
| 4 | /-! Two focusing radii for the original short normal collision. |
| 5 | Source: MT Claim 19.43, pp. 472-473; complete-remaining derivation, Section 6, |
| 6 | and short-geodesic-digons derivation, Section 13. The original delta is fixed. -/ |
| 7 | |
| 8 | noncomputable section |
| 9 | set_option autoImplicit false |
| 10 | set_option backward.isDefEq.respectTransparency false |
| 11 | |
| 12 | open Set |
| 13 | open scoped Topology ContDiff Manifold |
| 14 | |
| 15 | namespace PoincareMT |
| 16 | |
| 17 | /-- The first focusing estimate shrinks the actual competitor radius below q/10; the second |
| 18 | gives the sharp inequality at that uniform radius. Both uses retain the original short-arc |
| 19 | turning hypothesis. Source: MT Claim 19.43; digon derivation, Section 13. |
| 20 | Source/construction: proof-work/tasks/M64/derivations/2026-09-27-short-geodesic-digons.md, |
| 21 | Section 13. -/ |
| 22 | theorem m64Intrinsic_normal_collision_double_focusing |
| 23 | (N : IntrinsicAnnulus) {alpha beta : ℝ → AnnulusCoordinates} |
| 24 | (ha : ContDiff ℝ ∞ alpha) (hb : ContDiff ℝ ∞ beta) |
| 25 | {a b A B r q h : ℝ} (hab : a < b) (hA : 0 < A) (hB : 0 < B) |
| 26 | (hai : InjOn alpha (Icc 0 A)) (hbi : InjOn beta (Icc 0 B)) |
| 27 | (ha0 : alpha 0 = intrinsicAnnulusBoundary 1 a) |
| 28 | (hb0 : beta 0 = intrinsicAnnulusBoundary 1 b) (hmeet : alpha A = beta B) |
| 29 | (hsides : ∀ s ∈ Icc 0 A, ∀ t ∈ Icc 0 B, alpha s = beta t → s = A ∧ t = B) |
| 30 | (horthA : N.metric.inner (intrinsicAnnulusBoundary 1 a) |
| 31 | (deriv (intrinsicAnnulusBoundary 1) a) (deriv alpha 0) = 0) |
| 32 | (horthB : N.metric.inner (intrinsicAnnulusBoundary 1 b) |
| 33 | (deriv (intrinsicAnnulusBoundary 1) b) (deriv beta 0) = 0) |
| 34 | (hgeoA : N.metric.IsGeodesicOn alpha (Icc 0 A)) |
| 35 | (hgeoB : N.metric.IsGeodesicOn beta (Icc 0 B)) |
| 36 | (hunitA : ∀ t ∈ Icc 0 A, N.metric.inner (alpha t) (deriv alpha t) (deriv alpha t) = 1) |
| 37 | (hunitB : ∀ t ∈ Icc 0 B, N.metric.inner (beta t) (deriv beta t) (deriv beta t) = 1) |
| 38 | (haInterior : ∀ t ∈ Ioc 0 A, 1 < ‖alpha t‖) |
| 39 | (hbInterior : ∀ t ∈ Ioc 0 B, 1 < ‖beta t‖) |
| 40 | (hinwardA : 0 < inner ℝ (intrinsicAnnulusBoundary 1 a) (deriv alpha 0)) |
| 41 | (hinwardB : 0 < inner ℝ (intrinsicAnnulusBoundary 1 b) (deriv beta 0)) |
| 42 | (hperiod : b - a < rampPeriod) (hshort : intrinsicBoundaryLength N.metric 1 a b ≤ q) |
| 43 | (hq : 0 < q) (hqr : q ≤ r) (hAh : A ≤ h) (hBh : B ≤ h) (hhq : h ≤ q / 100) |
| 44 | {U V : Set AnnulusCoordinates} (hU : IsOpen U) (hV : IsOpen V) |
| 45 | (hpV : IsPreconnected V) (hbV : ¬ Bornology.IsBounded V) (hUV : Disjoint U V) |
| 46 | (hcover : U ∪ V = (frontier U)ᶜ) (hfV : frontier V = frontier U) |
| 47 | (hfront : frontier U = intrinsicAnnulusBoundary 1 '' Icc a b ∪ |
| 48 | (alpha '' Icc 0 A ∪ beta '' Icc 0 B)) |
| 49 | (hsub : closure U ⊆ standardAnnulusDomain) |
| 50 | {K delta mu : ℝ} (hK : N.GaussianCurvatureBound K) |
| 51 | (hdelta : 0 < delta) (hdeltaSmall : delta < 1 / 100) (hturn : N.SmallBoundaryTurning delta r) |
| 52 | (harea : intrinsicAnnulusArea N.metric < mu) |
| 53 | (hbudget : max K 0 * mu + delta ≤ Real.pi / 2) |
| 54 | (hmodel : Real.sqrt (max K 1) * q ≤ 1 / 2) : |
| 55 | intrinsicBoundaryLength N.metric 1 a b < 51 * q / 5000 ∧ |
| 56 | intrinsicBoundaryLength N.metric 1 a b / 2 + max A B < 151 * q / 10000 ∧ |
| 57 | Real.cos (Real.sqrt (max K 1) * (q / 10)) * intrinsicBoundaryLength N.metric 1 a b ≤ |
| 58 | (Real.sin (Real.sqrt (max K 1) * (q / 10)) / Real.sqrt (max K 1)) * |
| 59 | intrinsicGeodesicCurvatureIntegral N.metric N.connection 1 a b := by |
| 60 | have hkappa : 0 < Real.sqrt (max K 1) := |
| 61 | Real.sqrt_pos.mpr (zero_lt_one.trans_le (le_max_right K 1)) |
| 62 | have hh : 0 < h := hA.trans_le hAh |
| 63 | have hmax : max A B ≤ h := max_le hAh hBh |
| 64 | have hR0 : 0 < q / 2 + h := by positivity |
| 65 | have hR0bound : q / 2 + h ≤ 51 * q / 100 := by linarith only [hhq] |
| 66 | have hangle0 : Real.sqrt (max K 1) * (q / 2 + h) ≤ Real.pi / 4 := by |
| 67 | have hs := mul_le_mul_of_nonneg_left hhq hkappa.le |
| 68 | nlinarith only [hs, hmodel, Real.pi_gt_three] |
| 69 | have hradius0 : intrinsicBoundaryLength N.metric 1 a b / 2 + max A B ≤ q / 2 + h := by |
| 70 | linarith only [hshort, hmax] |
| 71 | have hfocus0 := (m64Intrinsic_normal_collision_focusing N ha hb hab hA hB hai hbi ha0 hb0 |
| 72 | hmeet hsides horthA horthB hgeoA hgeoB hunitA hunitB haInterior hbInterior hinwardA hinwardB |
| 73 | hperiod (hshort.trans hqr) hU hV hpV hbV hUV hcover hfV hfront hsub hK hdelta hturn |
| 74 | harea hbudget hradius0 hangle0).2 |
| 75 | have hturnLocal := hturn a b hab.le (by linarith only [hperiod]) (hshort.trans hqr) |
| 76 | have hlen : intrinsicBoundaryLength N.metric 1 a b < 51 * q / 5000 := by |
| 77 | have ht := hfocus0.trans_lt (mul_lt_mul_of_pos_left hturnLocal |
| 78 | (mul_pos (by norm_num : (0 : ℝ) < 2) hR0)) |
| 79 | have hd := mul_lt_mul_of_pos_left hdeltaSmall |
| 80 | (mul_pos (by norm_num : (0 : ℝ) < 2) hR0) |
| 81 | nlinarith only [ht, hd, hR0bound] |
| 82 | have hradius : intrinsicBoundaryLength N.metric 1 a b / 2 + max A B < 151 * q / 10000 := by |
| 83 | linarith only [hlen, hmax, hhq] |
| 84 | have hradius' : intrinsicBoundaryLength N.metric 1 a b / 2 + max A B ≤ q / 10 := by |
| 85 | linarith only [hradius, hq] |
| 86 | have hangle : Real.sqrt (max K 1) * (q / 10) ≤ Real.pi / 4 := by |
| 87 | nlinarith only [hmodel, Real.pi_gt_three] |
| 88 | exact ⟨hlen, hradius, (m64Intrinsic_normal_collision_focusing N ha hb hab hA hB hai hbi |
| 89 | ha0 hb0 hmeet hsides horthA horthB hgeoA hgeoB hunitA hunitB haInterior hbInterior |
| 90 | hinwardA hinwardB hperiod (hshort.trans hqr) hU hV hpV hbV hUV hcover hfV hfront hsub |
| 91 | hK hdelta hturn harea hbudget hradius' hangle).1⟩ |
| 92 | |
| 93 | end PoincareMT |