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.ReducedGeometry.ReducedLength.Geometry.MinimizingInitialVectors |
| 2 | |
| 3 | /-! # Unique minimality and uniqueness of the initial vector -/ |
| 4 | |
| 5 | set_option autoImplicit false |
| 6 | set_option maxSynthPendingDepth 3 |
| 7 | |
| 8 | open scoped Manifold ContDiff Bundle |
| 9 | |
| 10 | universe u |
| 11 | |
| 12 | namespace PoincareMT.ReducedLength |
| 13 | |
| 14 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 15 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 16 | [IsManifold (𝓡 n) ∞ M] [ConnectedSpace M] [T2Space M] |
| 17 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 18 | |
| 19 | theorem lExponentialFamily_uniqueMinimizing_iff (hM04 : RicciFlowCurvatureTheory.{u}) |
| 20 | (hL : LGeodesicTheory F T τmax) (hτmax : 0 < τmax) |
| 21 | (hwindow : Set.Icc (T - τmax) T ⊆ J) (A : LExponentialFamily F T τmax p) |
| 22 | (Z : TangentSpace (𝓡 n) p) (τ : ℝ) (ht : 0 < τ) (hm : τ < τmax) : |
| 23 | A.uniqueMinimizing Z τ ↔ |
| 24 | IsMinimizingBackwardLPath F T 0 τ (A.path Z τ ht hm) ∧ |
| 25 | ∀ W, A.gamma W τ = A.gamma Z τ → |
| 26 | IsMinimizingBackwardLPath F T 0 τ (A.path W τ ht hm) → W = Z := by |
| 27 | constructor |
| 28 | · rintro ⟨ht', hm', hmin, huniq⟩ |
| 29 | refine ⟨hmin, ?_⟩ |
| 30 | intro W hend hWmin |
| 31 | have heq := huniq (A.path W τ ht hm) |
| 32 | ((congrFun (A.path_eq W τ ht hm) 0).trans (A.gamma_at_zero W)) |
| 33 | ((congrFun (A.path_eq W τ ht hm) τ).trans hend) hWmin |
| 34 | rw [A.path_eq] at heq |
| 35 | exact lExponentialFamily_initialVector_eq_of_eqOn A W Z τ ht hm heq |
| 36 | · rintro ⟨hmin, hvec⟩ |
| 37 | refine ⟨ht, hm, hmin, ?_⟩ |
| 38 | intro q hq0 hqτ hqmin |
| 39 | obtain ⟨W, heq, _⟩ := lExponentialFamily_minimizers_lift hM04 hL hτmax hwindow |
| 40 | A τ ht hm q hq0 hqmin |
| 41 | have hselected : Set.EqOn q.curve (A.path W τ ht hm).curve (Set.Icc 0 τ) := by |
| 42 | rw [A.path_eq] |
| 43 | exact heq |
| 44 | have hWmin := (isMinimizingBackwardLPath_iff_of_eqOn q (A.path W τ ht hm) hselected).mp hqmin |
| 45 | have hend : A.gamma W τ = A.gamma Z τ := |
| 46 | (heq (show τ ∈ Set.Icc 0 τ from ⟨ht.le, le_rfl⟩)).symm.trans hqτ |
| 47 | simpa only [hvec W hend hWmin] using heq |
| 48 | |
| 49 | end PoincareMT.ReducedLength |