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.ChartEnergy |
| 2 | |
| 3 | /-! |
| 4 | # Weak coordinate velocities of a path limit |
| 5 | |
| 6 | Reference energy bounds on finitely many compact chart cores give a common |
| 7 | weakly convergent velocity subsequence. Pointwise convergence of the paths |
| 8 | identifies the coordinate primitives of their limit. |
| 9 | |
| 10 | Adapted from Mapher `Proofs/M08/MinimizingCompactness.lean`, commit |
| 11 | `49331b7d7ecad38f53e4300c3b35d6a84b2cc648`, using the actual reference energy |
| 12 | without a curvature-theory assumption. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open MeasureTheory Set Filter Topology |
| 18 | open scoped Manifold ContDiff Bundle intervalIntegral ENNReal |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.ReducedLengthMinimum.Variational |
| 23 | |
| 24 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 26 | |
| 27 | /-- Bounded reference energy and compact chart cores identify the limit's L2 |
| 28 | velocities on every piece of a finite subdivision. -/ |
| 29 | theorem finite_chartH1_limit {ι : Type*} [Fintype ι] |
| 30 | (g : RiemannianMetric n M) (a b : ι → ℝ) (hab : ∀ i, a i ≤ b i) |
| 31 | (x : ι → M) (K : ι → Set M) (hK : ∀ i, IsCompact (K i)) |
| 32 | (hsrc : ∀ i, K i ⊆ (chartAt (EuclideanSpace ℝ (Fin n)) (x i)).source) |
| 33 | (α : ℕ → ℝ → M) (γ : ℝ → M) |
| 34 | (hα : ∀ i k, ContinuousOn (α k) (Icc (a i) (b i))) |
| 35 | (hreg : ∀ i k, ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) 1 (α k) (Ioo (a i) (b i))) |
| 36 | (hαK : ∀ i k, MapsTo (α k) (Icc (a i) (b i)) (K i)) |
| 37 | (hγK : ∀ i, MapsTo γ (Icc (a i) (b i)) (K i)) |
| 38 | (hpoint : ∀ i s, s ∈ Icc (a i) (b i) → |
| 39 | Tendsto (fun k => α k s) atTop (𝓝 (γ s))) |
| 40 | (hE : ∀ i k, IntervalIntegrable (referenceSpeedSq g (α k)) volume (a i) (b i)) |
| 41 | (C : ι → ℝ) (hbound : ∀ i k, (∫ s in a i..b i, referenceSpeedSq g (α k) s) ≤ C i) : |
| 42 | ∃ (v : ∀ i, ℕ → IntervalL2 (EuclideanSpace ℝ (Fin n)) (a i) (b i)) |
| 43 | (w : ∀ i, IntervalL2 (EuclideanSpace ℝ (Fin n)) (a i) (b i)) |
| 44 | (B : ι → ℝ) (φ : ℕ → ℕ), StrictMono φ ∧ |
| 45 | (∀ i k, ‖v i k‖ ≤ B i ∧ |
| 46 | (v i k : ℝ → EuclideanSpace ℝ (Fin n)) =ᵐ[volume.restrict (Icc (a i) (b i))] |
| 47 | deriv ((extChartAt (𝓡 n) (x i)) ∘ α k)) ∧ |
| 48 | (∀ i, ∀ s ∈ Icc (a i) (b i), |
| 49 | extChartAt (𝓡 n) (x i) (γ s) = extChartAt (𝓡 n) (x i) (γ (a i)) + |
| 50 | ∫ r in a i..s, w i r) ∧ |
| 51 | ∀ i, ∀ l : IntervalL2 (EuclideanSpace ℝ (Fin n)) (a i) (b i) →L[ℝ] ℝ, |
| 52 | Tendsto (fun k => l (v i (φ k))) atTop (𝓝 (l (w i))) := by |
| 53 | classical |
| 54 | choose c hc hcbound using fun i => chart_velocity_L2_bound g (x i) (hK i) (hsrc i) |
| 55 | choose hLp hvbound using fun i k => |
| 56 | hcbound i (hab i) (α k) (hreg i k) (hαK i k) (hE i k) (hbound i k) |
| 57 | let v : ∀ i, ℕ → IntervalL2 (EuclideanSpace ℝ (Fin n)) (a i) (b i) := |
| 58 | fun i k => (hLp i k).toLp (deriv ((extChartAt (𝓡 n) (x i)) ∘ α k)) |
| 59 | let : Fact ((2 : ℝ≥0∞) ≠ (⊤ : ℝ≥0∞)) := ⟨by norm_num⟩ |
| 60 | let (i : ι) : TopologicalSpace.SeparableSpace |
| 61 | (IntervalL2 (EuclideanSpace ℝ (Fin n)) (a i) (b i)) := inferInstance |
| 62 | obtain ⟨φ, hφ, w, hweak⟩ := exists_finite_weak_subsequence v |
| 63 | (fun i => Real.sqrt ((c i)⁻¹ * C i)) hvbound |
| 64 | refine ⟨v, w, (fun i => Real.sqrt ((c i)⁻¹ * C i)), φ, hφ, |
| 65 | (fun i k => ⟨hvbound i k, (hLp i k).coeFn_toLp⟩), ?_, fun i => (hweak i).2⟩ |
| 66 | intro i s hs |
| 67 | apply primitive_of_weak_limit |
| 68 | (fun k => (extChartAt (𝓡 n) (x i)) ∘ α (φ k)) |
| 69 | ((extChartAt (𝓡 n) (x i)) ∘ γ) (fun k => v i (φ k)) (w i) _ _ (hweak i).2 hs |
| 70 | · intro k r hr |
| 71 | have hαsrc : ∀ t ∈ Icc (a i) (b i), |
| 72 | α (φ k) t ∈ (chartAt (EuclideanSpace ℝ (Fin n)) (x i)).source := by |
| 73 | intro t ht |
| 74 | exact (hsrc i) (hαK i (φ k) ht) |
| 75 | apply primitive_of_deriv |
| 76 | ((continuousOn_extChartAt (I := 𝓡 n) (x i)).comp (hα i (φ k)) |
| 77 | (fun t ht => by simpa only [extChartAt_source] using hαsrc t ht)) _ |
| 78 | (hLp i (φ k)) hr |
| 79 | intro t ht |
| 80 | have hm := ((hreg i (φ k) t ht).contMDiffAt (isOpen_Ioo.mem_nhds ht)).mdifferentiableAt |
| 81 | (by norm_num) |
| 82 | exact ((mdifferentiableAt_extChartAt |
| 83 | (hαsrc t (Ioo_subset_Icc_self ht))).comp t hm).differentiableAt.hasDerivAt |
| 84 | · intro t ht |
| 85 | have hsrc' : γ t ∈ (extChartAt (𝓡 n) (x i)).source := by |
| 86 | simpa only [extChartAt_source] using hsrc i (hγK i ht) |
| 87 | exact ((continuousAt_extChartAt' hsrc').tendsto.comp |
| 88 | (hpoint i t ht)).comp hφ.tendsto_atTop |
| 89 | |
| 90 | end PoincareMT.ReducedLengthMinimum.Variational |