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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.PartialLimits.RegularSets.CompactImageRegularity |
| 3 | import PoincareLib.Geometry.Riemannian.Comparison.Injectivity.PullbackGeodesics |
| 4 | |
| 5 | /-! |
| 6 | # A fixed Euclidean buffer for the moving image metric |
| 7 | |
| 8 | The lower quadratic bound on the outer coordinate ball gives intrinsic |
| 9 | regularity of radius a/8 at every image of its closed a/64 ball. The |
| 10 | inverse buffer lies in the compact a/2 ball. Source: Morgan--Tian's local |
| 11 | cone-limit argument, pp. 263-265; M28 derivation 132, Sections 2-3. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Metric |
| 18 | open scoped Manifold ContDiff Topology ENNReal |
| 19 | |
| 20 | namespace PoincareMT.M28 |
| 21 | |
| 22 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 23 | normedSpaceTangentSpaceVectorSpace |
| 24 | |
| 25 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 26 | |
| 27 | variable {N : Type*} [TopologicalSpace N] [T2Space N] |
| 28 | [ChartedSpace E N] [IsManifold (𝓡 3) ∞ N] |
| 29 | |
| 30 | /-- The explicit outer, buffer, and inner radii give literal intrinsic |
| 31 | image regularity from the lower coefficient bound. Compactness is used |
| 32 | only for the Euclidean buffer, without a complete ambient manifold. -/ |
| 33 | theorem mem_intrinsicImage_regularPoints_of_euclidean_buffer |
| 34 | (h : RiemannianMetric 3 N) (e : PartialDiffeomorph (𝓡 3) (𝓡 3) E N ∞) |
| 35 | {a : ℝ} (ha : 0 < a) (hsource : ball (0 : E) a ⊆ e.source) |
| 36 | (hlower : ∀ z ∈ ball (0 : E) a, ∀ v : E, |
| 37 | (1 / 8 : ℝ) * ‖v‖ ^ 2 ≤ h.inner (e z) |
| 38 | (mfderiv (𝓡 3) (𝓡 3) e z v) (mfderiv (𝓡 3) (𝓡 3) e z v)) |
| 39 | {x : E} (hx : x ∈ closedBall (0 : E) (a / 64)) : |
| 40 | let V : TopologicalSpace.Opens E := ⟨ball 0 a, isOpen_ball⟩ |
| 41 | let W : TopologicalSpace.Opens N := |
| 42 | ⟨e '' (V : Set E), e.toOpenPartialHomeomorph.isOpen_image_of_subset_source |
| 43 | V.isOpen hsource⟩ |
| 44 | ∀ p : W, (p : N) = e x → |
| 45 | p ∈ regularPoints (intrinsicOpenMetric h W) (a / 8) := by |
| 46 | let V : TopologicalSpace.Opens E := ⟨ball 0 a, isOpen_ball⟩ |
| 47 | let W : TopologicalSpace.Opens N := |
| 48 | ⟨e '' (V : Set E), e.toOpenPartialHomeomorph.isOpen_image_of_subset_source |
| 49 | V.isOpen hsource⟩ |
| 50 | have hxV : x ∈ (V : Set E) := closedBall_subset_ball (by linarith) hx |
| 51 | have hKV : closedBall (0 : E) (a / 2) ⊆ (V : Set E) := |
| 52 | closedBall_subset_ball (by linarith) |
| 53 | have hbound : ∀ z ∈ (V : Set E), ∀ v : TangentSpace (𝓡 3) z, |
| 54 | (RiemannianMetric.euclideanMetric 3).inner z v v ≤ (3 : ℝ) ^ 2 * |
| 55 | h.inner (e z) (mfderiv (𝓡 3) (𝓡 3) e z v) |
| 56 | (mfderiv (𝓡 3) (𝓡 3) e z v) := by |
| 57 | intro z hz v |
| 58 | rw [RiemannianMetric.euclideanMetric_inner, real_inner_self_eq_norm_sq] |
| 59 | nlinarith [hlower z hz v, sq_nonneg ‖(v : E)‖] |
| 60 | have hball : (RiemannianMetric.euclideanMetric 3).ball x (3 * (a / 8)) ⊆ |
| 61 | closedBall (0 : E) (a / 2) := by |
| 62 | intro y hy |
| 63 | change (RiemannianMetric.euclideanMetric 3).edist x y < |
| 64 | ENNReal.ofReal (3 * (a / 8)) at hy |
| 65 | rw [RiemannianMetric.euclideanMetric_edist, edist_dist] at hy |
| 66 | have hxy : dist x y < 3 * (a / 8) := |
| 67 | (ENNReal.ofReal_lt_ofReal_iff (by positivity)).mp hy |
| 68 | have hx0 : dist x 0 ≤ a / 64 := hx |
| 69 | have hy0 := dist_triangle y x (0 : E) |
| 70 | rw [dist_comm y x] at hy0 |
| 71 | change dist y 0 ≤ a / 2 |
| 72 | linarith |
| 73 | change ∀ p : W, (p : N) = e x → |
| 74 | p ∈ regularPoints (intrinsicOpenMetric h W) (a / 8) |
| 75 | intro p hp |
| 76 | have heq : (⟨e x, x, hxV, rfl⟩ : W) = p := Subtype.ext hp.symm |
| 77 | rw [← heq] |
| 78 | exact mem_intrinsicImage_regularPoints_of_compact_inverse_buffer |
| 79 | (RiemannianMetric.euclideanMetric 3) h e V hsource |
| 80 | (isCompact_closedBall 0 (a / 2)) hKV (by norm_num : (0 : ℝ) < 3) |
| 81 | hbound hxV (by positivity) hball |
| 82 | |
| 83 | end PoincareMT.M28 |