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.Surgery.Induction.Noncollapse.Compat.GeneralizedEquation |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.CapEntry.ActualSideEntry |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.CapEntry.CylinderOpenImage |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.CapEntry.LastEntry |
| 5 | |
| 6 | /-! |
| 7 | # The actual lateral-or-top cap-entry alternative |
| 8 | |
| 9 | Proposition 16.13, pp. 377-378. Last entry into the open positive-time |
| 10 | cap image gives a tracked suffix. Clock continuity puts its first point |
| 11 | either at the excluded physical top or at an included physical time. |
| 12 | In the latter case finite-energy recovery forces physical side entry. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter MeasureTheory Function |
| 19 | open scoped Manifold ContDiff Topology intervalIntegral |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.Proofs.M12 |
| 24 | end PoincareMT.Proofs.M12 |
| 25 | open PoincareMT.EpochExtension.Spacetime |
| 26 | |
| 27 | namespace PoincareMT.Proofs.M46 |
| 28 | |
| 29 | open PoincareMT.Proofs.M12 |
| 30 | |
| 31 | /-- Last entry into the actual positive-time cap image is either a |
| 32 | physical side entry with its action barrier or an entry at the excluded |
| 33 | physical top. Source: Proposition 16.13, pp. 377-378. -/ |
| 34 | theorem exists_actualCap_sideEntry_or_top |
| 35 | {F : GeneralizedRicciFlowData.{u}} (G : FlowBoxRicciGeometry F) |
| 36 | (hM12 : GeneralizedRicciGaugeTheory.{u} 3) |
| 37 | {C : GeneralizedSliceCarrier.{u}} [CompactSpace C.carrier] |
| 38 | {origin scale top : ℝ} {J : SpacetimeInterval} |
| 39 | {U : TopologicalSpace.Opens C.carrier} |
| 40 | (e : GeneralizedFlowCylinder F C origin scale J.domain U) |
| 41 | (hI : (cylinderPhysicalInterval origin scale e.scale_pos J).domain ⊆ F.interval) |
| 42 | (hphysical : (cylinderPhysicalInterval origin scale e.scale_pos J).domain = Ioo origin top) |
| 43 | (gBirth : RiemannianMetric 3 C.carrier) {mu A h : ℝ} |
| 44 | (hmu : 0 < mu) (hA : 0 < A) (hh : 0 < h) (hwidth : top - origin ≤ h ^ 2) |
| 45 | (hbound : ∀ (s : ℝ) (hs : s ∈ J.domain) (z : U) |
| 46 | (v : TangentSpace (𝓡 3) z.val), |
| 47 | scale * (mu * gBirth.inner z.val v v) ≤ e.pullbackInner s hs z.val v v) |
| 48 | (center : C.carrier) (hsource : (U : Set C.carrier) = gBirth.ball center (A * h)) |
| 49 | {T tau a b : ℝ} {x y : G.toLGeometry.Point} |
| 50 | (p : M14BackwardPath G.toLGeometry T 0 tau x y) |
| 51 | (ha : 0 < a) (hab : a < b) (hbtau : b ≤ tau) |
| 52 | (hout : p.curve a ∉ range (rawCylinderMap G.realization e)) |
| 53 | (z : (G.realization.timeIntervals.interval |
| 54 | (cylinderPhysicalInterval origin scale e.scale_pos J)).Point × U) |
| 55 | (hend : p.curve b = rawCylinderMap G.realization e z) |
| 56 | (hinner : z.2.val ∈ gBirth.ball center (A * h / 2)) : |
| 57 | ∃ c ∈ Ico a b, |
| 58 | p.curve c ∉ range (rawCylinderMap G.realization e) ∧ |
| 59 | MapsTo p.curve (Ioc c b) (range (rawCylinderMap G.realization e)) ∧ |
| 60 | MapsTo p.curve (Icc c b) (closure (range (rawCylinderMap G.realization e))) ∧ |
| 61 | (mu * A ^ 2 / 4 ≤ ∫ t in c..b, pathPositiveDensity p t ∨ |
| 62 | G.realization.spacetime.timeFunction (p.curve c) = top) := by |
| 63 | let : ChartedSpace (ModelProd (EuclideanHalfSpace 1) (EuclideanSpace ℝ (Fin 3))) |
| 64 | F.point := G.realization.spacetime.chartedSpace |
| 65 | have hopen : IsOpen (cylinderPhysicalInterval origin scale e.scale_pos J).domain := by |
| 66 | rw [hphysical] |
| 67 | exact isOpen_Ioo |
| 68 | have hrawOpen := (rawCylinder_isOpenEmbedding G.realization e hI hopen).isOpen_range |
| 69 | have hpcont : ContinuousOn p.curve (Icc a b) := |
| 70 | p.curve_continuous.mono (Icc_subset_Icc ha.le hbtau) |
| 71 | obtain ⟨c, hc, hcout, hinside, hclosure⟩ := |
| 72 | exists_last_entry_of_continuousOn hab hpcont hrawOpen hout ⟨z, hend.symm⟩ |
| 73 | have hclockClosed : closure (range (rawCylinderMap G.realization e)) ⊆ |
| 74 | G.realization.spacetime.timeFunction ⁻¹' Icc origin top := by |
| 75 | apply closure_minimal _ |
| 76 | (isClosed_Icc.preimage G.realization.spacetime.time_smooth.continuous) |
| 77 | rintro v ⟨w, rfl⟩ |
| 78 | change G.realization.spacetime.timeFunction (rawCylinderMap G.realization e w) ∈ |
| 79 | Icc origin top |
| 80 | rw [rawCylinderMap_time] |
| 81 | exact Ioo_subset_Icc_self (hphysical ▸ w.1.property) |
| 82 | have hclockC := hclockClosed (hclosure ⟨le_rfl, hc.2.le⟩) |
| 83 | have hclockChi : G.toLGeometry.spacetime.timeFunction (p.curve c) ≤ top := hclockC.2 |
| 84 | have hclockB : origin < G.realization.spacetime.timeFunction (p.curve b) := by |
| 85 | rw [hend, rawCylinderMap_time] |
| 86 | exact (show z.1.val ∈ Ioo origin top from hphysical ▸ z.1.property).1 |
| 87 | have htimeC := p.curve_time c ⟨ha.le.trans hc.1, hc.2.le.trans hbtau⟩ |
| 88 | have htimeB := p.curve_time b ⟨ha.le.trans hab.le, hbtau⟩ |
| 89 | have hclockClo : origin < G.realization.spacetime.timeFunction (p.curve c) := by |
| 90 | change G.toLGeometry.spacetime.timeFunction (p.curve c) = T - c at htimeC |
| 91 | change G.toLGeometry.spacetime.timeFunction (p.curve b) = T - b at htimeB |
| 92 | change origin < G.toLGeometry.spacetime.timeFunction (p.curve b) at hclockB |
| 93 | change origin < G.toLGeometry.spacetime.timeFunction (p.curve c) |
| 94 | linarith [hc.2] |
| 95 | refine ⟨c, hc, hcout, hinside, hclosure, ?_⟩ |
| 96 | by_cases htop : G.realization.spacetime.timeFunction (p.curve c) < top |
| 97 | · left |
| 98 | have hclockMem : G.realization.spacetime.timeFunction (p.curve c) ∈ |
| 99 | (cylinderPhysicalInterval origin scale e.scale_pos J).domain := by |
| 100 | rw [hphysical] |
| 101 | exact ⟨hclockClo, htop⟩ |
| 102 | have hduration : b - c ≤ h ^ 2 := by |
| 103 | change origin < G.toLGeometry.spacetime.timeFunction (p.curve b) at hclockB |
| 104 | linarith |
| 105 | exact actualCapSideEntry_action_lower G hM12 e hI gBirth hmu hA hh hbound |
| 106 | center hsource p (ha.trans_le hc.1) hc.2 hbtau hduration |
| 107 | (hinside.mono_left Ioo_subset_Ioc_self) hclockMem hcout z hend hinner |
| 108 | · exact Or.inr (le_antisymm hclockC.2 (le_of_not_gt htop)) |
| 109 | |
| 110 | end PoincareMT.Proofs.M46 |