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 | /- Adapted from Mapher `PoincareMT/Proofs/M03/ConnectionRateRicciSmoothness.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import PoincareLib.Geometry.RicciFlow.Local.Metric.RicciPairRegularity |
| 6 | import PoincareLib.Geometry.RicciFlow.Local.Energy.Comparison.ScalarMixedDerivative |
| 7 | |
| 8 | set_option autoImplicit false |
| 9 | set_option maxHeartbeats 1800000 |
| 10 | |
| 11 | open scoped Manifold ContDiff Bundle Topology |
| 12 | open Set |
| 13 | |
| 14 | universe u |
| 15 | |
| 16 | namespace PoincareMT.RicciFlow.Local |
| 17 | |
| 18 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 19 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 20 | [IsManifold (𝓡 n) ∞ M] |
| 21 | |
| 22 | theorem connection_rate_ricci_pair_smooth |
| 23 | {J : Set ℝ} (F : RicciFlow n M J) {t : ℝ} (ht : t ∈ interior J) |
| 24 | {U : Set M} (hU : IsOpen U) |
| 25 | (Y Z : (y : M) → TangentSpace (𝓡 n) y) |
| 26 | (hY : ContMDiffOn (𝓡 n) |
| 27 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% Y) U) |
| 28 | (hZ : ContMDiffOn (𝓡 n) |
| 29 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% Z) U) |
| 30 | {x : M} (hx : x ∈ U) : |
| 31 | ContMDiffAt (𝓡 n) 𝓘(ℝ, ℝ) ∞ |
| 32 | (fun y => (F.connection t).ricci y (Y y) (Z y)) x := by |
| 33 | let c := extChartAt (𝓡 n) x |
| 34 | have hcx : c.symm (c x) = x := c.left_inv (mem_extChartAt_source x) |
| 35 | have hcxt : c x ∈ c.target := mem_extChartAt_target x |
| 36 | have hc : ContMDiffAt 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) (𝓡 n) ∞ c.symm (c x) := |
| 37 | (contMDiffOn_extChartAt_symm (I := 𝓡 n) x).contMDiffAt |
| 38 | (extChartAt_target_mem_nhds' hcxt) |
| 39 | have hn : interior J ×ˢ (c.target ∩ c.symm ⁻¹' U) ∈ 𝓝 (t, c x) := |
| 40 | prod_mem_nhds (isOpen_interior.mem_nhds ht) |
| 41 | (Filter.inter_mem (extChartAt_target_mem_nhds' hcxt) |
| 42 | (hc.continuousAt.preimage_mem_nhds (hU.mem_nhds (by simpa only [hcx] using hx)))) |
| 43 | have hh := (contDiffOn_ricciFlow_ricci_chart_pair F hU Y Z hY hZ x).contDiffAt hn |
| 44 | have hs := hh.comp (c x) (contDiffAt_const.prodMk contDiffAt_id) |
| 45 | rw [contMDiffAt_iff_source] |
| 46 | rw [(𝓡 n).range_eq_univ, contMDiffWithinAt_univ] |
| 47 | change ContMDiffAt (𝓡 n) 𝓘(ℝ, ℝ) ∞ |
| 48 | ((fun p : ℝ × EuclideanSpace ℝ (Fin n) => |
| 49 | (F.connection p.1).ricci (c.symm p.2) |
| 50 | (Y (c.symm p.2)) (Z (c.symm p.2))) ∘ fun z => (t, z)) (c x) |
| 51 | exact hs.contMDiffAt |
| 52 | |
| 53 | end PoincareMT.RicciFlow.Local |