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.ThreeDimensional.Noncompact.ScalarIdentity |
| 2 | import PoincareLib.Geometry.RicciFlow.Soliton.ThreeDimensional.Noncompact.Rigidity.PotentialLevels |
| 3 | import PoincareLib.Geometry.RicciFlow.Soliton.Flow.Generation |
| 4 | import PoincareLib.Geometry.Riemannian.Splitting.ParallelGradient.Flow |
| 5 | |
| 6 | /-! |
| 7 | # Scalar monotonicity along the complete potential flow |
| 8 | |
| 9 | Under the strict-positivity alternative, the scalar curvature is positive on |
| 10 | the compact core of a sufficiently high potential sublevel. The complete |
| 11 | gradient flow supplied by the bounded-Hessian construction carries every |
| 12 | point above that level down to the core. The scalar identity and |
| 13 | nonnegative Ricci curvature then propagate the core lower bound to the whole |
| 14 | manifold. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Bundle Topology |
| 22 | |
| 23 | noncomputable section |
| 24 | |
| 25 | namespace PoincareMT.GradientShrinkingSolitonData |
| 26 | |
| 27 | variable {M : Type*} [TopologicalSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 29 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 30 | [SecondCountableTopology M] [ConnectedSpace M] |
| 31 | |
| 32 | theorem scalar_positive_of_ricci_positive |
| 33 | (S : GradientShrinkingSolitonData 3 M) |
| 34 | (hRic : ∀ x : M, ∀ v : TangentSpace (𝓡 3) x, v ≠ 0 → |
| 35 | 0 < S.connection.ricci x v v) : |
| 36 | ∀ x : M, 0 < S.connection.scalarCurvature x := by |
| 37 | intro x |
| 38 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 39 | ⟨S.metric.toRiemannianMetric⟩ |
| 40 | let b := S.metric.orthonormalBasis x |
| 41 | have hdim : Module.finrank ℝ (TangentSpace (𝓡 3) x) = 3 := by |
| 42 | exact finrank_euclideanSpace_fin |
| 43 | have hb (i : Fin (Module.finrank ℝ (TangentSpace (𝓡 3) x))) : |
| 44 | b i ≠ 0 := by |
| 45 | intro hz |
| 46 | have hn := b.norm_eq_one i |
| 47 | change ‖b i‖ = 1 at hn |
| 48 | rw [hz, norm_zero] at hn |
| 49 | norm_num at hn |
| 50 | have hsum : 0 < ∑ i, S.connection.ricci x (b i) (b i) := by |
| 51 | apply Finset.sum_pos' |
| 52 | · intro i hi |
| 53 | exact (hRic x (b i) (hb i)).le |
| 54 | · exact ⟨⟨0, by rw [hdim]; norm_num⟩, Finset.mem_univ _, |
| 55 | hRic x (b ⟨0, by rw [hdim]; norm_num⟩) |
| 56 | (hb ⟨0, by rw [hdim]; norm_num⟩)⟩ |
| 57 | simpa only [LeviCivitaData.scalarCurvature, b] using hsum |
| 58 | |
| 59 | theorem hasDerivAt_scalar_along_gradient_flow |
| 60 | (S : GradientShrinkingSolitonData 3 M) |
| 61 | (hD : S.connection.CurvatureTensorCalculus) |
| 62 | {γ : ℝ → M} (hγ : IsMIntegralCurve γ |
| 63 | (S.connection.gradient S.potential)) (t : ℝ) : |
| 64 | HasDerivAt (fun s => S.connection.scalarCurvature (γ s)) |
| 65 | (2 * S.connection.ricci (γ t) |
| 66 | (S.connection.gradient S.potential (γ t)) |
| 67 | (S.connection.gradient S.potential (γ t))) t := by |
| 68 | have hF := (S.connection.contMDiff_scalarCurvature (γ t)).mdifferentiableAt |
| 69 | (by simp) |
| 70 | have hcomp := hF.hasMFDerivAt.comp t (hγ t) |
| 71 | have hder := (hasMFDerivAt_iff_hasFDerivAt.mp hcomp).hasDerivAt |
| 72 | change HasDerivAt (S.connection.scalarCurvature ∘ γ) |
| 73 | (mvfderiv (𝓡 3) S.connection.scalarCurvature (γ t) |
| 74 | ((1 : ℝ) • S.connection.gradient S.potential (γ t))) t at hder |
| 75 | rw [one_smul, S.mvfderiv_scalarCurvature_threeDimensional hD] at hder |
| 76 | simpa only [Function.comp_def] using hder |
| 77 | |
| 78 | theorem scalar_monotone_on_gradient_flow |
| 79 | (S : GradientShrinkingSolitonData 3 M) |
| 80 | (hD : S.connection.CurvatureTensorCalculus) |
| 81 | {γ : ℝ → M} (hγ : IsMIntegralCurve γ |
| 82 | (S.connection.gradient S.potential)) |
| 83 | (hRic : ∀ x : M, ∀ v : TangentSpace (𝓡 3) x, |
| 84 | 0 ≤ S.connection.ricci x v v) : |
| 85 | Monotone (fun t => S.connection.scalarCurvature (γ t)) := by |
| 86 | have hdiff : ∀ t, DifferentiableAt ℝ |
| 87 | (fun s => S.connection.scalarCurvature (γ s)) t := by |
| 88 | intro t |
| 89 | exact (S.hasDerivAt_scalar_along_gradient_flow hD hγ t).differentiableAt |
| 90 | apply monotone_of_deriv_nonneg hdiff |
| 91 | intro t |
| 92 | rw [(S.hasDerivAt_scalar_along_gradient_flow hD hγ t).deriv] |
| 93 | exact mul_nonneg (by norm_num) (hRic _ _) |
| 94 | |
| 95 | /-- Every complete gradient trajectory reaches a prescribed high sublevel |
| 96 | in backward time, because the potential grows at speed at least one above it. -/ |
| 97 | theorem exists_potential_sublevel_on_backward_gradient_curve |
| 98 | (S : GradientShrinkingSolitonData 3 M) {a : ℝ} |
| 99 | (ha : ∀ x : M, a ≤ S.potential x → 1 ≤ |
| 100 | S.metric.inner x (S.connection.gradient S.potential x) |
| 101 | (S.connection.gradient S.potential x)) |
| 102 | {γ : ℝ → M} (hγ : IsMIntegralCurve γ |
| 103 | (S.connection.gradient S.potential)) : |
| 104 | ∃ t : ℝ, t ≤ 0 ∧ S.potential (γ t) ≤ a := by |
| 105 | have hd (t : ℝ) : HasDerivAt (S.potential ∘ γ) |
| 106 | (S.metric.inner (γ t) (S.connection.gradient S.potential (γ t)) |
| 107 | (S.connection.gradient S.potential (γ t))) t := by |
| 108 | have h := RiemannianMetric.hasDerivAt_comp_integralCurve |
| 109 | S.potential_contMDiff hγ t |
| 110 | rw [S.connection.inner_gradient] |
| 111 | exact h |
| 112 | by_contra h |
| 113 | have habove (t : ℝ) (ht : t ≤ 0) : a < S.potential (γ t) := by |
| 114 | by_contra hn |
| 115 | exact h ⟨t, ht, le_of_not_gt hn⟩ |
| 116 | let t : ℝ := -(S.potential (γ 0) - a + 1) |
| 117 | have ht : t ≤ 0 := by dsimp [t]; linarith [habove 0 le_rfl] |
| 118 | have hdiff : Differentiable ℝ (S.potential ∘ γ) := fun s => (hd s).differentiableAt |
| 119 | have hbound := (convex_Iic (0 : ℝ)).mul_sub_le_image_sub_of_le_deriv |
| 120 | hdiff.continuous.continuousOn hdiff.differentiableOn |
| 121 | (C := (1 : ℝ)) (fun s hs => by |
| 122 | rw [(hd s).deriv] |
| 123 | exact ha (γ s) (habove s (show s ∈ Iic (0 : ℝ) from interior_subset hs)).le) |
| 124 | t ht 0 (by simp) ht |
| 125 | dsimp only [Function.comp_def] at hbound |
| 126 | dsimp [t] at hbound |
| 127 | linarith [habove t ht] |
| 128 | |
| 129 | /-- A positive scalar curvature has a uniform positive lower bound on a |
| 130 | bounded-curvature shrinker: compactness gives the bound on a core, and the |
| 131 | complete potential flow propagates it to every point. -/ |
| 132 | theorem exists_scalar_positive_global_lower_bound |
| 133 | (S : GradientShrinkingSolitonData 3 M) |
| 134 | (hD : S.connection.CurvatureTensorCalculus) |
| 135 | (hR : ∀ x : M, 0 < S.connection.scalarCurvature x) : |
| 136 | ∃ c : ℝ, 0 < c ∧ ∀ x : M, c ≤ S.connection.scalarCurvature x := by |
| 137 | obtain ⟨a, ha⟩ := S.exists_gradient_sq_gt_on_superlevel hD 1 |
| 138 | obtain ⟨p, hp⟩ := S.exists_potential_minimum |
| 139 | let b := max a (S.potential p) |
| 140 | have hcore : ({x : M | S.potential x ≤ b}).Nonempty := |
| 141 | ⟨p, show S.potential p ≤ max a (S.potential p) from le_max_right _ _⟩ |
| 142 | have hcont : Continuous S.connection.scalarCurvature := |
| 143 | (show ContMDiff (𝓡 3) 𝓘(ℝ, ℝ) ∞ S.connection.scalarCurvature from |
| 144 | S.connection.contMDiff_scalarCurvature).continuous |
| 145 | obtain ⟨q, hq, hmin⟩ := (S.isCompact_potential_sublevel b).exists_isMinOn |
| 146 | hcore hcont.continuousOn |
| 147 | refine ⟨S.connection.scalarCurvature q, hR q, ?_⟩ |
| 148 | obtain ⟨C, hC, hess⟩ := S.exists_hessian_quadratic_bound |
| 149 | obtain ⟨Φ, h0, hΦ, -, -⟩ := |
| 150 | S.connection.exists_complete_gradientFlow_of_bounded_hessian S.complete |
| 151 | S.potential_contMDiff hC hess |
| 152 | intro x |
| 153 | obtain ⟨t, ht, htx⟩ := S.exists_potential_sublevel_on_backward_gradient_curve |
| 154 | (a := b) (fun y hy => (ha y ((le_max_left _ _).trans hy)).le) (hΦ x) |
| 155 | have hmono := S.scalar_monotone_on_gradient_flow hD (hΦ x) |
| 156 | (fun y v => (S.connection.ricci_bounds_of_nonnegative_curvatureOperator |
| 157 | hD y (S.nonnegative_curvature y) v).1) |
| 158 | have hx : S.connection.scalarCurvature (Φ t x) ≤ |
| 159 | S.connection.scalarCurvature (Φ 0 x) := hmono ht |
| 160 | rw [h0 x] at hx |
| 161 | exact (hmin htx).trans hx |
| 162 | |
| 163 | end PoincareMT.GradientShrinkingSolitonData |