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.GlobalExtrema |
| 2 | import PoincareLib.Geometry.RicciFlow.Soliton.TwoDimensional.Compact.Rigidity.PoleInequality |
| 3 | |
| 4 | /-! |
| 5 | # Regular intermediate levels of a compact shrinking surface |
| 6 | |
| 7 | For a nonround shrinking surface, potential extrema have strict Hessian signs, |
| 8 | and every intermediate potential level is regular. These are consequences of |
| 9 | the original soliton equation and its first integrals, supporting the compact |
| 10 | rigidity argument of 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 | theorem scalar_lt_twice_scale_at_min_of_not_round (D : LeviCivitaData g) |
| 26 | {f : M → ℝ} {lambda : ℝ} (hlambda : 0 < lambda) |
| 27 | (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 | (hnot : ¬ ConstantPositiveSectionalCurvature g D) |
| 31 | {p : M} (hp : IsLocalMin f p) : D.scalarCurvature p < 2 * lambda := by |
| 32 | have hfs := D.contMDiff_of_C2_surface_soliton hf hsol |
| 33 | apply lt_of_le_of_ne (D.scalar_le_twice_scale_of_potential_min hfs hsol hp) |
| 34 | intro heq |
| 35 | exact hnot (D.round_of_degenerate_critical_point hlambda hf hsol |
| 36 | (D.gradient_eq_zero_of_potential_min hfs hp) heq) |
| 37 | |
| 38 | theorem twice_scale_lt_scalar_at_max_of_not_round (D : LeviCivitaData g) |
| 39 | {f : M → ℝ} {lambda : ℝ} (hlambda : 0 < lambda) |
| 40 | (hf : ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) 2 f) |
| 41 | (hsol : ∀ x, ∀ v w : TangentSpace (𝓡 2) x, |
| 42 | D.ricci x v w + D.hessian f x v w = lambda * g.inner x v w) |
| 43 | (hnot : ¬ ConstantPositiveSectionalCurvature g D) |
| 44 | {p : M} (hp : IsLocalMax f p) : 2 * lambda < D.scalarCurvature p := by |
| 45 | have hfs := D.contMDiff_of_C2_surface_soliton hf hsol |
| 46 | apply lt_of_le_of_ne (D.twice_scale_le_scalar_of_potential_max hfs hsol hp) |
| 47 | intro heq |
| 48 | exact hnot (D.round_of_degenerate_critical_point hlambda hf hsol |
| 49 | (D.gradient_eq_zero_of_potential_max hfs hp) heq.symm) |
| 50 | |
| 51 | /-- A point whose potential lies strictly between two attained values cannot |
| 52 | be critical on a nonnegatively curved shrinking surface. -/ |
| 53 | theorem gradient_ne_zero_at_intermediate_value (D : LeviCivitaData g) |
| 54 | {f : M → ℝ} {lambda : ℝ} (hlambda : 0 < lambda) |
| 55 | (hf : ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) 2 f) |
| 56 | (hsol : ∀ x, ∀ v w : TangentSpace (𝓡 2) x, |
| 57 | D.ricci x v w + D.hessian f x v w = lambda * g.inner x v w) |
| 58 | {p q x : M} (hpx : f p < f x) (hxq : f x < f q) |
| 59 | (hR : 0 ≤ D.scalarCurvature x) : D.gradient f x ≠ 0 := by |
| 60 | intro hx |
| 61 | rcases D.isMinOn_or_isMaxOn_of_critical_point hlambda hf hsol hx hR with hmin | hmax |
| 62 | · exact (not_lt_of_ge (hmin (mem_univ p))) hpx |
| 63 | · exact (not_lt_of_ge (hmax (mem_univ q))) hxq |
| 64 | |
| 65 | /-- Compactness supplies extrema bracketing every potential value, with the |
| 66 | strict scalar-curvature signs required by the two-pole argument. -/ |
| 67 | theorem exists_strict_extrema_of_compact_not_round [CompactSpace M] [Nonempty M] |
| 68 | (D : LeviCivitaData g) {f : M → ℝ} {lambda : ℝ} (hlambda : 0 < lambda) |
| 69 | (hf : ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) 2 f) |
| 70 | (hsol : ∀ x, ∀ v w : TangentSpace (𝓡 2) x, |
| 71 | D.ricci x v w + D.hessian f x v w = lambda * g.inner x v w) |
| 72 | (hnot : ¬ ConstantPositiveSectionalCurvature g D) : |
| 73 | ∃ p q : M, (∀ x, f p ≤ f x ∧ f x ≤ f q) ∧ |
| 74 | D.gradient f p = 0 ∧ D.gradient f q = 0 ∧ f p < f q ∧ |
| 75 | D.scalarCurvature p < 2 * lambda ∧ 2 * lambda < D.scalarCurvature q ∧ |
| 76 | 4 * lambda < D.scalarCurvature p + D.scalarCurvature q := by |
| 77 | have hfs := D.contMDiff_of_C2_surface_soliton hf hsol |
| 78 | obtain ⟨z⟩ := ‹Nonempty M› |
| 79 | obtain ⟨p, _, hp⟩ := isCompact_univ.exists_isMinOn ⟨z, mem_univ z⟩ hf.continuous.continuousOn |
| 80 | obtain ⟨q, _, hq⟩ := isCompact_univ.exists_isMaxOn ⟨z, mem_univ z⟩ hf.continuous.continuousOn |
| 81 | have hp' := hp.isLocalMin Filter.univ_mem |
| 82 | have hq' := hq.isLocalMax Filter.univ_mem |
| 83 | have hgp := D.gradient_eq_zero_of_potential_min hfs hp' |
| 84 | have hgq := D.gradient_eq_zero_of_potential_max hfs hq' |
| 85 | have hRp := D.scalar_lt_twice_scale_at_min_of_not_round hlambda hf hsol hnot hp' |
| 86 | have hRq := D.twice_scale_lt_scalar_at_max_of_not_round hlambda hf hsol hnot hq' |
| 87 | have hpq : f p < f q := by |
| 88 | apply lt_of_le_of_ne (hp (mem_univ q)) |
| 89 | intro heq |
| 90 | have hR := D.scalar_eq_exp_potential_difference_of_surface_soliton hf hsol p q |
| 91 | rw [heq, sub_self, Real.exp_zero, mul_one] at hR |
| 92 | linarith |
| 93 | exact ⟨p, q, fun x => ⟨hp (mem_univ x), hq (mem_univ x)⟩, |
| 94 | hgp, hgq, hpq, hRp, hRq, |
| 95 | D.four_scale_lt_scalar_sum_at_critical_points hlambda hf hsol hgp hgq hpq⟩ |
| 96 | |
| 97 | end PoincareMT.LeviCivitaData |