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.SourceNames.LGeometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Domain.PhaseContinuation |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Families.GaugeFamilyLift |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Domain.MaximalCoherence |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.ODE.Families.ClosedFamilyGluing |
| 6 | |
| 7 | /-! |
| 8 | # Continuing an actual smooth family through a common phase restart |
| 9 | |
| 10 | Morgan-Tian Definition 6.17 and Lemma 6.18, pp. 113-114. |
| 11 | The smooth actual coordinate-momentum map supplies restart data. |
| 12 | The resulting joint gauge lift is realized by normalized paths; |
| 13 | coherence and closed-tube locality give joint smoothness throughout |
| 14 | the longer actual survival tube. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open Set |
| 20 | open scoped Manifold ContDiff |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M14 |
| 25 | |
| 26 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 27 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 28 | {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 29 | |
| 30 | set_option maxHeartbeats 800000 in |
| 31 | -- The actual coordinate phase and the two joint manifold models are retained throughout. |
| 32 | /-- A common closed phase restart, initialized with the actual |
| 33 | momentum of a smooth normalized family, extends actual survival and |
| 34 | joint smoothness on a smaller open parameter neighborhood. This is |
| 35 | the propagation step of Lemma 6.18, pp. 113-114. -/ |
| 36 | theorem initialValueCurve_smooth_tube_of_restart |
| 37 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 38 | (b : G.gaugeCover.index) |
| 39 | (W : OrdinaryGaugeWitness G.leafwise (G.gaugeCover.cylinder b) (G.gaugeCover.metric b)) |
| 40 | (t₀ : (G.timeIntervals.interval (G.gaugeCover.interval b)).Point) |
| 41 | (x₀ : G.gaugeCover.spatial b) {T l r d : ℝ} (hl : 0 ≤ l) (hlr : l < r) (hrd : r < d) |
| 42 | {x : G.Point} (ζ : E → G.Horizontal x) {U : Set E} (hU : IsOpen U) |
| 43 | {z₀ : E} (hz₀ : z₀ ∈ U) |
| 44 | (hγ : ContMDiffOn ((𝓘(ℝ, E)).prod (𝓘(ℝ, ℝ))) (spacetimeModel n) ∞ |
| 45 | (fun z => initialValueCurve G T x (ζ z.1) z.2) (U ×ˢ Icc 0 r)) |
| 46 | (hsurv : ∀ z ∈ U, (ζ z, r) ∈ initialValueDomain G T x) |
| 47 | (β₀ : E × ℝ → (G.timeIntervals.interval (G.gaugeCover.interval b)).Point × |
| 48 | G.gaugeCover.spatial b) |
| 49 | (hβ₀ : ContMDiffOn ((𝓘(ℝ, E)).prod (𝓘(ℝ, ℝ))) (spacetimeModel n) ∞ β₀ |
| 50 | (U ×ˢ Icc l r)) |
| 51 | (hrec₀ : ∀ z ∈ U ×ˢ Icc l r, |
| 52 | (G.gaugeCover.cylinder b).toSpacetime (β₀ z) = initialValueCurve G T x (ζ z.1) z.2) |
| 53 | (htime : ∀ s ∈ Icc l d, T - s ^ 2 ∈ (G.gaugeCover.interval b).domain) |
| 54 | (Φ : E → EuclideanSpace ℝ (Fin n) × EuclideanSpace ℝ (Fin n)) |
| 55 | (hΦ : ContDiffOn ℝ ∞ Φ U) |
| 56 | (hi : ∀ z ∈ U, Φ z = ((β₀ (z, r)).2.val, |
| 57 | M08.chartMomentumVector (M08.chartActionMetric W.flow T x₀ (r, (β₀ (z, r)).2.val)) |
| 58 | (derivWithin (fun s => (β₀ (z, s)).2.val) (Icc l r) r))) |
| 59 | {A : Set (EuclideanSpace ℝ (Fin n) × EuclideanSpace ℝ (Fin n))} |
| 60 | (hA : IsOpen A) (hcenter : Φ z₀ ∈ A) |
| 61 | (Ψ : (EuclideanSpace ℝ (Fin n) × EuclideanSpace ℝ (Fin n)) × ℝ → |
| 62 | EuclideanSpace ℝ (Fin n) × EuclideanSpace ℝ (Fin n)) |
| 63 | (hΨ : ContDiffOn ℝ ∞ Ψ (A ×ˢ Icc l d)) |
| 64 | (hdata : ∀ y ∈ A, Ψ (y, r) = y ∧ ∀ s ∈ Icc l d, |
| 65 | (Ψ (y, s)).1 ∈ (extChartAt (𝓡 n) x₀).target ∧ |
| 66 | HasDerivWithinAt (fun t => Ψ (y, t)) |
| 67 | (M08.closedChartEulerPhase W.flow T x₀ (Icc l d) s (Ψ (y, s))) (Icc l d) s) : |
| 68 | ∃ V : Set E, IsOpen V ∧ z₀ ∈ V ∧ V ⊆ U ∧ |
| 69 | (∀ z ∈ V ×ˢ Icc 0 d, (ζ z.1, z.2) ∈ initialValueDomain G T x) ∧ |
| 70 | ContMDiffOn ((𝓘(ℝ, E)).prod (𝓘(ℝ, ℝ))) (spacetimeModel n) ∞ |
| 71 | (fun z => initialValueCurve G T x (ζ z.1) z.2) (V ×ˢ Icc 0 d) := by |
| 72 | let V := U ∩ Φ ⁻¹' A |
| 73 | have hV : IsOpen V := hΦ.continuousOn.isOpen_inter_preimage hU hA |
| 74 | have hzV : z₀ ∈ V := ⟨hz₀, hcenter⟩ |
| 75 | have hVU : V ⊆ U := inter_subset_left |
| 76 | have hr : 0 < r := hl.trans_lt hlr |
| 77 | have hd : 0 < d := hr.trans hrd |
| 78 | let ψ : E × ℝ → EuclideanSpace ℝ (Fin n) × EuclideanSpace ℝ (Fin n) := |
| 79 | fun z => Ψ (Φ z.1, z.2) |
| 80 | have hψ : ContDiffOn ℝ ∞ ψ (V ×ˢ Icc l d) := hΨ.comp |
| 81 | (((hΦ.mono hVU).comp contDiffOn_fst (fun _ hz => hz.1)).prodMk contDiffOn_snd) |
| 82 | (fun _ hz => ⟨hz.1.2, hz.2⟩) |
| 83 | obtain ⟨β, hβ, hβclock, hβcoord⟩ := exists_smooth_gaugeLift_of_maps |
| 84 | ((𝓘(ℝ, E)).prod (𝓘(ℝ, ℝ))) b t₀ x₀ |
| 85 | (S := V ×ˢ Icc l d) (c := fun z => T - z.2 ^ 2) (q := fun z => (ψ z).1) |
| 86 | (contMDiffOn_const.sub (contMDiffOn_snd.pow 2)) (fun z hz => htime z.2 hz.2) |
| 87 | (by |
| 88 | rw [← modelWithCornersSelf_prod, chartedSpaceSelf_prod] |
| 89 | exact hψ.fst.contMDiffOn) |
| 90 | (fun z hz => ((hdata (Φ z.1) hz.1.2).2 z.2 hz.2).1) |
| 91 | have hCr : M14SqrtParameterInterval 0 (r ^ 2) = Icc 0 r := by |
| 92 | rw [M14SqrtParameterInterval, Real.sqrt_zero, Real.sqrt_sq hr.le] |
| 93 | have hCd : M14SqrtParameterInterval 0 (d ^ 2) = Icc 0 d := by |
| 94 | rw [M14SqrtParameterInterval, Real.sqrt_zero, Real.sqrt_sq hd.le] |
| 95 | have hpaths (z : E) (hz : z ∈ V) : |
| 96 | ∃ y : G.Point, ∃ Q : M14SquareRootInitialValuePath G T (d ^ 2) x y (ζ z), |
| 97 | EqOn Q.square_path.curve (fun s => (G.gaugeCover.cylinder b).toSpacetime (β (z, s))) |
| 98 | (Icc l d) := by |
| 99 | obtain ⟨y, ⟨P⟩⟩ := (initialValueDomain_positive_iff hr).mp (hsurv z hz.1) |
| 100 | have hβ₀z : ContMDiffOn (𝓘(ℝ, ℝ)) (spacetimeModel n) ∞ |
| 101 | (fun s => β₀ (z, s)) (Icc l r) := hβ₀.comp |
| 102 | (contMDiffOn_const.prodMk contMDiffOn_id) (fun _ hs => ⟨hz.1, hs⟩) |
| 103 | have hrec (s : ℝ) (hs : s ∈ Icc l r) : |
| 104 | (G.gaugeCover.cylinder b).toSpacetime (β₀ (z, s)) = P.square_path.curve s := by |
| 105 | have hsP : s ∈ M14SqrtParameterInterval 0 (r ^ 2) := hCr ▸ ⟨hl.trans hs.1, hs.2⟩ |
| 106 | exact (hrec₀ (z, s) ⟨hz.1, hs⟩).trans |
| 107 | (initialValueCurve_eqOn_square hM04 hM12 P hsP) |
| 108 | have hψz : ContDiffOn ℝ ∞ (fun s => ψ (z, s)) (Icc l d) := |
| 109 | hψ.comp (contDiffOn_const.prodMk contDiffOn_id) (fun _ hs => ⟨hz, hs⟩) |
| 110 | exact exists_initialValuePath_realizing_phase_continuation hM04 hM12 b W t₀ x₀ |
| 111 | hl hlr hrd P (fun s => β₀ (z, s)) hβ₀z hrec htime |
| 112 | (fun s => ψ (z, s)) hψz |
| 113 | (fun s hs => ((hdata (Φ z) hz.2).2 s hs).1) |
| 114 | (fun s hs => ((hdata (Φ z) hz.2).2 s hs).2) |
| 115 | (((hdata (Φ z) hz.2).1).trans (hi z hz.1)) (fun s => β (z, s)) |
| 116 | (fun s hs => hβclock (z, s) ⟨hz, hs⟩) (fun s hs => hβcoord (z, s) ⟨hz, hs⟩) |
| 117 | refine ⟨V, hV, hzV, hVU, ?_, ?_⟩ |
| 118 | · intro z hz |
| 119 | obtain ⟨y, Q, _⟩ := hpaths z.1 hz.1 |
| 120 | exact initialValueDomain_prefix (Or.inr ⟨hd, y, ⟨Q⟩⟩) hz.2.1 hz.2.2 |
| 121 | · apply contMDiffOn_union_closed_tubes (spacetimeModel n) hlr |
| 122 | (hγ.mono (prod_mono hVU (Subset.refl _))) |
| 123 | apply ((G.gaugeCover.cylinder b).smooth.comp_contMDiffOn hβ).congr |
| 124 | intro z hz |
| 125 | obtain ⟨_, Q, hQ⟩ := hpaths z.1 hz.1 |
| 126 | have hsQ : z.2 ∈ M14SqrtParameterInterval 0 (d ^ 2) := |
| 127 | hCd ▸ ⟨hl.trans hz.2.1, hz.2.2⟩ |
| 128 | exact (initialValueCurve_eqOn_square hM04 hM12 Q hsQ).trans (hQ hz.2) |
| 129 | |
| 130 | end PoincareMT.M14 |