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.LGeometry.Variation.ActualPhaseRestart |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.Variation.PhaseContinuity |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.Variation.RestartPasting |
| 4 | |
| 5 | /-! |
| 6 | # Survival through an actual phase cluster point |
| 7 | |
| 8 | Proposition 16.4 and Lemma 6.18, pp. 389-391 and 113-114. |
| 9 | Converging positive survival times with an actual horizontal phase |
| 10 | cluster point admit a common restart. Frequent phase-neighborhood |
| 11 | membership and eventual time-neighborhood membership supply a pasting |
| 12 | point, without any metrizability assumption on the phase bundle. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | -- The selected square-path phase is identified in its actual horizontal fiber. |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter Bundle |
| 20 | open scoped Topology Manifold ContDiff |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.Proofs.M46 |
| 25 | |
| 26 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 27 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 28 | {T : ℝ} {x : G.Point} |
| 29 | |
| 30 | /-- A compactness-produced phase cluster permits continuation through |
| 31 | the limiting positive square time. The returned endpoint includes a |
| 32 | relative physical neighborhood, so it also handles a physical boundary |
| 33 | time. Source: Proposition 16.4 and Lemma 6.18, pp. 389-391 and 113-114. -/ |
| 34 | theorem exponential_survival_of_phase_cluster |
| 35 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 36 | (E : M14ExponentialFamily G T x) (Z : G.Horizontal x) |
| 37 | {sk : ℕ → ℝ} {s : ℝ} (hs : 0 < s) (hsk : Tendsto sk atTop (𝓝 s)) |
| 38 | (hsurv : ∀ k, (Z, sk k) ∈ E.domain) |
| 39 | (hbelow : ∀ᶠ k in atTop, 0 < sk k ∧ sk k < s) |
| 40 | (z : TotalSpace (EuclideanSpace ℝ (Fin n)) G.Horizontal) |
| 41 | (hcluster : MapClusterPt z atTop (fun k => exponentialPhase E Z (sk k))) : |
| 42 | ∃ r : ℝ, s ≤ r ∧ |
| 43 | Icc 0 r ∈ 𝓝[{w | 0 ≤ w ∧ T - w ^ 2 ∈ I.domain}] s ∧ |
| 44 | (Z, r) ∈ E.domain := by |
| 45 | have htime : Continuous G.spacetime.timeFunction := |
| 46 | (show ContMDiff (spacetimeModel n) 𝓘(ℝ, ℝ) ∞ G.spacetime.timeFunction |
| 47 | from G.spacetime.time_smooth).continuous |
| 48 | have hphaseTime : Continuous |
| 49 | (fun z : TotalSpace (EuclideanSpace ℝ (Fin n)) G.Horizontal => |
| 50 | G.spacetime.timeFunction z.proj) := |
| 51 | htime.comp (FiberBundle.continuous_proj _ _) |
| 52 | have hclockCluster := hcluster.continuousAt_comp hphaseTime.continuousAt |
| 53 | have hclockLimit : Tendsto |
| 54 | (fun k => G.spacetime.timeFunction (exponentialPhase E Z (sk k)).proj) |
| 55 | atTop (𝓝 (T - s ^ 2)) := by |
| 56 | have heq : (fun k => G.spacetime.timeFunction (exponentialPhase E Z (sk k)).proj) = |
| 57 | fun k => T - (sk k) ^ 2 := funext (fun k => E.clock Z (sk k) (hsurv k)) |
| 58 | rw [heq] |
| 59 | exact tendsto_const_nhds.sub (hsk.pow 2) |
| 60 | have hclock : G.spacetime.timeFunction z.proj = T - s ^ 2 := |
| 61 | eq_of_nhds_neBot (hclockCluster.clusterPt.mono hclockLimit).neBot |
| 62 | have hT : T ∈ I.domain := by |
| 63 | rw [← G.spacetime.time_range] |
| 64 | exact ⟨x, E.base_time⟩ |
| 65 | obtain ⟨l, r, hl, hls, hsr, hnear, hrestart⟩ := |
| 66 | exists_actualPhase_uniform_restart hM04 hM12 hT hs z hclock |
| 67 | obtain ⟨A, hA, B, hB, hAB⟩ := mem_prod_iff.mp hrestart |
| 68 | have hskWithin : Tendsto sk atTop |
| 69 | (𝓝[{w | 0 ≤ w ∧ T - w ^ 2 ∈ I.domain}] s) := |
| 70 | tendsto_nhdsWithin_iff.mpr ⟨hsk, Eventually.of_forall (fun k => E.domain_admissible (hsurv k))⟩ |
| 71 | have hAevent := hskWithin.eventually hA |
| 72 | have hlevent : ∀ᶠ k in atTop, l < sk k := hsk.eventually (Ioi_mem_nhds hls) |
| 73 | obtain ⟨k, hBk, hAk, hlk, hkpos, hks⟩ := |
| 74 | ((hcluster.frequently hB).and_eventually (hAevent.and (hlevent.and hbelow))).exists |
| 75 | obtain ⟨q₀, q₁, p, R, extension, hEuler, hpoint, hvel⟩ := |
| 76 | (hAB (show (sk k, exponentialPhase E Z (sk k)) ∈ A ×ˢ B from ⟨hAk, hBk⟩)).2 |
| 77 | (E.clock Z (sk k) (hsurv k)) |
| 78 | let P : M14SquareRootInitialValuePath G T ((sk k) ^ 2) x (E.gamma Z (sk k)) Z := { |
| 79 | path := E.path Z (sk k) (hsurv k) hkpos |
| 80 | square_path := E.square_path Z (sk k) (hsurv k) hkpos |
| 81 | extension := E.square_extension Z (sk k) (hsurv k) hkpos |
| 82 | euler := E.square_euler Z (sk k) (hsurv k) hkpos |
| 83 | initial_velocity := E.square_initial_velocity Z (sk k) (hsurv k) hkpos |
| 84 | } |
| 85 | have hphase := exponentialPhase_eq_squarePath E (hsurv k) hkpos |
| 86 | have hpointP : (exponentialPhase E Z (sk k)).proj = P.square_path.curve (sk k) := |
| 87 | congrArg TotalSpace.proj hphase |
| 88 | have hvelP : HEq (exponentialPhase E Z (sk k)).2 |
| 89 | (P.square_path.horizontal_velocity (sk k)) := (TotalSpace.ext_iff.mp hphase).2 |
| 90 | obtain ⟨q, Q, _⟩ := exists_initialValuePath_of_matching_restart hM04 hM12 hl.le hlk |
| 91 | (hks.trans_le hsr) P R extension hEuler (hpoint.trans hpointP) (hvel.trans hvelP) |
| 92 | exact ⟨r, hsr, mem_of_superset hnear (Icc_subset_Icc hl.le le_rfl), |
| 93 | (E.positive_survival_iff Z r (hs.trans_le hsr)).mpr ⟨q, ⟨Q⟩⟩⟩ |
| 94 | |
| 95 | end PoincareMT.Proofs.M46 |