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.MaximalDomain |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.InitialValue.InitialValueUnique |
| 3 | |
| 4 | /-! |
| 5 | # Coherence of the selected maximal initial-value curve |
| 6 | |
| 7 | Morgan-Tian Definition 6.17 and Lemma 6.18, pp. 113-114. |
| 8 | Actual endpoint uniqueness identifies the independently selected endpoints |
| 9 | with each supplied initial-value path. Prefix restriction then gives |
| 10 | agreement on its whole closed square-root and original-time intervals. |
| 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 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 24 | {T τ s : ℝ} {x y : G.Point} {Z : G.Horizontal x} |
| 25 | |
| 26 | include hM04 hM12 |
| 27 | |
| 28 | /-- Every actual initial-value path has the selected endpoint at its |
| 29 | positive final square time, Lemma 6.18, pp. 113-114. -/ |
| 30 | theorem initialValueCurve_eq_endpoint (hs : 0 < s) |
| 31 | (P : M14SquareRootInitialValuePath G T (s ^ 2) x y Z) : |
| 32 | initialValueCurve G T x Z s = y := by |
| 33 | have hsurv : initialValueSurvives G T x Z s := ⟨hs, y, ⟨P⟩⟩ |
| 34 | exact initialValuePath_endpoint_eq hM04 hM12 (selectedInitialValuePath hsurv) P |
| 35 | |
| 36 | /-- The selected maximal curve agrees with every actual initial-value |
| 37 | square curve on its closed interval, Lemma 6.18, pp. 113-114. -/ |
| 38 | theorem initialValueCurve_eqOn_square (P : M14SquareRootInitialValuePath G T τ x y Z) : |
| 39 | EqOn (initialValueCurve G T x Z) P.square_path.curve (M14SqrtParameterInterval 0 τ) := by |
| 40 | intro r hr |
| 41 | have hr0 : 0 ≤ r := by simpa only [Real.sqrt_zero] using hr.1 |
| 42 | rcases eq_or_lt_of_le hr0 with hr0 | hr0 |
| 43 | · subst r |
| 44 | exact (initialValueCurve_zero Z).trans P.initial_velocity.choose.symm |
| 45 | · have hrτ : r ^ 2 ≤ τ := by |
| 46 | have hsq := (sq_le_sq₀ hr0.le (Real.sqrt_nonneg τ)).mpr hr.2 |
| 47 | simpa only [Real.sq_sqrt P.path.tau_lt.le] using hsq |
| 48 | exact (initialValueCurve_eq_endpoint hM04 hM12 hr0 |
| 49 | (initialValuePathRestrict P (sq_pos_of_pos hr0) hrτ)).trans (P.square_path.agrees r hr).symm |
| 50 | |
| 51 | /-- Every actual initial-value path is the original-time restriction |
| 52 | of the selected maximal curve, Lemma 6.18, pp. 113-114. -/ |
| 53 | theorem initialValueCurve_eqOn_path (P : M14SquareRootInitialValuePath G T τ x y Z) : |
| 54 | EqOn P.path.curve (fun t => initialValueCurve G T x Z (Real.sqrt t)) (Icc 0 τ) := by |
| 55 | intro t ht |
| 56 | have hs : Real.sqrt t ∈ M14SqrtParameterInterval 0 τ := |
| 57 | ⟨by simpa only [Real.sqrt_zero] using Real.sqrt_nonneg t, Real.sqrt_le_sqrt ht.2⟩ |
| 58 | have heq := (initialValueCurve_eqOn_square hM04 hM12 P hs).trans |
| 59 | (P.square_path.agrees (Real.sqrt t) hs) |
| 60 | simpa only [Real.sq_sqrt ht.1] using heq.symm |
| 61 | |
| 62 | end PoincareMT.M14 |