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.CanonicalInduction.Positive.PositiveGradientMetric |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Positive.PositiveGradientMyers |
| 3 | |
| 4 | /-! |
| 5 | # Large scalar maxima control the entire positive component |
| 6 | |
| 7 | The scalar gradient estimate gives a positive-curvature ball centered at |
| 8 | an attained scalar maximum. The local Myers inequality prevents this ball |
| 9 | from ending before the whole connected component is covered. This is the |
| 10 | spatial step of Morgan--Tian, Theorem 4.23, pp. 74-75. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | -- Metric and tangent-fiber norm presentations agree definitionally. |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M47Positive |
| 23 | |
| 24 | variable {M : Type u} [TopologicalSpace M] [T3Space M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 26 | [PreconnectedSpace M] {g : RiemannianMetric 3 M} |
| 27 | |
| 28 | /-- A scalar value with sufficiently small global gradient variation |
| 29 | controls the whole complete component by local Myers. The Ricci lower |
| 30 | bound is applied only along the actual minimizing segment inside the |
| 31 | positive scalar ball, as in Morgan--Tian, Theorem 4.23, pp. 74-75. -/ |
| 32 | theorem half_scalar_lower_of_small_gradient (D : LeviCivitaData g) |
| 33 | (hD : D.CurvatureTensorCalculus) (hc : MetricComplete g) (p : M) |
| 34 | {delta Q : ℝ} (hdelta : 0 < delta) (hQ : 0 < Q) (hp : D.scalarCurvature p = Q) |
| 35 | (hgradient : ∀ y, g.inner y (D.gradient D.scalarCurvature y) |
| 36 | (D.gradient D.scalarCurvature y) ≤ (delta / 320) * Q ^ 3) |
| 37 | (hRic : ∀ y (v : TangentSpace (𝓡 3) y), |
| 38 | delta * D.scalarCurvature y * g.inner y v v ≤ D.ricci y v v) : |
| 39 | ∀ x : M, Q / 2 ≤ D.scalarCurvature x := by |
| 40 | let A := Real.sqrt ((delta / 320) * Q ^ 3) |
| 41 | let rho := Real.sqrt (80 / (delta * Q)) |
| 42 | have hA : 0 < A := Real.sqrt_pos.mpr (by positivity) |
| 43 | have hrho : 0 < rho := Real.sqrt_pos.mpr (by positivity) |
| 44 | have hAsq : A ^ 2 = (delta / 320) * Q ^ 3 := Real.sq_sqrt (by positivity) |
| 45 | have hrhosq : rho ^ 2 = 80 / (delta * Q) := Real.sq_sqrt (by positivity) |
| 46 | have hproduct : A * rho = Q / 2 := by |
| 47 | apply (sq_eq_sq₀ (mul_nonneg hA.le hrho.le) (by positivity)).mp |
| 48 | rw [mul_pow, hAsq, hrhosq] |
| 49 | field_simp [hdelta.ne', hQ.ne'] |
| 50 | ring |
| 51 | have hLip (y : M) : |Q - D.scalarCurvature y| ≤ A * (g.edist p y).toReal := by |
| 52 | have h := scalar_increment_le_of_gradient_energy_bound D hD.contMDiff_scalarCurvature |
| 53 | hA (fun z => by rw [hAsq]; exact hgradient z) p y |
| 54 | rwa [hp] at h |
| 55 | have hlocal (y : M) (hy : (g.edist p y).toReal ≤ rho) : Q / 2 ≤ D.scalarCurvature y := by |
| 56 | have h := (hLip y).trans (mul_le_mul_of_nonneg_left hy hA.le) |
| 57 | rw [hproduct] at h |
| 58 | have hle := le_abs_self (Q - D.scalarCurvature y) |
| 59 | linarith only [h, hle] |
| 60 | have hball (x : M) : (g.edist p x).toReal < rho := by |
| 61 | by_contra hx |
| 62 | obtain ⟨y, hy⟩ := exists_point_at_intrinsic_radius g hc p x hrho (le_of_not_gt hx) |
| 63 | have hmyers := ricci_distance_sq_le_of_ball_lower g D hc p y (k := delta * Q / 2) (by |
| 64 | intro z hz v |
| 65 | have hzR := hlocal z (hz.trans_eq hy) |
| 66 | have hv : 0 ≤ g.inner z v v := by |
| 67 | by_cases hv : v = 0 |
| 68 | · simp [hv] |
| 69 | · exact (g.pos z v hv).le |
| 70 | have h := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hzR hdelta.le) hv |
| 71 | have hlower := hRic z v |
| 72 | nlinarith only [h, hlower]) |
| 73 | rw [hy, hrhosq] at hmyers |
| 74 | have hid : delta * Q / 2 * (80 / (delta * Q)) = 40 := by |
| 75 | field_simp [hdelta.ne', hQ.ne'] |
| 76 | ring |
| 77 | rw [hid] at hmyers |
| 78 | norm_num at hmyers |
| 79 | exact fun x => hlocal x (hball x).le |
| 80 | |
| 81 | /-- One threshold, fixed before time, ensures that every attained scalar |
| 82 | maximum above it bounds the scalar from below on the whole compact |
| 83 | connected slice. This is the spatial conclusion used for the terminal |
| 84 | argument in Morgan--Tian, Theorem 4.23, pp. 74-75. -/ |
| 85 | theorem exists_scalar_maximum_uniformization_threshold |
| 86 | [CompactSpace M] [SecondCountableTopology M] |
| 87 | (hC : RicciFlowCurvatureTheory.{u}) {T : ℝ} (hT : 0 < T) |
| 88 | (F : RicciFlow 3 M (Ico 0 T)) |
| 89 | (hpos : ∀ x : M, ∀ v w : TangentSpace (𝓡 3) x, |
| 90 | LeviCivitaData.IsOrthonormalPair (F.metric 0) x v w → |
| 91 | 0 < (F.connection 0).sectionalCurvature x v w) : |
| 92 | ∃ B : ℝ, 1 ≤ B ∧ ∀ t ∈ Ico 0 T, ∀ p : M, |
| 93 | B ≤ (F.connection t).scalarCurvature p → |
| 94 | (∀ y, (F.connection t).scalarCurvature y ≤ (F.connection t).scalarCurvature p) → |
| 95 | ∀ x, (F.connection t).scalarCurvature p / 2 ≤ (F.connection t).scalarCurvature x := by |
| 96 | obtain ⟨delta, hdelta, _, hpinch⟩ := exists_uniform_ricci_pinching hC hT F hpos |
| 97 | let eta := delta / 640 |
| 98 | have heta : 0 < eta := by dsimp only [eta]; positivity |
| 99 | obtain ⟨K, _, hgradient⟩ := exists_uniform_scalar_gradient_bound hC hT F hpos heta |
| 100 | obtain ⟨r, hr, hlower⟩ := exists_uniform_positive_scalar_lower hT F hpos |
| 101 | let B := max 1 (K / eta) |
| 102 | refine ⟨B, le_max_left _ _, ?_⟩ |
| 103 | intro t ht p hp hmax x |
| 104 | let D := F.connection t |
| 105 | let Q := D.scalarCurvature p |
| 106 | have hQ1 : 1 ≤ Q := (le_max_left _ _).trans hp |
| 107 | have hQ : 0 < Q := (by norm_num : (0 : ℝ) < 1).trans_le hQ1 |
| 108 | have hKQ : K ≤ Q * eta := (div_le_iff₀ heta).mp ((le_max_right _ _).trans hp) |
| 109 | have hQcube : Q ≤ Q ^ 3 := by nlinarith only [hQ1, sq_nonneg (Q - 1)] |
| 110 | have hKcube : K ≤ eta * Q ^ 3 := by |
| 111 | have h := mul_le_mul_of_nonneg_left hQcube heta.le |
| 112 | nlinarith only [hKQ, h] |
| 113 | apply half_scalar_lower_of_small_gradient D |
| 114 | (hC.tensor_calculus 3 M (F.metric t) D) (F.metric t).metricComplete_of_compact p hdelta hQ rfl |
| 115 | · intro y |
| 116 | have hRy : 0 ≤ D.scalarCurvature y := (hr.trans_le (hlower t ht y)).le |
| 117 | have hcube : D.scalarCurvature y ^ 3 ≤ Q ^ 3 := by gcongr; exact hmax y |
| 118 | have h := hgradient t ht y |
| 119 | have hmul := mul_le_mul_of_nonneg_left hcube heta.le |
| 120 | change _ ≤ (delta / 320) * Q ^ 3 |
| 121 | dsimp only [eta] at h hmul hKcube |
| 122 | nlinarith only [h, hmul, hKcube] |
| 123 | · intro y v |
| 124 | exact ricci_lower_of_unit_lower D y (hpinch t ht y) v |
| 125 | |
| 126 | end PoincareMT.M47Positive |