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.Avoidance.SafeExitEnergy |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.Avoidance.CylinderFirstExit |
| 4 | |
| 5 | /-! |
| 6 | # Actual initial capture from a positive-action bound |
| 7 | |
| 8 | Lemma 16.15, pp. 379-381. Relative first exit and the physical |
| 9 | square-time energy estimate confine every admissible small-action |
| 10 | path to the actual tested cylinder on the chosen initial interval. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set MeasureTheory Function |
| 17 | open scoped Manifold ContDiff Topology intervalIntegral |
| 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 sufficiently small positive-action budget gives actual initial |
| 30 | capture, including both endpoints of the closed square-time prefix. |
| 31 | Source: Lemma 16.15 and Claim 16.17, pp. 379-381. -/ |
| 32 | theorem actualSafeCylinder_confines_initial_prefix |
| 33 | {F : GeneralizedRicciFlowData.{u}} (G : FlowBoxRicciGeometry F) |
| 34 | (hM12 : GeneralizedRicciGaugeTheory.{u} 3) |
| 35 | {C : GeneralizedSliceCarrier.{u}} [CompactSpace C.carrier] |
| 36 | {origin scale : ℝ} {J : SpacetimeInterval} |
| 37 | {U : TopologicalSpace.Opens C.carrier} |
| 38 | (e : GeneralizedFlowCylinder F C origin scale J.domain U) |
| 39 | (hI : (cylinderPhysicalInterval origin scale e.scale_pos J).domain ⊆ F.interval) |
| 40 | (gBirth : RiemannianMetric 3 C.carrier) {rho : ℝ} (hrho : 0 < rho) |
| 41 | (hbound : ∀ (s : ℝ) (hs : s ∈ J.domain) (z : U) |
| 42 | (v : TangentSpace (𝓡 3) z.val), |
| 43 | scale * ((1 / 2 : ℝ) * gBirth.inner z.val v v) ≤ e.pullbackInner s hs z.val v v) |
| 44 | (center : C.carrier) (hsource : (U : Set C.carrier) = gBirth.ball center (rho / 2)) |
| 45 | {T tau b : ℝ} {x y : G.toLGeometry.Point} |
| 46 | (p : M14BackwardPath G.toLGeometry T 0 tau x y) |
| 47 | (_hb : 0 < b) (hbtau : b ≤ Real.sqrt tau) |
| 48 | (hclock : ∀ s ∈ Icc 0 b, |
| 49 | G.realization.spacetime.timeFunction (p.curve (s ^ 2)) ∈ |
| 50 | (cylinderPhysicalInterval origin scale e.scale_pos J).domain) |
| 51 | (z : (G.realization.timeIntervals.interval |
| 52 | (cylinderPhysicalInterval origin scale e.scale_pos J)).Point × U) |
| 53 | (hbase : p.curve 0 = rawCylinderMap G.realization e z) (hcenter : z.2.val = center) |
| 54 | (hbudget : (∫ t in 0..tau, Real.sqrt t * pathPositiveDensity p t) < rho ^ 2 / (16 * b)) : |
| 55 | MapsTo (fun s => p.curve (s ^ 2)) (Icc 0 b) (range (rawCylinderMap G.realization e)) := by |
| 56 | have hcont : ContinuousOn (fun s => p.curve (s ^ 2)) (Icc 0 b) := by |
| 57 | apply (M14.squarePath_continuousOn p).mono |
| 58 | simpa only [M14SqrtParameterInterval, Real.sqrt_zero] using Icc_subset_Icc le_rfl hbtau |
| 59 | have hrelative : IsOpen {s : Icc (0 : ℝ) b | |
| 60 | p.curve (s.val ^ 2) ∈ range (rawCylinderMap G.realization e)} := |
| 61 | rawCylinder_preimage_isOpen G.realization e hI (fun s : Icc (0 : ℝ) b => |
| 62 | p.curve (s.val ^ 2)) (continuousOn_iff_continuous_domRestrict.mp hcont) |
| 63 | (fun s => hclock s.val s.property) |
| 64 | have hstart : p.curve ((0 : ℝ) ^ 2) ∈ range (rawCylinderMap G.realization e) := by |
| 65 | simp only [zero_pow (by decide : (2 : ℕ) ≠ 0)] |
| 66 | exact ⟨z, hbase.symm⟩ |
| 67 | by_contra hnot |
| 68 | have hleave : ∃ s ∈ Icc 0 b, |
| 69 | p.curve (s ^ 2) ∉ range (rawCylinderMap G.realization e) := by |
| 70 | simpa only [MapsTo, not_forall, Classical.not_imp, exists_prop] using hnot |
| 71 | obtain ⟨d, hd, hdout, hinside, _⟩ := |
| 72 | exists_first_exit_of_relative_preimage hcont hrelative hstart hleave |
| 73 | have hexit := actualSafeCylinder_exit_energy G hM12 e hI gBirth hrho hbound |
| 74 | center hsource p hd.1 (hd.2.trans hbtau) |
| 75 | (hinside.mono_left Ioo_subset_Ico_self) (hclock d ⟨hd.1.le, hd.2⟩) hdout z hbase hcenter |
| 76 | have hden : rho ^ 2 / (16 * b) ≤ rho ^ 2 / (16 * d) := by |
| 77 | exact div_le_div_of_nonneg_left (sq_nonneg rho) (mul_pos (by norm_num) hd.1) |
| 78 | (mul_le_mul_of_nonneg_left hd.2 (by norm_num)) |
| 79 | exact (not_lt_of_ge (hden.trans hexit)) hbudget |
| 80 | |
| 81 | end PoincareMT.Proofs.M46 |