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.AncientKappa.Compactness.Boundedness.Projective.Diameter |
| 2 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.Neck.Geodesic.Competitor |
| 3 | |
| 4 | /-! |
| 5 | # Intrinsic competitors in projective cylinders |
| 6 | |
| 7 | The spherical path and linear axial path remain in the prescribed slab. |
| 8 | Their image under the actual cylinder covering gives the same intrinsic |
| 9 | competitor estimate as for an embedded neck; injectivity is not required. |
| 10 | -/ |
| 11 | |
| 12 | noncomputable section |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open Poincare.Geometry.Riemannian.SpaceForm |
| 18 | open scoped Topology Manifold ContDiff Bundle ENNReal |
| 19 | |
| 20 | namespace PoincareMT |
| 21 | |
| 22 | variable {M : Type*} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 24 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 25 | |
| 26 | /-- The actual cylinder image has an intrinsic path competitor controlled |
| 27 | by the axial displacement and the round-sphere diameter, at the original |
| 28 | scalar normalization scale. -/ |
| 29 | theorem intrinsicEDist_cylinderCover_le_axial_add |
| 30 | (g : RiemannianMetric 3 M) (f : RoundCylinderSpace → M) |
| 31 | {ε Q : ℝ} (hε : 0 < ε) (hQ : 0 < Q) |
| 32 | (hf : ContMDiffOn ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) ∞ f |
| 33 | (univ ×ˢ Ioo (-ε⁻¹) ε⁻¹)) |
| 34 | (hclose : RoundCylinderClose ε 0 |
| 35 | (fun z v w => Q * roundCylinderPullback g f z v w)) |
| 36 | {z w : RoundCylinderSpace} |
| 37 | (hz : z.2 ∈ Ioo (-ε⁻¹) ε⁻¹) (hw : w.2 ∈ Ioo (-ε⁻¹) ε⁻¹) : |
| 38 | intrinsicEDist g (f '' (univ ×ˢ Ioo (-ε⁻¹) ε⁻¹)) (f z) (f w) ≤ |
| 39 | ENNReal.ofReal (Real.sqrt ((1 + ε) / Q) * |
| 40 | (|w.2 - z.2| + Real.sqrt 2 * (Real.pi + 1))) := by |
| 41 | let := RiemannianMetric.lineProductChartedSpace (n := 2) (M := UnitTwoSphere) |
| 42 | let := RiemannianMetric.lineProductIsManifold (n := 2) (M := UnitTwoSphere) |
| 43 | let e := roundCylinderModelDiffeomorph |
| 44 | let U : Set RoundCylinderSpace := univ ×ˢ Ioo (-ε⁻¹) ε⁻¹ |
| 45 | have hU : IsOpen U := isOpen_univ.prod isOpen_Ioo |
| 46 | have hflat : ContMDiffOn (𝓡 3) (𝓡 3) ∞ f U := by |
| 47 | have he : (e.symm : RoundCylinderSpace → RoundCylinderSpace) = id := rfl |
| 48 | have h := hf.comp e.symm.contMDiff.contMDiffOn |
| 49 | (show MapsTo e.symm U U from by rw [he]; exact mapsTo_id _) |
| 50 | simpa only [he, Function.comp_id] using h |
| 51 | have hpull (x : RoundCylinderSpace) (hx : x ∈ U) |
| 52 | (v : TangentSpace (𝓡 3) x) : |
| 53 | g.inner (f x) (mfderiv (𝓡 3) (𝓡 3) f x v) |
| 54 | (mfderiv (𝓡 3) (𝓡 3) f x v) = |
| 55 | roundCylinderPullback g f x |
| 56 | (mfderiv (𝓡 3) ((𝓡 2).prod 𝓘(ℝ, ℝ)) e.symm x v) |
| 57 | (mfderiv (𝓡 3) ((𝓡 2).prod 𝓘(ℝ, ℝ)) e.symm x v) := by |
| 58 | have hh := mfderiv_comp x |
| 59 | ((hf.contMDiffAt (hU.mem_nhds hx)).mdifferentiableAt (by simp)) |
| 60 | (e.symm.contMDiff.mdifferentiable (by simp) x) |
| 61 | change mfderiv (𝓡 3) (𝓡 3) f x = _ at hh |
| 62 | change g.inner _ _ _ = g.inner _ _ _ |
| 63 | rw [hh] |
| 64 | rfl |
| 65 | let C := Real.sqrt ((1 + ε) / Q) |
| 66 | have hC : 0 < C := Real.sqrt_pos.mpr (by positivity) |
| 67 | have hnorm (x : RoundCylinderSpace) (hx : x ∈ U) |
| 68 | (v : TangentSpace (𝓡 3) x) : |
| 69 | g.tangentNorm (f x) (mfderiv (𝓡 3) (𝓡 3) f x v) ≤ |
| 70 | C * roundCylinderMetric.tangentNorm x v := by |
| 71 | have hb := roundCylinderClose_scaled_pullback_quadratic_error g f hε.le hclose hx.2 |
| 72 | (mfderiv (𝓡 3) ((𝓡 2).prod 𝓘(ℝ, ℝ)) e.symm x v) |
| 73 | rw [← roundCylinderMetric_inner_flat x v v, ← hpull x hx v] at hb |
| 74 | have hinner : g.inner (f x) (mfderiv (𝓡 3) (𝓡 3) f x v) |
| 75 | (mfderiv (𝓡 3) (𝓡 3) f x v) ≤ C ^ 2 * roundCylinderMetric.inner x v v := by |
| 76 | rw [show C ^ 2 = (1 + ε) / Q from Real.sq_sqrt (by positivity), |
| 77 | div_mul_eq_mul_div, le_div_iff₀ hQ] |
| 78 | have h := (abs_le.mp hb).2 |
| 79 | nlinarith |
| 80 | simpa only [RiemannianMetric.tangentNorm, Real.sqrt_mul (sq_nonneg C), |
| 81 | Real.sqrt_sq hC.le] using Real.sqrt_le_sqrt hinner |
| 82 | have htransport := roundCylinderMetric.intrinsicEDist_image_le_of_tangentNorm_le g |
| 83 | hU (hflat.of_le (by simp)) (mapsTo_image f U) hC hnorm z w |
| 84 | have hmodel : intrinsicEDist roundCylinderMetric U z w ≤ |
| 85 | ENNReal.ofReal (|w.2 - z.2| + Real.sqrt 2 * (Real.pi + 1)) := by |
| 86 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 2) : UnitTwoSphere → Type _) := |
| 87 | ⟨(roundSphereMetric 2).toRiemannianMetric⟩ |
| 88 | have hdist : (roundSphereMetric 2).edist z.1 w.1 < ENNReal.ofReal (Real.pi + 1) := by |
| 89 | rw [roundSphereMetric_edist_eq_angle (by norm_num : 1 ≤ 2)] |
| 90 | apply ENNReal.ofReal_lt_ofReal_iff (by positivity) |>.mpr |
| 91 | exact (Real.arccos_le_pi _).trans_lt (by linarith) |
| 92 | obtain ⟨σ, h0, h1, hσ, hlen⟩ := Manifold.exists_lt_of_riemannianEDist_lt hdist |
| 93 | let η : ℝ → RoundCylinderSpace := fun t => (σ t, z.2 + t * (w.2 - z.2)) |
| 94 | have hη := EpsilonNeck.model_path_smooth (z := z) (w := w) hσ |
| 95 | have hpath : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 (e ∘ η) (Icc (0 : ℝ) 1) := |
| 96 | (e.contMDiff.of_le (by simp : (1 : ℕ∞ω) ≤ (∞ : ℕ∞ω))).comp_contMDiffOn hη |
| 97 | have hend0 : (e ∘ η) 0 = z := by |
| 98 | change (σ 0, z.2 + 0 * (w.2 - z.2)) = z |
| 99 | simp [h0] |
| 100 | have hend1 : (e ∘ η) 1 = w := by |
| 101 | change (σ 1, z.2 + 1 * (w.2 - z.2)) = w |
| 102 | simp [h1] |
| 103 | apply roundCylinderMetric.intrinsicEDist_le_of_path hpath hend0 hend1 |
| 104 | · exact image_subset_iff.mpr (EpsilonNeck.model_path_mem hz hw) |
| 105 | · have hh := EpsilonNeck.model_path_length_le (z := z) (w := w) hσ hlen.le |
| 106 | rw [ENNReal.ofReal_add (abs_nonneg _) (by positivity)] |
| 107 | simpa only [abs_sub_comm, add_comm] using hh |
| 108 | exact (htransport.trans (mul_le_mul_right hmodel _)).trans_eq |
| 109 | (ENNReal.ofReal_mul hC.le).symm |
| 110 | |
| 111 | end PoincareMT |