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.ReducedGeometry.ReducedLength.Tensor.TensorEvaluationBound |
| 2 | |
| 3 | /-! |
| 4 | # Uniform contractions and metric control on a time window |
| 5 | |
| 6 | These estimates specialize the actual curvature bound and the frozen M04 |
| 7 | metric comparison. No derivative bound or completeness is presumed here. |
| 8 | -/ |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | |
| 12 | open scoped Manifold ContDiff Bundle |
| 13 | |
| 14 | universe u |
| 15 | |
| 16 | namespace PoincareMT.ReducedLength |
| 17 | |
| 18 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 19 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 20 | [IsManifold (𝓡 n) ∞ M] |
| 21 | |
| 22 | theorem ricci_abs_le_of_curvature_bound (hM04 : RicciFlowCurvatureTheory.{u}) |
| 23 | (g : RiemannianMetric n M) (D : LeviCivitaData g) (x : M) |
| 24 | (v w : TangentSpace (𝓡 n) x) (K : ℝ) (hK : D.curvatureTensorNorm x ≤ K) : |
| 25 | |D.ricci x v w| ≤ (n : ℝ) * K * g.tangentNorm x v * g.tangentNorm x w := by |
| 26 | apply (ricci_abs_le_curvatureTensorNorm hM04 g D x v w).trans |
| 27 | exact mul_le_mul_of_nonneg_right |
| 28 | (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hK (Nat.cast_nonneg n)) |
| 29 | (Real.sqrt_nonneg _)) (Real.sqrt_nonneg _) |
| 30 | |
| 31 | theorem scalar_abs_le_of_curvature_bound (hM04 : RicciFlowCurvatureTheory.{u}) |
| 32 | (g : RiemannianMetric n M) (D : LeviCivitaData g) (x : M) |
| 33 | (K : ℝ) (hK : D.curvatureTensorNorm x ≤ K) : |
| 34 | |D.scalarCurvature x| ≤ (n : ℝ) ^ 2 * K := |
| 35 | (scalar_abs_le_curvatureTensorNorm hM04 g D x).trans |
| 36 | (mul_le_mul_of_nonneg_left hK (sq_nonneg _)) |
| 37 | |
| 38 | theorem ricci_quadratic_abs_le_of_curvature_bound (hM04 : RicciFlowCurvatureTheory.{u}) |
| 39 | (g : RiemannianMetric n M) (D : LeviCivitaData g) (x : M) |
| 40 | (v : TangentSpace (𝓡 n) x) (K : ℝ) (hK : D.curvatureTensorNorm x ≤ K) : |
| 41 | |D.ricci x v v| ≤ (n : ℝ) * K * g.inner x v v := by |
| 42 | have hpos : 0 ≤ g.inner x v v := by |
| 43 | rcases eq_or_ne v 0 with rfl | hv |
| 44 | · simp |
| 45 | · exact (g.pos x v hv).le |
| 46 | have hn : (g.tangentNorm x v) ^ 2 = g.inner x v v := Real.sq_sqrt hpos |
| 47 | calc |
| 48 | _ ≤ (n : ℝ) * K * g.tangentNorm x v * g.tangentNorm x v := |
| 49 | ricci_abs_le_of_curvature_bound hM04 g D x v v K hK |
| 50 | _ = _ := by rw [← hn]; ring |
| 51 | |
| 52 | theorem window_metric_comparison {J : Set ℝ} (F : RicciFlow n M J) |
| 53 | (hM04 : RicciFlowCurvatureTheory.{u}) (T b K : ℝ) |
| 54 | (hb : 0 ≤ b) (hK : 0 ≤ K) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 55 | (hbound : ∀ s ∈ Set.Icc (T - b) T, ∀ x : M, |
| 56 | (F.connection s).curvatureTensorNorm x ≤ K) |
| 57 | (t : ℝ) (ht : t ∈ Set.Icc (T - b) T) |
| 58 | (x : M) (v : TangentSpace (𝓡 n) x) : |
| 59 | Real.exp (-(2 * (n : ℝ) * K * b)) * (F.metric T).inner x v v ≤ |
| 60 | (F.metric t).inner x v v ∧ |
| 61 | (F.metric t).inner x v v ≤ |
| 62 | Real.exp (2 * (n : ℝ) * K * b) * (F.metric T).inner x v v := by |
| 63 | let c : ℝ := 2 * (n : ℝ) * K |
| 64 | have hc : 0 ≤ c := by dsimp [c]; positivity |
| 65 | have hg (r : ℝ) : 0 ≤ (F.metric r).inner x v v := by |
| 66 | rcases eq_or_ne v 0 with rfl | hv |
| 67 | · simp |
| 68 | · exact ((F.metric r).pos x v hv).le |
| 69 | have hcompare := hM04.metric_comparison n M J F t T K (hwindow ht) |
| 70 | (hwindow ⟨by linarith, le_rfl⟩) ht.2 hK |
| 71 | (fun s hs y ↦ hbound s ⟨ht.1.trans hs.1, hs.2⟩ y) x v |
| 72 | have hm : Real.exp (-(c * (T - t))) * (F.metric t).inner x v v ≤ |
| 73 | (F.metric T).inner x v v ∧ |
| 74 | (F.metric T).inner x v v ≤ Real.exp (c * (T - t)) * (F.metric t).inner x v v := by |
| 75 | simpa [c, neg_mul] using hcompare |
| 76 | have hlo : Real.exp (-(c * (T - t))) * (F.metric T).inner x v v ≤ |
| 77 | (F.metric t).inner x v v := by |
| 78 | calc |
| 79 | _ ≤ Real.exp (-(c * (T - t))) * |
| 80 | (Real.exp (c * (T - t)) * (F.metric t).inner x v v) := |
| 81 | mul_le_mul_of_nonneg_left hm.2 (Real.exp_nonneg _) |
| 82 | _ = _ := by rw [← mul_assoc, ← Real.exp_add, neg_add_cancel, Real.exp_zero, one_mul] |
| 83 | have hhi : (F.metric t).inner x v v ≤ |
| 84 | Real.exp (c * (T - t)) * (F.metric T).inner x v v := by |
| 85 | calc |
| 86 | _ = Real.exp (c * (T - t)) * |
| 87 | (Real.exp (-(c * (T - t))) * (F.metric t).inner x v v) := by |
| 88 | rw [← mul_assoc, ← Real.exp_add, add_neg_cancel, Real.exp_zero, one_mul] |
| 89 | _ ≤ _ := mul_le_mul_of_nonneg_left hm.1 (Real.exp_nonneg _) |
| 90 | have hcb : c * (T - t) ≤ c * b := mul_le_mul_of_nonneg_left (by linarith [ht.1]) hc |
| 91 | refine ⟨?_, ?_⟩ |
| 92 | · exact (mul_le_mul_of_nonneg_right (Real.exp_le_exp.mpr (neg_le_neg hcb)) (hg T)).trans hlo |
| 93 | · exact hhi.trans (mul_le_mul_of_nonneg_right (Real.exp_le_exp.mpr hcb) (hg T)) |
| 94 | |
| 95 | end PoincareMT.ReducedLength |