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.Convergence.MetricJets |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.Convergence.CoordinateRegularity |
| 3 | import PoincareLib.Analysis.Calculus.SpatialJets |
| 4 | import Mathlib.Topology.Instances.Matrix |
| 5 | |
| 6 | /-! # Spatial regularity and convergence in pointed coordinate charts -/ |
| 7 | |
| 8 | set_option autoImplicit false |
| 9 | open Set Filter |
| 10 | open scoped Manifold ContDiff Bundle Topology |
| 11 | |
| 12 | namespace PoincareMT.PointedGeometricConvergence |
| 13 | |
| 14 | variable {n : ℕ} {T' T : ℝ} {S : PointedFlowSequence n T' T} |
| 15 | |
| 16 | /-- Every fixed interior coordinate point eventually lies in a smooth source |
| 17 | stage, so its frozen pullback coefficients are jointly smooth. -/ |
| 18 | theorem eventually_contDiffAt_coordinateCoefficient |
| 19 | (G : PointedGeometricConvergence S) |
| 20 | (q : G.limitCarrier.carrier) (p : ℝ × EuclideanSpace ℝ (Fin n)) |
| 21 | (ht : p.1 ∈ Ioo T' T) |
| 22 | (hp : |
| 23 | letI : TopologicalSpace G.limitCarrier.carrier := G.limitCarrier.topologicalSpace |
| 24 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) G.limitCarrier.carrier := |
| 25 | G.limitCarrier.chartedSpace |
| 26 | p.2 ∈ (extChartAt (𝓡 n) q).target) : |
| 27 | ∀ᶠ k : ℕ in atTop, ∀ a b : Fin n, |
| 28 | ContDiffAt ℝ ∞ (G.limitCarrier.coordinateCoefficient q |
| 29 | (pullbackInnerValue G.limitFlow (S.flow (G.subsequence k)) (G.embedding k)) a b) p := by |
| 30 | let : TopologicalSpace G.limitCarrier.carrier := G.limitCarrier.topologicalSpace |
| 31 | let : ChartedSpace (EuclideanSpace ℝ (Fin n)) G.limitCarrier.carrier := |
| 32 | G.limitCarrier.chartedSpace |
| 33 | let : IsManifold (𝓡 n) ∞ G.limitCarrier.carrier := G.limitCarrier.isManifold |
| 34 | obtain ⟨j, hj⟩ := G.exists_exhaustion_superset |
| 35 | (isCompact_singleton (x := (extChartAt (𝓡 n) q).symm p.2)) |
| 36 | filter_upwards [eventually_ge_atTop j] with k hk a b |
| 37 | exact (G.embedding k).contDiffAt_coordinateCoefficient_pullback (G.exhaustion_open k) |
| 38 | q a b p ht ⟨hp, G.exhaustion_monotone hk (hj (mem_singleton _))⟩ |
| 39 | |
| 40 | /-- Restricting the frozen spacetime jets to a time slice gives convergence |
| 41 | of the full spatial derivative maps, at every order. -/ |
| 42 | theorem tendsto_coordinate_spatial_metricJet (G : PointedGeometricConvergence S) |
| 43 | (q : G.limitCarrier.carrier) (r : ℕ) (a b : Fin n) |
| 44 | (p : ℝ × EuclideanSpace ℝ (Fin n)) (ht : p.1 ∈ Ioo T' T) |
| 45 | (hp : |
| 46 | letI : TopologicalSpace G.limitCarrier.carrier := G.limitCarrier.topologicalSpace |
| 47 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) G.limitCarrier.carrier := |
| 48 | G.limitCarrier.chartedSpace |
| 49 | p.2 ∈ (extChartAt (𝓡 n) q).target) : |
| 50 | Tendsto (fun k => iteratedFDeriv ℝ r (fun y => |
| 51 | G.limitCarrier.coordinateCoefficient q |
| 52 | (pullbackInnerValue G.limitFlow (S.flow (G.subsequence k)) (G.embedding k)) |
| 53 | a b (p.1, y)) p.2) atTop |
| 54 | (𝓝 (iteratedFDeriv ℝ r (fun y => G.limitCarrier.coordinateCoefficient q |
| 55 | (fun t x v w => G.limitCarrier.metricInner (G.limitFlow.metricAt t) x v w) |
| 56 | a b (p.1, y)) p.2)) := by |
| 57 | let P := ContinuousMultilinearMap.compContinuousLinearMapL |
| 58 | (𝕜 := ℝ) (F := ℝ) (fun _ : Fin r => |
| 59 | ContinuousLinearMap.inr ℝ ℝ (EuclideanSpace ℝ (Fin n))) |
| 60 | have h := P.continuous.continuousAt.tendsto.comp |
| 61 | (G.tendsto_coordinate_metricJet q r a b p ht hp) |
| 62 | have hlim : iteratedFDeriv ℝ r (fun y => G.limitCarrier.coordinateCoefficient q |
| 63 | (fun t x v w => G.limitCarrier.metricInner (G.limitFlow.metricAt t) x v w) |
| 64 | a b (p.1, y)) p.2 = P (iteratedFDeriv ℝ r |
| 65 | (G.limitCarrier.coordinateCoefficient q |
| 66 | (fun t x v w => G.limitCarrier.metricInner (G.limitFlow.metricAt t) x v w) |
| 67 | a b) p) := by |
| 68 | ext v |
| 69 | exact Poincare.Analysis.iteratedFDeriv_spatial_slice _ |
| 70 | (G.limitFlow.contDiffAt_coordinateCoefficient_metric q a b p ht hp) r v |
| 71 | rw [← hlim] at h |
| 72 | apply h.congr' |
| 73 | filter_upwards [G.eventually_contDiffAt_coordinateCoefficient q p ht hp] with k hk |
| 74 | ext v |
| 75 | exact (Poincare.Analysis.iteratedFDeriv_spatial_slice _ (hk a b) r v).symm |
| 76 | |
| 77 | /-- The inverse coefficient matrices converge at every interior chart point. -/ |
| 78 | theorem tendsto_coordinate_metric_inverse (G : PointedGeometricConvergence S) |
| 79 | (q : G.limitCarrier.carrier) (p : ℝ × EuclideanSpace ℝ (Fin n)) |
| 80 | (ht : p.1 ∈ Ioo T' T) |
| 81 | (hp : |
| 82 | letI : TopologicalSpace G.limitCarrier.carrier := G.limitCarrier.topologicalSpace |
| 83 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) G.limitCarrier.carrier := |
| 84 | G.limitCarrier.chartedSpace |
| 85 | p.2 ∈ (extChartAt (𝓡 n) q).target) : |
| 86 | Tendsto (fun k => (Matrix.of (fun a b : Fin n => |
| 87 | G.limitCarrier.coordinateCoefficient q |
| 88 | (pullbackInnerValue G.limitFlow (S.flow (G.subsequence k)) (G.embedding k)) a b p))⁻¹) |
| 89 | atTop (𝓝 ((Matrix.of (fun a b : Fin n => |
| 90 | G.limitCarrier.coordinateCoefficient q |
| 91 | (fun t x v w => G.limitCarrier.metricInner (G.limitFlow.metricAt t) x v w) |
| 92 | a b p))⁻¹)) := by |
| 93 | have hg : Tendsto (fun k => Matrix.of (fun a b : Fin n => |
| 94 | G.limitCarrier.coordinateCoefficient q |
| 95 | (pullbackInnerValue G.limitFlow (S.flow (G.subsequence k)) (G.embedding k)) a b p)) |
| 96 | atTop (𝓝 (Matrix.of (fun a b : Fin n => |
| 97 | G.limitCarrier.coordinateCoefficient q |
| 98 | (fun t x v w => G.limitCarrier.metricInner (G.limitFlow.metricAt t) x v w) |
| 99 | a b p))) := by |
| 100 | apply tendsto_pi_nhds.mpr |
| 101 | intro a |
| 102 | apply tendsto_pi_nhds.mpr |
| 103 | intro b |
| 104 | simpa only [iteratedFDeriv_zero_apply, Matrix.of_apply] using |
| 105 | G.tendsto_coordinate_metricJet_apply q 0 a b p ht hp (fun i => Fin.elim0 i) |
| 106 | have hdet := G.limitCarrier.coordinateCoefficient_metric_det_ne_zero |
| 107 | (G.limitFlow.metricAt p.1) q p hp |
| 108 | have hi : ContinuousAt Ring.inverse |
| 109 | (Matrix.of (fun a b : Fin n => G.limitCarrier.coordinateCoefficient q |
| 110 | (fun t x v w => G.limitCarrier.metricInner (G.limitFlow.metricAt t) x v w) |
| 111 | a b p)).det := by |
| 112 | rw [show (Ring.inverse : ℝ → ℝ) = Inv.inv from funext Ring.inverse_eq_inv] |
| 113 | convert! continuousAt_inv₀ hdet using 1 |
| 114 | exact (continuousAt_matrix_inv _ hi).tendsto.comp hg |
| 115 | |
| 116 | end PoincareMT.PointedGeometricConvergence |