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.Curvature.Calculus |
| 2 | import PoincareLib.Geometry.RicciFlow.Tensor.TimeScaling |
| 3 | import PoincareLib.Geometry.RicciFlow.Curvature.Evolution.Ricci |
| 4 | |
| 5 | /-! |
| 6 | # The reciprocal-time Ricci correction |
| 7 | |
| 8 | This is the first equality in Chow et al., Part II, (15.55), printed p. 276 |
| 9 | (PDF p. 303), with an arbitrary initial time. Only nonzero elapsed time is |
| 10 | needed for this evolution identity. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace Poincare.RicciFlow.Harnack |
| 21 | |
| 22 | open PoincareMT |
| 23 | |
| 24 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 26 | {J : Set ℝ} |
| 27 | |
| 28 | lemma tensorHeatOperator_ricci_timeCorrection |
| 29 | (hC : RicciFlowCurvatureCalculus.{u}) (F : RicciFlow n M J) |
| 30 | (T₀ : ℝ) {t : ℝ} (ht : t ∈ interior J) (hτ : t - T₀ ≠ 0) |
| 31 | (x : M) (u v : TangentSpace (𝓡 n) x) : |
| 32 | let D := F.connection t |
| 33 | let b := (F.metric t).orthonormalBasis x |
| 34 | F.tensorHeatOperator (fun s y z => (F.connection s).ricciEvaluation y z / (2 * (s - T₀))) |
| 35 | t x ![u, v] = |
| 36 | 2 * (∑ i, ∑ j, D.curvatureTensor x u (b i) v (b j) * |
| 37 | (D.ricci x (b i) (b j) / (2 * (t - T₀)))) - |
| 38 | D.ricci x u v / (2 * (t - T₀) ^ 2) := by |
| 39 | let D := F.connection t |
| 40 | have hD := hC.tensor_calculus n M (F.metric t) D |
| 41 | have hf := (((hasDerivAt_id t).sub_const T₀).const_mul 2).inv |
| 42 | (mul_ne_zero (by norm_num) hτ) |
| 43 | have hd := (hC.ricci_evolution n M J F t (interior_subset ht) x u v).hasDerivAt |
| 44 | (mem_interior_iff_mem_nhds.mp ht) |
| 45 | have heq : (fun s y z => (F.connection s).ricciEvaluation y z / (2 * (s - T₀))) = |
| 46 | (fun s y z => (2 * (s - T₀))⁻¹ * (F.connection s).ricciEvaluation y z) := by |
| 47 | funext s y z |
| 48 | rw [div_eq_mul_inv, mul_comm] |
| 49 | dsimp only |
| 50 | rw [heq] |
| 51 | have h := F.tensorHeatOperator_time_mul (T := fun s => (F.connection s).ricciEvaluation) |
| 52 | hf hD.2.1 (hD.2.2.1 _ _ hD.2.1) |
| 53 | x ![u, v] hd.differentiableAt |
| 54 | simp only [Pi.inv_apply, id_eq, mul_one] at h |
| 55 | rw [h, F.tensorHeatOperator_ricci hC ht] |
| 56 | simp only [LeviCivitaData.ricciEvaluation, Matrix.cons_val_zero, Matrix.cons_val_one, |
| 57 | ← mul_div_assoc, ← Finset.sum_div] |
| 58 | field_simp [hτ] |
| 59 | ring |
| 60 | |
| 61 | end Poincare.RicciFlow.Harnack |