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.CappedTwoNeckConfinement |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Paths.ConfinementMinimizers |
| 4 | |
| 5 | /-! |
| 6 | # Actual full-carrier minimizers between two selected neck centers |
| 7 | |
| 8 | Claim 10.3, Morgan--Tian pp. 248-249. In the singly capped branch the |
| 9 | actual compact cap-side construction confines competitors in the full |
| 10 | capped carrier. In particular, competitors may pass through the cap. |
| 11 | The endpoint crossings and local M07 producer give the regional minimum. |
| 12 | See derivation 28 and the source-producer obligation map. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Topology ENNReal Bundle |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.CappedTubeCertificate |
| 23 | |
| 24 | open M28 |
| 25 | |
| 26 | variable {M : Type u} [TopologicalSpace M] |
| 27 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 28 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 29 | [T2Space M] [T3Space M] {g : RiemannianMetric 3 M} |
| 30 | |
| 31 | /-- The actual capped region supplies K and crossings for a finite path |
| 32 | between two selected centers. The infimum is over the full capped carrier. -/ |
| 33 | theorem exists_chain_neck_minimizer (T : CappedTubeCertificate g) |
| 34 | (i j : ℤ) (hi : i ∈ T.tube.chain.shape.active) (hj : j ∈ T.tube.chain.shape.active) |
| 35 | (hdisj : Disjoint (T.tube.chain.neck i).carrier (T.tube.chain.neck j).carrier) |
| 36 | (hcap : Disjoint T.cap.carrier (T.tube.chain.neck i).carrier ∨ |
| 37 | Disjoint T.cap.carrier (T.tube.chain.neck j).carrier) |
| 38 | (hsmall : T.tube.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.tube.chain.neck i).center) |
| 43 | (hη1 : η b = (T.tube.chain.neck j).center) |
| 44 | (hηL : g.pathELength η a b < ENNReal.ofReal L) : |
| 45 | ∃ γ : ℝ → M, γ 0 = η a ∧ γ 1 = η b ∧ |
| 46 | ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 γ (Icc (0 : ℝ) 1) ∧ |
| 47 | MapsTo γ (Icc (0 : ℝ) 1) T.carrier ∧ |
| 48 | g.pathELength γ 0 1 = intrinsicEDist g T.carrier (η a) (η b) ∧ |
| 49 | g.pathELength γ 0 1 ≠ ⊤ ∧ g.pathELength γ 0 1 < ENNReal.ofReal L := by |
| 50 | let N : Bool → EpsilonNeck g := fun k => T.tube.chain.neck (if k then j else i) |
| 51 | have hactive (k : Bool) : (if k then j else i) ∈ T.tube.chain.shape.active := by |
| 52 | cases k |
| 53 | · exact hi |
| 54 | · exact hj |
| 55 | have hNsmall (k : Bool) : (N k).epsilon ≤ neckShorteningEpsilon := |
| 56 | (T.tube.chain.epsilon_eq _ (hactive k)).trans_le hsmall |
| 57 | have hNU (k : Bool) : (N k).carrier ⊆ T.carrier := by |
| 58 | apply Subset.trans _ T.tube_subset |
| 59 | rw [T.tube.carrier_eq_chain_union] |
| 60 | exact subset_iUnion_of_subset ⟨_, hactive k⟩ Subset.rfl |
| 61 | obtain ⟨K, hK, hKU, hcross⟩ := T.exists_chain_neck_confinement i j hi hj hdisj hcap |
| 62 | have hopen : IsOpen T.carrier := by |
| 63 | rw [T.carrier_eq_union] |
| 64 | exact T.cap.carrier_open.union T.tube.carrier_open |
| 65 | let U : TopologicalSpace.Opens M := ⟨T.carrier, hopen⟩ |
| 66 | obtain ⟨α, hα0, hα1, hα, hαU, hαlength⟩ := exists_unit_interval_path g hab hη hηU |
| 67 | have hαL : g.pathELength α 0 1 < ENNReal.ofReal L := hαlength ▸ hηL |
| 68 | have hcross' : ∀ γ : ℝ → M, γ 0 = η a → γ 1 = η b → |
| 69 | ContinuousOn γ (Icc (0 : ℝ) 1) → MapsTo γ (Icc (0 : ℝ) 1) (U : Set M) → |
| 70 | ∀ t ∈ Icc (0 : ℝ) 1, γ t ∉ K → |
| 71 | ∃ (k : Bool) (c d : ℝ), 0 ≤ c ∧ c ≤ t ∧ t ≤ d ∧ d ≤ 1 ∧ |
| 72 | γ c ∈ (N k).central_sphere ∧ γ d ∈ (N k).central_sphere ∧ |
| 73 | γ t ∉ (N k).region (-((N k).epsilon⁻¹ / 2)) ((N k).epsilon⁻¹ / 2) := by |
| 74 | intro γ hγ0 hγ1 hγ hγU t ht hnot |
| 75 | exact hcross γ (hγ0.trans hη0) (hγ1.trans hη1) hγ hγU t ht hnot |
| 76 | obtain ⟨_, _, _, hmin⟩ := |
| 77 | exists_confined_sequence_and_minimizer_of_endpoint_crossings g U hK hKU N hNsmall |
| 78 | (fun k => (N k).central_sphere_subset.trans (hNU k)) |
| 79 | hcross' hα0 hα1 hα hαU hαL |
| 80 | exact hmin |
| 81 | |
| 82 | end PoincareMT.CappedTubeCertificate |