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.Minimum.Variational.LocalMinimality |
| 2 | |
| 3 | /-! |
| 4 | # Admissible paths from regular weak action limits |
| 5 | |
| 6 | Interior regularity identifies weak coordinate velocities with the actual |
| 7 | velocity. The square-root pullback then realizes the spatial action infimum |
| 8 | in the frozen admissible path class. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | |
| 14 | open Set Filter MeasureTheory |
| 15 | open scoped Manifold ContDiff Bundle Topology intervalIntegral |
| 16 | |
| 17 | namespace PoincareMT.ReducedLengthMinimum.Variational |
| 18 | |
| 19 | variable {n : ℕ} {M : Type*} [MetricSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 21 | |
| 22 | theorem finite_chart_action_of_interior_regular {J : Set ℝ} (F : RicciFlow n M J) |
| 23 | (T : ℝ) {m : ℕ} (t : Fin (m + 1) → ℝ) (ht : Monotone t) |
| 24 | (htime : ∀ s ∈ Icc (t 0) (t (Fin.last m)), T - s ^ 2 ∈ J) |
| 25 | (hpotential : ContinuousOn |
| 26 | (fun z : ℝ × M => 2 * z.1 ^ 2 * (F.connection (T - z.1 ^ 2)).scalarCurvature z.2) |
| 27 | (Icc (t 0) (t (Fin.last m)) ×ˢ univ)) |
| 28 | (γ : ℝ → M) (hγ : ContinuousOn γ (Icc (t 0) (t (Fin.last m)))) |
| 29 | (hreg : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) 1 γ (Ioo (t 0) (t (Fin.last m)))) |
| 30 | (x : Fin m → M) |
| 31 | (hsrc : ∀ i, MapsTo γ (Icc (t i.castSucc) (t i.succ)) |
| 32 | (chartAt (EuclideanSpace ℝ (Fin n)) (x i)).source) |
| 33 | (w : ∀ i : Fin m, IntervalL2 (EuclideanSpace ℝ (Fin n)) (t i.castSucc) (t i.succ)) |
| 34 | (hprimitive : ∀ i s, s ∈ Icc (t i.castSucc) (t i.succ) → |
| 35 | extChartAt (𝓡 n) (x i) (γ s) = extChartAt (𝓡 n) (x i) (γ (t i.castSucc)) + |
| 36 | ∫ r in t i.castSucc..s, w i r) : |
| 37 | IntervalIntegrable (regularizedLIntegrand F T γ) volume (t 0) (t (Fin.last m)) ∧ |
| 38 | (∑ i, chartH1Action F T (x i) (t i.castSucc) (t i.succ) γ (w i)) = |
| 39 | ∫ s in t 0..t (Fin.last m), regularizedLIntegrand F T γ s := by |
| 40 | have hseg (i : Fin m) : t i.castSucc ≤ t i.succ := ht (Fin.castSucc_le_succ i) |
| 41 | have hsub (i : Fin m) : Icc (t i.castSucc) (t i.succ) ⊆ Icc (t 0) (t (Fin.last m)) := |
| 42 | Icc_subset_Icc (ht (Fin.zero_le _)) (ht (Fin.le_last _)) |
| 43 | have hreg' (i : Fin m) : |
| 44 | ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) 1 γ (Ioo (t i.castSucc) (t i.succ)) := |
| 45 | hreg.mono (Ioo_subset_Ioo (ht (Fin.zero_le _)) (ht (Fin.le_last _))) |
| 46 | have hv (i : Fin m) : |
| 47 | (w i : ℝ → EuclideanSpace ℝ (Fin n)) =ᵐ[volume.restrict (Icc (t i.castSucc) (t i.succ))] |
| 48 | deriv ((extChartAt (𝓡 n) (x i)) ∘ γ) := by |
| 49 | filter_upwards [primitive_ae_hasDerivAt (hseg i) |
| 50 | ((extChartAt (𝓡 n) (x i)) ∘ γ) (w i) (hprimitive i)] with s hs |
| 51 | exact hs.deriv.symm |
| 52 | have hV (i : Fin m) : ContinuousOn |
| 53 | (fun s => 2 * s ^ 2 * (F.connection (T - s ^ 2)).scalarCurvature (γ s)) |
| 54 | (Icc (t i.castSucc) (t i.succ)) := |
| 55 | (hpotential.comp (continuousOn_id.prodMk hγ) (fun s hs => ⟨hs, mem_univ _⟩)).mono (hsub i) |
| 56 | have hint (i : Fin m) : |
| 57 | IntervalIntegrable (regularizedLIntegrand F T γ) volume (t i.castSucc) (t i.succ) := |
| 58 | chart_piece_integrable F T (hseg i) (x i) γ (hγ.mono (hsub i)) (hreg' i) |
| 59 | (hsrc i) (fun s hs => htime s (hsub i hs)) (hV i) (w i) (hv i) |
| 60 | obtain ⟨hglobal, hsum⟩ := integrable_sum_fin_partition t (regularizedLIntegrand F T γ) hint |
| 61 | refine ⟨hglobal, ?_⟩ |
| 62 | calc |
| 63 | _ = ∑ i : Fin m, ∫ s in t i.castSucc..t i.succ, regularizedLIntegrand F T γ s := by |
| 64 | apply Finset.sum_congr rfl |
| 65 | intro i _ |
| 66 | exact chart_piece_action_eq F T (hseg i) (x i) γ (hreg' i) (hsrc i) |
| 67 | (hV i) (hint i) (w i) (hv i) |
| 68 | _ = _ := hsum |
| 69 | |
| 70 | end PoincareMT.ReducedLengthMinimum.Variational |
| 71 | |
| 72 | namespace PoincareMT.AncientKappaSolution |
| 73 | |
| 74 | open ReducedLengthMinimum.Variational |
| 75 | |
| 76 | variable {M : Type*} [MetricSpace M] |
| 77 | [ChartedSpace (EuclideanSpace ℝ (Fin 2)) M] [IsManifold (𝓡 2) ∞ M] |
| 78 | [MeasurableSpace M] [BorelSpace M] [SecondCountableTopology M] [ConnectedSpace M] |
| 79 | |
| 80 | theorem exists_minimizing_path_of_regular_chart_limit (K : AncientKappaSolution 2 M) |
| 81 | {τ : ℝ} (hτ : 0 < τ) {m : ℕ} (t : Fin (m + 1) → ℝ) (ht : Monotone t) |
| 82 | (hta : t 0 = 0) (htb : t (Fin.last m) = Real.sqrt τ) |
| 83 | (γ : ℝ → M) (hγ : ContinuousOn γ (Icc 0 (Real.sqrt τ))) |
| 84 | (hreg : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 2) 1 γ (Ioo 0 (Real.sqrt τ))) |
| 85 | (x : Fin m → M) |
| 86 | (hsrc : ∀ i, MapsTo γ (Icc (t i.castSucc) (t i.succ)) |
| 87 | (chartAt (EuclideanSpace ℝ (Fin 2)) (x i)).source) |
| 88 | (w : ∀ i : Fin m, IntervalL2 (EuclideanSpace ℝ (Fin 2)) (t i.castSucc) (t i.succ)) |
| 89 | (hprimitive : ∀ i s, s ∈ Icc (t i.castSucc) (t i.succ) → |
| 90 | extChartAt (𝓡 2) (x i) (γ s) = extChartAt (𝓡 2) (x i) (γ (t i.castSucc)) + |
| 91 | ∫ r in t i.castSucc..s, w i r) |
| 92 | (hmin : (∑ i, chartH1Action K.flow 0 (x i) (t i.castSucc) (t i.succ) γ (w i)) ≤ |
| 93 | 2 * Real.sqrt τ * K.spatialReducedLengthInfimum (γ 0) τ) : |
| 94 | ∃ p : BackwardTimePath K.flow 0 0 τ, |
| 95 | (∀ s, p.curve s = γ (Real.sqrt s)) ∧ |
| 96 | backwardLLength K.flow 0 0 τ p.curve = |
| 97 | 2 * Real.sqrt τ * K.spatialReducedLengthInfimum (γ 0) τ ∧ |
| 98 | ∀ q : BackwardTimePath K.flow 0 0 τ, q.curve 0 = γ 0 → |
| 99 | backwardLLength K.flow 0 0 τ p.curve ≤ backwardLLength K.flow 0 0 τ q.curve := by |
| 100 | have htime (s : ℝ) (_hs : s ∈ Icc (t 0) (t (Fin.last m))) : |
| 101 | 0 - s ^ 2 ∈ Iic (0 : ℝ) := sub_nonpos.mpr (sq_nonneg s) |
| 102 | have hpot : ContinuousOn (fun z : ℝ × M => |
| 103 | 2 * z.1 ^ 2 * (K.flow.connection (0 - z.1 ^ 2)).scalarCurvature z.2) |
| 104 | (Icc (t 0) (t (Fin.last m)) ×ˢ univ) := by |
| 105 | rw [hta, htb] |
| 106 | exact K.regularizedPotential_continuousOn le_rfl (Real.sqrt_nonneg τ) univ |
| 107 | obtain ⟨hint, hact⟩ := finite_chart_action_of_interior_regular K.flow 0 t ht htime hpot |
| 108 | γ (by simpa only [hta, htb] using hγ) (by simpa only [hta, htb] using hreg) |
| 109 | x hsrc w hprimitive |
| 110 | have hback (r : ℝ) (hr : r ∈ Icc 0 τ) : 0 - r ∈ Iic (0 : ℝ) := sub_nonpos.mpr hr.1 |
| 111 | let p := backwardPathOfSqrt K.flow 0 0 τ le_rfl hτ (by simp) hback γ |
| 112 | (by simpa only [Real.sqrt_zero] using hγ) |
| 113 | (by simpa only [Real.sqrt_zero] using hreg) |
| 114 | (by simpa only [hta, htb, Real.sqrt_zero] using hint) |
| 115 | have hpact : backwardLLength K.flow 0 0 τ p.curve = |
| 116 | ∑ i, chartH1Action K.flow 0 (x i) (t i.castSucc) (t i.succ) γ (w i) := by |
| 117 | rw [backwardPathOfSqrt_action] |
| 118 | simpa only [hta, htb, Real.sqrt_zero] using hact.symm |
| 119 | have hbound (q : BackwardTimePath K.flow 0 0 τ) (hq : q.curve 0 = γ 0) : |
| 120 | 2 * Real.sqrt τ * K.spatialReducedLengthInfimum (γ 0) τ ≤ |
| 121 | backwardLLength K.flow 0 0 τ q.curve := by |
| 122 | have hle := (K.spatialReducedLengthInfimum_le (γ 0) (q.curve τ) τ).trans |
| 123 | (K.reducedLength_le_path q hq rfl) |
| 124 | simpa only [mul_comm] using (le_div_iff₀ (show 0 < 2 * Real.sqrt τ by positivity)).mp hle |
| 125 | have hpa : p.curve 0 = γ 0 := by change γ (Real.sqrt 0) = γ 0; rw [Real.sqrt_zero] |
| 126 | have heq := le_antisymm (hpact.trans_le hmin) (hbound p hpa) |
| 127 | exact ⟨p, fun _ => rfl, heq, fun q hq => heq.le.trans (hbound q hq)⟩ |
| 128 | |
| 129 | end PoincareMT.AncientKappaSolution |