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.Volume.Surgery.Measure.Distance.PathSupports |
| 2 | |
| 3 | /-! |
| 4 | Adapted from Mapher `PoincareMT/Proofs/M10/IntrinsicLipschitz.lean` at |
| 5 | revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. |
| 6 | |
| 7 | # Intrinsic local Lipschitz bounds from upper supports |
| 8 | |
| 9 | Short paths between two points of an inner ball stay in a larger ball by |
| 10 | the prefix-length estimate. Applying the upper-support path comparison and |
| 11 | letting path lengths decrease to the intrinsic distance gives the local |
| 12 | spatial estimate used in Morgan-Tian Proposition 7.5. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Bundle Topology ENNReal NNReal |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.SurgeryVolume.Measure |
| 23 | |
| 24 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 26 | |
| 27 | set_option backward.isDefEq.respectTransparency false in |
| 28 | /-- Uniform upper supports on a larger ball bound differences by intrinsic distance. -/ |
| 29 | theorem edist_le_mul_riemannianEDist_of_upper_supports |
| 30 | (g : RiemannianMetric n M) {f : M → ℝ} {U : Set M} |
| 31 | (hf : ContinuousOn f U) {C : ℝ≥0} |
| 32 | (hsupport : ∀ q ∈ U, ∃ B : M → ℝ, |
| 33 | MDifferentiableAt (𝓡 n) (𝓘(ℝ, ℝ)) B q ∧ B q = f q ∧ |
| 34 | (∀ᶠ x in 𝓝 q, f x ≤ B x) ∧ ∀ v : TangentSpace (𝓡 n) q, |
| 35 | |mvfderiv (𝓡 n) B q v| ≤ C * g.tangentNorm q v) |
| 36 | {x₀ x y : M} {r : ℝ≥0} |
| 37 | (hball : ∀ q, g.edist x₀ q < (r : ℝ≥0∞) + r + r → q ∈ U) |
| 38 | (hx : g.edist x₀ x < r) (hy : g.edist x₀ y < r) : |
| 39 | edist (f x) (f y) ≤ (C : ℝ≥0∞) * g.edist x y := by |
| 40 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 41 | ⟨g.toRiemannianMetric⟩ |
| 42 | have hd : g.edist x y < (r : ℝ≥0∞) + r := by |
| 43 | calc |
| 44 | g.edist x y ≤ g.edist x x₀ + g.edist x₀ y := |
| 45 | Manifold.riemannianEDist_triangle |
| 46 | _ < (r : ℝ≥0∞) + r := ENNReal.add_lt_add |
| 47 | (by simpa only [RiemannianMetric.edist, Manifold.riemannianEDist_comm] using hx) hy |
| 48 | let : (𝓝[>] (g.edist x y)).NeBot := nhdsGT_neBot_of_exists_gt ⟨_, hd⟩ |
| 49 | have hlim : Tendsto (fun R : ℝ≥0∞ ↦ (C : ℝ≥0∞) * R) |
| 50 | (𝓝[>] (g.edist x y)) (𝓝 ((C : ℝ≥0∞) * g.edist x y)) := |
| 51 | (ENNReal.continuous_const_mul ENNReal.coe_ne_top).continuousWithinAt |
| 52 | apply ge_of_tendsto hlim |
| 53 | filter_upwards [self_mem_nhdsWithin, |
| 54 | mem_nhdsWithin_of_mem_nhds (eventually_lt_nhds hd)] with R hR hRsmall |
| 55 | obtain ⟨γ, hγx, hγy, hγ, hlength, _⟩ := |
| 56 | Manifold.exists_lt_locally_constant_of_riemannianEDist_lt |
| 57 | (I := 𝓡 n) hR zero_lt_one |
| 58 | have hγU : MapsTo γ (Icc 0 1) U := by |
| 59 | intro t ht |
| 60 | apply hball |
| 61 | have hprefix : g.edist x (γ t) ≤ g.pathELength γ 0 1 := |
| 62 | (Manifold.riemannianEDist_le_pathELength hγ.contMDiffOn hγx rfl ht.1).trans |
| 63 | (Manifold.pathELength_mono le_rfl ht.2) |
| 64 | calc |
| 65 | g.edist x₀ (γ t) ≤ g.edist x₀ x + g.edist x (γ t) := |
| 66 | Manifold.riemannianEDist_triangle |
| 67 | _ ≤ g.edist x₀ x + g.pathELength γ 0 1 := add_le_add_right hprefix _ |
| 68 | _ < (r : ℝ≥0∞) + (r + r) := |
| 69 | ENNReal.add_lt_add hx (hlength.trans hRsmall) |
| 70 | _ = (r : ℝ≥0∞) + r + r := (add_assoc _ _ _).symm |
| 71 | have hpath := edist_le_pathELength_of_upper_supports g hf C.coe_nonneg hsupport hγ hγU |
| 72 | simp only [hγx, hγy, ENNReal.ofReal_coe_nnreal] at hpath |
| 73 | exact hpath.trans (mul_le_mul_right hlength.le _) |
| 74 | |
| 75 | end PoincareMT.SurgeryVolume.Measure |