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.InitialValue.InitialValueRestriction |
| 2 | |
| 3 | /-! |
| 4 | # The actual initial-value survival domain |
| 5 | |
| 6 | Morgan-Tian Definition 6.17 and Lemma 6.18, pp. 113-114. |
| 7 | The domain consists of actual frozen initial-value solutions at positive |
| 8 | square times, together with every initial vector at zero. Restriction |
| 9 | proves order-connectedness without assuming local existence or openness. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.M14 |
| 19 | |
| 20 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 21 | {I : SpacetimeInterval} |
| 22 | |
| 23 | /-- Positive square-time survival means existence of an actual frozen |
| 24 | initial-value path, Definition 6.17, p. 113. -/ |
| 25 | def initialValueSurvives (G : GeneralizedLGeometryTransport n X time I) |
| 26 | (T : ℝ) (x : G.Point) (Z : G.Horizontal x) (s : ℝ) : Prop := |
| 27 | 0 < s ∧ ∃ y : G.Point, Nonempty (M14SquareRootInitialValuePath G T (s ^ 2) x y Z) |
| 28 | |
| 29 | /-- The actual survival domain includes all zero-time initial data, |
| 30 | Definition 6.17 and Lemma 6.18, pp. 113-114. -/ |
| 31 | def initialValueDomain (G : GeneralizedLGeometryTransport n X time I) |
| 32 | (T : ℝ) (x : G.Point) : Set (G.Horizontal x × ℝ) := |
| 33 | {z | z.2 = 0 ∨ initialValueSurvives G T x z.1 z.2} |
| 34 | |
| 35 | /-- Select an actual surviving endpoint and use the basepoint elsewhere. |
| 36 | Uniqueness will give coherence, as in Lemma 6.18, pp. 113-114. -/ |
| 37 | noncomputable def initialValueCurve (G : GeneralizedLGeometryTransport n X time I) |
| 38 | (T : ℝ) (x : G.Point) (Z : G.Horizontal x) (s : ℝ) : G.Point := by |
| 39 | classical |
| 40 | exact if h : initialValueSurvives G T x Z s then Classical.choose h.2 else x |
| 41 | |
| 42 | variable {G : GeneralizedLGeometryTransport n X time I} |
| 43 | {T : ℝ} {x : G.Point} {Z : G.Horizontal x} {r s : ℝ} |
| 44 | |
| 45 | /-- The chosen endpoint is witnessed by an actual frozen initial-value |
| 46 | path, including its prescribed velocity, Definition 6.17, p. 113. -/ |
| 47 | noncomputable def selectedInitialValuePath (hs : initialValueSurvives G T x Z s) : |
| 48 | M14SquareRootInitialValuePath G T (s ^ 2) x (initialValueCurve G T x Z s) Z := by |
| 49 | classical |
| 50 | simpa only [initialValueCurve, dif_pos hs] using Classical.choice (Classical.choose_spec hs.2) |
| 51 | |
| 52 | /-- Every initial vector belongs to the survival domain at zero, |
| 53 | Definition 6.17, p. 113. -/ |
| 54 | theorem initialValueDomain_zero (Z : G.Horizontal x) : |
| 55 | (Z, 0) ∈ initialValueDomain G T x := Or.inl rfl |
| 56 | |
| 57 | /-- The selected square curve starts at the given basepoint, |
| 58 | Definition 6.17, p. 113. -/ |
| 59 | theorem initialValueCurve_zero (Z : G.Horizontal x) : |
| 60 | initialValueCurve G T x Z 0 = x := by |
| 61 | unfold initialValueCurve |
| 62 | rw [dif_neg (show ¬ initialValueSurvives G T x Z 0 from fun h => (lt_irrefl 0) h.1)] |
| 63 | |
| 64 | /-- At positive square time the domain is exactly actual initial-value |
| 65 | survival, Definition 6.17 and Lemma 6.18, pp. 113-114. -/ |
| 66 | theorem initialValueDomain_positive_iff (hs : 0 < s) : |
| 67 | (Z, s) ∈ initialValueDomain G T x ↔ |
| 68 | ∃ y : G.Point, Nonempty (M14SquareRootInitialValuePath G T (s ^ 2) x y Z) := by |
| 69 | simp only [initialValueDomain, mem_ofPred_eq, initialValueSurvives, ne_of_gt hs, false_or, |
| 70 | hs, true_and] |
| 71 | |
| 72 | /-- No negative square time survives, Definition 6.17, p. 113. -/ |
| 73 | theorem initialValueDomain_nonneg (hs : (Z, s) ∈ initialValueDomain G T x) : 0 ≤ s := by |
| 74 | rcases hs with hs | hs |
| 75 | · exact hs ▸ le_rfl |
| 76 | · exact hs.1.le |
| 77 | |
| 78 | /-- The actual endpoint clock agrees with square-time substitution on |
| 79 | the entire survival domain, Definition 6.17, p. 113. -/ |
| 80 | theorem initialValueCurve_clock (hbase : G.spacetime.timeFunction x = T) |
| 81 | (hs : (Z, s) ∈ initialValueDomain G T x) : |
| 82 | G.spacetime.timeFunction (initialValueCurve G T x Z s) = T - s ^ 2 := by |
| 83 | rcases hs with hs | hs |
| 84 | · change s = 0 at hs |
| 85 | subst s |
| 86 | simp only [initialValueCurve_zero, hbase, zero_pow (by decide : 2 ≠ 0), sub_zero] |
| 87 | · exact (selectedInitialValuePath hs).path.endpoint_time |
| 88 | |
| 89 | /-- Every surviving parameter is physically admissible, using the |
| 90 | actual spacetime clock range, Definition 6.17, p. 113. -/ |
| 91 | theorem initialValueDomain_admissible (hbase : G.spacetime.timeFunction x = T) : |
| 92 | initialValueDomain G T x ⊆ M14AdmissibleParameter G T x := by |
| 93 | intro z hz |
| 94 | refine ⟨initialValueDomain_nonneg hz, ?_⟩ |
| 95 | rw [← G.spacetime.time_range] |
| 96 | exact ⟨initialValueCurve G T x z.1 z.2, initialValueCurve_clock hbase hz⟩ |
| 97 | |
| 98 | /-- An actual surviving solution restricts to every nonnegative earlier |
| 99 | square time, Definition 6.17 and Lemma 6.18, pp. 113-114. -/ |
| 100 | theorem initialValueDomain_prefix (hs : (Z, s) ∈ initialValueDomain G T x) |
| 101 | (hr : 0 ≤ r) (hrs : r ≤ s) : (Z, r) ∈ initialValueDomain G T x := by |
| 102 | rcases eq_or_lt_of_le hr with hr | hr |
| 103 | · exact Or.inl hr.symm |
| 104 | · have hpos : 0 < s := hr.trans_le hrs |
| 105 | obtain ⟨y, ⟨P⟩⟩ := (initialValueDomain_positive_iff hpos).mp hs |
| 106 | exact Or.inr ⟨hr, exists_initialValuePath_prefix P (sq_pos_of_pos hr) |
| 107 | ((sq_le_sq₀ hr.le hpos.le).mpr hrs)⟩ |
| 108 | |
| 109 | /-- The actual survival times of each initial vector form an |
| 110 | order-connected set, Lemma 6.18, pp. 113-114. -/ |
| 111 | theorem initialValueDomain_ordConnected (Z : G.Horizontal x) : |
| 112 | OrdConnected {s | (Z, s) ∈ initialValueDomain G T x} := by |
| 113 | constructor |
| 114 | intro a ha b hb r hr |
| 115 | exact initialValueDomain_prefix hb ((initialValueDomain_nonneg ha).trans hr.1) hr.2 |
| 116 | |
| 117 | end PoincareMT.M14 |