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.Analysis.Calculus.SmoothCompactness.FiniteDimensional |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.GeometricLimit.Overlap.MetricFamilyLimit |
| 3 | import PoincareLib.Geometry.RicciFlow.MetricFamily.PullbackCoefficients |
| 4 | |
| 5 | /-! |
| 6 | # Spacetime metric extraction on the original overlap quotient |
| 7 | |
| 8 | Local eventual bounds for every mixed coefficient derivative select one |
| 9 | strict subsequence and jointly smooth coefficient limits on countably many |
| 10 | spacetime chart domains. Pointwise eventual positivity and the retained |
| 11 | transition bounds construct compatible metric families on the original |
| 12 | zero-distance overlap system, and hence a smooth quotient metric family. |
| 13 | This is conditional on the stated analytic bounds; no evolution equation or |
| 14 | geometric compactness conclusion is assumed or asserted. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter Metric Poincare.Gluing Poincare.Analysis.Calculus |
| 21 | open scoped Topology NNReal Manifold ContDiff |
| 22 | |
| 23 | namespace PoincareMT.ChartDistance |
| 24 | |
| 25 | /-- Raw local eventual mixed derivative bounds extract smooth positive metric |
| 26 | families on the fixed distance-limit quotient, retaining all compact jet tests |
| 27 | and the original distance limits along one strict subsequence. -/ |
| 28 | theorem exists_smooth_metricFamilies_of_spacetime_bounds |
| 29 | {n : ℕ} (U : ℕ → Set (EuclideanSpace ℝ (Fin n))) (hU : ∀ i, IsOpen (U i)) |
| 30 | [∀ i, Nonempty (Piece U i)] |
| 31 | {M : ℕ → Type*} [∀ k, MetricSpace (M k)] |
| 32 | [∀ k, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M k)] |
| 33 | [∀ k, IsManifold (𝓡 n) ∞ (M k)] |
| 34 | {e : ∀ k i, Piece U i → M k} |
| 35 | {D : ∀ i j, C(Piece U i × Piece U j, ℝ)} |
| 36 | (hD : ∀ i j x y, Tendsto (fun k => dist (e k i x) (e k j y)) atTop |
| 37 | (𝓝 (D i j (x, y)))) |
| 38 | (L : ℕ → ℝ≥0) (he : ∀ k i, LipschitzWith (L i) (e k i)) |
| 39 | (c : ℕ → ℝ) (hc : ∀ i, 0 < c i) |
| 40 | (hlower : ∀ k i x y, c i * dist x y ≤ dist (e k i x) (e k i y)) |
| 41 | (hopen : ∀ k i, Topology.IsOpenEmbedding (e k i)) |
| 42 | (hconn : ∀ k (p : M k) r, IsPreconnected (ball p r)) |
| 43 | (hsmooth : letI : ∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 44 | fun i => (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 45 | ∀ k i, IsLocalDiffeomorph (𝓡 n) (𝓡 n) ∞ (e k i)) |
| 46 | {J : Set ℝ} (hJ : IsOpen J) (t₀ : ℝ) (ht₀ : t₀ ∈ J) |
| 47 | (g : ∀ k, ℝ → RiemannianMetric n (M k)) |
| 48 | (hg : ∀ k, RiemannianMetric.IsSmoothFamilyOn (g k) J) |
| 49 | (hjets : ∀ i (K : Set (ℝ × EuclideanSpace ℝ (Fin n))), |
| 50 | IsCompact K → K ⊆ J ×ˢ U i → ∀ m : ℕ, ∃ C : ℝ, |
| 51 | ∀ᶠ k in atTop, ∀ p ∈ K, |
| 52 | ‖iteratedFDeriv ℝ m |
| 53 | (fun z : ℝ × EuclideanSpace ℝ (Fin n) => |
| 54 | (g k z.1).pullbackCoefficients (chartParametrization U hU (e k i)) z.2) p‖ ≤ C) |
| 55 | (hpositive : ∀ t ∈ J, ∀ i x, x ∈ U i → ∃ a : ℝ, 0 < a ∧ ∀ᶠ k in atTop, |
| 56 | ∀ v, a * ‖v‖ ^ 2 ≤ |
| 57 | (g k t).pullbackCoefficients (chartParametrization U hU (e k i)) x v v) |
| 58 | (hbound : ∀ i j, LocallyEventuallyBoundedDerivatives |
| 59 | (Subtype.val '' overlap (fun i j => D i j) i j) |
| 60 | (fun k => coordinateRepresentative U hU |
| 61 | (fun x => Function.invFun (e k j) (e k i x)))) : |
| 62 | letI : ∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 63 | fun i => (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 64 | letI : ∀ i, IsManifold (𝓡 n) ∞ (Piece U i) := |
| 65 | fun i => (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 66 | letI : ∀ i, LocallyCompactSpace (Piece U i) := fun i => (hU i).locallyCompactSpace |
| 67 | let O := overlapSystem hD L he c hc hlower hopen hconn |
| 68 | let hO := overlapSystem_smooth U hU hD L he c hc hlower hopen hconn hsmooth hbound |
| 69 | letI := quotientChartedSpace U hU O |
| 70 | letI := quotient_isManifold U hU O hO |
| 71 | ∃ σ : ℕ → ℕ, StrictMono σ ∧ |
| 72 | (∀ i j x y, Tendsto (fun k => dist (e (σ k) i x) (e (σ k) j y)) atTop |
| 73 | (𝓝 (D i j (x, y)))) ∧ |
| 74 | ∃ B : ℕ → ℝ × EuclideanSpace ℝ (Fin n) → |
| 75 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ, |
| 76 | (∀ i, ContDiffOn ℝ ∞ (B i) (J ×ˢ U i)) ∧ |
| 77 | (∀ i m K, IsCompact K → K ⊆ J ×ˢ U i → TendstoUniformlyOn |
| 78 | (fun k => iteratedFDeriv ℝ m |
| 79 | (fun z : ℝ × EuclideanSpace ℝ (Fin n) => |
| 80 | (g (σ k) z.1).pullbackCoefficients |
| 81 | (chartParametrization U hU (e (σ k) i)) z.2)) |
| 82 | (iteratedFDeriv ℝ m (B i)) atTop K) ∧ |
| 83 | ∃ (gLimit : ℝ → ∀ i, CanonicalMetric U hU i) |
| 84 | (hcompat : ∀ t, CompatibleMetrics U hU O (gLimit t)), |
| 85 | (∀ t ∈ J, ∀ i (x : Piece U i) v w, |
| 86 | (gLimit t i).inner x v w = B i (t, x) v w) ∧ |
| 87 | (∀ i, RiemannianMetric.IsSmoothFamilyOn (fun t => gLimit t i) J) ∧ |
| 88 | RiemannianMetric.IsSmoothFamilyOn |
| 89 | (fun t => quotientMetric U hU O hO (gLimit t) (hcompat t)) J := by |
| 90 | let : ∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 91 | fun i => (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 92 | let : ∀ i, IsManifold (𝓡 n) ∞ (Piece U i) := |
| 93 | fun i => (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 94 | let : ∀ i, LocallyCompactSpace (Piece U i) := fun i => (hU i).locallyCompactSpace |
| 95 | let O := overlapSystem hD L he c hc hlower hopen hconn |
| 96 | let hO := overlapSystem_smooth U hU hD L he c hc hlower hopen hconn hsmooth hbound |
| 97 | let := quotientChartedSpace U hU O |
| 98 | let := quotient_isManifold U hU O hO |
| 99 | have hsource (i k : ℕ) : ContDiffOn ℝ ∞ |
| 100 | (fun z : ℝ × EuclideanSpace ℝ (Fin n) => |
| 101 | (g k z.1).pullbackCoefficients (chartParametrization U hU (e k i)) z.2) |
| 102 | (J ×ˢ U i) := by |
| 103 | intro p hp |
| 104 | exact ((hg k).contDiffAt_spacetime_pullbackCoefficients hJ |
| 105 | ((contMDiffOn_chartParametrization U hU (hsmooth k i).contMDiff).contMDiffAt |
| 106 | ((hU i).mem_nhds hp.2)) hp.1).contDiffWithinAt |
| 107 | obtain ⟨σ, hσ, B, hBsmooth, hBjets⟩ := |
| 108 | exists_common_smoothSubsequenceExtraction_finiteDimensional |
| 109 | (fun i => hJ.prod (hU i)) |
| 110 | (fun i k z => (g k z.1).pullbackCoefficients |
| 111 | (chartParametrization U hU (e k i)) z.2) hsource hjets |
| 112 | have hDσ : ∀ i j x y, |
| 113 | Tendsto (fun k => dist (e (σ k) i x) (e (σ k) j y)) atTop |
| 114 | (𝓝 (D i j (x, y))) := fun i j x y => (hD i j x y).comp hσ.tendsto_atTop |
| 115 | have hBlocal (i : ℕ) : TendstoLocallyUniformlyOn |
| 116 | (fun k z => (g (σ k) z.1).pullbackCoefficients |
| 117 | (chartParametrization U hU (e (σ k) i)) z.2) |
| 118 | (B i) atTop (J ×ˢ U i) := |
| 119 | CoordinateTransition.locallyUniformly_of_tendsto_zeroJet (hJ.prod (hU i)) (hBjets i 0) |
| 120 | have hBslice : ∀ t ∈ J, ∀ i, TendstoLocallyUniformlyOn |
| 121 | (fun k => (g (σ k) t).pullbackCoefficients (chartParametrization U hU (e (σ k) i))) |
| 122 | (fun x => B i (t, x)) atTop (U i) := by |
| 123 | intro t ht i |
| 124 | have hmaps : MapsTo (fun x : EuclideanSpace ℝ (Fin n) => (t, x)) |
| 125 | (U i) (J ×ˢ U i) := fun _ hx => ⟨ht, hx⟩ |
| 126 | exact (hBlocal i).comp (fun x => (t, x)) hmaps |
| 127 | (continuous_const.prodMk continuous_id).continuousOn |
| 128 | have hpositiveσ : ∀ t ∈ J, ∀ i x, x ∈ U i → ∃ a : ℝ, 0 < a ∧ ∀ᶠ k in atTop, |
| 129 | ∀ v, a * ‖v‖ ^ 2 ≤ |
| 130 | (g (σ k) t).pullbackCoefficients (chartParametrization U hU (e (σ k) i)) x v v := by |
| 131 | intro t ht i x hx |
| 132 | obtain ⟨a, ha, hpos⟩ := hpositive t ht i x hx |
| 133 | exact ⟨a, ha, hσ.tendsto_atTop.eventually hpos⟩ |
| 134 | have hboundσ : ∀ i j, LocallyEventuallyBoundedDerivatives |
| 135 | (Subtype.val '' overlap (fun i j => D i j) i j) |
| 136 | (fun k => coordinateRepresentative U hU |
| 137 | (fun x => Function.invFun (e (σ k) j) (e (σ k) i x))) := by |
| 138 | intro i j K hK hKU m |
| 139 | obtain ⟨C, hC⟩ := hbound i j K hK hKU m |
| 140 | exact ⟨C, hσ.tendsto_atTop.eventually hC⟩ |
| 141 | obtain ⟨gLimit, hcompat, hcoeff, hfamily, hquotient⟩ := |
| 142 | exists_compatibleMetricFamilies_of_spacetime_limits U hU hDσ L (fun k => he (σ k)) |
| 143 | c hc (fun k => hlower (σ k)) (fun k => hopen (σ k)) (fun k => hconn (σ k)) |
| 144 | (fun k => hsmooth (σ k)) t₀ ht₀ (fun k => g (σ k)) B hBslice hBsmooth |
| 145 | hpositiveσ hboundσ |
| 146 | exact ⟨σ, hσ, hDσ, B, hBsmooth, hBjets, gLimit, hcompat, hcoeff, hfamily, hquotient⟩ |
| 147 | |
| 148 | end PoincareMT.ChartDistance |