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.Minimization.Charts.ChartMinimizerRegularity |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Minimization.ChartCoverAt |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Minimization.LocalChartLimit |
| 4 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Minimization.MinimizerPath |
| 5 | |
| 6 | /-! Adapted from Mapher `PoincareMT/Proofs/M08/CompleteMinimizer.lean` at |
| 7 | `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. -/ |
| 8 | |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | set_option backward.isDefEq.respectTransparency false |
| 12 | |
| 13 | open MeasureTheory Set Filter Topology |
| 14 | open scoped Manifold ContDiff Bundle intervalIntegral |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.LGeometry |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [mTop : TopologicalSpace M] |
| 21 | [mChart : ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 22 | [mSmooth : IsManifold (𝓡 n) ∞ M] [mConnected : ConnectedSpace M] [mT3 : T3Space M] |
| 23 | |
| 24 | set_option maxHeartbeats 800000 in |
| 25 | set_option synthInstance.maxHeartbeats 200000 in |
| 26 | -- Keep the original manifold instances while installing the reference metric. |
| 27 | theorem minimizing_uniform_limit_contMDiffOn {J : Set ℝ} {F : RicciFlow n M J} |
| 28 | {T τmax τ₁ τ₂ : ℝ} (hM04 : RicciFlowCurvatureTheory.{u}) (hT : T ∈ J) |
| 29 | (hwindow : Icc (T - τmax) T ⊆ J) |
| 30 | (hcurvature : CompleteBoundedCurvatureOn F (Icc (T - τmax) T)) |
| 31 | (hτ₁ : 0 ≤ τ₁) (hordered : τ₁ < τ₂) (hτ₂ : τ₂ ≤ τmax) (p₁ p₂ : M) |
| 32 | (p : ℕ → BackwardTimePath F T τ₁ τ₂) |
| 33 | (hanti : Antitone (fun k ↦ backwardLLength F T τ₁ τ₂ (p k).curve)) |
| 34 | (hmin : Tendsto (fun k ↦ backwardLLength F T τ₁ τ₂ (p k).curve) |
| 35 | atTop (𝓝 (sInf (backwardActionValues F T τ₁ τ₂ p₁ p₂)))) |
| 36 | (γ : ℝ → M) (hγ : Continuous γ) |
| 37 | (hγa : γ (Real.sqrt τ₁) = p₁) (hγb : γ (Real.sqrt τ₂) = p₂) |
| 38 | (hlim : letI : MetricSpace M := referenceMetricSpace (F.metric T) |
| 39 | TendstoUniformlyOn (fun k ↦ squareReparameterizedCurve (p k).curve) γ atTop |
| 40 | (Icc (Real.sqrt τ₁) (Real.sqrt τ₂))) : |
| 41 | ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) 1 γ (Ioo (Real.sqrt τ₁) (Real.sqrt τ₂)) := by |
| 42 | letI : MetricSpace M := referenceMetricSpace (F.metric T) |
| 43 | letI : LocallyCompactSpace M := |
| 44 | Manifold.locallyCompact_of_finiteDimensional (M := M) (𝓡 n) |
| 45 | intro s hs |
| 46 | obtain ⟨m, t, x, K, j, ht, hta, htb, hK, haj, hjs, hsj, hjb⟩ := |
| 47 | exists_compact_partition_at |
| 48 | (fun x : M ↦ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) |
| 49 | (fun x ↦ (chartAt (EuclideanSpace ℝ (Fin n)) x).open_source) |
| 50 | (fun y ↦ ⟨y, mem_chart_source _ y⟩) hs γ hγ |
| 51 | obtain ⟨w, hw, hsum⟩ := @finite_chart_limit_le_inf n M mTop mChart mSmooth |
| 52 | mConnected mT3 J F T τmax τ₁ τ₂ hM04 hwindow hcurvature hτ₁ hordered hτ₂ |
| 53 | p₁ p₂ p hanti hmin γ hγ hlim m t ht hta htb x K hK |
| 54 | have hsrc (i : Fin m) : MapsTo γ (Icc (t i.castSucc) (t i.succ)) |
| 55 | (chartAt (EuclideanSpace ℝ (Fin n)) (x i)).source := |
| 56 | fun r hr ↦ (hK i).2.2 (interior_subset ((hK i).2.1 (mem_image_of_mem γ hr))) |
| 57 | have hsum' : (∑ i, chartH1Action F T (x i) (t i.castSucc) (t i.succ) γ (w i)) ≤ |
| 58 | sInf (backwardActionValues F T τ₁ τ₂ (γ (t 0)) (γ (t (Fin.last m)))) := by |
| 59 | simpa only [chartH1Action, hta, htb, hγa, hγb] using hsum |
| 60 | have hlocal : IsChartH1Minimizer F T (x j) (t j.castSucc) (t j.succ) γ (w j) := by |
| 61 | intro ξ hξ hξa hξb hξsrc v hv |
| 62 | exact chart_piece_minimal hM04 hT hwindow hcurvature hτ₁ hordered hτ₂ |
| 63 | t ht hta htb γ hγ.continuousOn x hsrc w hw hsum' j ξ hξ hξa hξb hξsrc v hv |
| 64 | have htime (r : ℝ) (hr : r ∈ Icc (t j.castSucc) (t j.succ)) : |
| 65 | T - r ^ 2 ∈ interior J := |
| 66 | backwardSquareTime_mem_interior hwindow hτ₁ hordered hτ₂ |
| 67 | ⟨haj.trans_le hr.1, hr.2.trans_lt hjb⟩ |
| 68 | have hreg := chart_minimum_contDiffOn F hM04 T (hjs.trans hsj) (x j) γ hγ.continuousOn |
| 69 | (hsrc j) htime (w j) (hw j) hlocal |
| 70 | exact (chart_contMDiffAt_of_contDiffOn ⟨hjs, hsj⟩ (x j) γ (hsrc j) hreg).contMDiffWithinAt |
| 71 | |
| 72 | set_option maxHeartbeats 800000 in |
| 73 | set_option synthInstance.maxHeartbeats 200000 in |
| 74 | -- The extraction and the final path share the original flow and topology instances. |
| 75 | theorem exists_minimizing_backward_path {J : Set ℝ} {F : RicciFlow n M J} |
| 76 | {T τmax τ₁ τ₂ : ℝ} (hM04 : RicciFlowCurvatureTheory.{u}) (hT : T ∈ J) |
| 77 | (hwindow : Icc (T - τmax) T ⊆ J) |
| 78 | (hcurvature : CompleteBoundedCurvatureOn F (Icc (T - τmax) T)) |
| 79 | (hτ₁ : 0 ≤ τ₁) (hordered : τ₁ < τ₂) (hτ₂ : τ₂ ≤ τmax) (p₁ p₂ : M) : |
| 80 | ∃ p : BackwardTimePath F T τ₁ τ₂, |
| 81 | p.curve τ₁ = p₁ ∧ p.curve τ₂ = p₂ ∧ IsMinimizingBackwardLPath F T τ₁ τ₂ p := by |
| 82 | letI : MetricSpace M := referenceMetricSpace (F.metric T) |
| 83 | letI : LocallyCompactSpace M := |
| 84 | Manifold.locallyCompact_of_finiteDimensional (M := M) (𝓡 n) |
| 85 | obtain ⟨p, γ, _, hanti, hmin, hγ, hγa, hγb, hlim⟩ := |
| 86 | @exists_backward_minimizing_uniform_limit n M mTop mChart mSmooth mConnected mT3 |
| 87 | J F T τmax τ₁ τ₂ hM04 hT hwindow hcurvature hτ₁ hordered hτ₂ p₁ p₂ |
| 88 | have hreg := @minimizing_uniform_limit_contMDiffOn n M mTop mChart mSmooth |
| 89 | mConnected mT3 J F T τmax τ₁ τ₂ hM04 hT hwindow hcurvature hτ₁ hordered hτ₂ |
| 90 | p₁ p₂ p hanti hmin γ hγ hγa hγb hlim |
| 91 | obtain ⟨m, t, x, K, _, ht, hta, htb, hK, _⟩ := |
| 92 | exists_compact_partition_of_uniform_limit |
| 93 | (fun x : M ↦ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) |
| 94 | (fun x ↦ (chartAt (EuclideanSpace ℝ (Fin n)) x).open_source) |
| 95 | (fun y ↦ ⟨y, mem_chart_source _ y⟩) (Real.sqrt_lt_sqrt hτ₁ hordered).le γ hγ |
| 96 | (fun k ↦ squareReparameterizedCurve (p k).curve) hlim |
| 97 | obtain ⟨w, hw, hsum⟩ := @finite_chart_limit_le_inf n M mTop mChart mSmooth |
| 98 | mConnected mT3 J F T τmax τ₁ τ₂ hM04 hwindow hcurvature hτ₁ hordered hτ₂ |
| 99 | p₁ p₂ p hanti hmin γ hγ hlim m t ht hta htb x K hK |
| 100 | have hsrc (i : Fin m) : MapsTo γ (Icc (t i.castSucc) (t i.succ)) |
| 101 | (chartAt (EuclideanSpace ℝ (Fin n)) (x i)).source := |
| 102 | fun r hr ↦ (hK i).2.2 (interior_subset ((hK i).2.1 (mem_image_of_mem γ hr))) |
| 103 | have hreg' : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) 1 γ (Ioo (t 0) (t (Fin.last m))) := by |
| 104 | simpa only [hta, htb] using hreg |
| 105 | obtain ⟨q, hqa, hqb, hqmin, _, _⟩ := exists_minimizing_backward_path_of_chart_limit |
| 106 | hM04 hT hwindow hcurvature hτ₁ hordered hτ₂ t ht hta htb γ hγ.continuousOn hreg' |
| 107 | p₁ p₂ hγa hγb x hsrc w hw hsum |
| 108 | exact ⟨q, hqa, hqb, hqmin⟩ |
| 109 | |
| 110 | end PoincareMT.LGeometry |