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.StandardCap.Persistence.SourceNames.Metric |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Removal.Sphere.PhysicalAxialPlane |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Removal.Sphere.CylinderPlaneRank |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Removal.Sphere.SphereTopology |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Charts.LocalHomeomorphDerivative |
| 6 | |
| 7 | /-! |
| 8 | # The actual angular projection of an immersed collar sphere |
| 9 | |
| 10 | A sphere immersed in a sufficiently thin neck, whose actual tangent |
| 11 | planes have a fixed positive normalized sectional lower bound, has |
| 12 | nonsingular angular projection everywhere. The whole projection is |
| 13 | therefore a local homeomorphism and cannot be nullhomotopic. |
| 14 | Morgan--Tian, Claim 16.10, pp. 374-375; see M44 derivation 46. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set |
| 21 | open scoped Manifold ContDiff Topology ContinuousMap |
| 22 | |
| 23 | namespace PoincareMT.M44 |
| 24 | |
| 25 | open M36 |
| 26 | |
| 27 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 28 | local notation "E2" => EuclideanSpace ℝ (Fin 2) |
| 29 | local notation "IC" => ModelWithCorners.prod (𝓡 2) 𝓘(ℝ, ℝ) |
| 30 | local notation "e" => EuclideanSpace.basisFun (Fin 3) ℝ |
| 31 | |
| 32 | /-- The neck coordinates of an actual smooth sphere are smooth on |
| 33 | the whole sphere when its image lies in the neck. Source: |
| 34 | Claim 16.10, pp. 374-375; M44 derivation 46. -/ |
| 35 | theorem contMDiff_neck_sphere_coordinates |
| 36 | {M : Type*} [TopologicalSpace M] [ChartedSpace E M] [IsManifold (𝓡 3) ∞ M] |
| 37 | {g : RiemannianMetric 3 M} (N : EpsilonNeck g) |
| 38 | {f : UnitTwoSphere → M} (hf : ContMDiff (𝓡 2) (𝓡 3) ∞ f) |
| 39 | (hmem : ∀ z, f z ∈ N.carrier) : |
| 40 | ContMDiff (𝓡 2) IC ∞ (N.coordinate_inverse ∘ f) := |
| 41 | fun z => (neck_inverse_contMDiffAt N (hmem z)).comp z (hf z) |
| 42 | |
| 43 | /-- Angular projection of the actual sphere, with continuity on |
| 44 | the whole sphere. Source: Claim 16.10; M44 derivation 46. -/ |
| 45 | def neckSphereAngularMap |
| 46 | {M : Type*} [TopologicalSpace M] [ChartedSpace E M] [IsManifold (𝓡 3) ∞ M] |
| 47 | {g : RiemannianMetric 3 M} (N : EpsilonNeck g) |
| 48 | {f : UnitTwoSphere → M} (hf : ContMDiff (𝓡 2) (𝓡 3) ∞ f) |
| 49 | (hmem : ∀ z, f z ∈ N.carrier) : C(UnitTwoSphere, UnitTwoSphere) := |
| 50 | ⟨fun z => (N.coordinate_inverse (f z)).1, |
| 51 | (contMDiff_neck_sphere_coordinates N hf hmem).fst.continuous⟩ |
| 52 | |
| 53 | /-- A positive tangent-plane lower bound forces the whole angular |
| 54 | projection to be a local homeomorphism at one uniform neck cutoff. |
| 55 | The lower bound is measured in the actual central-scalar-normalized |
| 56 | metric. Source: Claim 16.10, pp. 374-375; M44 derivation 46. -/ |
| 57 | theorem exists_neck_sphere_angular_cutoff {k : ℝ} (hk : 0 < k) : |
| 58 | ∃ epsilon0 : ℝ, 0 < epsilon0 ∧ |
| 59 | ∀ {M : Type*} [TopologicalSpace M] [ChartedSpace E M] |
| 60 | [IsManifold (𝓡 3) ∞ M] [T2Space M] |
| 61 | {g : RiemannianMetric 3 M} (N : EpsilonNeck g), N.epsilon ≤ epsilon0 → |
| 62 | ∀ (f : UnitTwoSphere → M) (hf : ContMDiff (𝓡 2) (𝓡 3) ∞ f) |
| 63 | (hmem : ∀ z, f z ∈ N.carrier), |
| 64 | (∀ z, Function.Injective (mfderiv (𝓡 2) (𝓡 3) f z)) → |
| 65 | (∀ z, ∀ u v : TangentSpace (𝓡 2) z, |
| 66 | let Df := mfderiv (𝓡 2) (𝓡 3) f z |
| 67 | let h := normalizedNeckMetric N |
| 68 | 0 < h.inner (f z) (Df u) (Df u) * h.inner (f z) (Df v) (Df v) - |
| 69 | (h.inner (f z) (Df u) (Df v)) ^ 2 → |
| 70 | k < (normalizedNeckConnection N).sectionalCurvature (f z) (Df u) (Df v)) → |
| 71 | IsLocalHomeomorph (neckSphereAngularMap N hf hmem) := by |
| 72 | obtain ⟨epsilon0, hepsilon0, hbound⟩ := exists_normalized_neck_axial_cutoff hk |
| 73 | refine ⟨epsilon0, hepsilon0, ?_⟩ |
| 74 | intro M _ _ _ _ g N hsmall f hf hmem himm hlower |
| 75 | let H := N.coordinate_inverse ∘ f |
| 76 | have hH : ContMDiff (𝓡 2) IC ∞ H := contMDiff_neck_sphere_coordinates N hf hmem |
| 77 | apply Poincare.isLocalHomeomorph_of_mfderiv_bijective hH.fst |
| 78 | intro z |
| 79 | let L0 : E2 →L[ℝ] E2 × ℝ := mfderiv (𝓡 2) IC H z |
| 80 | let L : E2 →L[ℝ] E := cylinderEuclideanEquiv.symm.toContinuousLinearMap.comp L0 |
| 81 | have hz : (H z).2 ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹ := |
| 82 | (N.coordinate_inverse_mem (f z) (hmem z)).2 |
| 83 | have hzero := zero_mem_centeredNeckDomain N hz |
| 84 | have hcoord := neck_coordinate_contMDiffAt N (N.coordinate_inverse_mem (f z) (hmem z)) |
| 85 | have hfull : N.coordinate_map ∘ H = f := funext (fun w => neck_coordinate_inverse N (hmem w)) |
| 86 | have hcomp : mfderiv (𝓡 2) (𝓡 3) f z = |
| 87 | (mfderiv IC (𝓡 3) N.coordinate_map (H z)).comp L0 := by |
| 88 | have h := mfderiv_comp z (hcoord.mdifferentiableAt (by simp)) |
| 89 | ((hH z).mdifferentiableAt (by simp)) |
| 90 | rw [hfull] at h |
| 91 | exact h |
| 92 | have hL0 : Function.Injective L0 := by |
| 93 | intro a c hac |
| 94 | apply himm z |
| 95 | rw [hcomp] |
| 96 | exact congrArg (mfderiv IC (𝓡 3) N.coordinate_map (H z)) hac |
| 97 | have hL : Function.Injective L := cylinderEuclideanEquiv.symm.injective.comp hL0 |
| 98 | have hproj : mfderiv (𝓡 2) (𝓡 2) (fun w => (H w).1) z = |
| 99 | cylinderHorizontalProjection.comp L := by |
| 100 | change mfderiv (𝓡 2) (𝓡 2) (Prod.fst ∘ H) z = _ |
| 101 | rw [mfderiv_comp z mdifferentiableAt_fst ((hH z).mdifferentiableAt (by simp)), mfderiv_fst] |
| 102 | ext v |
| 103 | change (L0 v).1 = (cylinderEuclideanEquiv (cylinderEuclideanEquiv.symm (L0 v))).1 |
| 104 | rw [cylinderEuclideanEquiv.apply_symm_apply] |
| 105 | have hinj : Function.Injective (cylinderHorizontalProjection.comp L) := by |
| 106 | by_contra hP |
| 107 | obtain ⟨⟨a, ha⟩, u, hu, hh, c, hc⟩ := cylinder_axis_and_horizontal_of_rank_drop L hL hP |
| 108 | let lift := centeredNeckLift N (H z).1 (H z).2 |
| 109 | let A : E →L[ℝ] TangentSpace (𝓡 3) (f z) := mfderiv (𝓡 3) (𝓡 3) lift 0 |
| 110 | have hpoint : lift 0 = f z := by |
| 111 | change centeredNeckLift N (H z).1 (H z).2 0 = f z |
| 112 | rw [centeredNeckLift_zero] |
| 113 | exact neck_coordinate_inverse N (hmem z) |
| 114 | have hA (v : E) : A v = |
| 115 | mfderiv IC (𝓡 3) N.coordinate_map (H z) (cylinderEuclideanEquiv v) := by |
| 116 | change mfderiv (𝓡 3) (𝓡 3) (centeredNeckLift N (H z).1 (H z).2) 0 v = _ |
| 117 | rw [centeredNeckLift_mfderiv N (H z).1 (H z).2 hzero, |
| 118 | centeredCylinderLift_zero, map_zero, |
| 119 | ← sphere_chart_center_zero (H z).1, sphere_chart_inverse_mfderiv] |
| 120 | rfl |
| 121 | have hAL (v : E2) : A (L v) = mfderiv (𝓡 2) (𝓡 3) f z v := by |
| 122 | rw [hA, hcomp] |
| 123 | change mfderiv IC (𝓡 3) N.coordinate_map (H z) |
| 124 | (cylinderEuclideanEquiv (cylinderEuclideanEquiv.symm (L0 v))) = _ |
| 125 | rw [cylinderEuclideanEquiv.apply_symm_apply] |
| 126 | rfl |
| 127 | have ha' : A (e 2) = mfderiv (𝓡 2) (𝓡 3) f z a := by rw [← ha]; exact hAL a |
| 128 | have hc' : A u = mfderiv (𝓡 2) (𝓡 3) f z c := by rw [← hc]; exact hAL c |
| 129 | have hax := hbound N hsmall (H z) hz u hu hh |
| 130 | change 0 < (normalizedNeckMetric N).inner (lift 0) (A (e 2)) (A (e 2)) * |
| 131 | (normalizedNeckMetric N).inner (lift 0) (A u) (A u) - |
| 132 | ((normalizedNeckMetric N).inner (lift 0) (A (e 2)) (A u)) ^ 2 ∧ |
| 133 | |(normalizedNeckConnection N).sectionalCurvature (lift 0) (A (e 2)) (A u)| < k at hax |
| 134 | rw [hpoint, ha', hc'] at hax |
| 135 | have hlo := hlower z a c hax.1 |
| 136 | exact (not_lt_of_ge hlo.le) ((le_abs_self _).trans_lt hax.2) |
| 137 | have hangular : Function.Injective (mfderiv (𝓡 2) (𝓡 2) (fun w => (H w).1) z) := |
| 138 | hproj ▸ hinj |
| 139 | let Dangle : E2 →L[ℝ] E2 := mfderiv (𝓡 2) (𝓡 2) (fun w => (H w).1) z |
| 140 | exact ⟨hangular, |
| 141 | (LinearMap.injective_iff_surjective_of_finrank_eq_finrank |
| 142 | (f := Dangle.toLinearMap) rfl).mp hangular⟩ |
| 143 | |
| 144 | end PoincareMT.M44 |