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.BirthNeighborhood |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.Avoidance.WindowAvoidance |
| 4 | |
| 5 | /-! |
| 6 | # Approaching a cap birth along the same admissible path |
| 7 | |
| 8 | Lemma 16.15, pp. 379-382. The future neighborhood of the actual birth |
| 9 | point is reached just before the corresponding backward parameter. |
| 10 | Thus positive-time cap avoidance also excludes that birth point. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter Function |
| 17 | open scoped Manifold ContDiff Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.Proofs.M12 |
| 22 | end PoincareMT.Proofs.M12 |
| 23 | open PoincareMT.EpochExtension.Spacetime |
| 24 | |
| 25 | namespace PoincareMT.Proofs.M46 |
| 26 | |
| 27 | open PoincareMT.Proofs.M12 |
| 28 | |
| 29 | /-- A future relative neighborhood of a birth point contains points of |
| 30 | the same backward path at strictly earlier parameters. Source: Lemma |
| 31 | 16.15, pp. 379-382. -/ |
| 32 | theorem backwardPath_reaches_future_neighborhood |
| 33 | {F : GeneralizedRicciFlowData.{u}} (G : FlowBoxRicciGeometry F) |
| 34 | {T tau a b origin width : ℝ} {x y : G.toLGeometry.Point} |
| 35 | (p : M14BackwardPath G.toLGeometry T 0 tau x y) |
| 36 | (ha : 0 ≤ a) (hab : a < b) (hbtau : b ≤ tau) (hwidth : 0 < width) |
| 37 | (hclock : T - b = origin) {O : Set G.toLGeometry.Point} |
| 38 | (hnear : O ∈ 𝓝[G.realization.spacetime.timeFunction ⁻¹' |
| 39 | Ioc origin (origin + width)] (p.curve b)) : |
| 40 | ∃ r ∈ Ioo a b, p.curve r ∈ O := by |
| 41 | have hsub : Ioo a b ⊆ Icc 0 tau := by |
| 42 | intro r hr |
| 43 | exact ⟨ha.trans hr.1.le, hr.2.le.trans hbtau⟩ |
| 44 | have : NeBot (𝓝[Ioo a b] b) := right_nhdsWithin_Ioo_neBot hab |
| 45 | have hcont : Tendsto p.curve (𝓝[Ioo a b] b) (𝓝 (p.curve b)) := |
| 46 | (p.curve_continuous b ⟨ha.trans hab.le, hbtau⟩).mono hsub |
| 47 | have htend : Tendsto (fun r : ℝ => T - r) (𝓝[Ioo a b] b) (𝓝 origin) := by |
| 48 | rw [← hclock] |
| 49 | exact (continuous_const.sub continuous_id).continuousAt.tendsto.mono_left |
| 50 | nhdsWithin_le_nhds |
| 51 | have hupper : ∀ᶠ r in 𝓝[Ioo a b] b, T - r < origin + width := |
| 52 | htend (Iio_mem_nhds (by linarith : origin < origin + width)) |
| 53 | have htimes : ∀ᶠ r in 𝓝[Ioo a b] b, |
| 54 | p.curve r ∈ G.realization.spacetime.timeFunction ⁻¹' Ioc origin (origin + width) := by |
| 55 | filter_upwards [hupper, self_mem_nhdsWithin] with r hr ht |
| 56 | change G.toLGeometry.spacetime.timeFunction (p.curve r) ∈ Ioc origin (origin + width) |
| 57 | rw [p.curve_time r (hsub ht)] |
| 58 | exact ⟨by linarith [ht.2], hr.le⟩ |
| 59 | have hcapture := (tendsto_nhdsWithin_iff.mpr ⟨hcont, htimes⟩) hnear |
| 60 | have hmem : ∀ᶠ r in 𝓝[Ioo a b] b, r ∈ Ioo a b := self_mem_nhdsWithin |
| 61 | obtain ⟨r, hr, hcaptured⟩ := (hmem.and hcapture).exists |
| 62 | exact ⟨r, hr, hcaptured⟩ |
| 63 | |
| 64 | end PoincareMT.Proofs.M46 |