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.Tube.NeckGeometry.NeckSphereProjection |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.NeckGeometry.NeckMinimizerTraversal |
| 4 | |
| 5 | /-! |
| 6 | # A literal cap-boundary hit from buffered contact |
| 7 | |
| 8 | Claim 10.4 and Appendix A.11, Morgan--Tian pp. 249-251 and 503-504. One |
| 9 | actual boundary point in the symmetric three-quarter core produces the |
| 10 | boundary's smooth graph. The regional minimum through the same neck's |
| 11 | center then crosses that literal sphere. No graph, sign, entry or hit is |
| 12 | an input. See the source-cap-boundary-contact task derivation. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M28 |
| 23 | |
| 24 | /-- A literal cap-boundary contact in the three-quarter core of an |
| 25 | admissible neck forces a hit by the actual regional minimum. The graph |
| 26 | and crossing are produced, with accuracy before every geometric input. -/ |
| 27 | theorem exists_cap_boundary_minimizer_hit_accuracy : |
| 28 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 1000 : ℝ) ∧ |
| 29 | ∀ (M : Type u) [TopologicalSpace M] |
| 30 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 31 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 32 | [T2Space M] [T3Space M] |
| 33 | (g : RiemannianMetric 3 M) (_D : LeviCivitaData g) |
| 34 | (K : CapCertificate g) (W : EpsilonNeck g), |
| 35 | K.epsilon ≤ epsilon₀ → W.epsilon ≤ epsilon₀ → |
| 36 | ∀ U : Set M, W.carrier ⊆ U → |
| 37 | ∀ {γ : ℝ → M} {a b t : ℝ}, a < t → t < b → |
| 38 | ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 γ (Icc a b) → |
| 39 | MapsTo γ (Icc a b) U → |
| 40 | g.pathELength γ a b = intrinsicEDist g U (γ a) (γ b) → |
| 41 | γ t = W.center → γ a ∉ W.carrier → γ b ∉ W.carrier → |
| 42 | ∀ z ∈ K.boundary_sphere, z ∈ W.carrier → |
| 43 | |(W.coordinate_inverse z).2| ≤ 3 * W.epsilon⁻¹ / 4 → |
| 44 | ∃ v ∈ Ioo a b, γ v ∈ K.boundary_sphere := by |
| 45 | obtain ⟨epsilonG, hGpos, _, hgraph⟩ := exists_buffered_neck_sphere_graph_accuracy.{u} |
| 46 | refine ⟨min epsilonG (1 / 1000), lt_min hGpos (by norm_num), min_le_right _ _, ?_⟩ |
| 47 | intro M _ _ _ _ _ _ _ g D K W hK hW U hWU γ a b t hat htb |
| 48 | hγ hγU hmin hcenter haout hbout z hzboundary hzW haxis |
| 49 | have hboundary : K.boundary_sphere = |
| 50 | range (fun p : UnitTwoSphere => K.boundary_neck.coordinate_map (p, 0)) := by |
| 51 | rw [K.boundary_eq_neck_sphere, K.boundary_neck.central_sphere_eq] |
| 52 | ext y |
| 53 | constructor |
| 54 | · rintro ⟨⟨p, s⟩, ⟨_, hs⟩, hpoint⟩ |
| 55 | have hs0 : s = 0 := mem_singleton_iff.mp hs |
| 56 | subst s |
| 57 | exact ⟨p, hpoint⟩ |
| 58 | · rintro ⟨p, rfl⟩ |
| 59 | exact ⟨(p, 0), ⟨mem_univ _, mem_singleton _⟩, rfl⟩ |
| 60 | obtain ⟨q, hq⟩ : ∃ q : UnitTwoSphere, |
| 61 | K.boundary_neck.coordinate_map (q, 0) = z := by |
| 62 | rw [hboundary] at hzboundary |
| 63 | exact hzboundary |
| 64 | have hKgraph : K.boundary_neck.epsilon ≤ epsilonG := by |
| 65 | rw [K.boundary_neck_epsilon] |
| 66 | exact hK.trans (min_le_left _ _) |
| 67 | have hzero : (0 : ℝ) ∈ Ioo (-K.boundary_neck.epsilon⁻¹) |
| 68 | K.boundary_neck.epsilon⁻¹ := by |
| 69 | have hpos := inv_pos.mpr K.boundary_neck.epsilon_pos |
| 70 | exact ⟨neg_lt_zero.mpr hpos, hpos⟩ |
| 71 | have hqW : K.boundary_neck.coordinate_map (q, 0) ∈ W.carrier := by |
| 72 | simpa only [hq] using hzW |
| 73 | have hqaxis : |(W.coordinate_inverse (K.boundary_neck.coordinate_map (q, 0))).2| ≤ |
| 74 | 3 * W.epsilon⁻¹ / 4 := by |
| 75 | simpa only [hq] using haxis |
| 76 | obtain ⟨_, _, f, hf, hfb, _, hrange⟩ := hgraph M g D W K.boundary_neck |
| 77 | (hW.trans (min_le_left _ _)) hKgraph 0 hzero q hqW hqaxis |
| 78 | obtain ⟨v, hv, hvgraph⟩ := exists_neck_minimizer_graph_crossing W |
| 79 | (hW.trans (min_le_right _ _)) hWU hat htb hγ hγU hmin |
| 80 | hcenter haout hbout hf hfb |
| 81 | refine ⟨v, hv, ?_⟩ |
| 82 | rw [hboundary, hrange] |
| 83 | exact hvgraph |
| 84 | |
| 85 | end PoincareMT.M28 |