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.Riemannian.Measure.HausdorffDensity.LocalDistance |
| 2 | |
| 3 | /-! |
| 4 | # A global distance bound from a unit differential bound |
| 5 | |
| 6 | Integrating a unit differential bound along every smooth path gives a |
| 7 | bound for the Riemannian extended distance. This general statement is |
| 8 | used in Morgan-Tian Lemma 12.2, printed pp. 294-295, to prove that the cap |
| 9 | radius equals distance from its tip; see the M34 radial-distance derivation. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Manifold |
| 15 | open scoped Manifold ContDiff Bundle ENNReal |
| 16 | |
| 17 | namespace Poincare |
| 18 | |
| 19 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 20 | {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 21 | {H : Type*} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} |
| 22 | {M : Type*} [TopologicalSpace M] [ChartedSpace H M] |
| 23 | [Bundle.RiemannianBundle (TangentSpace I : M → Type _)] |
| 24 | |
| 25 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 26 | normedSpaceTangentSpaceVectorSpace |
| 27 | |
| 28 | set_option backward.isDefEq.respectTransparency false in |
| 29 | /-- A map with differential of extended operator norm at most one does |
| 30 | not increase Riemannian distance. Completeness and connectedness are not |
| 31 | needed (Lemma 12.2 distance argument, pp. 294-295). -/ |
| 32 | theorem edist_le_riemannianEDist_of_mfderiv_le_one {f : M → F} |
| 33 | (hf : ContMDiff I 𝓘(ℝ, F) 1 f) |
| 34 | (hbound : ∀ z, ‖mfderiv I 𝓘(ℝ, F) f z‖ₑ ≤ 1) (x y : M) : |
| 35 | edist (f x) (f y) ≤ riemannianEDist I x y := by |
| 36 | apply le_of_forall_gt_imp_ge_of_dense |
| 37 | intro b hb |
| 38 | obtain ⟨γ, hγ0, hγ1, hγsmooth, hγlength⟩ := exists_lt_of_riemannianEDist_lt hb |
| 39 | have h := edist_le_mul_pathELength_of_mfderiv_le |
| 40 | (s := univ) (K := 1) (fun z _ => hf.contMDiffAt) |
| 41 | (fun z _ => hbound z) hγsmooth (mapsTo_univ _ _) |
| 42 | simp only [hγ0, hγ1, ENNReal.coe_one, one_mul] at h |
| 43 | exact h.trans hγlength.le |
| 44 | |
| 45 | end Poincare |