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.InitialEstimates.CurvatureCoefficients |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Analysis.Metric.RadialConnectionDerivative |
| 3 | import PoincareLib.Geometry.Riemannian.Curvature.Euclidean |
| 4 | |
| 5 | /-! |
| 6 | # Actual curvature on radial and angular axis planes |
| 7 | |
| 8 | Morgan-Tian Lemma 12.3, pp. 294-295. Local equality with the supplied |
| 9 | Levi-Civita connection permits differentiation in the genuine coordinate |
| 10 | curvature formula. Evaluation on the coordinate axis gives the two |
| 11 | sectional numerators used to control the weighted slope. The convention |
| 12 | is g(R(u,v)v,u), as in the frozen contract. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Filter |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | namespace PoincareMT.M34 |
| 21 | |
| 22 | set_option backward.isDefEq.respectTransparency false in |
| 23 | /-- The actual curvature of the supplied radial connection away from |
| 24 | the origin (Lemma 12.3, pp. 294-295). -/ |
| 25 | theorem initialCurvature_formula (g₀ : StandardInitialMetric) |
| 26 | {x : StandardCapSpace} (hx : x ≠ 0) (u v w : StandardCapSpace) : |
| 27 | let A := initialChristoffelA g₀ ‖x‖ |
| 28 | let B := initialChristoffelB g₀ ‖x‖ |
| 29 | let C := initialChristoffelC g₀ ‖x‖ |
| 30 | g₀.connection.curvature x u v w = |
| 31 | (B - A + A * B * ‖x‖ ^ 2) • (inner ℝ v w • u - inner ℝ u w • v) + |
| 32 | ((C - deriv (initialChristoffelA g₀) ‖x‖ / ‖x‖ + A ^ 2 + A * C * ‖x‖ ^ 2) * |
| 33 | inner ℝ x w) • (inner ℝ x v • u - inner ℝ x u • v) + |
| 34 | ((deriv (initialChristoffelB g₀) ‖x‖ / ‖x‖ - C + B ^ 2 + B * C * ‖x‖ ^ 2) * |
| 35 | (inner ℝ x u * inner ℝ v w - inner ℝ x v * inner ℝ u w)) • x := by |
| 36 | dsimp only |
| 37 | have he (p q : StandardCapSpace) : g₀.connection.euclideanConnection p q =ᶠ[𝓝 x] |
| 38 | (fun y => Poincare.radialChristoffel (initialChristoffelA g₀ ‖y‖) |
| 39 | (initialChristoffelB g₀ ‖y‖) (initialChristoffelC g₀ ‖y‖) y p q) := by |
| 40 | filter_upwards [eventually_ne_nhds hx] with y hy |
| 41 | exact initialConnection_formula g₀ hy p q |
| 42 | have hp (p q : StandardCapSpace) : g₀.connection.euclideanConnection p q x = |
| 43 | Poincare.radialChristoffel (initialChristoffelA g₀ ‖x‖) |
| 44 | (initialChristoffelB g₀ ‖x‖) (initialChristoffelC g₀ ‖x‖) x p q := |
| 45 | initialConnection_formula g₀ hx p q |
| 46 | rw [g₀.connection.curvature_eq_euclideanConnection, |
| 47 | (he v w).fderiv_eq, (he u w).fderiv_eq] |
| 48 | simp only [hp] |
| 49 | obtain ⟨hA, hB, hC⟩ := initialChristoffel_contDiffAt g₀ (norm_ne_zero_iff.mpr hx) |
| 50 | exact Poincare.radialChristoffel_curvature_expression hx |
| 51 | (hA.differentiableAt (by simp)).hasDerivAt |
| 52 | (hB.differentiableAt (by simp)).hasDerivAt |
| 53 | (hC.differentiableAt (by simp)).hasDerivAt u v w |
| 54 | |
| 55 | set_option backward.isDefEq.respectTransparency false in |
| 56 | /-- The angular axis curvature vector in terms of the weighted slope |
| 57 | (Lemma 12.3, pp. 294-295). -/ |
| 58 | theorem initialCurvature_angular_axis (g₀ : StandardInitialMetric) {r : ℝ} (hr : 0 < r) : |
| 59 | g₀.connection.curvature (EuclideanSpace.single (0 : Fin 3) r) |
| 60 | (EuclideanSpace.single (1 : Fin 3) (1 : ℝ)) |
| 61 | (EuclideanSpace.single (2 : Fin 3) (1 : ℝ)) |
| 62 | (EuclideanSpace.single (2 : Fin 3) (1 : ℝ)) = |
| 63 | ((1 - initialWeightedSlope g₀ r ^ 2) / r ^ 2) • |
| 64 | EuclideanSpace.single (1 : Fin 3) (1 : ℝ) := by |
| 65 | have hx : EuclideanSpace.single (0 : Fin 3) r ≠ (0 : StandardCapSpace) := by |
| 66 | simp [hr.ne'] |
| 67 | rw [initialCurvature_formula g₀ hx] |
| 68 | simp only [EuclideanSpace.inner_single_right, PiLp.norm_single, |
| 69 | Real.norm_eq_abs, abs_of_pos hr] |
| 70 | norm_num |
| 71 | rw [initialCurvature_coefficient_F g₀ hr] |
| 72 | simp |
| 73 | |
| 74 | set_option backward.isDefEq.respectTransparency false in |
| 75 | /-- The radial axis curvature vector in terms of the derivative of |
| 76 | the weighted slope (Lemma 12.3, pp. 294-295). -/ |
| 77 | theorem initialCurvature_radial_axis (g₀ : StandardInitialMetric) {r : ℝ} (hr : 0 < r) : |
| 78 | g₀.connection.curvature (EuclideanSpace.single (0 : Fin 3) r) |
| 79 | (EuclideanSpace.single (0 : Fin 3) (1 : ℝ)) |
| 80 | (EuclideanSpace.single (1 : Fin 3) (1 : ℝ)) |
| 81 | (EuclideanSpace.single (1 : Fin 3) (1 : ℝ)) = |
| 82 | (-initialWarping g₀ r * deriv (initialWeightedSlope g₀) r / |
| 83 | (initialRadialSpeed g₀ r * r ^ 2)) • EuclideanSpace.single (0 : Fin 3) (1 : ℝ) := by |
| 84 | have hx : EuclideanSpace.single (0 : Fin 3) r ≠ (0 : StandardCapSpace) := by |
| 85 | simp [hr.ne'] |
| 86 | rw [initialCurvature_formula g₀ hx] |
| 87 | simp only [EuclideanSpace.inner_single_right, PiLp.norm_single, |
| 88 | Real.norm_eq_abs, abs_of_pos hr] |
| 89 | norm_num |
| 90 | have haxis : EuclideanSpace.single (0 : Fin 3) r = |
| 91 | r • EuclideanSpace.single (0 : Fin 3) (1 : ℝ) := by ext i; simp |
| 92 | rw [haxis, smul_smul, ← add_smul] |
| 93 | congr 1 |
| 94 | convert! initialCurvature_coefficient_radial g₀ hr using 1 <;> ring |
| 95 | |
| 96 | set_option backward.isDefEq.respectTransparency false in |
| 97 | /-- The angular sectional numerator of the actual supplied metric |
| 98 | (Lemma 12.3, pp. 294-295). -/ |
| 99 | theorem initialCurvatureTensor_angular_axis (g₀ : StandardInitialMetric) |
| 100 | {r : ℝ} (hr : 0 < r) : |
| 101 | g₀.connection.curvatureTensor (EuclideanSpace.single (0 : Fin 3) r) |
| 102 | (EuclideanSpace.single (1 : Fin 3) (1 : ℝ)) |
| 103 | (EuclideanSpace.single (2 : Fin 3) (1 : ℝ)) |
| 104 | (EuclideanSpace.single (1 : Fin 3) (1 : ℝ)) |
| 105 | (EuclideanSpace.single (2 : Fin 3) (1 : ℝ)) = |
| 106 | initialAngularCoefficient g₀ r * (1 - initialWeightedSlope g₀ r ^ 2) / r ^ 2 := by |
| 107 | change g₀.metric.inner _ (g₀.connection.curvature _ _ _ _) _ = _ |
| 108 | rw [initialCurvature_angular_axis g₀ hr] |
| 109 | simp only [map_smul, smul_apply, smul_eq_mul] |
| 110 | change (1 - initialWeightedSlope g₀ r ^ 2) / r ^ 2 * initialAngularCoefficient g₀ r = _ |
| 111 | ring |
| 112 | |
| 113 | set_option backward.isDefEq.respectTransparency false in |
| 114 | /-- The radial sectional numerator of the actual supplied metric |
| 115 | (Lemma 12.3, pp. 294-295). -/ |
| 116 | theorem initialCurvatureTensor_radial_axis (g₀ : StandardInitialMetric) |
| 117 | {r : ℝ} (hr : 0 < r) : |
| 118 | g₀.connection.curvatureTensor (EuclideanSpace.single (0 : Fin 3) r) |
| 119 | (EuclideanSpace.single (0 : Fin 3) (1 : ℝ)) |
| 120 | (EuclideanSpace.single (1 : Fin 3) (1 : ℝ)) |
| 121 | (EuclideanSpace.single (0 : Fin 3) (1 : ℝ)) |
| 122 | (EuclideanSpace.single (1 : Fin 3) (1 : ℝ)) = |
| 123 | -(initialRadialSpeed g₀ r * initialWarping g₀ r / r ^ 2) * |
| 124 | deriv (initialWeightedSlope g₀) r := by |
| 125 | have ha := (initialRadialSpeed_pos g₀ r).ne' |
| 126 | change g₀.metric.inner _ (g₀.connection.curvature _ _ _ _) _ = _ |
| 127 | rw [initialCurvature_radial_axis g₀ hr] |
| 128 | simp only [map_smul, smul_apply, smul_eq_mul] |
| 129 | change (-initialWarping g₀ r * deriv (initialWeightedSlope g₀) r / |
| 130 | (initialRadialSpeed g₀ r * r ^ 2)) * initialRadialCoefficient g₀ r = _ |
| 131 | rw [initialRadialCoefficient_eq] |
| 132 | field_simp |
| 133 | |
| 134 | end PoincareMT.M34 |