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.Predecessors.Necks.Geometry.AmbientRicci |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Predecessors.Necks.Geometry.ModelRicci |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Predecessors.Necks.Geometry.RealizedRicciQuadratic |
| 5 | |
| 6 | /-! |
| 7 | # Uniform ambient Ricci component control throughout a neck |
| 8 | |
| 9 | The realized curvature modulus and the exact model and ambient Ricci |
| 10 | identities give one epsilon threshold for every retained coordinate point. |
| 11 | The reference matrix is diag(1,1,0) in the matched coordinate basis, whose |
| 12 | model metric is diag(2,2,1). This proves the pointwise tensor comparison |
| 13 | from Morgan--Tian Lemma A.2, pp. 497-498, used for Proposition A.11, |
| 14 | pp. 503-504. See the ambient-ricci-naturality derivation. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.EpsilonNeck |
| 25 | |
| 26 | /-- Lemma A.2, pp. 497-498: one universal epsilon threshold controls every |
| 27 | ambient Ricci component on the images of the matched coordinate basis, |
| 28 | at every point of the actual neck strip. -/ |
| 29 | theorem exists_normalized_ricci_basis_control {α : ℝ} (hα : 0 < α) : |
| 30 | ∃ epsilon0 : ℝ, 0 < epsilon0 ∧ epsilon0 ≤ 1 / 200 ∧ |
| 31 | ∀ {M : Type u} [TopologicalSpace M] |
| 32 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 33 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 34 | {g : RiemannianMetric 3 M}, ∀ (N : EpsilonNeck g), N.epsilon ≤ epsilon0 → |
| 35 | ∀ (q : UnitTwoSphere) {s : ℝ}, s ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹ → |
| 36 | ∀ i j : Fin 3, |
| 37 | |N.connection.ricci (N.coordinate_map (q, s)) |
| 38 | (mfderiv (𝓡 3) (𝓡 3) (N.euclideanParametrization q s) 0 (m25_roundCylinderEuclideanBasis i)) |
| 39 | (mfderiv (𝓡 3) (𝓡 3) (N.euclideanParametrization q s) 0 |
| 40 | (m25_roundCylinderEuclideanBasis j)) - |
| 41 | (if i = j ∧ i ≠ 2 then 1 else 0)| < α := by |
| 42 | obtain ⟨epsilon0, hpos, hcap, hcontrol⟩ := exists_realized_scalar_ricci_control.{u} hα |
| 43 | refine ⟨epsilon0, hpos, hcap, ?_⟩ |
| 44 | intro M _ _ _ _ _ _ g N hepsilon q s hs i j |
| 45 | obtain ⟨h, D, V, hV, h0, hstrip, heq⟩ := |
| 46 | N.m25_exists_normalizedEuclideanCoefficients_realization q hs |
| 47 | have hnear : h.euclideanCoefficients =ᶠ[𝓝 0] N.m25_normalizedEuclideanCoefficients q s := |
| 48 | Filter.mem_of_superset (hV.mem_nhds h0) heq |
| 49 | have hricci := (hcontrol N hepsilon q hs h D hnear).2 i j |
| 50 | rw [N.realization_ricci_eq q s h D hV h0 hstrip heq, |
| 51 | roundCylinderEuclideanModelConnection_ricci_zero_basis] at hricci |
| 52 | exact hricci |
| 53 | |
| 54 | /-- The quadratic form version of Lemma A.2, pp. 497-498: the ambient |
| 55 | Ricci value of a transported parameter vector differs from its squared |
| 56 | horizontal component by at most alpha times its squared Euclidean norm. -/ |
| 57 | theorem exists_normalized_ricci_quadratic_control {α : ℝ} (hα : 0 < α) : |
| 58 | ∃ epsilon0 : ℝ, 0 < epsilon0 ∧ epsilon0 ≤ 1 / 200 ∧ |
| 59 | ∀ {M : Type u} [TopologicalSpace M] |
| 60 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 61 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 62 | {g : RiemannianMetric 3 M}, ∀ (N : EpsilonNeck g), N.epsilon ≤ epsilon0 → |
| 63 | ∀ (q : UnitTwoSphere) {s : ℝ}, s ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹ → |
| 64 | ∀ v : EuclideanSpace ℝ (Fin 3), |
| 65 | |N.connection.ricci (N.coordinate_map (q, s)) |
| 66 | (mfderiv (𝓡 3) (𝓡 3) (N.euclideanParametrization q s) 0 v) |
| 67 | (mfderiv (𝓡 3) (𝓡 3) (N.euclideanParametrization q s) 0 v) - |
| 68 | ‖((RiemannianMetric.lineModelEquiv 2).symm v).1‖ ^ 2| ≤ α * ‖v‖ ^ 2 := by |
| 69 | obtain ⟨epsilon0, hpos, hcap, hcontrol⟩ := exists_realized_ricci_quadratic_control.{u} hα |
| 70 | refine ⟨epsilon0, hpos, hcap, ?_⟩ |
| 71 | intro M _ _ _ _ _ _ g N hepsilon q s hs v |
| 72 | obtain ⟨h, D, V, hV, h0, hstrip, heq⟩ := |
| 73 | N.m25_exists_normalizedEuclideanCoefficients_realization q hs |
| 74 | have hnear : h.euclideanCoefficients =ᶠ[𝓝 0] N.m25_normalizedEuclideanCoefficients q s := |
| 75 | Filter.mem_of_superset (hV.mem_nhds h0) heq |
| 76 | have hricci := hcontrol N hepsilon q hs h D hnear v |
| 77 | rw [N.realization_ricci_eq q s h D hV h0 hstrip heq, |
| 78 | roundCylinderEuclideanModelConnection_ricci_zero_self] at hricci |
| 79 | exact hricci |
| 80 | |
| 81 | end PoincareMT.EpsilonNeck |