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.ReducedGeometry.Exponential.Domain.SmoothPrefixPropagation |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.InitialValue.InitialSmooth |
| 3 | |
| 4 | /-! |
| 5 | # Joint relative openness and smoothness of the actual maximal family |
| 6 | |
| 7 | Morgan-Tian Definition 6.17 and Lemma 6.18, pp. 113-114. |
| 8 | Smooth-prefix propagation in the actual horizontal metric norm and |
| 9 | single-path continuation give a smooth relative tube near every |
| 10 | surviving positive pair. The zero-time results complete the frozen |
| 11 | joint relative openness, smoothness and continuity clauses. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Topology Bundle |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M14 |
| 22 | |
| 23 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 24 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 25 | {T : ℝ} {x : G.Point} |
| 26 | |
| 27 | private theorem horizontal_t2Space : T2Space (G.Horizontal x) := |
| 28 | FiberBundle.t2Space (EuclideanSpace ℝ (Fin n)) G.Horizontal x |
| 29 | |
| 30 | attribute [local instance] horizontal_t2Space |
| 31 | |
| 32 | /-- Every actual surviving positive prefix has a common open |
| 33 | initial-vector neighborhood on which survival and the contract's |
| 34 | joint smoothness hold through that closed time, Lemma 6.18, |
| 35 | pp. 113-114. -/ |
| 36 | theorem initialValueCurve_smooth_prefix |
| 37 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 38 | (hbase : G.spacetime.timeFunction x = T) {Z : G.Horizontal x} {s : ℝ} |
| 39 | (hs : 0 < s) (hsurv : (Z, s) ∈ initialValueDomain G T x) : |
| 40 | ∃ U : Set (G.Horizontal x), IsOpen U ∧ Z ∈ U ∧ |
| 41 | U ×ˢ Icc 0 s ⊆ initialValueDomain G T x ∧ |
| 42 | M14HorizontalFamilySmooth G (initialValueCurve G T x) (U ×ˢ Icc 0 s) := by |
| 43 | let metric := G.spacetime.horizontalMetric.toRiemannianMetric |
| 44 | let : NormedAddCommGroup (G.Horizontal x) := |
| 45 | (metric.toCore x).toNormedAddCommGroupOfTopology |
| 46 | (metric.continuousAt x) (metric.isVonNBounded x) |
| 47 | let : InnerProductSpace ℝ (G.Horizontal x) := |
| 48 | .ofCoreOfTopology (metric.toCore x) (metric.continuousAt x) (metric.isVonNBounded x) |
| 49 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := ⟨metric⟩ |
| 50 | have hprev : ∃ a ∈ I.domain, a < T := |
| 51 | ⟨T - s ^ 2, (initialValueDomain_admissible hbase hsurv).2, |
| 52 | sub_lt_self T (sq_pos_of_pos hs)⟩ |
| 53 | obtain ⟨d, hd, U, hU, hZU, htube, hsm⟩ := |
| 54 | initialValueCurve_smooth_initial_tube hM04 hM12 hbase hprev Z |
| 55 | obtain ⟨V, hV, hZV, hsurvV, hsmV⟩ := initialValueCurve_smooth_prefix_from_initial_tube |
| 56 | hM04 hM12 hbase (fun V : G.Horizontal x => V) Z hs hsurv |
| 57 | ⟨d, hd, U, hU, hZU, fun W hW => htube ⟨hW, hd.le, le_rfl⟩, hsm⟩ |
| 58 | exact ⟨V, hV, hZV, fun z hz => initialValueDomain_prefix |
| 59 | (hsurvV z.1 hz.1) hz.2.1 hz.2.2, hsmV⟩ |
| 60 | |
| 61 | /-- Every positive surviving pair lies in a jointly smooth actual |
| 62 | survival tube that is a relative neighborhood in the full physically |
| 63 | admissible parameter set, including physical boundary times, |
| 64 | Lemma 6.18, pp. 113-114. -/ |
| 65 | theorem initialValueCurve_smooth_neighborhood_positive |
| 66 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 67 | (hbase : G.spacetime.timeFunction x = T) {Z : G.Horizontal x} {s : ℝ} |
| 68 | (hs : 0 < s) (hsurv : (Z, s) ∈ initialValueDomain G T x) : |
| 69 | ∃ r : ℝ, s ≤ r ∧ ∃ U : Set (G.Horizontal x), IsOpen U ∧ Z ∈ U ∧ |
| 70 | U ×ˢ Icc 0 r ∈ 𝓝[M14AdmissibleParameter G T x] (Z, s) ∧ |
| 71 | U ×ˢ Icc 0 r ⊆ initialValueDomain G T x ∧ |
| 72 | M14HorizontalFamilySmooth G (initialValueCurve G T x) (U ×ˢ Icc 0 r) := by |
| 73 | obtain ⟨y, ⟨P⟩⟩ := (initialValueDomain_positive_iff hs).mp hsurv |
| 74 | obtain ⟨r, hsr, hnear, z, Q, _⟩ := |
| 75 | exists_initialValuePath_extension_neighborhood hM04 hM12 P |
| 76 | rw [Real.sqrt_sq hs.le] at hsr hnear |
| 77 | have hr : 0 < r := hs.trans_le hsr |
| 78 | obtain ⟨U, hU, hZU, htube, hsm⟩ := |
| 79 | initialValueCurve_smooth_prefix hM04 hM12 hbase hr (Or.inr ⟨hr, z, ⟨Q⟩⟩) |
| 80 | refine ⟨r, hsr, U, hU, hZU, ?_, htube, hsm⟩ |
| 81 | have hprod : M14AdmissibleParameter G T x = |
| 82 | (univ : Set (G.Horizontal x)) ×ˢ {r | 0 ≤ r ∧ T - r ^ 2 ∈ I.domain} := by |
| 83 | ext w |
| 84 | simp only [M14AdmissibleParameter, mem_ofPred_eq, mem_prod, mem_univ, true_and] |
| 85 | rw [hprod, nhdsWithin_prod_eq, nhdsWithin_univ] |
| 86 | exact prod_mem_prod (hU.mem_nhds hZU) hnear |
| 87 | |
| 88 | /-- The actual maximal survival domain is relatively open in the |
| 89 | frozen admissible parameter set at every pair, Definition 6.17 and |
| 90 | Lemma 6.18, pp. 113-114. -/ |
| 91 | theorem initialValueDomain_relative_open |
| 92 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 93 | (hbase : G.spacetime.timeFunction x = T) : |
| 94 | ∀ z ∈ initialValueDomain G T x, ∃ U : Set (G.Horizontal x × ℝ), |
| 95 | IsOpen U ∧ z ∈ U ∧ U ∩ M14AdmissibleParameter G T x ⊆ initialValueDomain G T x := by |
| 96 | rintro ⟨Z, s⟩ hz |
| 97 | rcases eq_or_lt_of_le (initialValueDomain_nonneg hz) with hs | hs |
| 98 | · subst s |
| 99 | exact initialValueDomain_zero_relative_open hM04 hM12 hbase Z |
| 100 | · obtain ⟨_, _, _, _, _, hnear, hsub, _⟩ := |
| 101 | initialValueCurve_smooth_neighborhood_positive hM04 hM12 hbase hs hz |
| 102 | obtain ⟨U, hU, hzU, hUsub⟩ := mem_nhdsWithin.mp hnear |
| 103 | exact ⟨U, hU, hzU, hUsub.trans hsub⟩ |
| 104 | |
| 105 | /-- The actual selected maximal family has precisely the frozen |
| 106 | joint within smoothness on its whole survival domain, including |
| 107 | zero and physical closed endpoints, Lemma 6.18, pp. 113-114. -/ |
| 108 | theorem initialValueCurve_family_smooth |
| 109 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 110 | (hbase : G.spacetime.timeFunction x = T) : |
| 111 | M14HorizontalFamilySmooth G (initialValueCurve G T x) (initialValueDomain G T x) := by |
| 112 | let metric := G.spacetime.horizontalMetric.toRiemannianMetric |
| 113 | let : NormedAddCommGroup (G.Horizontal x) := |
| 114 | (metric.toCore x).toNormedAddCommGroupOfTopology |
| 115 | (metric.continuousAt x) (metric.isVonNBounded x) |
| 116 | let : InnerProductSpace ℝ (G.Horizontal x) := |
| 117 | .ofCoreOfTopology (metric.toCore x) (metric.continuousAt x) (metric.isVonNBounded x) |
| 118 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := ⟨metric⟩ |
| 119 | rintro ⟨Z, s⟩ hz |
| 120 | rcases eq_or_lt_of_le (initialValueDomain_nonneg hz) with hs | hs |
| 121 | · subst s |
| 122 | exact initialValueCurve_contMDiffWithinAt_zero hM04 hM12 hbase Z |
| 123 | · obtain ⟨r, hsr, U, _, hZU, hnear, _, hsm⟩ := |
| 124 | initialValueCurve_smooth_neighborhood_positive hM04 hM12 hbase hs hz |
| 125 | exact (hsm (Z, s) ⟨hZU, hs.le, hsr⟩).mono_of_mem_nhdsWithin |
| 126 | (nhdsWithin_mono (Z, s) (initialValueDomain_admissible hbase) hnear) |
| 127 | |
| 128 | /-- The actual selected family is jointly continuous on its whole |
| 129 | maximal survival domain, the continuity clause of Lemma 6.18, |
| 130 | pp. 113-114. -/ |
| 131 | theorem initialValueCurve_joint_continuous |
| 132 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 133 | (hbase : G.spacetime.timeFunction x = T) : |
| 134 | ContinuousOn (fun z : G.Horizontal x × ℝ => initialValueCurve G T x z.1 z.2) |
| 135 | (initialValueDomain G T x) := by |
| 136 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 137 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 138 | exact (initialValueCurve_family_smooth hM04 hM12 hbase).continuousOn |
| 139 | |
| 140 | end PoincareMT.M14 |