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.MinimizingRegion.MovingEndpoint |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Attainment.Minimum.ConfinedAttainment |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.StableSet.RegularImage.InteriorSurvival |
| 4 | |
| 5 | /-! |
| 6 | # Relative openness of the actual strict action region |
| 7 | |
| 8 | Proposition 16.4, p. 369. Every reachable endpoint has an attained smooth |
| 9 | representative. Moving-endpoint recovery gives an ambient open neighborhood |
| 10 | relative to the exact physical strip, including its left endpoint. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.Proofs.M46 |
| 22 | |
| 23 | variable {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 24 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport 3 X time I} |
| 25 | {T start : ℝ} {x : G.Point} |
| 26 | |
| 27 | /-- The literal strict action sublevel in Proposition 16.4, p. 369. |
| 28 | Its time strip includes its left physical endpoint. -/ |
| 29 | def confinementRegion (C : ActionConfinement G T start x) : Set G.Point := |
| 30 | {y | G.spacetime.timeFunction y ∈ Ico start T ∧ |
| 31 | ∃ p : M14BackwardPath G T 0 (T - G.spacetime.timeFunction y) x y, |
| 32 | M14BackwardLAction G p < C.barrier} |
| 33 | |
| 34 | /-- Every point of the strict region has an ambient neighborhood |
| 35 | whose intersection with the physical strip remains reachable. |
| 36 | Source: Proposition 16.4, p. 369. -/ |
| 37 | theorem confinementRegion_local |
| 38 | (hM12 : GeneralizedRicciGaugeTheory.{u} 3) |
| 39 | (LG : GeneralizedLGeometryConclusion G) (E : M14ExponentialFamily G T x) |
| 40 | (C : ActionConfinement G T start x) (hstrip : Icc start T ⊆ I.domain) |
| 41 | {y : G.Point} (hy : y ∈ confinementRegion C) : |
| 42 | ∃ V : Set G.Point, IsOpen V ∧ y ∈ V ∧ |
| 43 | V ∩ G.spacetime.timeFunction ⁻¹' Ico start T ⊆ confinementRegion C := by |
| 44 | obtain ⟨hyt, p0, hp0⟩ := hy |
| 45 | have htau : 0 < T - G.spacetime.timeFunction y := sub_pos.mpr hyt.2 |
| 46 | obtain ⟨p, hp⟩ := actionConfinement_attained hM12 C htau |
| 47 | (sub_le_sub_left hyt.1 T) p0 hp0 |
| 48 | have hpB : M14BackwardLAction G p < C.barrier := (hp p0).trans_lt hp0 |
| 49 | obtain ⟨Z, hZ, htrace, _⟩ := minimizing_exponential_branch LG E p hp |
| 50 | have hs : 0 < Real.sqrt (T - G.spacetime.timeFunction y) := Real.sqrt_pos.mpr htau |
| 51 | obtain ⟨b, hsb, hZb, hbchoice⟩ : ∃ b : ℝ, |
| 52 | Real.sqrt (T - G.spacetime.timeFunction y) ≤ b ∧ (Z, b) ∈ E.domain ∧ |
| 53 | (G.spacetime.timeFunction y = start ∨ Real.sqrt (T - G.spacetime.timeFunction y) < b) := by |
| 54 | by_cases ht : G.spacetime.timeFunction y = start |
| 55 | · exact ⟨_, le_rfl, hZ, Or.inl ht⟩ |
| 56 | · have hstart : start < G.spacetime.timeFunction y := lt_of_le_of_ne hyt.1 (Ne.symm ht) |
| 57 | have hinterior : G.spacetime.timeFunction y ∈ interior I.domain := by |
| 58 | apply mem_interior_iff_mem_nhds.mpr |
| 59 | apply mem_of_superset (Ioo_mem_nhds hstart hyt.2) |
| 60 | exact fun _ hz => hstrip (Ioo_subset_Icc_self hz) |
| 61 | obtain ⟨b, hsb, hZb⟩ := exists_surviving_extension_at_interior E hs hZ |
| 62 | (by simpa only [Real.sq_sqrt htau.le, sub_sub_cancel] using hinterior) |
| 63 | exact ⟨b, hsb.le, hZb, Or.inr hsb⟩ |
| 64 | let metric := G.spacetime.horizontalMetric.toRiemannianMetric |
| 65 | let : NormedAddCommGroup (G.Horizontal x) := |
| 66 | (metric.toCore x).toNormedAddCommGroupOfTopology |
| 67 | (metric.continuousAt x) (metric.isVonNBounded x) |
| 68 | let : InnerProductSpace ℝ (G.Horizontal x) := |
| 69 | .ofCoreOfTopology (metric.toCore x) (metric.continuousAt x) (metric.isVonNBounded x) |
| 70 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := ⟨metric⟩ |
| 71 | have hgamma : ContMDiffOn (𝓘(ℝ, ℝ)) (spacetimeModel 3) ∞ (E.gamma Z) (Icc 0 b) := |
| 72 | E.family_smooth.comp (contMDiff_const.prodMk contMDiff_id).contMDiffOn |
| 73 | (fun s hs' => (E.maximal_lifetime Z).out (E.domain_zero Z) hZb hs') |
| 74 | have hclock (s : ℝ) (hs' : s ∈ Icc 0 b) : |
| 75 | G.spacetime.timeFunction (E.gamma Z s) = T - s ^ 2 := |
| 76 | E.clock Z s ((E.maximal_lifetime Z).out (E.domain_zero Z) hZb hs') |
| 77 | obtain ⟨V, hV, hyV, hrecover⟩ := moving_endpoint_recovery hM12 p hpB (E.gamma Z) |
| 78 | hsb hgamma hclock (E.gamma_at_zero Z) htrace |
| 79 | rcases hbchoice with hboundary | hstrict |
| 80 | · refine ⟨V, hV, hyV, ?_⟩ |
| 81 | intro z hz |
| 82 | refine ⟨hz.2, hrecover z hz.1 (sub_pos.mpr hz.2.2) ?_⟩ |
| 83 | apply (Real.sqrt_le_sqrt ?_).trans hsb |
| 84 | exact sub_le_sub_left (hboundary.symm ▸ hz.2.1) T |
| 85 | · let W : Set G.Point := {z | Real.sqrt (T - G.spacetime.timeFunction z) < b} |
| 86 | have hW : IsOpen W := isOpen_Iio.preimage |
| 87 | (Real.continuous_sqrt.comp (continuous_const.sub |
| 88 | (show ContMDiff (spacetimeModel 3) (𝓘(ℝ, ℝ)) ∞ |
| 89 | (fun z : G.Point => G.spacetime.timeFunction z) from |
| 90 | G.spacetime.time_smooth).continuous)) |
| 91 | refine ⟨V ∩ W, hV.inter hW, ⟨hyV, hstrict⟩, ?_⟩ |
| 92 | intro z hz |
| 93 | exact ⟨hz.2, hrecover z hz.1.1 (sub_pos.mpr hz.2.2) hz.1.2.le⟩ |
| 94 | |
| 95 | /-- The actual strict action region has exactly the relative openness |
| 96 | required by `MinimizingRegion`, including its left endpoint. |
| 97 | Source: Proposition 16.4, p. 369. -/ |
| 98 | theorem confinementRegion_relatively_open |
| 99 | (hM12 : GeneralizedRicciGaugeTheory.{u} 3) |
| 100 | (LG : GeneralizedLGeometryConclusion G) (E : M14ExponentialFamily G T x) |
| 101 | (C : ActionConfinement G T start x) (hstrip : Icc start T ⊆ I.domain) : |
| 102 | ∃ U : Set G.Point, IsOpen U ∧ |
| 103 | confinementRegion C = U ∩ G.spacetime.timeFunction ⁻¹' Ico start T := by |
| 104 | classical |
| 105 | choose V hV hyV hsub using fun y : confinementRegion C => |
| 106 | confinementRegion_local hM12 LG E C hstrip y.property |
| 107 | refine ⟨⋃ y : confinementRegion C, V y, isOpen_iUnion hV, ?_⟩ |
| 108 | ext z |
| 109 | constructor |
| 110 | · intro hz |
| 111 | exact ⟨mem_iUnion.mpr ⟨⟨z, hz⟩, hyV ⟨z, hz⟩⟩, hz.1⟩ |
| 112 | · rintro ⟨hzU, hzt⟩ |
| 113 | obtain ⟨y, hy⟩ := mem_iUnion.mp hzU |
| 114 | exact hsub y ⟨hy, hzt⟩ |
| 115 | |
| 116 | end PoincareMT.Proofs.M46 |