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.LGeometry.Theory |
| 2 | import PoincareLib.Geometry.RicciFlow.Curvature.Theory |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Minimization.CompleteMinimizer |
| 4 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Regularity.EulerLagrange |
| 5 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Regularity.RegularizedGeodesic |
| 6 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Variation.FirstVariation |
| 7 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Jacobi.Index.IndexKernel |
| 8 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Continuation.ExtensionToZero |
| 9 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Variation.Second.SecondVariation |
| 10 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Jacobi.JacobiInitialValue |
| 11 | |
| 12 | /-! |
| 13 | # Existence and variation of L-geodesics |
| 14 | |
| 15 | This is the ordinary-flow M08 entry point. The complete analytic proof uses |
| 16 | the compactness and variation producers below the reduced-length namespace; |
| 17 | the public declaration keeps the reviewed predecessor package explicit. |
| 18 | |
| 19 | Adapted from Mapher `PoincareMT/Proofs/M08.lean` at |
| 20 | `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. |
| 21 | Sources: Morgan-Tian Definitions 6.1-6.2, p. 106; Lemmas 6.4 and 6.8, |
| 22 | pp. 107-108; Lemmas 6.10/6.12 and Proposition 6.13, pp. 109-112; |
| 23 | Proposition 6.33 and Claim 6.34, pp. 120-122; Lemmas 7.2-7.3, pp. 150-151. |
| 24 | -/ |
| 25 | |
| 26 | set_option autoImplicit false |
| 27 | |
| 28 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 29 | |
| 30 | universe u |
| 31 | |
| 32 | namespace PoincareMT |
| 33 | |
| 34 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 35 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 36 | [IsManifold (𝓡 n) ∞ M] |
| 37 | |
| 38 | theorem lGeodesicExistenceAndVariation |
| 39 | {J : Set ℝ} [ConnectedSpace M] [T3Space M] [SecondCountableTopology M] |
| 40 | (F : RicciFlow n M J) (T τmax : ℝ) (hT : T ∈ J) (hτmax : 0 < τmax) |
| 41 | (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 42 | (hcurvature : CompleteBoundedCurvatureOn F (Set.Icc (T - τmax) T)) |
| 43 | (hM04 : RicciFlowCurvatureTheory.{u}) : |
| 44 | Nonempty (LGeodesicTheory F T τmax) := by |
| 45 | refine ⟨{ |
| 46 | minimizing_existence := ?_ |
| 47 | euler_lagrange := ?_ |
| 48 | regularized_geodesic := ?_ |
| 49 | first_variation := ?_ |
| 50 | second_variation_jacobi := ?_ |
| 51 | extension_to_zero := ?_ |
| 52 | reduced_length_attained := ?_ |
| 53 | second_variation := ?_ |
| 54 | jacobi_initial_value := ?_ |
| 55 | }⟩ |
| 56 | · intro τ₁ τ₂ hτ₁ hordered hτ₂ p₁ p₂ |
| 57 | exact LGeometry.exists_minimizing_backward_path |
| 58 | hM04 hT hwindow hcurvature hτ₁ hordered hτ₂ p₁ p₂ |
| 59 | · intro τ₁ τ₂ _ _ hτ₂ p hp |
| 60 | exact LGeometry.isBackwardLGeodesic_of_minimizing hM04 hwindow hcurvature hτ₂ p hp |
| 61 | · intro τ₁ τ₂ _ _ hτ₂ p hp |
| 62 | exact LGeometry.nonempty_regularizedLGeodesicData hM04 hwindow hcurvature hτ₂ p hp |
| 63 | · intro τ₁ τ₂ _ _ hτ₂ p V |
| 64 | exact LGeometry.exists_firstVariation hM04 hwindow hτ₂ V |
| 65 | · intro τ₁ τ₂ _ _ hτ₂ p hp V |
| 66 | have hEuler := LGeometry.isBackwardLGeodesic_of_minimizing hM04 hwindow hcurvature hτ₂ p hp |
| 67 | obtain ⟨R⟩ := LGeometry.nonempty_regularizedLGeodesicData hM04 hwindow hcurvature hτ₂ p hEuler |
| 68 | exact LGeometry.exists_fixedEndpointSecondVariation hM04 hp R V |
| 69 | · intro τ₁ τ₂ hτ₁ _ hτ₂ p hp |
| 70 | exact LGeometry.exists_backward_geodesic_extension hM04 hwindow hcurvature hτ₁ hτ₂ p hp |
| 71 | · intro τ hτ hτmax p q |
| 72 | exact LGeometry.reducedLength_attained_of_exists_minimizing |
| 73 | (LGeometry.exists_minimizing_backward_path hM04 hT hwindow hcurvature le_rfl hτ hτmax p q) |
| 74 | · intro τ₁ τ₂ _ _ hτ₂ p hp V |
| 75 | obtain ⟨R⟩ := LGeometry.nonempty_regularizedLGeodesicData hM04 hwindow hcurvature hτ₂ p hp |
| 76 | exact LGeometry.exists_secondVariation hM04 V R |
| 77 | · intro τ₁ τ₂ _ _ _ p R Z |
| 78 | exact LGeometry.exists_lJacobi_initialValue F hM04 p R Z |
| 79 | |
| 80 | end PoincareMT |