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.Persistence.SourceNames.Normalization |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Limit.Coordinates.NormalizedCoefficients |
| 3 | import PoincareLib.Geometry.Riemannian.Normalization.Scaling.Distance |
| 4 | import PoincareLib.Geometry.Riemannian.Coordinates.Geodesic |
| 5 | import Mathlib.Analysis.Calculus.MeanValue |
| 6 | |
| 7 | /-! |
| 8 | # Initial metric positivity and compact phase bounds |
| 9 | |
| 10 | The actual normalized pullback is positive on its supplied chart. The |
| 11 | zeroth intrinsic comparison gives a uniform quadratic lower bound on |
| 12 | fixed compact sets. The fixed model geodesic field is Lipschitz on |
| 13 | compact convex phase regions. Morgan--Tian, Claim 16.6, pp. 371-372; |
| 14 | see `derivations/16-geodesic-field-convergence.md`. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set |
| 21 | open scoped Manifold ContDiff Topology NNReal |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.SurgeryCapClose |
| 26 | |
| 27 | local notation "E" => StandardCapSpace |
| 28 | |
| 29 | variable {g₀ : StandardInitialMetric} {S : GeneralizedSliceCarrier.{u}} |
| 30 | {g : RiemannianMetric 3 S.carrier} {tip : S.carrier} {scale eta : ℝ} |
| 31 | |
| 32 | /-- Symmetry of the actual metric is preserved by the normalized |
| 33 | pullback in Claim 16.6. -/ |
| 34 | theorem normalizedCoefficients_symm (Q : SurgeryCapClose g₀ S g tip scale eta) |
| 35 | (x v w : E) : Q.normalizedCoefficients x v w = Q.normalizedCoefficients x w v := by |
| 36 | simp only [normalizedCoefficients_apply, g.symm] |
| 37 | |
| 38 | /-- The actual comparison differential is injective, so its normalized |
| 39 | pullback is positive throughout the comparison domain. -/ |
| 40 | theorem normalizedCoefficients_pos (Q : SurgeryCapClose g₀ S g tip scale eta) |
| 41 | {x : E} (hx : x ∈ g₀.metric.ball 0 eta⁻¹) {v : E} (hv : v ≠ 0) : |
| 42 | 0 < Q.normalizedCoefficients x v v := by |
| 43 | have hD := Poincare.mfderiv_bijective_of_smooth_leftInvOn |
| 44 | Q.toPartialDiffeomorph.open_source Q.map_smooth Q.inverse_smooth Q.left_inverse hx |
| 45 | have hDv : mfderiv (𝓡 3) (𝓡 3) Q.map x v ≠ 0 := by |
| 46 | intro hzero |
| 47 | exact hv (hD.1 (by simpa only [map_zero] using hzero)) |
| 48 | rw [Q.normalizedCoefficients_apply] |
| 49 | exact mul_pos (sq_pos_of_pos (inv_pos.mpr Q.scale_pos)) (g.pos _ _ hDv) |
| 50 | |
| 51 | /-- The same actual normalized coefficients are invertible on the full |
| 52 | comparison domain, including comparisons whose tolerance exceeds one. -/ |
| 53 | theorem normalizedCoefficients_isInvertible (Q : SurgeryCapClose g₀ S g tip scale eta) |
| 54 | {x : E} (hx : x ∈ g₀.metric.ball 0 eta⁻¹) : |
| 55 | (Q.normalizedCoefficients x).IsInvertible := by |
| 56 | let h := m01RescaledMetric g (scale⁻¹ ^ 2) (sq_pos_of_pos (inv_pos.mpr Q.scale_pos)) |
| 57 | have hD := Poincare.mfderiv_bijective_of_smooth_leftInvOn |
| 58 | Q.toPartialDiffeomorph.open_source Q.map_smooth Q.inverse_smooth Q.left_inverse hx |
| 59 | have heq : Q.normalizedCoefficients x = h.pullbackCoefficients Q.map x := by |
| 60 | ext v w |
| 61 | rfl |
| 62 | rw [heq] |
| 63 | exact h.isInvertible_pullbackCoefficients hD.1 |
| 64 | |
| 65 | /-- A fixed compact region has a common ellipticity constant for all |
| 66 | actual comparisons with tolerance at most one half; Claim 16.6. -/ |
| 67 | theorem exists_normalized_uniform_lower_bound |
| 68 | (g₀ : StandardInitialMetric) {K : Set E} (hK : IsCompact K) : |
| 69 | ∃ c : ℝ, 0 < c ∧ ∀ (S : GeneralizedSliceCarrier.{u}) |
| 70 | (g : RiemannianMetric 3 S.carrier) (tip : S.carrier) (scale eta : ℝ) |
| 71 | (Q : SurgeryCapClose g₀ S g tip scale eta), |
| 72 | eta ≤ 1 / 2 → K ⊆ g₀.metric.ball 0 eta⁻¹ → ∀ x ∈ K, ∀ v : E, |
| 73 | c * ‖v‖ ^ 2 ≤ Q.normalizedCoefficients x v v := by |
| 74 | have hg : Continuous g₀.metric.euclideanCoefficients := |
| 75 | (contDiff_iff_contDiffAt.mpr g₀.metric.contDiffAt_euclideanCoefficients).continuous |
| 76 | obtain ⟨c, hc, hbound⟩ := exists_uniform_bilinear_lower_bound hK hg.continuousOn |
| 77 | (fun x _ v hv => g₀.metric.pos x v hv) |
| 78 | refine ⟨c / 2, half_pos hc, ?_⟩ |
| 79 | intro S g tip scale eta Q heta hKU x hx v |
| 80 | have hgpos : 0 ≤ g₀.metric.inner x v v := |
| 81 | (mul_nonneg hc.le (sq_nonneg ‖v‖)).trans (hbound x hx v) |
| 82 | calc |
| 83 | c / 2 * ‖v‖ ^ 2 = (1 / 2) * (c * ‖v‖ ^ 2) := by ring |
| 84 | _ ≤ (1 / 2) * g₀.metric.inner x v v := |
| 85 | mul_le_mul_of_nonneg_left (hbound x hx v) (by norm_num) |
| 86 | _ ≤ (1 - eta) * g₀.metric.inner x v v := |
| 87 | mul_le_mul_of_nonneg_right (by linarith) hgpos |
| 88 | _ ≤ Q.normalizedCoefficients x v v := (Q.quadratic_bounds (hKU hx) v).1 |
| 89 | |
| 90 | end PoincareMT.SurgeryCapClose |
| 91 | |
| 92 | namespace PoincareMT.M44 |
| 93 | |
| 94 | /-- The fixed model geodesic field has one Lipschitz constant on each |
| 95 | compact convex phase region used in the stability argument of Claim 16.6. -/ |
| 96 | theorem exists_standard_geodesicField_lipschitz |
| 97 | (g₀ : StandardInitialMetric) {K : Set (StandardCapSpace × StandardCapSpace)} |
| 98 | (hK : IsCompact K) (hconv : Convex ℝ K) : |
| 99 | ∃ L : ℝ≥0, LipschitzOnWith L (coordinateGeodesicField g₀.metric.euclideanCoefficients) K := by |
| 100 | let V := coordinateGeodesicField g₀.metric.euclideanCoefficients |
| 101 | have hV : ContDiff ℝ ∞ V := contDiff_iff_contDiffAt.mpr fun z => |
| 102 | contDiffAt_coordinateGeodesicField (g₀.metric.contDiffAt_euclideanCoefficients z.1) |
| 103 | (g₀.metric.inner_isInvertible z.1) |
| 104 | obtain ⟨C, hC⟩ := hK.exists_bound_of_continuousOn |
| 105 | (hV.fderiv_right (m := ∞) (by simp)).continuous.continuousOn |
| 106 | refine ⟨⟨max C 0, le_max_right _ _⟩, ?_⟩ |
| 107 | apply Convex.lipschitzOnWith_of_nnnorm_fderiv_le |
| 108 | (fun z _ => hV.differentiable (by simp) z) ?_ hconv |
| 109 | intro z hz |
| 110 | exact (hC z hz).trans (le_max_left _ _) |
| 111 | |
| 112 | end PoincareMT.M44 |