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.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.TipRicciIsotropy |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.Neck.Jets.NeckMetricJets |
| 4 | import PoincareLib.Geometry.RicciFlow.Limit.RicciConvergence |
| 5 | |
| 6 | /-! |
| 7 | # An actual neck chart through the tip retains its Ricci isotropy |
| 8 | |
| 9 | Morgan-Tian Theorem 12.32, pp. 326-327. Centering a Euclidean realization |
| 10 | at any interior point of the actual neck preserves its literal coefficient |
| 11 | germ. If that point is the original tip, metric and Ricci naturality retain |
| 12 | the actual rotational isotropy identity in the same coordinates. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Bundle Topology |
| 20 | |
| 21 | namespace PoincareMT.M35 |
| 22 | |
| 23 | noncomputable section |
| 24 | |
| 25 | open Uniqueness |
| 26 | |
| 27 | local notation "V" => EuclideanSpace ℝ (Fin 3) |
| 28 | local notation "B" => V →L[ℝ] V →L[ℝ] ℝ |
| 29 | |
| 30 | local instance tipNeckDualNormedGroup : NormedAddCommGroup (V →L[ℝ] ℝ) := inferInstance |
| 31 | local instance tipNeckDualNormedSpace : NormedSpace ℝ (V →L[ℝ] ℝ) := inferInstance |
| 32 | local instance tipNeckMetricNormedGroup : NormedAddCommGroup B := inferInstance |
| 33 | local instance tipNeckMetricNormedSpace : NormedSpace ℝ B := inferInstance |
| 34 | |
| 35 | /-- Theorem 12.32, pp. 326-327: a hypothetical tip point in the actual |
| 36 | neck has a centered metric realization with the actual tip Ricci identity. -/ |
| 37 | theorem exists_tip_neck_metric_realization |
| 38 | (g : RiemannianMetric 3 StandardCapSpace) (D : LeviCivitaData g) |
| 39 | (hrotation : ∀ A : Matrix.specialOrthogonalGroup (Fin 3) ℝ, |
| 40 | ∀ x u v : StandardCapSpace, |
| 41 | g.inner (standardRotation A x) |
| 42 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x u) |
| 43 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x v) = g.inner x u v) |
| 44 | {length : ℝ} {center : StandardCapSpace} (N : StandardCylinderPatch length center) |
| 45 | (q : UnitTwoSphere) (s : ℝ) (hs : s ∈ Ioo (-length) length) |
| 46 | (htip : N.coordinate (q, s) = 0) : |
| 47 | ∃ (g' : RiemannianMetric 3 V) (D' : LeviCivitaData g'), |
| 48 | (∀ i j : Fin 3, |
| 49 | (fun z : V => g'.inner z (EuclideanSpace.basisFun (Fin 3) ℝ i) |
| 50 | (EuclideanSpace.basisFun (Fin 3) ℝ j)) =ᶠ[𝓝 0] |
| 51 | (fun z => roundCylinderTensorCoefficient (roundCylinderPullback g N.coordinate) |
| 52 | (chartAt (EuclideanSpace ℝ (Fin 2)) q) |
| 53 | (cylinderCoordinateEquiv z + (0, s)) i j)) ∧ |
| 54 | (∀ u v : V, D'.ricci 0 u u * g'.inner 0 v v = |
| 55 | D'.ricci 0 v v * g'.inner 0 u u) := by |
| 56 | let p := cylinderCoordinateEquiv.symm ((0, s) : RoundCylinderCoordinates) |
| 57 | let shift : V → V := fun z => z + p |
| 58 | let f := (N.coordinate ∘ cylinderChart q) ∘ shift |
| 59 | let U : Set V := {z | (cylinderCoordinateEquiv (z + p)).2 ∈ Ioo (-length) length} |
| 60 | have hU : IsOpen U := isOpen_Ioo.preimage |
| 61 | (continuous_snd.comp (cylinderCoordinateEquiv.continuous.comp |
| 62 | (continuous_id.add continuous_const))) |
| 63 | have hzero : (0 : V) ∈ U := by |
| 64 | simpa only [U, mem_ofPred_eq, zero_add, p, |
| 65 | ContinuousLinearEquiv.apply_symm_apply] using hs |
| 66 | have hdshift (z : V) : mfderiv (𝓡 3) (𝓡 3) shift z = ContinuousLinearMap.id ℝ V := by |
| 67 | rw [mfderiv_eq_fderiv] |
| 68 | exact ((hasFDerivAt_id z).add_const p).fderiv |
| 69 | have hshift : ContMDiff (𝓡 3) (𝓡 3) ∞ shift := |
| 70 | (contDiff_id.add contDiff_const).contMDiff |
| 71 | have hf (z : V) (hz : z ∈ U) : ContMDiffAt (𝓡 3) (𝓡 3) ∞ f z := |
| 72 | (N.euclideanChart_contMDiffAt q hz).comp z (hshift z) |
| 73 | have hdf (z : V) (hz : z ∈ U) : mfderiv (𝓡 3) (𝓡 3) f z = |
| 74 | mfderiv (𝓡 3) (𝓡 3) (N.coordinate ∘ cylinderChart q) (z + p) := by |
| 75 | rw [mfderiv_comp z ((N.euclideanChart_contMDiffAt q hz).mdifferentiableAt (by simp)) |
| 76 | (hshift.mdifferentiable (by simp) z)] |
| 77 | change (mfderiv (𝓡 3) (𝓡 3) (N.coordinate ∘ cylinderChart q) (z + p)).comp |
| 78 | (mfderiv (𝓡 3) (𝓡 3) shift z) = _ |
| 79 | rw [hdshift] |
| 80 | rfl |
| 81 | have hi (z : V) (hz : z ∈ U) : (mfderiv (𝓡 3) (𝓡 3) f z).IsInvertible := by |
| 82 | rw [hdf z hz] |
| 83 | exact N.euclideanChart_mfderiv_invertible q hz |
| 84 | obtain ⟨g', D', W, hW, hzeroW, _hWU, hcoeff⟩ := |
| 85 | RiemannianMetric.exists_local_realization hU hzero (g.pullbackCoefficients f) |
| 86 | (fun z hz => (g.contDiffAt_pullbackCoefficients (hf z hz)).contDiffWithinAt) |
| 87 | (fun z _ u v => g.symm (f z) _ _) |
| 88 | (fun z hz v hv => by |
| 89 | apply g.pos (f z) |
| 90 | intro h |
| 91 | apply hv |
| 92 | exact (hi z hz).injective (h.trans (map_zero _).symm)) |
| 93 | have hg : g'.euclideanCoefficients =ᶠ[𝓝 (0 : V)] g.pullbackCoefficients f := |
| 94 | Filter.mem_of_superset (hW.mem_nhds hzeroW) hcoeff |
| 95 | have hm : ∀ᶠ z in 𝓝 (0 : V), ∀ u v : V, g'.inner z u v = |
| 96 | g.inner (f z) (mfderiv (𝓡 3) (𝓡 3) f z u) (mfderiv (𝓡 3) (𝓡 3) f z v) := by |
| 97 | filter_upwards [hg] with z hz u v |
| 98 | exact congrArg (fun A : B => A u v) hz |
| 99 | have hfzero : f 0 = 0 := by |
| 100 | have hc : cylinderChart q p = (q, s) := by |
| 101 | change ((chartAt (EuclideanSpace ℝ (Fin 2)) q).symm (cylinderCoordinateEquiv p).1, |
| 102 | (cylinderCoordinateEquiv p).2) = _ |
| 103 | dsimp only [p] |
| 104 | rw [ContinuousLinearEquiv.apply_symm_apply] |
| 105 | apply Prod.ext |
| 106 | · have hh := (chartAt (EuclideanSpace ℝ (Fin 2)) q).left_inv |
| 107 | (mem_chart_source (EuclideanSpace ℝ (Fin 2)) q) |
| 108 | simpa only [sphere_chart_center] using hh |
| 109 | · rfl |
| 110 | simpa only [f, shift, Function.comp_apply, zero_add, hc] using htip |
| 111 | refine ⟨g', D', ?_, ?_⟩ |
| 112 | · intro i j |
| 113 | filter_upwards [hm, hU.mem_nhds hzero] with z hz hzU |
| 114 | have h := hz (EuclideanSpace.basisFun (Fin 3) ℝ i) |
| 115 | (EuclideanSpace.basisFun (Fin 3) ℝ j) |
| 116 | rw [hdf z hzU] at h |
| 117 | have hchart := N.euclideanChart_coefficient g q hzU i j |
| 118 | have heq := h.trans hchart |
| 119 | simpa only [map_add, p, ContinuousLinearEquiv.apply_symm_apply] using heq |
| 120 | · let A := mfderiv (𝓡 3) (𝓡 3) f 0 |
| 121 | let R (z u v : V) := D.ricci z u v |
| 122 | let H (z u v : V) := g.inner z u v |
| 123 | have hmetric (u v : V) : g'.inner 0 u v = g.inner 0 (A u) (A v) := by |
| 124 | have h := hm.self_of_nhds u v |
| 125 | change g'.inner 0 u v = H (f 0) (A u) (A v) at h |
| 126 | rwa [hfzero] at h |
| 127 | have hricci (u v : V) : D'.ricci 0 u v = D.ricci 0 (A u) (A v) := by |
| 128 | have h := D'.ricci_eq_pullback_euclidean D (hf 0 hzero) |
| 129 | (Filter.mem_of_superset (hU.mem_nhds hzero) hi) hm u v |
| 130 | change D'.ricci 0 u v = R (f 0) (A u) (A v) at h |
| 131 | rwa [hfzero] at h |
| 132 | intro u v |
| 133 | rw [hricci, hricci, hmetric, hmetric] |
| 134 | exact rotational_tip_ricci_diagonal D hrotation (A u) (A v) |
| 135 | |
| 136 | end |
| 137 | |
| 138 | end PoincareMT.M35 |