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.CurvatureFormula |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Analysis.Coordinates.RadialGram |
| 3 | |
| 4 | /-! |
| 5 | # Sectional numerator of the actual cap metric |
| 6 | |
| 7 | Morgan-Tian Lemma 12.2, printed pp. 294-295. Pairing the genuine curvature |
| 8 | vector with the metric gives a radial squared norm and an angular Gram |
| 9 | determinant. This formula is valid for all fixed vectors, including |
| 10 | dependent ones, and uses the contract's actual curvature tensor. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open scoped Manifold ContDiff Bundle |
| 16 | |
| 17 | namespace PoincareMT.M34 |
| 18 | |
| 19 | /-- Gram determinant of the cap metric, retaining the radial correction |
| 20 | (Lemma 12.2 curvature computation, pp. 294-295). -/ |
| 21 | theorem capMetricInner_gram (a : ℝ) (x u v : StandardCapSpace) : |
| 22 | capMetricInner a x u u * capMetricInner a x v v - capMetricInner a x u v ^ 2 = |
| 23 | capAngularCoefficient a ‖x‖ ^ 2 * |
| 24 | (inner ℝ u u * inner ℝ v v - inner ℝ u v ^ 2) + |
| 25 | capAngularCoefficient a ‖x‖ * capRadialCoefficient a ‖x‖ * |
| 26 | ‖inner ℝ x u • v - inner ℝ x v • u‖ ^ 2 := by |
| 27 | exact Poincare.radial_pairing_gram _ _ x u v |
| 28 | |
| 29 | set_option backward.isDefEq.respectTransparency false in |
| 30 | /-- The actual sectional numerator splits into radial and angular terms |
| 31 | at every nonzero point (Lemma 12.2, pp. 294-295). -/ |
| 32 | theorem capCurvatureTensor_formula {a : ℝ} (ha : 0 < a) (hapi : a ≤ Real.pi / 2) |
| 33 | (D : LeviCivitaData (capRiemannianMetric a ha hapi)) |
| 34 | {x : StandardCapSpace} (hx : x ≠ 0) (u v : StandardCapSpace) : |
| 35 | D.curvatureTensor x u v u v = |
| 36 | (-capProfile a ‖x‖ * deriv (capSlope a) ‖x‖ / ‖x‖ ^ 4) * |
| 37 | ‖inner ℝ x u • v - inner ℝ x v • u‖ ^ 2 + |
| 38 | (capProfile a ‖x‖ ^ 2 * (1 - capSlope a ‖x‖ ^ 2) / ‖x‖ ^ 4) * |
| 39 | (inner ℝ u u * inner ℝ v v - inner ℝ u v ^ 2 - |
| 40 | ‖inner ℝ x u • v - inner ℝ x v • u‖ ^ 2 / ‖x‖ ^ 2) := by |
| 41 | have hr : ‖x‖ ≠ 0 := norm_ne_zero_iff.mpr hx |
| 42 | have hf : capProfile a ‖x‖ ≠ 0 := |
| 43 | (capProfile_pos ha.le hapi (norm_pos_iff.mpr hx)).ne' |
| 44 | change capMetricInner a x (D.curvature x u v v) u = _ |
| 45 | rw [capCurvature_formula ha hapi D hx, capMetricInner_apply, |
| 46 | Poincare.radial_cross_norm_sq] |
| 47 | simp only [inner_add_left, inner_add_right, inner_sub_left, inner_sub_right, |
| 48 | real_inner_smul_left, real_inner_smul_right, real_inner_self_eq_norm_sq] |
| 49 | rw [real_inner_comm u v] |
| 50 | rw [capRadialCoefficient, if_neg hr, capAngularCoefficient, if_neg hr] |
| 51 | field_simp |
| 52 | ring |
| 53 | |
| 54 | set_option backward.isDefEq.respectTransparency false in |
| 55 | /-- Spherical profile identities imply curvature one quarter times the |
| 56 | metric Gram determinant, before imposing orthonormality |
| 57 | (Lemma 12.2 round-tip computation, pp. 294-295). -/ |
| 58 | theorem capCurvatureTensor_eq_quarter_of_profile {a : ℝ} |
| 59 | (ha : 0 < a) (hapi : a ≤ Real.pi / 2) |
| 60 | (D : LeviCivitaData (capRiemannianMetric a ha hapi)) |
| 61 | {x : StandardCapSpace} (hx : x ≠ 0) |
| 62 | (hq : deriv (capSlope a) ‖x‖ = -capProfile a ‖x‖ / 4) |
| 63 | (hp : capSlope a ‖x‖ ^ 2 = 1 - capProfile a ‖x‖ ^ 2 / 4) |
| 64 | (u v : StandardCapSpace) : |
| 65 | D.curvatureTensor x u v u v = (1 / 4 : ℝ) * |
| 66 | (capMetricInner a x u u * capMetricInner a x v v - capMetricInner a x u v ^ 2) := by |
| 67 | have hr : ‖x‖ ≠ 0 := norm_ne_zero_iff.mpr hx |
| 68 | rw [capCurvatureTensor_formula ha hapi D hx, hq, hp, capMetricInner_gram, |
| 69 | capRadialCoefficient, if_neg hr, capAngularCoefficient, if_neg hr] |
| 70 | field_simp |
| 71 | ring |
| 72 | |
| 73 | end PoincareMT.M34 |