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.SourceGeometry.Ends.SourceTubeData |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.CapGeometry.SourceCapWholePathBarrier |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Analysis.Geometry.FrontierCrossing |
| 5 | |
| 6 | /-! |
| 7 | # Cap-boundary contact on the actual retained source tube |
| 8 | |
| 9 | Claim 10.4, Morgan--Tian pp. 249-251. The same selected tube lies in the |
| 10 | original source-neck union. A closed-core contact gives the whole-path |
| 11 | cap barrier; preconnectedness and the actual low path point then produce |
| 12 | a literal boundary contact on that same tube. No path hit is assumed. |
| 13 | See the source-cap-boundary-contact task derivation. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M28 |
| 24 | |
| 25 | /-- Every point of the actual tube lies in an original selected source |
| 26 | neck, by the literal chain carrier and its actual source provenance. -/ |
| 27 | theorem SourceTubeData.carrier_subset_neckCarrierUnion |
| 28 | {epsilon C A D₀ D : ℝ} |
| 29 | {E : SameTimeCounterexample.{u} epsilon C A D₀ D} |
| 30 | {S : CounterexampleNeckSegment E} (T : SourceTubeData S) : |
| 31 | (T.carrierOpen : Set _) ⊆ S.neckCarrierUnion := by |
| 32 | intro x hx |
| 33 | change x ∈ T.tube.carrier at hx |
| 34 | rw [T.carrier_eq] at hx |
| 35 | change x ∈ ⋃ i : {i // i ∈ T.chain.shape.active}, (T.chain.neck i.1).carrier at hx |
| 36 | obtain ⟨i, hxi⟩ := mem_iUnion.mp hx |
| 37 | obtain ⟨N, hN, hsame⟩ := T.chain.selected i.1 i.2 |
| 38 | rw [T.source_eq] at hN |
| 39 | exact ⟨N, hN, hsame.2.2.2.1 ▸ hxi⟩ |
| 40 | |
| 41 | /-- A closed-core point in the same actual tube produces a literal cap |
| 42 | boundary contact there, while the whole original path avoids the closed |
| 43 | core. The accuracy precedes all source data and the contacting cap. -/ |
| 44 | theorem exists_source_cap_boundary_contact_accuracy : |
| 45 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 200 : ℝ) ∧ |
| 46 | ∀ {epsilon C A D₀ D : ℝ} (E : SameTimeCounterexample.{u} epsilon C A D₀ D) |
| 47 | (S : CounterexampleNeckSegment E), |
| 48 | 0 < E.flow.scalar ⟨E.time, E.basepoint⟩ → epsilon ≤ epsilon₀ → |
| 49 | ∀ (T : SourceTubeData S) (K : CapCertificate (E.flow.metric E.time)), |
| 50 | K.epsilon = epsilon → K.cap_constant ≤ C → |
| 51 | ∀ x ∈ (T.carrierOpen : Set _), x ∈ K.closed_core → |
| 52 | ((T.carrierOpen : Set _) ∩ K.boundary_sphere).Nonempty ∧ |
| 53 | Disjoint K.closed_core (S.path '' Icc (0 : ℝ) 1) := by |
| 54 | obtain ⟨epsilon₀, hpos, hsmall, hbarrier⟩ := |
| 55 | exists_source_cap_whole_path_avoidance_accuracy.{u} |
| 56 | refine ⟨epsilon₀, hpos, hsmall, ?_⟩ |
| 57 | intro epsilon C A D₀ D E S hQ hε T K hepsilon hKC x hxT hxcore |
| 58 | have hxK : x ∈ K.carrier := by |
| 59 | rw [K.closed_core_eq_complement_end] at hxcore |
| 60 | exact hxcore.1 |
| 61 | obtain ⟨_, _, _, havoid⟩ := hbarrier E S hQ hε K hepsilon hKC x |
| 62 | (T.carrier_subset_neckCarrierUnion hxT) hxK |
| 63 | have hlowT : S.path S.lower ∈ (T.carrierOpen : Set _) := |
| 64 | T.path_mem (left_mem_Icc.mpr S.lower_lt_upper.le) |
| 65 | have hlowout : S.path S.lower ∉ K.closed_core := by |
| 66 | intro hlow |
| 67 | apply disjoint_left.mp havoid hlow |
| 68 | exact ⟨S.lower, ⟨S.lower_pos.le, (S.lower_lt_upper.trans S.upper_lt_one).le⟩, rfl⟩ |
| 69 | have hT : IsPreconnected T.tube.carrier := by |
| 70 | apply isPreconnected_iff_preconnectedSpace.mpr |
| 71 | exact T.preconnected |
| 72 | obtain ⟨z, hzT, hzfront⟩ := |
| 73 | hT.exists_mem_frontier_of_mem_of_notMem hxT hxcore hlowT hlowout |
| 74 | refine ⟨⟨z, hzT, ?_⟩, havoid⟩ |
| 75 | simpa only [K.core_frontier_eq_boundary] using hzfront |
| 76 | |
| 77 | end PoincareMT.M28 |