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.Euler.EulerUnique |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential |
| 3 | |
| 4 | /-! |
| 5 | # Uniqueness for the frozen square-root initial-value paths |
| 6 | |
| 7 | Morgan-Tian Definition 6.17 and Lemma 6.18, pp. 113-114. |
| 8 | The frozen initial velocities both transport to twice the prescribed |
| 9 | horizontal vector. Actual geometric uniqueness compares the paths |
| 10 | on their common interval and determines each output endpoint uniquely. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 25 | {T τ σ : ℝ} {x y z : G.Point} {Z : G.Horizontal x} |
| 26 | |
| 27 | include hM04 hM12 |
| 28 | |
| 29 | /-- Frozen initial-value paths with the same initial vector have |
| 30 | equal square curves on their common closed interval, Definition 6.17 |
| 31 | and Lemma 6.18, pp. 113-114. -/ |
| 32 | theorem initialValuePath_square_eqOn |
| 33 | (P : M14SquareRootInitialValuePath G T τ x y Z) |
| 34 | (Q : M14SquareRootInitialValuePath G T σ x z Z) : |
| 35 | EqOn P.square_path.curve Q.square_path.curve (M14SqrtParameterInterval 0 (min τ σ)) := by |
| 36 | obtain ⟨hP, hvP⟩ := P.initial_velocity |
| 37 | obtain ⟨hQ, hvQ⟩ := Q.initial_velocity |
| 38 | have hvel : HEq (P.square_path.horizontal_velocity 0) (Q.square_path.horizontal_velocity 0) := by |
| 39 | have hp : HEq (hP ▸ P.square_path.horizontal_velocity 0) |
| 40 | (P.square_path.horizontal_velocity 0) := eqRec_heq _ _ |
| 41 | have hq : HEq (hQ ▸ Q.square_path.horizontal_velocity 0) |
| 42 | (Q.square_path.horizontal_velocity 0) := eqRec_heq _ _ |
| 43 | exact hp.symm.trans ((heq_of_eq (hvP.trans hvQ.symm)).trans hq) |
| 44 | have hC : 0 < Real.sqrt (min τ σ) := Real.sqrt_pos.mpr (lt_min P.path.tau_lt Q.path.tau_lt) |
| 45 | have hsubP : Icc 0 (Real.sqrt (min τ σ)) ⊆ M14SqrtParameterInterval 0 τ := by |
| 46 | simpa only [M14SqrtParameterInterval, Real.sqrt_zero] using |
| 47 | Icc_subset_Icc (le_refl (0 : ℝ)) (Real.sqrt_le_sqrt (min_le_left τ σ)) |
| 48 | have hsubQ : Icc 0 (Real.sqrt (min τ σ)) ⊆ M14SqrtParameterInterval 0 σ := by |
| 49 | simpa only [M14SqrtParameterInterval, Real.sqrt_zero] using |
| 50 | Icc_subset_Icc (le_refl (0 : ℝ)) (Real.sqrt_le_sqrt (min_le_right τ σ)) |
| 51 | have hsame := squareRootEuler_unique hM04 hM12 P.square_path Q.square_path hC hsubP hsubQ |
| 52 | P.extension Q.extension (fun s hs => P.euler s (hsubP hs)) (fun s hs => Q.euler s (hsubQ hs)) |
| 53 | ⟨le_rfl, hC.le⟩ (hP.trans hQ.symm) hvel |
| 54 | intro s hs |
| 55 | exact (hsame s (by simpa only [M14SqrtParameterInterval, Real.sqrt_zero] using hs)).1 |
| 56 | |
| 57 | /-- Frozen initial-value paths with the same initial vector agree |
| 58 | in original time throughout their common closed interval, |
| 59 | Definition 6.17 and Lemma 6.18, pp. 113-114. -/ |
| 60 | theorem initialValuePath_curve_eqOn |
| 61 | (P : M14SquareRootInitialValuePath G T τ x y Z) |
| 62 | (Q : M14SquareRootInitialValuePath G T σ x z Z) : |
| 63 | EqOn P.path.curve Q.path.curve (Icc 0 (min τ σ)) := by |
| 64 | intro t ht |
| 65 | have hs : Real.sqrt t ∈ M14SqrtParameterInterval 0 (min τ σ) := |
| 66 | ⟨by simpa only [Real.sqrt_zero] using Real.sqrt_nonneg t, Real.sqrt_le_sqrt ht.2⟩ |
| 67 | have hp := P.square_path.agrees (Real.sqrt t) |
| 68 | ⟨hs.1, hs.2.trans (Real.sqrt_le_sqrt (min_le_left τ σ))⟩ |
| 69 | have hq := Q.square_path.agrees (Real.sqrt t) |
| 70 | ⟨hs.1, hs.2.trans (Real.sqrt_le_sqrt (min_le_right τ σ))⟩ |
| 71 | rw [Real.sq_sqrt ht.1] at hp hq |
| 72 | exact hp.symm.trans ((initialValuePath_square_eqOn hM04 hM12 P Q hs).trans hq) |
| 73 | |
| 74 | /-- The endpoint output of a frozen square-root initial-value problem |
| 75 | is unique at every common positive final time, Lemma 6.18, pp. 113-114. -/ |
| 76 | theorem initialValuePath_endpoint_eq |
| 77 | (P : M14SquareRootInitialValuePath G T τ x y Z) |
| 78 | (Q : M14SquareRootInitialValuePath G T τ x z Z) : y = z := by |
| 79 | have hτ : τ ∈ Icc 0 (min τ τ) := by simpa only [min_self] using |
| 80 | (show τ ∈ Icc 0 τ from ⟨P.path.tau_lt.le, le_rfl⟩) |
| 81 | exact P.path.curve_end.symm.trans |
| 82 | ((initialValuePath_curve_eqOn hM04 hM12 P Q hτ).trans Q.path.curve_end) |
| 83 | |
| 84 | end PoincareMT.M14 |