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.Blowup.Construction.PartialLimits.StaticCompleteness |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.GeometricLimit.Overlap.Metric |
| 3 | import PoincareLib.Geometry.RicciFlow.Compactness.GeometricLimit.Overlap.ChosenChart |
| 4 | import PoincareLib.Geometry.RicciFlow.Compactness.GeometricLimit.Overlap.FlowCarrier |
| 5 | import PoincareLib.Geometry.RicciFlow.Compactness.GeometricLimit.Stages.SourceEmbedding.PointedExhaustion |
| 6 | import PoincareLib.Geometry.RicciFlow.Compactness.GeometricLimit.Stages.SourceEmbedding.MetricExhaustion |
| 7 | import PoincareLib.Analysis.Calculus.SmoothCompactness.LocalConvergence |
| 8 | |
| 9 | /-! |
| 10 | # Complete static limits from controlled coordinate limits |
| 11 | |
| 12 | Morgan--Tian Theorem 5.9 and Corollary 5.10, pp. 88--89. All-radius chart |
| 13 | coverage constructs a complete terminal metric, with one retained sequence |
| 14 | of actual pointed embeddings and convergence of every spatial metric jet. |
| 15 | There is no common flow interval or global curvature bound among the inputs. |
| 16 | The complete-static-coordinate-limit derivation records the dependency check. |
| 17 | -/ |
| 18 | |
| 19 | set_option autoImplicit false |
| 20 | set_option backward.isDefEq.respectTransparency false |
| 21 | |
| 22 | open Set Filter Metric Poincare.Gluing Poincare.Analysis.Calculus |
| 23 | open scoped Topology NNReal Manifold ContDiff |
| 24 | |
| 25 | universe u |
| 26 | |
| 27 | namespace PoincareMT.M30 |
| 28 | |
| 29 | open ChartDistance |
| 30 | |
| 31 | /-- Spatial chart limits and coverage at every source radius construct a |
| 32 | complete pointed metric limit (Theorem 5.9, pp. 88--89). The radius-one |
| 33 | record stores the common maps; the separate all-radius coverage assertion |
| 34 | proves completeness and is retained for subsequent source estimates. -/ |
| 35 | theorem exists_complete_static_limit_of_coordinate_limits |
| 36 | {n : ℕ} (U : ℕ → Set (EuclideanSpace ℝ (Fin n))) (hU : ∀ i, IsOpen (U i)) |
| 37 | [∀ i, Nonempty (Piece U i)] |
| 38 | {M : ℕ → Type u} [∀ k, MetricSpace (M k)] |
| 39 | [∀ k, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M k)] |
| 40 | [∀ k, IsManifold (𝓡 n) ∞ (M k)] |
| 41 | {e : ∀ k i, Piece U i → M k} |
| 42 | {D : ∀ i j, C(Piece U i × Piece U j, ℝ)} |
| 43 | (hD : ∀ i j, TendstoLocallyUniformly |
| 44 | (fun k (p : Piece U i × Piece U j) => dist (e k i p.1) (e k j p.2)) (D i j) atTop) |
| 45 | (L : ℕ → ℝ≥0) (he : ∀ k i, LipschitzWith (L i) (e k i)) |
| 46 | (c : ℕ → ℝ) (hc : ∀ i, 0 < c i) |
| 47 | (hlower : ∀ k i x y, c i * dist x y ≤ dist (e k i x) (e k i y)) |
| 48 | (hopen : ∀ k i, Topology.IsOpenEmbedding (e k i)) |
| 49 | (hconn : ∀ k (p : M k) r, IsPreconnected (ball p r)) |
| 50 | (hsmooth : letI : ∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 51 | fun i => (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 52 | ∀ k i, IsLocalDiffeomorph (𝓡 n) (𝓡 n) ∞ (e k i)) |
| 53 | (hbound : ∀ i j, LocallyEventuallyBoundedDerivatives |
| 54 | (Subtype.val '' overlap (fun i j => D i j) i j) |
| 55 | (fun k => coordinateRepresentative U hU |
| 56 | (fun x => Function.invFun (e k j) (e k i x)))) |
| 57 | {i₀ : ℕ} (p : Piece U i₀) |
| 58 | (hcover : ∀ R : ℝ, 0 < R → ∃ s : Finset ℕ, |
| 59 | ∃ K : ∀ i, Set (Piece U i), (∀ i ∈ s, IsCompact (K i)) ∧ |
| 60 | ∀ᶠ k in atTop, ball (e k i₀ p) R ⊆ ⋃ i ∈ s, e k i '' K i) |
| 61 | (g : ∀ k, RiemannianMetric n (M k)) |
| 62 | (hdist : ∀ k (x y : M k), edist x y = (g k).edist x y) |
| 63 | (B : ℕ → EuclideanSpace ℝ (Fin n) → |
| 64 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 65 | (hBsmooth : ∀ i, ContDiffOn ℝ ∞ (B i) (U i)) |
| 66 | (hBjets : ∀ i m K, IsCompact K → K ⊆ U i → TendstoUniformlyOn |
| 67 | (fun k => iteratedFDeriv ℝ m |
| 68 | ((g k).pullbackCoefficients (chartParametrization U hU (e k i)))) |
| 69 | (iteratedFDeriv ℝ m (B i)) atTop K) |
| 70 | (hpositive : ∀ i x, x ∈ U i → ∃ a : ℝ, 0 < a ∧ ∀ᶠ k in atTop, |
| 71 | ∀ v, a * ‖v‖ ^ 2 ≤ |
| 72 | (g k).pullbackCoefficients (chartParametrization U hU (e k i)) x v v) : |
| 73 | ∃ G : PartialPointedMetricConvergence g (fun k => e k i₀ p) 1, |
| 74 | G.limitCarrier.metricComplete G.limitMetric ∧ |
| 75 | ∀ R : ℝ, 0 < R → ∃ l : ℕ, ∀ᶠ k in atTop, |
| 76 | (g (G.subsequence k)).ball (e (G.subsequence k) i₀ p) R ⊆ |
| 77 | G.embedding k '' G.exhaustion l := by |
| 78 | let : ∀ i, ChartedSpace (EuclideanSpace ℝ (Fin n)) (Piece U i) := |
| 79 | fun i => (hU i).isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 80 | let : ∀ i, IsManifold (𝓡 n) ∞ (Piece U i) := |
| 81 | fun i => (hU i).isOpenEmbedding_subtypeVal.isManifold_singleton |
| 82 | let : ∀ i, LocallyCompactSpace (Piece U i) := fun i => (hU i).locallyCompactSpace |
| 83 | let hp := fun i j x y => |
| 84 | (hD i j).tendstoLocallyUniformlyOn.tendsto_at (mem_univ (x, y)) |
| 85 | let O := overlapSystem hp L he c hc hlower hopen hconn |
| 86 | let hO := overlapSystem_smooth U hU hp L he c hc hlower hopen hconn hsmooth hbound |
| 87 | let hclosed := overlapSystem_closed hp L he c hc hlower hopen hconn |
| 88 | let := quotientChartedSpace U hU O |
| 89 | let := quotient_isManifold U hU O hO |
| 90 | obtain ⟨hconnected, E, hE, hEc, hEp, hEK, hEstep, hEcover, sigma, hsigma, |
| 91 | f, hf, happrox, hreadout, hescape⟩ := |
| 92 | exists_pointed_source_exhaustion_with_boundary_escape U hU hD L he c hc hlower |
| 93 | hopen hconn hsmooth hbound p hcover |
| 94 | let : ConnectedSpace (Quotient O.setoid) := hconnected |
| 95 | have hEmono : Monotone E := monotone_nat_of_le_succ fun j => |
| 96 | subset_closure.trans (hEstep j) |
| 97 | have hBlocal (i : ℕ) : TendstoLocallyUniformlyOn |
| 98 | (fun k => (g k).pullbackCoefficients (chartParametrization U hU (e k i))) |
| 99 | (B i) atTop (U i) := |
| 100 | CoordinateTransition.locallyUniformly_of_tendsto_zeroJet (hU i) (hBjets i 0) |
| 101 | obtain ⟨gLimit, hcoeff, hcompat⟩ := |
| 102 | exists_compatibleMetrics_of_coordinate_limits U hU hp L he c hc hlower |
| 103 | hopen hconn hsmooth g B hBlocal hBsmooth hpositive hbound |
| 104 | let C := O.flowCarrier U hU hO hclosed |
| 105 | let gQ := quotientMetric U hU O hO gLimit hcompat |
| 106 | have hsourceJets := source_exhaustion_pullbackCoefficients_tendsto_jets |
| 107 | U hU O hO hE hEmono hEcover f (fun k => (hf k).2.1) |
| 108 | L (fun k => he (sigma k)) c hc (fun k => hlower (sigma k)) |
| 109 | (fun k => hopen (sigma k)) (fun k => hconn (sigma k)) |
| 110 | (fun k => hsmooth (sigma k)) happrox hreadout (fun k => g (sigma k)) B hBsmooth |
| 111 | (fun i m K hK hKU V hV => |
| 112 | hsigma.tendsto_atTop.eventually (hBjets i m K hK hKU V hV)) |
| 113 | have hboundary (R : ℝ) (hR : 0 < R) : |
| 114 | ∃ l : ℕ, ∀ᶠ k in atTop, ∀ q ∈ frontier (E l), |
| 115 | ENNReal.ofReal R ≤ (g (sigma k)).edist (e (sigma k) i₀ p) (f k q) := by |
| 116 | obtain ⟨l, hl⟩ := hescape R hR |
| 117 | exact ⟨l, hl.mono fun k hk q hq => by simpa only [hdist] using hk q hq⟩ |
| 118 | let G : PartialPointedMetricConvergence g (fun k => e k i₀ p) 1 := { |
| 119 | limitCarrier := C |
| 120 | limitMetric := gQ |
| 121 | base := O.include i₀ p |
| 122 | subsequence := sigma |
| 123 | subsequence_strictMono := hsigma |
| 124 | exhaustion := E |
| 125 | exhaustion_open := hE |
| 126 | exhaustion_connected := hEc |
| 127 | base_in_exhaustion := hEp |
| 128 | exhaustion_compactClosure := hEK |
| 129 | exhaustion_step := hEstep |
| 130 | exhaustion_covers := hEcover |
| 131 | embedding := f |
| 132 | embedding_open := fun k => (hf k).1 |
| 133 | embedding_smooth := fun k => (hf k).2.1 |
| 134 | base_preserving := fun k => (hf k).2.2 |
| 135 | metric_jets := by |
| 136 | intro q m K hK hKchart |
| 137 | obtain ⟨i, _, htarget, hinverse⟩ := exists_chosen_quotient_chart U hU O q |
| 138 | have hKU : K ⊆ U i := by simpa only [htarget] using hKchart |
| 139 | rw [hinverse] |
| 140 | have hlimit : EqOn |
| 141 | (gQ.pullbackCoefficients (chartParametrization U hU (O.include i))) (B i) (U i) := |
| 142 | quotientMetric_pullbackCoefficients_eqOn U hU O hO gLimit hcompat B hcoeff i |
| 143 | apply (hsourceJets i m K hK hKU).congr_right |
| 144 | intro x hx |
| 145 | exact ((eqOn_iteratedFDeriv_of_isOpen (hU i) hlimit m) (hKU hx)).symm |
| 146 | boundary_control := by |
| 147 | intro R hR |
| 148 | obtain ⟨l, hl⟩ := hboundary 1 zero_lt_one |
| 149 | exact ⟨l, hl.mono fun k hk q hq => |
| 150 | (ENNReal.ofReal_le_ofReal hR.le).trans (hk q hq)⟩ } |
| 151 | have hcoverage (R : ℝ) (hR : 0 < R) : |
| 152 | ∃ l : ℕ, ∀ᶠ k in atTop, |
| 153 | (g (G.subsequence k)).ball (e (G.subsequence k) i₀ p) R ⊆ |
| 154 | G.embedding k '' G.exhaustion l := |
| 155 | G.source_ball_coverage_of_boundary_control hR (hboundary R hR) |
| 156 | exact ⟨G, G.metricComplete_of_source_ball_coverage hcoverage, hcoverage⟩ |
| 157 | |
| 158 | end PoincareMT.M30 |