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.StandardCap.Existence.InitialMetric.CylinderPullback |
| 2 | |
| 3 | /-! |
| 4 | # The cylindrical-end certificate of the initial cap |
| 5 | |
| 6 | Morgan-Tian Definition 12.1 and Lemma 12.2, printed pp. 293-295. |
| 7 | The normalized radial metric has an exact cylinder outside a compact |
| 8 | metric ball, including its boundary and an open collar. Every field of |
| 9 | the frozen `StandardCylindricalEnd` structure is provided explicitly. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff |
| 16 | |
| 17 | namespace PoincareMT.M34 |
| 18 | |
| 19 | /-- The normalized plateau supplies the full exact-end certificate, |
| 20 | with boundary radius `a+3/2` and collar width `1/2` |
| 21 | (Definition 12.1 and Lemma 12.2, pp. 293-295). -/ |
| 22 | noncomputable def capCylindricalEnd {a : ℝ} (ha : 0 < a) |
| 23 | (hapi : a ≤ Real.pi / 2) (hn : capProfile a Real.pi = Real.sqrt 2) : |
| 24 | StandardCylindricalEnd (capRiemannianMetric a ha hapi) where |
| 25 | radius := a + 3 / 2 |
| 26 | radius_pos := by linarith |
| 27 | closed_core := Metric.closedBall 0 (a + 3 / 2) |
| 28 | closed_core_eq := (capRiemannianMetric_closedBall_zero ha hapi (by linarith)).symm |
| 29 | core_compact := isCompact_closedBall _ _ |
| 30 | carrier := {x | a + 3 / 2 ≤ ‖x‖} |
| 31 | carrier_eq := by |
| 32 | rw [capRiemannianMetric_ball_zero ha hapi] |
| 33 | ext x |
| 34 | simp only [mem_ofPred_eq, mem_sdiff, mem_univ, Metric.mem_ball, |
| 35 | dist_zero_right, true_and, not_lt] |
| 36 | coordinate := capCylinderCoordinate (a + 3 / 2) |
| 37 | inverse := capCylinderInverse (a + 3 / 2) |
| 38 | coordinate_image := capCylinderCoordinate_image (by linarith) |
| 39 | coordinate_left_inverse := by |
| 40 | intro z hz |
| 41 | apply capCylinderInverse_coordinate |
| 42 | have hz0 : 0 ≤ z.2 := hz.2 |
| 43 | linarith |
| 44 | coordinate_right_inverse := by |
| 45 | intro x hx |
| 46 | apply capCylinderCoordinate_inverse |
| 47 | exact norm_pos_iff.mp (lt_of_lt_of_le (by linarith : 0 < a + 3 / 2) hx) |
| 48 | inverse_domain := by |
| 49 | intro x hx |
| 50 | exact sub_nonneg.mpr hx |
| 51 | collar := 1 / 2 |
| 52 | collar_pos := by norm_num |
| 53 | coordinate_smooth := (capCylinderCoordinate_contMDiff (a + 3 / 2)).contMDiffOn |
| 54 | inverse_smooth := by |
| 55 | intro x hx |
| 56 | apply (capCylinderInverse_contMDiffAt _ _).contMDiffWithinAt |
| 57 | exact norm_pos_iff.mp (lt_of_lt_of_le (by linarith : 0 < a + 3 / 2) hx) |
| 58 | metric_pullback := by |
| 59 | intro z hz v w |
| 60 | exact capRiemannianMetric_cylinder_pullback ha hapi hn _ z (by linarith) v w |
| 61 | |
| 62 | end PoincareMT.M34 |