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.Compactness.GeometricLimit.Overlap.CompactRepresentatives |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.GeometricLimit.Overlap.QuotientCoefficients |
| 3 | import PoincareLib.Geometry.Riemannian.Coordinates.CompactFamily |
| 4 | |
| 5 | /-! |
| 6 | # Uniform tensor convergence on compact quotient regions |
| 7 | |
| 8 | Uniform convergence of chart coefficients controls the tensor error on the |
| 9 | varying metric-unit balls. A finite family of compact chart representatives |
| 10 | gives one threshold for the entire compact quotient region and time set. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | open Set Filter Poincare.Gluing |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | namespace PoincareMT.ChartDistance |
| 19 | |
| 20 | variable {ι : Type*} {n : ℕ} |
| 21 | (U : ι → Set (EuclideanSpace ℝ (Fin n))) (hU : ∀ i, IsOpen (U i)) |
| 22 | [∀ i, Nonempty (Piece U i)] |
| 23 | (O : OverlapSystem (fun i => Piece U i)) (hs : SmoothOverlap U hU O) |
| 24 | |
| 25 | theorem eventually_tensor_error_lt_on_compact_quotient |
| 26 | [T2Space (Quotient O.setoid)] |
| 27 | (g : ∀ i, ℝ → CanonicalMetric U hU i) |
| 28 | (hg : ∀ t, CompatibleMetrics U hU O (fun i => g i t)) |
| 29 | {J : Set ℝ} : |
| 30 | letI := quotientChartedSpace U hU O |
| 31 | letI := quotient_isManifold U hU O hs |
| 32 | letI : ∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 33 | fun i => (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 34 | letI : ∀ i, IsManifold (𝓡 n) ∞ (Piece U i) := |
| 35 | fun i => (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 36 | (∀ i, ContinuousOn (Y := EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 37 | EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 38 | (fun p : ℝ × Piece U i => ((g i p.1).inner p.2 : |
| 39 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ)) |
| 40 | (J ×ˢ univ)) → |
| 41 | ∀ A : ℕ → ℝ → (x : Quotient O.setoid) → TangentSpace (𝓡 n) x →L[ℝ] |
| 42 | TangentSpace (𝓡 n) x →L[ℝ] ℝ, |
| 43 | (∀ i I C, IsCompact I → I ⊆ J → IsCompact C → TendstoUniformlyOn |
| 44 | (fun k (p : ℝ × Piece U i) => |
| 45 | let B : EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ := |
| 46 | A k p.1 (O.include i p.2) |
| 47 | let D : EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) := |
| 48 | mfderiv (𝓡 n) (𝓡 n) (O.include i) p.2 |
| 49 | B.bilinearComp D D) |
| 50 | (fun p => (g i p.1).inner p.2) atTop (I ×ˢ C)) → |
| 51 | ∀ K I, IsCompact K → IsCompact I → I ⊆ J → ∀ ε > 0, |
| 52 | ∀ᶠ k in atTop, ∀ t ∈ I, ∀ x ∈ K, ∀ v w : TangentSpace (𝓡 n) x, |
| 53 | Real.sqrt ((quotientMetric U hU O hs (fun i => g i t) (hg t)).inner x v v) ≤ 1 → |
| 54 | Real.sqrt ((quotientMetric U hU O hs (fun i => g i t) (hg t)).inner x w w) ≤ 1 → |
| 55 | |A k t x v w - |
| 56 | (quotientMetric U hU O hs (fun i => g i t) (hg t)).inner x v w| < ε := by |
| 57 | let := quotientChartedSpace U hU O |
| 58 | let := quotient_isManifold U hU O hs |
| 59 | let : ∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 60 | fun i => (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 61 | let : ∀ i, IsManifold (𝓡 n) ∞ (Piece U i) := |
| 62 | fun i => (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 63 | let : ∀ i, LocallyCompactSpace (Piece U i) := fun i => (hU i).locallyCompactSpace |
| 64 | intro hcont A hconv K I hK hI hIJ ε hε |
| 65 | classical |
| 66 | obtain ⟨s, C, hC, hcover⟩ := exists_finite_compact_representatives O hK hK.isClosed |
| 67 | have hlocal (a : Σ i, Piece U i) (ha : a ∈ s) : |
| 68 | ∀ᶠ k in atTop, ∀ p ∈ I ×ˢ C a, ∀ v w : EuclideanSpace ℝ (Fin n), |
| 69 | (g a.1 p.1).inner p.2 v v ≤ 1 → (g a.1 p.1).inner p.2 w w ≤ 1 → |
| 70 | |A k p.1 (O.include a.1 p.2) |
| 71 | (mfderiv (𝓡 n) (𝓡 n) (O.include a.1) p.2 v) |
| 72 | (mfderiv (𝓡 n) (𝓡 n) (O.include a.1) p.2 w) - |
| 73 | (g a.1 p.1).inner p.2 v w| < ε := by |
| 74 | apply eventually_bilinear_error_lt_on_unit_sublevels (hI.prod (hC a ha)) |
| 75 | ((hcont a.1).mono (prod_mono hIJ (subset_univ _))) |
| 76 | (fun p _ v hv => (g a.1 p.1).pos p.2 v hv) |
| 77 | (hconv a.1 I (C a) hI hIJ (hC a ha)) hε |
| 78 | filter_upwards [s.eventually_all.mpr hlocal] with k hk t ht x hx v w hv hw |
| 79 | rw [← hcover] at hx |
| 80 | obtain ⟨a, ha, y, hy, rfl⟩ := by |
| 81 | simpa only [mem_iUnion, exists_prop, mem_image] using hx |
| 82 | let L := (include_isLocalDiffeomorph U hU O hs a.1).mfderivToContinuousLinearEquiv |
| 83 | (by simp) y |
| 84 | obtain ⟨v', hv'⟩ := L.surjective v |
| 85 | obtain ⟨w', hw'⟩ := L.surjective w |
| 86 | change mfderiv (𝓡 n) (𝓡 n) (O.include a.1) y v' = v at hv' |
| 87 | change mfderiv (𝓡 n) (𝓡 n) (O.include a.1) y w' = w at hw' |
| 88 | subst v w |
| 89 | have hpull := quotientMetric_preserves U hU O hs (fun i => g i t) (hg t) a.1 y |
| 90 | have hvv : (g a.1 t).inner y v' v' ≤ 1 := by |
| 91 | rw [← hpull v' v'] at hv |
| 92 | exact Real.sqrt_le_one.mp hv |
| 93 | have hww : (g a.1 t).inner y w' w' ≤ 1 := by |
| 94 | rw [← hpull w' w'] at hw |
| 95 | exact Real.sqrt_le_one.mp hw |
| 96 | simpa only [ContinuousLinearMap.bilinearComp_apply, ← hpull v' w'] using |
| 97 | hk a ha (t, y) ⟨ht, hy⟩ v' w' hvv hww |
| 98 | |
| 99 | end PoincareMT.ChartDistance |