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.Continuation.ContinuationRegularized |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Regularity.RegularizedGeodesic |
| 3 | |
| 4 | /-! Adapted from Mapher `PoincareMT/Proofs/M08/ContinuationUniqueness.lean` at |
| 5 | `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. -/ |
| 6 | |
| 7 | |
| 8 | set_option autoImplicit false |
| 9 | set_option backward.isDefEq.respectTransparency false |
| 10 | |
| 11 | noncomputable section |
| 12 | |
| 13 | open Set Filter Topology |
| 14 | open scoped Manifold ContDiff Bundle |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.LGeometry |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 22 | |
| 23 | set_option maxHeartbeats 1000000 in |
| 24 | /-- Agreement on a positive final interval determines the backward Euler extension through zero. -/ |
| 25 | theorem backward_geodesic_eqOn_of_terminal_agreement [ConnectedSpace M] [T3Space M] |
| 26 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax τ₁ τ₂ : ℝ} |
| 27 | (hM04 : RicciFlowCurvatureTheory.{u}) (hwindow : Icc (T - τmax) T ⊆ J) |
| 28 | (hcurvature : CompleteBoundedCurvatureOn F (Icc (T - τmax) T)) |
| 29 | (hτ₁ : 0 < τ₁) (hordered : τ₁ < τ₂) (hmax : τ₂ ≤ τmax) |
| 30 | (q q' : BackwardTimePath F T 0 τ₂) |
| 31 | (hq : IsBackwardLGeodesic F T 0 τ₂ q) |
| 32 | (hq' : IsBackwardLGeodesic F T 0 τ₂ q') |
| 33 | (htail : EqOn q.curve q'.curve (Icc τ₁ τ₂)) : |
| 34 | EqOn q.curve q'.curve (Icc 0 τ₂) := by |
| 35 | obtain ⟨R⟩ := nonempty_regularizedLGeodesicData hM04 hwindow hcurvature hmax q hq |
| 36 | obtain ⟨R'⟩ := nonempty_regularizedLGeodesicData hM04 hwindow hcurvature hmax q' hq' |
| 37 | let α := squareReparameterizedCurve q.curve |
| 38 | let β := squareReparameterizedCurve q'.curve |
| 39 | have hα : IsContinuationCurve F T α (Ioo 0 (Real.sqrt τ₂)) := by |
| 40 | simpa only [Real.sqrt_zero] using regularizedSquare_isContinuationCurve hM04 hwindow hmax q R |
| 41 | have hβ : IsContinuationCurve F T β (Ioo 0 (Real.sqrt τ₂)) := by |
| 42 | simpa only [Real.sqrt_zero] using regularizedSquare_isContinuationCurve hM04 hwindow hmax q' R' |
| 43 | obtain ⟨s, hleft, hright⟩ := exists_between (Real.sqrt_lt_sqrt hτ₁.le hordered) |
| 44 | have hs : s ∈ Ioo 0 (Real.sqrt τ₂) := |
| 45 | ⟨(Real.sqrt_nonneg τ₁).trans_lt hleft, hright⟩ |
| 46 | have hseed : α =ᶠ[𝓝 s] β := by |
| 47 | filter_upwards [Ioo_mem_nhds hleft hright] with r hr |
| 48 | exact htail (Ioo_subset_Icc_self (sq_mem_backward_interior hτ₁.le hr).2) |
| 49 | have htime (r : ℝ) (hr : r ∈ Ioo 0 (Real.sqrt τ₂)) : T - r ^ 2 ∈ J := by |
| 50 | apply interior_subset |
| 51 | exact backwardSquareTime_mem_interior hwindow q.nonnegative q.ordered hmax |
| 52 | (by simpa only [Real.sqrt_zero] using hr) |
| 53 | have hopen : EqOn α β (Ioo 0 (Real.sqrt τ₂)) := |
| 54 | continuationCurve_eqOn_of_germ F hM04 T isOpen_Ioo isPreconnected_Ioo htime hα hβ hs hseed |
| 55 | have hαc : ContinuousOn α (Icc 0 (Real.sqrt τ₂)) := by |
| 56 | simpa only [sqrtParameterInterval, Real.sqrt_zero] using squarePath_continuousOn q |
| 57 | have hβc : ContinuousOn β (Icc 0 (Real.sqrt τ₂)) := by |
| 58 | simpa only [sqrtParameterInterval, Real.sqrt_zero] using squarePath_continuousOn q' |
| 59 | have hclosure : Icc 0 (Real.sqrt τ₂) ⊆ closure (Ioo 0 (Real.sqrt τ₂)) := by |
| 60 | rw [closure_Ioo (Real.sqrt_pos.mpr q.ordered).ne] |
| 61 | have hclosed := hopen.of_subset_closure hαc hβc Ioo_subset_Icc_self hclosure |
| 62 | intro τ hτ |
| 63 | have h := hclosed ⟨Real.sqrt_nonneg τ, Real.sqrt_le_sqrt hτ.2⟩ |
| 64 | simpa only [α, β, squareReparameterizedCurve, Real.sq_sqrt hτ.1] using h |
| 65 | |
| 66 | end PoincareMT.LGeometry |