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.CapGeometry.CapNeckConfinement |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Paths.ConfinementMinimizers |
| 4 | |
| 5 | /-! |
| 6 | # Actual intrinsic minimizers in the cap-to-neck branch |
| 7 | |
| 8 | Claim 10.3, Morgan--Tian pp. 248-249. The actual attachment and selected |
| 9 | neck construct the one compact confinement region and its return crossings. |
| 10 | The checked shortening consumer then produces a finite C1 minimizer without |
| 11 | a compactness, completeness or minimizing-sequence input. See derivation 28. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Topology ENNReal Bundle |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.CappedTubeCertificate |
| 22 | |
| 23 | open M28 |
| 24 | |
| 25 | variable {M : Type u} [TopologicalSpace M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 27 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 28 | [T2Space M] [T3Space M] {g : RiemannianMetric 3 M} |
| 29 | |
| 30 | /-- An actual cap-to-neck source path has an actual finite C1 regional |
| 31 | minimizer. The compact set and return crossings are produced from the |
| 32 | literal attachment and selected neck before the infimum argument. -/ |
| 33 | theorem exists_core_neck_minimizer (T : CappedTubeCertificate g) |
| 34 | (N : EpsilonNeck g) (hNU : N.carrier ⊆ T.tube.carrier) |
| 35 | (hS : SmoothSphereIsotopicIn T.tube.carrier N.central_sphere |
| 36 | T.tube.cylinder.middleSphere) |
| 37 | (hcapN : Disjoint T.cap.carrier N.carrier) |
| 38 | (hsmall : N.epsilon ≤ neckShorteningEpsilon) |
| 39 | {η : ℝ → M} {a b L : ℝ} (hab : a ≤ b) |
| 40 | (hη : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 η (Icc a b)) |
| 41 | (hηU : MapsTo η (Icc a b) T.carrier) |
| 42 | (hη0 : η a ∈ T.cap.carrier) (hη1 : η b ∈ N.central_sphere) |
| 43 | (hηL : g.pathELength η a b < ENNReal.ofReal L) : |
| 44 | ∃ γ : ℝ → M, γ 0 = η a ∧ γ 1 = η b ∧ |
| 45 | ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 γ (Icc (0 : ℝ) 1) ∧ |
| 46 | MapsTo γ (Icc (0 : ℝ) 1) T.carrier ∧ |
| 47 | g.pathELength γ 0 1 = intrinsicEDist g T.carrier (η a) (η b) ∧ |
| 48 | g.pathELength γ 0 1 ≠ ⊤ ∧ g.pathELength γ 0 1 < ENNReal.ofReal L := by |
| 49 | obtain ⟨K, hK, hKU, hcross⟩ := T.exists_core_neck_confinement N hNU hS hcapN |
| 50 | have hopen : IsOpen T.carrier := by |
| 51 | rw [T.carrier_eq_union] |
| 52 | exact T.cap.carrier_open.union T.tube.carrier_open |
| 53 | let U : TopologicalSpace.Opens M := ⟨T.carrier, hopen⟩ |
| 54 | obtain ⟨α, hα0, hα1, hα, hαU, hαlength⟩ := exists_unit_interval_path g hab hη hηU |
| 55 | have hαL : g.pathELength α 0 1 < ENNReal.ofReal L := hαlength ▸ hηL |
| 56 | have hcross' : ∀ γ : ℝ → M, γ 0 = η a → γ 1 = η b → |
| 57 | ContinuousOn γ (Icc (0 : ℝ) 1) → MapsTo γ (Icc (0 : ℝ) 1) (U : Set M) → |
| 58 | ∀ t ∈ Icc (0 : ℝ) 1, γ t ∉ K → |
| 59 | ∃ (i : Bool) (c d : ℝ), 0 ≤ c ∧ c ≤ t ∧ t ≤ d ∧ d ≤ 1 ∧ |
| 60 | γ c ∈ N.central_sphere ∧ γ d ∈ N.central_sphere ∧ |
| 61 | γ t ∉ N.region (-(N.epsilon⁻¹ / 2)) (N.epsilon⁻¹ / 2) := by |
| 62 | intro γ hγ0 hγ1 hγ hγU t ht hnot |
| 63 | obtain ⟨c, d, hc, hct, htd, hd, hcs, hds, hexit⟩ := |
| 64 | hcross γ (hγ0 ▸ hη0) (hγ1 ▸ hη1) hγ hγU t ht hnot |
| 65 | exact ⟨false, c, d, hc, hct, htd, hd, hcs, hds, hexit⟩ |
| 66 | obtain ⟨_, _, _, hmin⟩ := |
| 67 | exists_confined_sequence_and_minimizer_of_endpoint_crossings g U hK hKU |
| 68 | (fun _ => N) (fun _ => hsmall) |
| 69 | (fun _ => (N.central_sphere_subset.trans hNU).trans T.tube_subset) |
| 70 | hcross' hα0 hα1 hα hαU hαL |
| 71 | exact hmin |
| 72 | |
| 73 | end PoincareMT.CappedTubeCertificate |