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.RicciFlow.Surgery.CanonicalInduction.Component.ComponentEstimateGeometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.CanonicalGeometry.CapIntrinsicDiameter |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Flow.Basic |
| 4 | |
| 5 | /-! |
| 6 | # Intrinsic diameter of the actual component image |
| 7 | |
| 8 | The quadratic bound on the literal cylinder map gives its tangent-norm |
| 9 | bound. Intrinsic diameter transport then uses the actual terminal |
| 10 | weak-2C component, without changing the spatial carrier. |
| 11 | Source: Definition 9.75, p. 231, used in the induction on pp. 402-405. |
| 12 | See `proof-work/tasks/M47/derivations/component-frontier.md`, Stage F2. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M47 |
| 24 | |
| 25 | /-- The actual image of a terminal weak-2C component has diameter |
| 26 | below 4C/sqrt(Q) under the constructed quadratic factor two; |
| 27 | Definition 9.75, p. 231, and pp. 402-405. -/ |
| 28 | theorem component_cylinder_image_diameter_lt |
| 29 | {F : SurgeryFlowData.{u}} {origin C Q : ℝ} {I : Set ℝ} |
| 30 | (N : SingularCComponent (F.metric origin) (F.connection origin) (2 * C)) |
| 31 | {x : (F.slice origin).carrier} (hx : x ∈ N.carrier) |
| 32 | (hxQ : (F.connection origin).scalarCurvature x = Q) |
| 33 | (U : TopologicalSpace.Opens (F.slice origin).carrier) |
| 34 | (hU : (U : Set (F.slice origin).carrier) = N.carrier) |
| 35 | (e : SurgeryFlowCylinder F (F.slice origin) origin 1 I U) |
| 36 | (s : ℝ) (hs : s ∈ I) |
| 37 | (hquadratic : ∀ y ∈ U, ∀ v : TangentSpace (𝓡 3) y, |
| 38 | e.pullbackInner s hs y v v ≤ 2 * (F.metric origin).inner y v v) : |
| 39 | intrinsicDiameter (F.metric (origin + s / 1)) (e.forward s hs '' (U : Set _)) < |
| 40 | ENNReal.ofReal (4 * C / Real.sqrt Q) := by |
| 41 | have hQ : 0 < Q := hxQ ▸ component_scalar_pos N hx |
| 42 | have hbound : ∀ y ∈ U, ∀ v : TangentSpace (𝓡 3) y, |
| 43 | (F.metric (origin + s / 1)).tangentNorm (e.forward s hs y) |
| 44 | (mfderiv (𝓡 3) (𝓡 3) (e.forward s hs) y v) ≤ |
| 45 | 2 * (F.metric origin).tangentNorm y v := by |
| 46 | intro y hy v |
| 47 | have hquad := hquadratic y hy v |
| 48 | simp only [SurgeryFlowCylinder.pullbackInner, one_mul] at hquad |
| 49 | have hnonneg : 0 ≤ (F.metric origin).inner y v v := by |
| 50 | by_cases hv : v = 0 |
| 51 | · simp [hv] |
| 52 | · exact ((F.metric origin).pos y v hv).le |
| 53 | change Real.sqrt _ ≤ 2 * Real.sqrt _ |
| 54 | calc |
| 55 | _ ≤ Real.sqrt (4 * (F.metric origin).inner y v v) := Real.sqrt_le_sqrt (by linarith) |
| 56 | _ = _ := by rw [Real.sqrt_mul (by norm_num : (0 : ℝ) ≤ 4)]; norm_num |
| 57 | have hmap := (F.metric origin).intrinsicDiameter_image_le_mul_of_isOpen |
| 58 | (F.metric (origin + s / 1)) (e.forward s hs) U.isOpen |
| 59 | ((e.forward_smooth s hs).of_le (by simp)) (by norm_num : (0 : ℝ) < 2) hbound |
| 60 | have hdiam := component_diameter_lt N hx |
| 61 | rw [← hU] at hdiam |
| 62 | rw [hxQ] at hdiam |
| 63 | have hradius : (2 * C) * Q ^ (-1 / 2 : ℝ) = 2 * C / Real.sqrt Q := by |
| 64 | rw [show (-1 / 2 : ℝ) = -(1 / 2 : ℝ) by ring, Real.rpow_neg, |
| 65 | ← Real.sqrt_eq_rpow, div_eq_mul_inv] |
| 66 | exact hQ.le |
| 67 | rw [hradius] at hdiam |
| 68 | have hstrict := ENNReal.mul_lt_mul_right |
| 69 | (show (ENNReal.ofReal 2) ≠ 0 by norm_num) ENNReal.ofReal_ne_top hdiam |
| 70 | have hvalue : ENNReal.ofReal 2 * ENNReal.ofReal (2 * C / Real.sqrt Q) = |
| 71 | ENNReal.ofReal (4 * C / Real.sqrt Q) := by |
| 72 | rw [← ENNReal.ofReal_mul (by norm_num : (0 : ℝ) ≤ 2)] |
| 73 | congr 1 |
| 74 | ring |
| 75 | exact hmap.trans_lt (hstrict.trans_eq hvalue) |
| 76 | |
| 77 | end PoincareMT.M47 |