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.CanonicalInduction.Limit.Finite.LimitFiniteEndpointCapture |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Curvature.TerminalCurvatureActualUniformScalar |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Curvature.TerminalCurvatureCompactBuffers |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Curvature.TerminalCurvatureSourceCharts |
| 5 | import PoincareLib.Geometry.Riemannian.Curvature.Scalar.SharpBounds |
| 6 | import PoincareLib.Geometry.Riemannian.Normalization.Scaling.Curvature |
| 7 | |
| 8 | /-! |
| 9 | # Physical endpoint scalar ceilings on original compact regions |
| 10 | |
| 11 | The global endpoint bound and compact original chart jets give one |
| 12 | physical scalar coefficient before every original region or radius. |
| 13 | The source index keeps coefficient extraction followed by availability. |
| 14 | MT Proposition 17.1; endpoint-scalar-ceiling, SC1-SC3. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped ENNReal Manifold ContDiff Topology |
| 22 | |
| 23 | universe u v |
| 24 | |
| 25 | namespace PoincareMT.M47 |
| 26 | |
| 27 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 28 | |
| 29 | variable (F : ℕ → SurgeryFlowData.{u}) (W : ∀ k, M33RegularHistoryWindow (F k)) |
| 30 | (history : ∀ k, M33RegularHistoryData (W k)) (baseTime : ℕ → ℝ) |
| 31 | (hbaseTime : ∀ k, baseTime k ∈ (history k).generalized.interval) |
| 32 | (basePoint : ∀ k, ((history k).generalized.slice (baseTime k)).carrier) |
| 33 | (hPositive : ∀ k, 0 < ((F k).connection (baseTime k)).scalarCurvature |
| 34 | ((history k).history.forward (baseTime k) (hbaseTime k) (basePoint k))) |
| 35 | (hDiverges : Tendsto (fun k => ((F k).connection (baseTime k)).scalarCurvature |
| 36 | ((history k).history.forward (baseTime k) (hbaseTime k) (basePoint k))) atTop atTop) |
| 37 | |
| 38 | local notation "seq" => regularHistoryBlowupSequence F W history baseTime hbaseTime |
| 39 | basePoint hPositive hDiverges |
| 40 | |
| 41 | variable {H : ℝ≥0∞} (G : GeneralizedBlowupConvergence |
| 42 | (regularHistoryBlowupSequence F W history baseTime hbaseTime basePoint hPositive hDiverges) |
| 43 | (blowupBackwardInterval H)) (sigma eta : ℕ → ℕ) |
| 44 | |
| 45 | private local instance endpointCeilingTopology : TopologicalSpace G.limit.carrier.carrier := |
| 46 | G.limit.carrier.topologicalSpace |
| 47 | private local instance endpointCeilingCharts : ChartedSpace E G.limit.carrier.carrier := |
| 48 | G.limit.carrier.chartedSpace |
| 49 | private local instance endpointCeilingManifold : IsManifold (𝓡 3) ∞ G.limit.carrier.carrier := |
| 50 | G.limit.carrier.isManifold |
| 51 | private local instance endpointCeilingT3 : T3Space G.limit.carrier.carrier := |
| 52 | G.limit.carrier.t3Space |
| 53 | |
| 54 | local notation "X" => G.limit.sliceCarrier.carrier |
| 55 | local notation "n" => (fun k : ℕ => G.subsequence (sigma (eta k))) |
| 56 | local notation "q" => (fun k : ℕ => GeneralizedBlowupSequence.scale seq (n k)) |
| 57 | local notation "t" => (fun k : ℕ => baseTime (n k) + -H.toReal / q k) |
| 58 | local notation "gSource" => (fun k : ℕ => |
| 59 | rescaledMetric (SurgeryFlowData.metric (F (n k)) (t k)) (q k) |
| 60 | (GeneralizedBlowupSequence.base_scalar_pos seq (n k))) |
| 61 | |
| 62 | /-- One global coefficient controls the actual physical scalar on |
| 63 | every compact original region, on the same availability subsequence. -/ |
| 64 | theorem limitFinite_endpoint_scalar_ceiling |
| 65 | {ι : Type v} (gE : RiemannianMetric 3 X) (DE : LeviCivitaData gE) |
| 66 | {Bendpoint : ℝ} (hnorm : ∀ x, DE.curvatureTensorNorm x ≤ Bendpoint) |
| 67 | (psi : ∀ k, PartialDiffeomorph (𝓡 3) (𝓡 3) X ((F (n k)).slice (t k)).carrier ∞) |
| 68 | (hsource : ∀ k, (psi k).source = G.exhaustion.space k) |
| 69 | (c : ι → PartialDiffeomorph (𝓡 3) (𝓡 3) X E ∞) |
| 70 | (hcoverC : ∀ x : X, ∃ i, x ∈ (c i).source) |
| 71 | (hjets : ∀ i m, m ≤ 2 → ∀ C, IsCompact C → C ⊆ (c i).target → TendstoUniformlyOn |
| 72 | (fun k => iteratedFDeriv ℝ m ((gSource k).pullbackCoefficients (psi k ∘ (c i).symm))) |
| 73 | (iteratedFDeriv ℝ m (gE.pullbackCoefficients (c i).symm)) atTop C) : |
| 74 | let K := max 1 (3 * Bendpoint) |
| 75 | 1 ≤ K ∧ ∀ V : Set X, IsCompact V → ∀ᶠ k in atTop, |
| 76 | V ⊆ (psi k).source ∧ ∀ x ∈ V, |
| 77 | ((F (n k)).connection (t k)).scalarCurvature (psi k x) ≤ (2 * K) * q k := by |
| 78 | classical |
| 79 | let K0 := max 1 (3 * Bendpoint) |
| 80 | have hK0 : 0 < K0 := zero_lt_one.trans_le (le_max_left _ _) |
| 81 | have hscalar (x : X) : DE.scalarCurvature x ≤ K0 := |
| 82 | (le_abs_self _).trans ((DE.abs_scalarCurvature_le_curvatureTensorNorm_sharp x).trans |
| 83 | ((mul_le_mul_of_nonneg_left (hnorm x) (by norm_num : (0 : ℝ) ≤ 3)).trans |
| 84 | (le_max_right _ _))) |
| 85 | refine ⟨le_max_left _ _, ?_⟩ |
| 86 | intro V hV |
| 87 | by_cases hVne : V.Nonempty |
| 88 | · obtain ⟨s, _hsne, index, C, hC, hCtarget, hcover⟩ := |
| 89 | terminalCurvature_exists_finite_original_chart_buffers c hV hVne |
| 90 | (fun x _ => hcoverC x) |
| 91 | let D : ∀ k, LeviCivitaData (gSource k) := fun k => |
| 92 | rescaledMetric_connection ((F (n k)).metric (t k)) |
| 93 | ((F (n k)).connection (t k)) (q k) ((seq).base_scalar_pos (n k)) |
| 94 | have herrors : ∀ᶠ k in atTop, ∀ i : s, ∀ z ∈ C i, |
| 95 | |(D k).scalarCurvature (psi k ((c (index i)).symm z)) - |
| 96 | DE.scalarCurvature ((c (index i)).symm z)| < K0 := by |
| 97 | apply Filter.eventually_all.mpr |
| 98 | intro i |
| 99 | have hcharts := terminalCurvature_source_chart_readout |
| 100 | G.exhaustion.space G.exhaustion.space_open G.exhaustion.space_increasing |
| 101 | G.exhaustion.space_covers psi hsource (c (index i)) (hC i) (hCtarget i) |
| 102 | have herr := terminalCurvature_eventually_actual_scalar_error D DE |
| 103 | (fun k => ((psi k).symm.trans (c (index i))).symm) (c (index i)).symm |
| 104 | (hC i) (hCtarget i) hcharts.2 (fun m hm => ?_) hK0 |
| 105 | · simpa only [hcharts.1, Function.comp_apply] using herr |
| 106 | · simpa only [hcharts.1] using hjets (index i) m hm (C i) (hC i) (hCtarget i) |
| 107 | obtain ⟨j, hj⟩ := hV.elim_directed_cover G.exhaustion.space |
| 108 | G.exhaustion.space_open |
| 109 | (by rw [G.exhaustion.space_covers]; exact subset_univ _) |
| 110 | G.exhaustion.space_increasing.directed_le |
| 111 | filter_upwards [herrors, eventually_ge_atTop j] with k hk hjk |
| 112 | refine ⟨?_, ?_⟩ |
| 113 | · rw [hsource k] |
| 114 | exact hj.trans (G.exhaustion.space_increasing hjk) |
| 115 | · intro x hx |
| 116 | obtain ⟨i, hxi, hCx⟩ := hcover x hx |
| 117 | have herr := hk i (c (index i) x) hCx |
| 118 | have hinverse : (c (index i)).symm (c (index i) x) = x := (c (index i)).left_inv hxi |
| 119 | rw [hinverse] at herr |
| 120 | change |(rescaledMetric_connection _ _ _ _).scalarCurvature (psi k x) - |
| 121 | DE.scalarCurvature x| < K0 at herr |
| 122 | rw [rescaledMetric_scalarCurvature] at herr |
| 123 | have hnormalized : ((F (n k)).connection (t k)).scalarCurvature (psi k x) / q k ≤ |
| 124 | 2 * K0 := by |
| 125 | rw [div_eq_mul_inv, mul_comm] |
| 126 | linarith [(abs_lt.mp herr).2, hscalar x] |
| 127 | exact (div_le_iff₀ ((seq).base_scalar_pos (n k))).mp hnormalized |
| 128 | · have hVempty : V = ∅ := Set.not_nonempty_iff_eq_empty.mp hVne |
| 129 | subst V |
| 130 | exact Eventually.of_forall (fun _ => ⟨empty_subset _, fun _ hx => False.elim hx⟩) |
| 131 | |
| 132 | /-- The same endpoint coefficient applies on a fixed original stage |
| 133 | containing each ball of the original complete terminal metric. -/ |
| 134 | theorem limitFinite_endpoint_scalar_ceiling_on_terminal_ball |
| 135 | {ι : Type v} (gE : RiemannianMetric 3 X) (DE : LeviCivitaData gE) |
| 136 | {Bendpoint : ℝ} (hnorm : ∀ x, DE.curvatureTensorNorm x ≤ Bendpoint) |
| 137 | (psi : ∀ k, PartialDiffeomorph (𝓡 3) (𝓡 3) X ((F (n k)).slice (t k)).carrier ∞) |
| 138 | (hsource : ∀ k, (psi k).source = G.exhaustion.space k) |
| 139 | (c : ι → PartialDiffeomorph (𝓡 3) (𝓡 3) X E ∞) |
| 140 | (hcoverC : ∀ x : X, ∃ i, x ∈ (c i).source) |
| 141 | (hjets : ∀ i m, m ≤ 2 → ∀ C, IsCompact C → C ⊆ (c i).target → TendstoUniformlyOn |
| 142 | (fun k => iteratedFDeriv ℝ m ((gSource k).pullbackCoefficients (psi k ∘ (c i).symm))) |
| 143 | (iteratedFDeriv ℝ m (gE.pullbackCoefficients (c i).symm)) atTop C) : |
| 144 | let K := max 1 (3 * Bendpoint) |
| 145 | 1 ≤ K ∧ ∀ R : ℝ, 0 < R → ∃ j, |
| 146 | closure ((G.limit.flow.metric 0).ball G.limit.base R) ⊆ G.exhaustion.space j ∧ |
| 147 | ∀ᶠ k in atTop, closure (G.exhaustion.space j) ⊆ (psi k).source ∧ |
| 148 | ∀ x ∈ closure (G.exhaustion.space j), |
| 149 | ((F (n k)).connection (t k)).scalarCurvature (psi k x) ≤ (2 * K) * q k := by |
| 150 | have hbound := limitFinite_endpoint_scalar_ceiling F W history baseTime hbaseTime basePoint |
| 151 | hPositive hDiverges G sigma eta gE DE hnorm psi hsource c hcoverC hjets |
| 152 | refine ⟨hbound.1, ?_⟩ |
| 153 | intro R _hR |
| 154 | have hcompact := terminalCommonInterval_compact_ball_closure (G.limit.flow.metric 0) |
| 155 | (G.limit.complete 0 G.limit.zero_mem) G.limit.base R |
| 156 | obtain ⟨j, hj⟩ := hcompact.elim_directed_cover G.exhaustion.space |
| 157 | G.exhaustion.space_open |
| 158 | (by rw [G.exhaustion.space_covers]; exact subset_univ _) |
| 159 | G.exhaustion.space_increasing.directed_le |
| 160 | exact ⟨j, hj, hbound.2 _ (G.exhaustion.space_compactClosure j)⟩ |
| 161 | |
| 162 | end PoincareMT.M47 |