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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Cylinders.CylinderJetReadout |
| 3 | |
| 4 | /-! |
| 5 | # The literal cylinder model Ricci tensor |
| 6 | |
| 7 | Morgan--Tian, Lemma A.3 and Proposition A.11, pp. 498-504. The fixed |
| 8 | chosen-chart coefficient has zeroth metric diag(2,2,1), zero first |
| 9 | derivative, and an explicit second derivative. Substitution in the |
| 10 | published M07 two-jet curvature operator gives its actual Ricci form. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | set_option maxSynthPendingDepth 12 |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Bundle BigOperators Topology InnerProductSpace |
| 20 | |
| 21 | namespace PoincareMT.M28.tube |
| 22 | |
| 23 | open PoincareMT.SpacetimeBounds PoincareMT.Proofs.M28.NeckAnalysis |
| 24 | |
| 25 | private abbrev CE := EuclideanSpace ℝ (Fin 3) |
| 26 | private abbrev cb := EuclideanSpace.basisFun (Fin 3) ℝ |
| 27 | private abbrev CMetric := MetricCoefficient 3 |
| 28 | local instance : NormedAddCommGroup CMetric := ContinuousLinearMap.toNormedAddCommGroup |
| 29 | local instance : NormedSpace ℝ CMetric := ContinuousLinearMap.toNormedSpace |
| 30 | private abbrev CFirst := CE →L[ℝ] CMetric |
| 31 | local instance : NormedAddCommGroup CFirst := ContinuousLinearMap.toNormedAddCommGroup |
| 32 | local instance : NormedSpace ℝ CFirst := ContinuousLinearMap.toNormedSpace |
| 33 | private abbrev CSecond := CE →L[ℝ] CFirst |
| 34 | local instance : NormedAddCommGroup CSecond := ContinuousLinearMap.toNormedAddCommGroup |
| 35 | local instance : NormedSpace ℝ CSecond := ContinuousLinearMap.toNormedSpace |
| 36 | |
| 37 | private theorem cylinderModelMetricCoefficient_projection_apply (x v w : CE) : |
| 38 | cylinderModelMetricCoefficient x v w = |
| 39 | 2 * sphereChartConformalFactor (cylinderSphereProjection x) * |
| 40 | inner ℝ (cylinderSphereProjection v) (cylinderSphereProjection w) + |
| 41 | cylinderAxisProjection v * cylinderAxisProjection w := by |
| 42 | rw [cylinderModelMetricCoefficient_apply] |
| 43 | rfl |
| 44 | |
| 45 | /-- The first coefficient derivative comes directly from the actual |
| 46 | stereographic conformal coefficient, before specialization to the center. -/ |
| 47 | theorem cylinderModelMetricCoefficient_fderiv_apply (x u v w : CE) : |
| 48 | fderiv ℝ cylinderModelMetricCoefficient x u v w = |
| 49 | 2 * (-64 / (‖cylinderSphereProjection x‖ ^ 2 + 4) ^ 3) * |
| 50 | inner ℝ (cylinderSphereProjection x) (cylinderSphereProjection u) * |
| 51 | inner ℝ (cylinderSphereProjection v) (cylinderSphereProjection w) := by |
| 52 | rw [← coefficient_fderiv_evaluation |
| 53 | (contDiff_cylinderModelMetricCoefficient.differentiable (by simp) x)] |
| 54 | simp_rw [cylinderModelMetricCoefficient_projection_apply] |
| 55 | have hc := (hasFDerivAt_sphereChartConformalFactor |
| 56 | (cylinderSphereProjection x)).comp x cylinderSphereProjection.hasFDerivAt |
| 57 | have h := (((hc.const_mul 2).mul_const |
| 58 | (inner ℝ (cylinderSphereProjection v) (cylinderSphereProjection w))).add_const |
| 59 | (cylinderAxisProjection v * cylinderAxisProjection w)) |
| 60 | have heq := congrArg (fun L : CE →L[ℝ] ℝ => L u) h.fderiv |
| 61 | simp only [smul_apply, ContinuousLinearMap.comp_apply, |
| 62 | innerSL_apply_apply, smul_eq_mul] at heq |
| 63 | exact heq.trans (by ring) |
| 64 | |
| 65 | /-- The chosen cylinder model has zero first coefficient derivative at |
| 66 | the chart center, as a literal continuous linear map. -/ |
| 67 | theorem cylinderModelTwoJet_first_eq_zero : cylinderModelTwoJet.2.1 = 0 := by |
| 68 | ext u v w |
| 69 | change fderiv ℝ cylinderModelMetricCoefficient 0 u v w = 0 |
| 70 | rw [cylinderModelMetricCoefficient_fderiv_apply] |
| 71 | simp |
| 72 | |
| 73 | /-- The exact nested second coefficient derivative retains the sphere |
| 74 | projection in all four slots and vanishes in every axial slot. -/ |
| 75 | theorem cylinderModelTwoJet_second_apply (u v w z : CE) : |
| 76 | cylinderModelTwoJet.2.2 u v w z = |
| 77 | -2 * inner ℝ (cylinderSphereProjection u) (cylinderSphereProjection v) * |
| 78 | inner ℝ (cylinderSphereProjection w) (cylinderSphereProjection z) := by |
| 79 | have hB := contDiff_cylinderModelMetricCoefficient.contDiffAt (x := (0 : CE)) |
| 80 | have hD : DifferentiableAt ℝ (fderiv ℝ cylinderModelMetricCoefficient) 0 := |
| 81 | (hB.fderiv_right (m := ∞) (by simp)).differentiableAt (by simp) |
| 82 | have heval : |
| 83 | fderiv ℝ (fun y => fderiv ℝ cylinderModelMetricCoefficient y v w z) 0 u = |
| 84 | cylinderModelTwoJet.2.2 u v w z := by |
| 85 | rw [fderiv_clm_apply |
| 86 | ((hD.clm_apply (differentiableAt_const (c := v))).clm_apply |
| 87 | (differentiableAt_const (c := w))) (differentiableAt_const (c := z)), |
| 88 | fderiv_clm_apply (hD.clm_apply (differentiableAt_const (c := v))) |
| 89 | (differentiableAt_const (c := w)), |
| 90 | fderiv_clm_apply hD (differentiableAt_const (c := v))] |
| 91 | simp [cylinderModelTwoJet, metricTwoJet] |
| 92 | rw [← heval] |
| 93 | simp_rw [cylinderModelMetricCoefficient_fderiv_apply] |
| 94 | let f : CE → ℝ := fun x => |
| 95 | 2 * (-64 / (‖cylinderSphereProjection x‖ ^ 2 + 4) ^ 3) |
| 96 | have hdenSmooth : ContDiff ℝ ∞ |
| 97 | (fun x : CE => (‖cylinderSphereProjection x‖ ^ 2 + 4) ^ 3) := |
| 98 | (((contDiff_norm_sq ℝ).comp cylinderSphereProjection.contDiff).add |
| 99 | contDiff_const).pow 3 |
| 100 | have hden := hdenSmooth.differentiable (by simp) (0 : CE) |
| 101 | have hden0 : (‖cylinderSphereProjection (0 : CE)‖ ^ 2 + 4) ^ 3 ≠ 0 := by |
| 102 | norm_num |
| 103 | have hiDen : DifferentiableAt ℝ |
| 104 | (fun x : CE => ((‖cylinderSphereProjection x‖ ^ 2 + 4) ^ 3)⁻¹) 0 := |
| 105 | hden.fun_inv hden0 |
| 106 | have hf : DifferentiableAt ℝ f 0 := by |
| 107 | have h := (hiDen.const_mul (-64)).const_mul 2 |
| 108 | simpa only [f, div_eq_mul_inv] using h |
| 109 | have hi := cylinderSphereProjection.hasFDerivAt.inner ℝ |
| 110 | (hasFDerivAt_const (cylinderSphereProjection v) (0 : CE)) |
| 111 | have hh := ((hf.hasFDerivAt.mul hi).mul_const |
| 112 | (inner ℝ (cylinderSphereProjection w) (cylinderSphereProjection z))).fderiv |
| 113 | have heq := congrArg (fun L : CE →L[ℝ] ℝ => L u) hh |
| 114 | norm_num [f] at heq |
| 115 | convert heq using 1 |
| 116 | ring |
| 117 | |
| 118 | private theorem cylinderModelMetricCoefficient_zero_coordinates (v w : CE) : |
| 119 | cylinderModelMetricCoefficient 0 v w = |
| 120 | 2 * (v 0 * w 0 + v 1 * w 1) + v 2 * w 2 := by |
| 121 | rw [cylinderModelMetricCoefficient_apply, |
| 122 | cylinderScalarCoordinateEquiv_apply v, cylinderScalarCoordinateEquiv_apply w] |
| 123 | norm_num [sphereChartConformalFactor, EuclideanSpace.inner_eq_star_dotProduct, |
| 124 | dotProduct, Fin.sum_univ_two, mul_comm] |
| 125 | |
| 126 | /-- The actual inverse metric coefficients at the fixed cylinder center |
| 127 | are the inverse diagonal entries; positivity excludes junk inverses. -/ |
| 128 | theorem cylinderModelTwoJet_inverse_coefficient (i j : Fin 3) : |
| 129 | EuclideanSpace.proj j (cylinderModelTwoJet.1.inverse (EuclideanSpace.proj i)) = |
| 130 | if i = j then (cylinderGramDiagonal 0 i)⁻¹ else 0 := by |
| 131 | have h := congrArg (fun L : CE →L[ℝ] ℝ => L (cb j)) |
| 132 | (cylinderModelMetricCoefficient_zero_isInvertible.self_apply_inverse |
| 133 | (EuclideanSpace.proj i)) |
| 134 | let v : CE := (cylinderModelMetricCoefficient 0).inverse (EuclideanSpace.proj i) |
| 135 | change cylinderModelMetricCoefficient 0 v (cb j) = (cb j) i at h |
| 136 | rw [cylinderModelMetricCoefficient_zero_coordinates] at h |
| 137 | change v j = _ |
| 138 | fin_cases i <;> fin_cases j <;> |
| 139 | norm_num [cb, EuclideanSpace.basisFun_apply, PiLp.single_apply, |
| 140 | cylinderGramDiagonal, Fin.ext_iff] at h ⊢ |
| 141 | · change v 0 = (1 / 2 : ℝ) |
| 142 | linarith only [h] |
| 143 | · change v 1 = 0 |
| 144 | linarith only [h] |
| 145 | · change v 2 = 0 |
| 146 | linarith only [h] |
| 147 | · change v 0 = 0 |
| 148 | linarith only [h] |
| 149 | · change v 1 = (1 / 2 : ℝ) |
| 150 | linarith only [h] |
| 151 | · change v 2 = 0 |
| 152 | linarith only [h] |
| 153 | · change v 0 = 0 |
| 154 | linarith only [h] |
| 155 | · change v 1 = 0 |
| 156 | linarith only [h] |
| 157 | · change v 2 = 1 |
| 158 | exact h |
| 159 | |
| 160 | private theorem cylinderModelTwoJet_christoffel (u v : CE) : |
| 161 | jetChristoffel cylinderModelTwoJet u v = 0 := by |
| 162 | simp [jetChristoffel, cylinderModelTwoJet_first_eq_zero, metricKoszulCovector] |
| 163 | |
| 164 | /-- The model two-jet has the literal round-sphere curvature in its |
| 165 | sphere directions and zero curvature in the axial direction. -/ |
| 166 | theorem cylinderModelTwoJet_curvature (u w v z : CE) : |
| 167 | jetCurvature cylinderModelTwoJet u w v z = |
| 168 | 2 * (inner ℝ (cylinderSphereProjection u) (cylinderSphereProjection v) * |
| 169 | inner ℝ (cylinderSphereProjection w) (cylinderSphereProjection z) - |
| 170 | inner ℝ (cylinderSphereProjection u) (cylinderSphereProjection z) * |
| 171 | inner ℝ (cylinderSphereProjection w) (cylinderSphereProjection v)) := by |
| 172 | simp only [jetCurvature, cylinderModelTwoJet_first_eq_zero, |
| 173 | cylinderModelTwoJet_christoffel, cylinderModelTwoJet_second_apply, |
| 174 | zero_apply, map_zero, neg_zero, add_zero, sub_zero] |
| 175 | ring |
| 176 | |
| 177 | /-- The fixed actual model Ricci form is the Euclidean inner product on |
| 178 | the sphere-plane projection, with no scalar-normalization premise. -/ |
| 179 | theorem cylinderModelTwoJet_ricci (u v : CE) : |
| 180 | jetRicci cylinderModelTwoJet u v = |
| 181 | inner ℝ (cylinderSphereProjection u) (cylinderSphereProjection v) := by |
| 182 | have hcb (i : Fin 3) : cylinderSphereProjection (cb i) = |
| 183 | (roundCylinderCoordinateBasis i).1 := by |
| 184 | change (cylinderScalarCoordinateEquiv (cb i)).1 = _ |
| 185 | rw [cylinderScalarCoordinateEquiv_basis] |
| 186 | simp only [jetRicci, cylinderModelTwoJet_inverse_coefficient, |
| 187 | cylinderModelTwoJet_curvature, hcb] |
| 188 | norm_num [Fin.sum_univ_three, cylinderGramDiagonal, roundCylinderCoordinateBasis, |
| 189 | Matrix.cons_val_two, Fin.isValue, |
| 190 | EuclideanSpace.inner_eq_star_dotProduct, dotProduct, Fin.sum_univ_two] |
| 191 | ring |
| 192 | |
| 193 | end PoincareMT.M28.tube |