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.Continuation.RegularHistory |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Control.Basic |
| 3 | import PoincareLib.Geometry.RicciFlow.Curvature.Calculus.Tensors.TensorMetricTrace |
| 4 | |
| 5 | /-! |
| 6 | # Scalar estimates on the selected regular history |
| 7 | |
| 8 | The metric-unit directional range is bounded before its real supremum is |
| 9 | used. The same M33 metric and scalar pullbacks then transfer the gradient |
| 10 | and pinching estimates, including retained interiors at old surgery times. |
| 11 | Sources: Morgan--Tian Assumptions 11.18, p. 279, and Lemma 14.11 / |
| 12 | Proposition 14.12, pp. 349-350. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff Bundle |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | namespace M48 |
| 26 | |
| 27 | theorem scalarCurvature_smooth {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 29 | {g : RiemannianMetric n M} (D : LeviCivitaData g) : |
| 30 | ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ D.scalarCurvature := by |
| 31 | have h := RicciFlowAnalysis.contMDiffOn_tensorTraceLast g (k := 0) |
| 32 | (RicciFlowAnalysis.isSmoothCovariantTensor_ricciEvaluation D) isOpen_univ |
| 33 | (V := fun i : Fin 0 => Fin.elim0 i) (fun i => Fin.elim0 i) |
| 34 | have htrace (x : M) (v : Fin 0 → TangentSpace (𝓡 n) x) : |
| 35 | RicciFlowAnalysis.tensorTraceLast g D.ricciEvaluation x v = D.scalarCurvature x := by |
| 36 | have hv : v = Fin.elim0 := funext fun i => Fin.elim0 i |
| 37 | rw [hv] |
| 38 | simp [RicciFlowAnalysis.tensorTraceLast, LeviCivitaData.ricciEvaluation, |
| 39 | LeviCivitaData.scalarCurvature] |
| 40 | simpa only [htrace, contMDiffOn_univ] using h |
| 41 | |
| 42 | theorem scalarGradient_range_bddAbove {M : Type u} [TopologicalSpace M] |
| 43 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 44 | (g : RiemannianMetric 3 M) (D : LeviCivitaData g) (x : M) : |
| 45 | BddAbove (range (fun v : {v : TangentSpace (𝓡 3) x // g.inner x v v = 1} => |
| 46 | |mvfderiv (𝓡 3) D.scalarCurvature x v.1|)) := by |
| 47 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 48 | ⟨g.toRiemannianMetric⟩ |
| 49 | refine ⟨‖mvfderiv (𝓡 3) D.scalarCurvature x‖, ?_⟩ |
| 50 | rintro _ ⟨v, rfl⟩ |
| 51 | have hv : ‖v.1‖ = 1 := by |
| 52 | rw [norm_eq_sqrt_real_inner] |
| 53 | change Real.sqrt (g.inner x v.1 v.1) = 1 |
| 54 | rw [v.2, Real.sqrt_one] |
| 55 | simpa only [Real.norm_eq_abs, hv, mul_one] using |
| 56 | (mvfderiv (𝓡 3) D.scalarCurvature x).le_opNorm v.1 |
| 57 | |
| 58 | theorem scalar_direction_le_gradient {M : Type u} [TopologicalSpace M] |
| 59 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 60 | (g : RiemannianMetric 3 M) (D : LeviCivitaData g) (x : M) |
| 61 | (v : TangentSpace (𝓡 3) x) (hv : g.inner x v v = 1) : |
| 62 | |mvfderiv (𝓡 3) D.scalarCurvature x v| ≤ scalarGradientNorm g D x := |
| 63 | le_csSup (scalarGradient_range_bddAbove g D x) ⟨⟨v, hv⟩, rfl⟩ |
| 64 | |
| 65 | end M48 |
| 66 | |
| 67 | namespace M33RegularHistoryData |
| 68 | |
| 69 | variable {F : SurgeryFlowData.{u}} {W : M33RegularHistoryWindow F} |
| 70 | (H : M33RegularHistoryData W) |
| 71 | |
| 72 | /-- The exact directional gradient bound required by the singular-limit input. -/ |
| 73 | theorem scalar_gradient {J : Set ℝ} {r C : ℝ} |
| 74 | (hJ : H.generalized.interval ⊆ J) |
| 75 | (analytic : SurgeryHighCurvatureAnalyticOn F J r C) |
| 76 | (t : ℝ) (ht : t ∈ H.generalized.interval) |
| 77 | (x : (H.generalized.slice t).carrier) |
| 78 | (hQ : r⁻¹ ^ 2 ≤ (H.generalized.connection t).scalarCurvature x) |
| 79 | (v : TangentSpace (𝓡 3) x) (hv : (H.generalized.metric t).inner x v v = 1) : |
| 80 | |mvfderiv (𝓡 3) (H.generalized.connection t).scalarCurvature x v| ≤ |
| 81 | C * (H.generalized.connection t).scalarCurvature x ^ (3 / 2 : ℝ) := by |
| 82 | let f := H.history.forward t ht |
| 83 | let w := mfderiv (𝓡 3) (𝓡 3) f x v |
| 84 | have hw : (F.metric t).inner (f x) w w = 1 := |
| 85 | (H.history.metric_pullback t ht x v v).trans hv |
| 86 | have hscalar : (F.connection t).scalarCurvature ∘ f = |
| 87 | (H.generalized.connection t).scalarCurvature := |
| 88 | funext (H.scalar_pullback t ht) |
| 89 | have hderiv := mvfderiv_comp_apply x |
| 90 | ((M48.scalarCurvature_smooth (F.connection t)).mdifferentiable (by simp) (f x)) |
| 91 | ((H.history.forward_smooth t ht).mdifferentiable (by simp) x) v |
| 92 | rw [hscalar] at hderiv |
| 93 | rw [hderiv] |
| 94 | apply (M48.scalar_direction_le_gradient (F.metric t) (F.connection t) (f x) w hw).trans |
| 95 | have hactual : r⁻¹ ^ 2 ≤ (F.connection t).scalarCurvature (f x) := by |
| 96 | simpa only [f, H.scalar_pullback] using hQ |
| 97 | simpa only [f, H.scalar_pullback] using |
| 98 | (analytic t (hJ ht) (W.time_subset (H.interval_eq ▸ ht)) (f x) hactual).1 |
| 99 | |
| 100 | /-- Pinching uses the original clock and the same negative-curvature part. -/ |
| 101 | theorem pinched_at (t : ℝ) (ht : t ∈ H.generalized.interval) |
| 102 | (h : SurgeryPinchedAt (F.connection t) t) : |
| 103 | SurgeryPinchedAt (H.generalized.connection t) t := by |
| 104 | refine ⟨h.1, ?_, ?_⟩ |
| 105 | · intro x _ |
| 106 | simpa only [H.scalar_pullback] using h.2.1 (H.history.forward t ht x) (mem_univ _) |
| 107 | · intro x _ hx |
| 108 | have hy : 0 < (F.connection t).negativeCurvaturePart (H.history.forward t ht x) := by |
| 109 | simpa only [H.negative_part_pullback] using hx |
| 110 | simpa only [H.scalar_pullback, H.negative_part_pullback] using |
| 111 | h.2.2 (H.history.forward t ht x) (mem_univ _) hy |
| 112 | |
| 113 | theorem scalar_lower_bound (t : ℝ) (ht : t ∈ H.generalized.interval) |
| 114 | (h : SurgeryPinchedAt (F.connection t) t) (x : (H.generalized.slice t).carrier) : |
| 115 | -6 ≤ (H.generalized.connection t).scalarCurvature x := by |
| 116 | have hpinch := (H.pinched_at t ht h).2.1 x (mem_univ _) |
| 117 | have hclock : 0 < 1 + 4 * t := by linarith [h.1] |
| 118 | have hquot : -6 ≤ (-6 : ℝ) / (1 + 4 * t) := by |
| 119 | apply (le_div_iff₀ hclock).2 |
| 120 | nlinarith [h.1] |
| 121 | exact hquot.trans hpinch |
| 122 | |
| 123 | end M33RegularHistoryData |
| 124 | |
| 125 | end PoincareMT |