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.Variation.Coordinates.GaugeTimeDirection |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.InitialValue.InitialNeighborhood |
| 3 | |
| 4 | /-! |
| 5 | # Relative openness at every actual initial pair |
| 6 | |
| 7 | Morgan-Tian Definition 6.17 and Lemma 6.18, pp. 113-114. |
| 8 | Actual gauge time direction and uniform normalized local existence give |
| 9 | an initial tube whenever global earlier times exist. Otherwise zero is |
| 10 | the only admissible square time. Both cases give relative openness. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M14 |
| 20 | |
| 21 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 22 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 23 | {T : ℝ} {x : G.Point} |
| 24 | |
| 25 | /-- At a base time with global past, each initial vector has an open |
| 26 | neighborhood whose vectors all survive a common positive square-time |
| 27 | interval, Lemma 6.18, pp. 113-114. -/ |
| 28 | theorem initialValueDomain_initial_tube |
| 29 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 30 | (hbase : G.spacetime.timeFunction x = T) (hprev : ∃ a ∈ I.domain, a < T) |
| 31 | (Z : G.Horizontal x) : |
| 32 | ∃ c : ℝ, 0 < c ∧ ∃ U : Set (G.Horizontal x), |
| 33 | IsOpen U ∧ Z ∈ U ∧ U ×ˢ Icc 0 c ⊆ initialValueDomain G T x := by |
| 34 | obtain ⟨b, ⟨t₀, x₀⟩, rfl⟩ := G.gaugeCover.covers x |
| 35 | have ht₀ : t₀.val = T := ((G.gaugeCover.cylinder b).time_eq (t₀, x₀)).symm.trans hbase |
| 36 | have hprev' : ∃ a ∈ I.domain, a < t₀.val := by simpa only [ht₀] using hprev |
| 37 | obtain ⟨smax, hsmax, htime⟩ := |
| 38 | exists_gauge_squareClock_interval b t₀ (gauge_has_earlier_time b t₀ x₀ hprev') |
| 39 | obtain ⟨c, hc, _, U, hU, hZU, htube⟩ := |
| 40 | initialValueDomain_initial_tube_in_gauge hM04 hM12 b t₀ x₀ Z hsmax htime |
| 41 | exact ⟨c, hc, U, hU, hZU, ht₀ ▸ htube⟩ |
| 42 | |
| 43 | /-- The actual maximal survival domain is relatively open at every |
| 44 | zero-time pair, including a physical earliest time where zero is the |
| 45 | only admissible square time, Lemma 6.18, pp. 113-114. -/ |
| 46 | theorem initialValueDomain_zero_relative_open |
| 47 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 48 | (hbase : G.spacetime.timeFunction x = T) (Z : G.Horizontal x) : |
| 49 | ∃ U : Set (G.Horizontal x × ℝ), IsOpen U ∧ (Z, 0) ∈ U ∧ |
| 50 | U ∩ M14AdmissibleParameter G T x ⊆ initialValueDomain G T x := by |
| 51 | by_cases hprev : ∃ a ∈ I.domain, a < T |
| 52 | · obtain ⟨c, hc, U, hU, hZU, htube⟩ := |
| 53 | initialValueDomain_initial_tube hM04 hM12 hbase hprev Z |
| 54 | refine ⟨U ×ˢ Iio c, hU.prod isOpen_Iio, ⟨hZU, hc⟩, ?_⟩ |
| 55 | intro z hz |
| 56 | exact htube ⟨hz.1.1, hz.2.1, hz.1.2.le⟩ |
| 57 | · refine ⟨univ, isOpen_univ, mem_univ _, ?_⟩ |
| 58 | intro z hz |
| 59 | have hnonneg : T ≤ T - z.2 ^ 2 := |
| 60 | le_of_not_gt (fun hlt => hprev ⟨T - z.2 ^ 2, hz.2.2, hlt⟩) |
| 61 | exact Or.inl (sq_eq_zero_iff.mp (le_antisymm (by linarith) (sq_nonneg z.2))) |
| 62 | |
| 63 | end PoincareMT.M14 |