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.NeckGeometry.SourceNeckCoreBuffer |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.CapGeometry.SourceCapBoundaryContact |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.SourceGeometry.CapGeometry.SourceCapBoundaryGraphHit |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Persistence.CapTopology.InnerAttachment |
| 6 | |
| 7 | /-! |
| 8 | # Actual off-path cap exclusion on the selected tube |
| 9 | |
| 10 | Claim 10.4, pp. 250-251. A closed-core contact on the fixed tube produces |
| 11 | a boundary contact there. Actual first-exit buffers capture that contact, |
| 12 | and the original minimum crosses the resulting literal boundary graph. |
| 13 | The whole-path cap barrier gives the contradiction. See derivation 57. |
| 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 | /-- The actual fixed source tube misses every canonical cap's closed core. |
| 26 | All frontier buffers, graph coordinates and path hits are produced from |
| 27 | the original source data, with accuracy before C and the flow. -/ |
| 28 | theorem exists_source_tube_cap_exclusion_accuracy (P : RicciFlowCurvatureTheory.{u}) : |
| 29 | ∃ epsilon₀ : ℝ, 0 < epsilon₀ ∧ epsilon₀ ≤ (1 / 1000 : ℝ) ∧ |
| 30 | ∀ {epsilon C A D₀ D : ℝ} (E : SameTimeCounterexample.{u} epsilon C A D₀ D) |
| 31 | (S : CounterexampleNeckSegment E), |
| 32 | 0 < E.flow.scalar ⟨E.time, E.basepoint⟩ → epsilon ≤ epsilon₀ → |
| 33 | ∀ (T : SourceTubeData S) (K : CapCertificate (E.flow.metric E.time)), |
| 34 | K.epsilon = epsilon → K.cap_constant ≤ C → |
| 35 | Disjoint K.closed_core (T.carrierOpen : Set _) := by |
| 36 | obtain ⟨epsilonC, hCpos, _, hcontact⟩ := exists_source_cap_boundary_contact_accuracy.{u} |
| 37 | obtain ⟨epsilonB, hBpos, hBsmall, hbuffer⟩ := exists_source_neck_core_buffer_accuracy P |
| 38 | obtain ⟨epsilonG, hGpos, _, hhit⟩ := exists_cap_boundary_minimizer_hit_accuracy.{u} |
| 39 | let epsilon₀ := min epsilonC (min epsilonB epsilonG) |
| 40 | refine ⟨epsilon₀, lt_min hCpos (lt_min hBpos hGpos), |
| 41 | ((min_le_right _ _).trans (min_le_left _ _)).trans hBsmall, ?_⟩ |
| 42 | intro epsilon C A D₀ D E S hQ hsmall T K hepsilon hKC |
| 43 | have hεC : epsilon ≤ epsilonC := hsmall.trans (min_le_left _ _) |
| 44 | have hεB : epsilon ≤ epsilonB := |
| 45 | hsmall.trans ((min_le_right _ _).trans (min_le_left _ _)) |
| 46 | have hεG : epsilon ≤ epsilonG := |
| 47 | hsmall.trans ((min_le_right _ _).trans (min_le_right _ _)) |
| 48 | apply disjoint_left.mpr |
| 49 | intro x hxK hxT |
| 50 | obtain ⟨⟨z, hzT, hzK⟩, havoid⟩ := hcontact E S hQ hεC T K hepsilon hKC x hxT hxK |
| 51 | obtain ⟨N, hN, hzN⟩ := T.carrier_subset_neckCarrierUnion hzT |
| 52 | obtain ⟨W, t, ht, hWε, hcenter, hWU, hzero, hone, hzW, haxis⟩ := |
| 53 | hbuffer E S hQ hεB N hN z hzN |
| 54 | obtain ⟨v, hv, hvK⟩ := hhit (E.flow.slice E.time).carrier |
| 55 | (E.flow.metric E.time) (E.flow.connection E.time) K W |
| 56 | (by rw [hepsilon]; exact hεG) (by rw [hWε]; exact hεG) |
| 57 | S.source_region.carrier hWU ht.1 ht.2 S.path_smooth S.source_region.path_mem |
| 58 | S.source_region.minimizing hcenter hzero hone z hzK hzW haxis |
| 59 | exact disjoint_left.mp havoid (K.boundary_subset_closed_core_m28 hvK) |
| 60 | (mem_image_of_mem S.path ⟨hv.1.le, hv.2.le⟩) |
| 61 | |
| 62 | end PoincareMT.M28 |