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.Comparison.Distance.PathBounds |
| 2 | /-! |
| 3 | # Global metric bounds from local pair estimates |
| 4 | |
| 5 | The local smoothing estimates of Claim 18.22, Morgan-Tian p. 433, concern |
| 6 | the actual source and target metric values. Applying the published SurgeryComparison |
| 7 | path gluing theorem turns these local pair estimates into a global bound, |
| 8 | including for intermediate maps that are not yet smooth everywhere. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open Set Filter |
| 14 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 15 | |
| 16 | universe u v |
| 17 | |
| 18 | namespace PoincareMT.SurgeryComparison.Transport |
| 19 | |
| 20 | variable {X : Type u} {Y : Type v} [TopologicalSpace X] [TopologicalSpace Y] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) X] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) Y] |
| 23 | [IsManifold (𝓡 3) ∞ X] [IsManifold (𝓡 3) ∞ Y] [RegularSpace Y] |
| 24 | |
| 25 | /-- A common local pair-distance bound holds globally for the explicit |
| 26 | Riemannian metrics. The intermediate map may be nonsmooth; this is the |
| 27 | path integration step in Claim 18.22, Morgan-Tian p. 433. -/ |
| 28 | theorem metric_edist_le_mul_of_local_pair_bound |
| 29 | (g : RiemannianMetric 3 X) (h : RiemannianMetric 3 Y) |
| 30 | (f : X → Y) {C : ℝ} (hC : 0 < C) |
| 31 | (hlocal : ∀ x, ∃ U ∈ 𝓝 x, ∀ y ∈ U, ∀ z ∈ U, |
| 32 | h.edist (f y) (f z) ≤ ENNReal.ofReal C * g.edist y z) |
| 33 | (x y : X) : h.edist (f x) (f y) ≤ ENNReal.ofReal C * g.edist x y := by |
| 34 | have hopen : ∀ x, ∃ U : Set X, IsOpen U ∧ x ∈ U ∧ |
| 35 | ∀ y ∈ U, ∀ z ∈ U, |
| 36 | h.edist (f y) (f z) ≤ ENNReal.ofReal C * g.edist y z := by |
| 37 | intro x |
| 38 | obtain ⟨U, hUx, hU⟩ := hlocal x |
| 39 | obtain ⟨V, hVU, hVo, hxV⟩ := mem_nhds_iff.mp hUx |
| 40 | exact ⟨V, hVo, hxV, fun y hy z hz => hU y (hVU hy) z (hVU hz)⟩ |
| 41 | choose U hUo hxU hUb using hopen |
| 42 | apply SurgeryComparison.metric_edist_le_mul_of_open_cover g h U hUo |
| 43 | (fun z => ⟨z, hxU z⟩) f hC |
| 44 | intro i γ a b hab hγ hγU |
| 45 | exact (hUb i (γ a) (hγU ⟨le_rfl, hab⟩) (γ b) (hγU ⟨hab, le_rfl⟩)).trans |
| 46 | (mul_le_mul' le_rfl (MetricSurgery.metric_edist_le_pathELength g hab hγ)) |
| 47 | |
| 48 | end PoincareMT.SurgeryComparison.Transport |