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.Surgery.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.MetricConvergence.TerminalMetricComparison |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.MetricConvergence.MetricChartCancellation |
| 4 | |
| 5 | /-! |
| 6 | # Intrinsic terminal metric comparison on actual compact limit sets |
| 7 | |
| 8 | Morgan-Tian Theorem 12.28, pp. 323-324. Compact chart neighborhoods |
| 9 | and cancellation of their actual differentials give one uniform |
| 10 | relative metric comparison on any retained compact subset of the limit. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | namespace PoincareMT.M35.OrdinaryRealization |
| 19 | |
| 20 | private theorem eventually_on_compact {X : Type*} [TopologicalSpace X] |
| 21 | {K : Set X} (hK : IsCompact K) {R : ℕ → X → Prop} |
| 22 | (hlocal : ∀ x ∈ K, ∃ U ∈ 𝓝 x, ∀ᶠ k in atTop, ∀ y ∈ U, R k y) : |
| 23 | ∀ᶠ k in atTop, ∀ y ∈ K, R k y := by |
| 24 | apply hK.induction_on (p := fun S : Set X => ∀ᶠ k in atTop, ∀ y ∈ S, R k y) |
| 25 | · exact Eventually.of_forall (fun _ _ hy => hy.elim) |
| 26 | · intro S T hST hT |
| 27 | exact hT.mono (fun _ hk y hy => hk y (hST hy)) |
| 28 | · intro S T hS hT |
| 29 | filter_upwards [hS, hT] with k hkS hkT y hy |
| 30 | exact hy.elim (hkS y) (hkT y) |
| 31 | · intro x hx |
| 32 | obtain ⟨U, hUx, hU⟩ := hlocal x hx |
| 33 | exact ⟨U, mem_nhdsWithin_of_mem_nhds hUx, hU⟩ |
| 34 | |
| 35 | /-- Theorem 12.28: the actual rescaled original metric converges |
| 36 | multiplicatively to the limit metric uniformly on every compact subset, |
| 37 | with no choice of one global chart for that subset. -/ |
| 38 | theorem blowupSequence_compact_metric_comparison (P : M35StandardCapPredecessors) |
| 39 | {g₀ : StandardInitialMetric} (E : RepairedStandardCapExistenceData g₀) |
| 40 | (t : ℕ → ℝ) (x : ℕ → StandardCapSpace) |
| 41 | (ht : ∀ k, t k ∈ Ico 0 E.flow.base.lifetime) |
| 42 | (hR : Tendsto (fun k => (E.flow.connection (t k)).scalarCurvature (x k)) atTop atTop) |
| 43 | (L : GeneralizedBlowupConvergence (blowupSequence P E t x ht hR) |
| 44 | (blowupBackwardInterval ⊤)) |
| 45 | (j : ℕ) (K : Set L.limit.sliceCarrier.carrier) (hK : IsCompact K) |
| 46 | (hKU : K ⊆ L.exhaustion.space j) (eta : ℝ) (heta : 0 < eta) : |
| 47 | letI : TopologicalSpace L.limit.carrier.carrier := L.limit.carrier.topologicalSpace |
| 48 | letI : ChartedSpace (EuclideanSpace ℝ (Fin 3)) L.limit.carrier.carrier := |
| 49 | L.limit.carrier.chartedSpace |
| 50 | letI : IsManifold (𝓡 3) ∞ L.limit.carrier.carrier := L.limit.carrier.isManifold |
| 51 | ∃ N : ℕ, j ≤ N ∧ ∀ k ≥ N, ∀ y ∈ K, ∀ v : TangentSpace (𝓡 3) y, |
| 52 | let f : L.limit.sliceCarrier.carrier → StandardCapSpace := |
| 53 | fun z => ((L.embedding k).forward 0 |
| 54 | ⟨neg_nonpos.mpr (L.exhaustion.time_pos k).le, le_rfl⟩ z).val |
| 55 | |(blowupSequence P E t x ht hR).scale (L.subsequence k) * |
| 56 | (E.flow.metric (t (L.subsequence k))).inner (f y) |
| 57 | (mfderiv (𝓡 3) (𝓡 3) f y v) (mfderiv (𝓡 3) (𝓡 3) f y v) - |
| 58 | (L.limit.flow.metric 0).inner y v v| ≤ eta * (L.limit.flow.metric 0).inner y v v := by |
| 59 | let : TopologicalSpace L.limit.carrier.carrier := L.limit.carrier.topologicalSpace |
| 60 | let : ChartedSpace (EuclideanSpace ℝ (Fin 3)) L.limit.carrier.carrier := |
| 61 | L.limit.carrier.chartedSpace |
| 62 | have : IsManifold (𝓡 3) ∞ L.limit.carrier.carrier := L.limit.carrier.isManifold |
| 63 | let f (k : ℕ) : L.limit.sliceCarrier.carrier → StandardCapSpace := |
| 64 | fun z => ((L.embedding k).forward 0 |
| 65 | ⟨neg_nonpos.mpr (L.exhaustion.time_pos k).le, le_rfl⟩ z).val |
| 66 | let Good (k : ℕ) (y : L.limit.sliceCarrier.carrier) := |
| 67 | ∀ v : TangentSpace (𝓡 3) y, |
| 68 | |(blowupSequence P E t x ht hR).scale (L.subsequence k) * |
| 69 | (E.flow.metric (t (L.subsequence k))).inner (f k y) |
| 70 | (mfderiv (𝓡 3) (𝓡 3) (f k) y v) (mfderiv (𝓡 3) (𝓡 3) (f k) y v) - |
| 71 | (L.limit.flow.metric 0).inner y v v| ≤ eta * (L.limit.flow.metric 0).inner y v v |
| 72 | have hevent : ∀ᶠ k in atTop, ∀ y ∈ K, Good k y := by |
| 73 | apply eventually_on_compact hK |
| 74 | intro q hq |
| 75 | let c := extChartAt (𝓡 3) q |
| 76 | let V := c.target ∩ c.symm ⁻¹' L.exhaustion.space j |
| 77 | have hV : IsOpen V := (continuousOn_extChartAt_symm q).isOpen_inter_preimage |
| 78 | (isOpen_extChartAt_target q) (L.exhaustion.space_open j) |
| 79 | have hqV : c q ∈ V := ⟨mem_extChartAt_target q, |
| 80 | (congrArg (fun z : L.limit.sliceCarrier.carrier => z ∈ L.exhaustion.space j) |
| 81 | (c.left_inv (mem_extChartAt_source q))).mpr (hKU hq)⟩ |
| 82 | obtain ⟨C, hC, hqC, hCV⟩ := exists_compact_between isCompact_singleton hV |
| 83 | (singleton_subset_iff.mpr hqV) |
| 84 | let W := c.source ∩ c ⁻¹' interior C |
| 85 | have hchartsource : c.source = (chartAt (EuclideanSpace ℝ (Fin 3)) q).source := |
| 86 | extChartAt_source (𝓡 3) q |
| 87 | have hccont : ContinuousOn c c.source := hchartsource.symm ▸ |
| 88 | (contMDiffOn_extChartAt (I := 𝓡 3) (n := ∞) (x := q)).continuousOn |
| 89 | have hW : IsOpen W := hccont.isOpen_inter_preimage |
| 90 | (isOpen_extChartAt_source q) isOpen_interior |
| 91 | have hqW : q ∈ W := ⟨mem_extChartAt_source q, hqC (mem_singleton _)⟩ |
| 92 | obtain ⟨N, hjN, hN⟩ := blowupSequence_terminal_metric_comparison P E t x ht hR L q j C hC |
| 93 | (fun z hz => hCV hz) eta heta |
| 94 | refine ⟨W, hW.mem_nhds hqW, ?_⟩ |
| 95 | filter_upwards [eventually_ge_atTop N] with k hk y hy |
| 96 | intro v |
| 97 | have hcy : c y ∈ C := interior_subset hy.2 |
| 98 | have hyj : y ∈ L.exhaustion.space j := (c.left_inv hy.1) ▸ (hCV hcy).2 |
| 99 | have hyk := L.exhaustion.space_increasing (hjN.trans hk) hyj |
| 100 | have hzero : (0 : ℝ) ∈ Icc (-L.exhaustion.time k) 0 := |
| 101 | ⟨neg_nonpos.mpr (L.exhaustion.time_pos k).le, le_rfl⟩ |
| 102 | have htime := ((L.embedding k).forward 0 hzero L.limit.base).property |
| 103 | have hf : ContMDiffAt (𝓡 3) (𝓡 3) ∞ (f k) y := |
| 104 | ((sliceDiffeomorph htime).contMDiff.comp_contMDiffOn |
| 105 | ((L.embedding k).forward_smooth 0 hzero)).contMDiffAt |
| 106 | ((L.exhaustion.space_open k).mem_nhds hyk) |
| 107 | have hsource := (E.flow.metric (t (L.subsequence k))).pullbackCoefficients_chart_cancel |
| 108 | (f k) q hy.1 hf v v |
| 109 | have hlimit := (L.limit.flow.metric 0).chartCoefficients_cancel q hy.1 v v |
| 110 | have hcompare := hN k hk (c y) hcy (mfderiv (𝓡 3) (𝓡 3) c y v) |
| 111 | exact (congrArg₂ (fun a b : ℝ => |
| 112 | |(blowupSequence P E t x ht hR).scale (L.subsequence k) * a - b| ≤ eta * b) |
| 113 | hsource hlimit).mp hcompare |
| 114 | obtain ⟨N, hN⟩ := eventually_atTop.mp hevent |
| 115 | exact ⟨max j N, le_max_left _ _, fun k hk => hN k ((le_max_right _ _).trans hk)⟩ |
| 116 | |
| 117 | end PoincareMT.M35.OrdinaryRealization |