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.Soliton.TwoDimensional.Compact.Rigidity.Degenerate |
| 2 | |
| 3 | /-! |
| 4 | # Critical points of a shrinking surface are global extrema |
| 5 | |
| 6 | The conserved gradient energy and the strict tangent inequality for the |
| 7 | exponential determine the side of every critical value on which the potential |
| 8 | can lie. For nonnegative scalar curvature, every critical point is a global |
| 9 | minimum or a global maximum. This supports the rotational route to compact |
| 10 | rigidity in Chow--Knopf, Proposition 5.21, p. 118. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle |
| 18 | |
| 19 | namespace PoincareMT.LeviCivitaData |
| 20 | |
| 21 | variable {M : Type*} [TopologicalSpace M] [PreconnectedSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin 2)) M] [IsManifold (𝓡 2) ∞ M] |
| 23 | {g : RiemannianMetric 2 M} |
| 24 | |
| 25 | /-- The conserved gradient energy relative to any critical point. -/ |
| 26 | theorem gradient_normSq_eq_at_critical_point (D : LeviCivitaData g) |
| 27 | {f : M → ℝ} {lambda : ℝ} (hf : ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) 2 f) |
| 28 | (hsol : ∀ x, ∀ v w : TangentSpace (𝓡 2) x, |
| 29 | D.ricci x v w + D.hessian f x v w = lambda * g.inner x v w) |
| 30 | {p : M} (hp : D.gradient f p = 0) (x : M) : |
| 31 | g.inner x (D.gradient f x) (D.gradient f x) = |
| 32 | 2 * lambda * (f x - f p) - |
| 33 | D.scalarCurvature p * (Real.exp (f x - f p) - 1) := by |
| 34 | obtain ⟨C, hC⟩ := D.exists_hamilton_conservation_of_surface_soliton hf hsol |
| 35 | have he := (hC x).trans (hC p).symm |
| 36 | rw [hp] at he |
| 37 | simp only [map_zero, add_zero] at he |
| 38 | rw [D.scalar_eq_exp_potential_difference_of_surface_soliton hf hsol p x] at he |
| 39 | nlinarith |
| 40 | |
| 41 | /-- A critical point on the lower side of the scalar threshold is a global |
| 42 | minimum of the soliton potential. -/ |
| 43 | theorem isMinOn_of_critical_scalar_le (D : LeviCivitaData g) |
| 44 | {f : M → ℝ} {lambda : ℝ} (hlambda : 0 < lambda) |
| 45 | (hf : ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) 2 f) |
| 46 | (hsol : ∀ x, ∀ v w : TangentSpace (𝓡 2) x, |
| 47 | D.ricci x v w + D.hessian f x v w = lambda * g.inner x v w) |
| 48 | {p : M} (hp : D.gradient f p = 0) |
| 49 | (hR : 0 ≤ D.scalarCurvature p) (hbound : D.scalarCurvature p ≤ 2 * lambda) : |
| 50 | IsMinOn f univ p := by |
| 51 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 2) : M → Type _) := |
| 52 | ⟨g.toRiemannianMetric⟩ |
| 53 | intro x _ |
| 54 | have he := D.gradient_normSq_eq_at_critical_point hf hsol hp x |
| 55 | have hnorm : 0 ≤ g.inner x (D.gradient f x) (D.gradient f x) := by |
| 56 | change 0 ≤ inner ℝ (D.gradient f x) (D.gradient f x) |
| 57 | exact real_inner_self_nonneg |
| 58 | by_contra h |
| 59 | have hneg : f x - f p < 0 := sub_neg.mpr (lt_of_not_ge h) |
| 60 | rcases eq_or_lt_of_le hR with hz | hpos |
| 61 | · rw [← hz] at he |
| 62 | have hm := mul_neg_of_pos_of_neg (show 0 < 2 * lambda by positivity) hneg |
| 63 | nlinarith |
| 64 | · have hexp := mul_lt_mul_of_pos_left (Real.add_one_lt_exp hneg.ne) hpos |
| 65 | have hsign := mul_nonpos_of_nonneg_of_nonpos (sub_nonneg.mpr hbound) hneg.le |
| 66 | nlinarith |
| 67 | |
| 68 | /-- A critical point on the upper side of the scalar threshold is a global |
| 69 | maximum of the soliton potential. -/ |
| 70 | theorem isMaxOn_of_critical_scalar_ge (D : LeviCivitaData g) |
| 71 | {f : M → ℝ} {lambda : ℝ} (hlambda : 0 < lambda) |
| 72 | (hf : ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) 2 f) |
| 73 | (hsol : ∀ x, ∀ v w : TangentSpace (𝓡 2) x, |
| 74 | D.ricci x v w + D.hessian f x v w = lambda * g.inner x v w) |
| 75 | {p : M} (hp : D.gradient f p = 0) (hbound : 2 * lambda ≤ D.scalarCurvature p) : |
| 76 | IsMaxOn f univ p := by |
| 77 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 2) : M → Type _) := |
| 78 | ⟨g.toRiemannianMetric⟩ |
| 79 | intro x _ |
| 80 | have he := D.gradient_normSq_eq_at_critical_point hf hsol hp x |
| 81 | have hnorm : 0 ≤ g.inner x (D.gradient f x) (D.gradient f x) := by |
| 82 | change 0 ≤ inner ℝ (D.gradient f x) (D.gradient f x) |
| 83 | exact real_inner_self_nonneg |
| 84 | by_contra h |
| 85 | have hpos : 0 < f x - f p := sub_pos.mpr (lt_of_not_ge h) |
| 86 | have hR : 0 < D.scalarCurvature p := (by positivity : 0 < 2 * lambda).trans_le hbound |
| 87 | have hexp := mul_lt_mul_of_pos_left (Real.add_one_lt_exp hpos.ne') hR |
| 88 | have hsign := mul_nonpos_of_nonpos_of_nonneg (sub_nonpos.mpr hbound) hpos.le |
| 89 | nlinarith |
| 90 | |
| 91 | /-- Every critical point on a nonnegatively curved shrinking surface is a |
| 92 | global extremum. -/ |
| 93 | theorem isMinOn_or_isMaxOn_of_critical_point (D : LeviCivitaData g) |
| 94 | {f : M → ℝ} {lambda : ℝ} (hlambda : 0 < lambda) |
| 95 | (hf : ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) 2 f) |
| 96 | (hsol : ∀ x, ∀ v w : TangentSpace (𝓡 2) x, |
| 97 | D.ricci x v w + D.hessian f x v w = lambda * g.inner x v w) |
| 98 | {p : M} (hp : D.gradient f p = 0) (hR : 0 ≤ D.scalarCurvature p) : |
| 99 | IsMinOn f univ p ∨ IsMaxOn f univ p := by |
| 100 | rcases le_total (D.scalarCurvature p) (2 * lambda) with h | h |
| 101 | · exact Or.inl (D.isMinOn_of_critical_scalar_le hlambda hf hsol hp hR h) |
| 102 | · exact Or.inr (D.isMaxOn_of_critical_scalar_ge hlambda hf hsol hp h) |
| 103 | |
| 104 | end PoincareMT.LeviCivitaData |