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.Persistence.Comparison.Evolution.ScalarComparisonModel |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Limit.Compactness.CylinderCompactnessFeedData |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Removal.Terminal.TerminalScalar |
| 4 | |
| 5 | /-! |
| 6 | # Actual scalar control from standard two-jet comparison |
| 7 | |
| 8 | Finite spatial-jet comparison controls the native metric two-jet. |
| 9 | Its scalar readout is the scalar of the actual normalized physical |
| 10 | flow. Uniform comparison on a fixed whole birth chart therefore |
| 11 | supplies the scalar input for the restart theorem. Morgan--Tian, |
| 12 | Corollary 16.9, p. 373; M44 derivation 99. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | -- Native two-jets retain nested continuous-linear coefficient slots. |
| 18 | set_option maxSynthPendingDepth 16 |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Topology |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.M44 |
| 26 | |
| 27 | open SpacetimeBounds |
| 28 | |
| 29 | local notation "E" => StandardCapSpace |
| 30 | |
| 31 | noncomputable local instance scalarComparisonCoefficientNorm : |
| 32 | NormedAddCommGroup (MetricCoefficient 3) := ContinuousLinearMap.toNormedAddCommGroup |
| 33 | |
| 34 | noncomputable local instance scalarComparisonCoefficientSpace : |
| 35 | NormedSpace ℝ (MetricCoefficient 3) := ContinuousLinearMap.toNormedSpace |
| 36 | |
| 37 | noncomputable local instance scalarComparisonTwoJetNorm : |
| 38 | NormedAddCommGroup (MetricTwoJet 3) := Prod.normedAddCommGroup |
| 39 | |
| 40 | noncomputable local instance scalarComparisonTwoJetSpace : |
| 41 | NormedSpace ℝ (MetricTwoJet 3) := Prod.normedSpace |
| 42 | |
| 43 | namespace CylinderCompactnessSample |
| 44 | |
| 45 | variable {g0 : StandardInitialMetric} {F : SurgeryFlowData.{u}} {a : ℝ} |
| 46 | {ha : a ∈ F.surgery_times} [Nonempty (F.slice a).carrier] |
| 47 | {i : Fin (F.event a ha).cap_count} |
| 48 | |
| 49 | /-- The scalar readout is the actual physical normalized scalar, |
| 50 | using local metric realization and curvature naturality. Source: |
| 51 | Corollary 16.9, p. 373; M44 derivation 99. -/ |
| 52 | theorem scalar_eq_jetScalarCurvature (D : CylinderCompactnessSample g0 F a ha i) |
| 53 | (t : ℝ) {x : E} (hx : x ∈ D.chart.source) : |
| 54 | (D.ordinary.flow.connection t).scalarCurvature (targetChart D.chart D.target_point x) = |
| 55 | jetScalarCurvature (metricTwoJet (fun y => D.coefficients (t, y)) x) := by |
| 56 | symm |
| 57 | exact jetScalarCurvature_pullbackCoefficients |
| 58 | (D.ordinary.flow.metric t) (D.ordinary.flow.connection t) D.chart.open_source |
| 59 | (contMDiffOn_targetChart D.chart D.target_point) |
| 60 | (fun _ hy => D.target_derivative_invertible hy) hx |
| 61 | |
| 62 | /-- A scalar two-jet bound on every source point controls the |
| 63 | whole literal physical chart target. Source: the restarted scalar |
| 64 | estimate in Corollary 16.9; M44 derivation 99. -/ |
| 65 | theorem scalar_le_of_source_twoJet_bound (D : CylinderCompactnessSample g0 F a ha i) |
| 66 | (t : ℝ) {M : ℝ} |
| 67 | (hbound : ∀ x ∈ D.chart.source, |
| 68 | jetScalarCurvature (metricTwoJet (fun y => D.coefficients (t, y)) x) ≤ M) : |
| 69 | ∀ y, (D.ordinary.flow.connection t).scalarCurvature y ≤ M := by |
| 70 | intro y |
| 71 | have hx := D.chart.map_target y.2 |
| 72 | have h := (D.scalar_eq_jetScalarCurvature t hx).trans_le (hbound _ hx) |
| 73 | have heq : targetChart D.chart D.target_point (D.chart.invFun y.1) = y := by |
| 74 | apply Subtype.ext |
| 75 | exact (targetChart_val D.chart D.target_point hx).trans (D.chart.right_inv y.2) |
| 76 | change (D.ordinary.flow.connection t).scalarCurvature |
| 77 | (targetChart D.chart D.target_point (D.chart.invFun y.1)) ≤ M at h |
| 78 | simpa only [heq] using h |
| 79 | |
| 80 | end CylinderCompactnessSample |
| 81 | |
| 82 | variable {g0 : StandardInitialMetric} {F : ℕ → SurgeryFlowData.{u}} |
| 83 | {a : ℕ → ℝ} {ha : ∀ k, a k ∈ (F k).surgery_times} |
| 84 | [∀ k, Nonempty ((F k).slice (a k)).carrier] |
| 85 | {i : ∀ k, Fin ((F k).event (a k) (ha k)).cap_count} |
| 86 | |
| 87 | /-- Uniform actual spatial-jet comparison through order two gives |
| 88 | one common native two-jet comparison tail. It applies to fixed or |
| 89 | moving time sets and to compact collars and spheres. Source: |
| 90 | Corollary 16.9, p. 373; M44 derivation 99. -/ |
| 91 | theorem eventually_cylinder_twoJet_comparison |
| 92 | (S : RepairedStandardCapExistenceData g0) |
| 93 | (D : ∀ k, CylinderCompactnessSample g0 (F k) (a k) (ha k) (i k)) |
| 94 | (J : ℕ → Set ℝ) (C : ℕ → Set E) |
| 95 | (hjets : ∀ m : ℕ, m ≤ 2 → ∀ epsilon : ℝ, 0 < epsilon → ∀ᶠ k in atTop, |
| 96 | ∀ t ∈ J k, ∀ x ∈ C k, |
| 97 | ‖iteratedFDeriv ℝ m (fun y => (D k).coefficients (t, y)) x - |
| 98 | iteratedFDeriv ℝ m (S.flow.metric t).euclideanCoefficients x‖ < epsilon) |
| 99 | {delta : ℝ} (hdelta : 0 < delta) : |
| 100 | ∀ᶠ k in atTop, ∀ t ∈ J k, ∀ x ∈ C k, |
| 101 | ‖metricTwoJet (fun y => (D k).coefficients (t, y)) x - |
| 102 | metricTwoJet (S.flow.metric t).euclideanCoefficients x‖ ≤ delta := by |
| 103 | filter_upwards [hjets 0 (by omega) delta hdelta, hjets 1 (by omega) delta hdelta, |
| 104 | hjets 2 le_rfl delta hdelta] with k h0 h1 h2 |
| 105 | intro t ht x hx |
| 106 | apply norm_metricTwoJet_sub_le |
| 107 | intro m hm |
| 108 | interval_cases m |
| 109 | · exact (h0 t ht x hx).le |
| 110 | · exact (h1 t ht x hx).le |
| 111 | · exact (h2 t ht x hx).le |
| 112 | |
| 113 | /-- The global standard scalar ceiling controls every source point |
| 114 | in a fixed compact region along a common sequence tail. Source: |
| 115 | Corollary 16.9, p. 373; M44 derivation 99. -/ |
| 116 | theorem eventually_cylinder_scalar_on_compact |
| 117 | (S : RepairedStandardCapExistenceData g0) |
| 118 | (D : ∀ k, CylinderCompactnessSample g0 (F k) (a k) (ha k) (i k)) |
| 119 | {H M : ℝ} (hH1 : H < 1) |
| 120 | (hmodel : ∀ t ∈ Icc (0 : ℝ) H, ∀ x : E, |
| 121 | (S.flow.connection t).scalarCurvature x ≤ M) |
| 122 | (J : ℕ → Set ℝ) (hJ : ∀ k, J k ⊆ Icc (0 : ℝ) H) |
| 123 | {C : Set E} (hC : IsCompact C) |
| 124 | (hjets : ∀ m : ℕ, m ≤ 2 → ∀ epsilon : ℝ, 0 < epsilon → ∀ᶠ k in atTop, |
| 125 | ∀ t ∈ J k, ∀ x ∈ C, x ∈ (D k).chart.source → |
| 126 | ‖iteratedFDeriv ℝ m (fun y => (D k).coefficients (t, y)) x - |
| 127 | iteratedFDeriv ℝ m (S.flow.metric t).euclideanCoefficients x‖ < epsilon) : |
| 128 | ∀ᶠ k in atTop, ∀ t ∈ J k, ∀ x ∈ C, x ∈ (D k).chart.source → |
| 129 | ((D k).ordinary.flow.connection t).scalarCurvature |
| 130 | (targetChart (D k).chart (D k).target_point x) ≤ M + 1 := by |
| 131 | obtain ⟨delta, hdelta, hmargin⟩ := |
| 132 | exists_standard_scalar_comparison_tolerance S hH1 hmodel hC |
| 133 | have hnear := eventually_cylinder_twoJet_comparison S D J |
| 134 | (fun k => C ∩ (D k).chart.source) |
| 135 | (fun m hm epsilon hepsilon => (hjets m hm epsilon hepsilon).mono |
| 136 | fun k hk t ht x hx => hk t ht x hx.1 hx.2) hdelta |
| 137 | filter_upwards [hnear] with k hk |
| 138 | intro t ht x hx hsource |
| 139 | rw [(D k).scalar_eq_jetScalarCurvature t hsource] |
| 140 | exact (hmargin t (hJ k ht) x hx _ (hk t ht x ⟨hx, hsource⟩)).le |
| 141 | |
| 142 | /-- Comparison on a compact set containing each full fixed birth |
| 143 | chart controls the entire physical target at every compared time. |
| 144 | The scalar ceiling is the previously selected global one. Source: |
| 145 | Corollary 16.9 and the scalar restart in Lemma 16.8; |
| 146 | M44 derivation 99. -/ |
| 147 | theorem eventually_cylinder_whole_target_scalar_bound |
| 148 | (S : RepairedStandardCapExistenceData g0) |
| 149 | (D : ∀ k, CylinderCompactnessSample g0 (F k) (a k) (ha k) (i k)) |
| 150 | {H M : ℝ} (hH1 : H < 1) |
| 151 | (hmodel : ∀ t ∈ Icc (0 : ℝ) H, ∀ x : E, |
| 152 | (S.flow.connection t).scalarCurvature x ≤ M) |
| 153 | (J : ℕ → Set ℝ) (hJ : ∀ k, J k ⊆ Icc (0 : ℝ) H) |
| 154 | {C : Set E} (hC : IsCompact C) |
| 155 | (hsource : ∀ᶠ k in atTop, (D k).chart.source ⊆ C) |
| 156 | (hjets : ∀ m : ℕ, m ≤ 2 → ∀ epsilon : ℝ, 0 < epsilon → ∀ᶠ k in atTop, |
| 157 | ∀ t ∈ J k, ∀ x ∈ C, x ∈ (D k).chart.source → |
| 158 | ‖iteratedFDeriv ℝ m (fun y => (D k).coefficients (t, y)) x - |
| 159 | iteratedFDeriv ℝ m (S.flow.metric t).euclideanCoefficients x‖ < epsilon) : |
| 160 | ∀ᶠ k in atTop, ∀ t ∈ J k, ∀ y, |
| 161 | ((D k).ordinary.flow.connection t).scalarCurvature y ≤ M + 1 := by |
| 162 | filter_upwards [eventually_cylinder_scalar_on_compact S D hH1 hmodel J hJ hC hjets, |
| 163 | hsource] with k hk hsourcek |
| 164 | intro t ht |
| 165 | apply (D k).scalar_le_of_source_twoJet_bound |
| 166 | intro x hx |
| 167 | rw [← (D k).scalar_eq_jetScalarCurvature t hx] |
| 168 | exact hk t ht x (hsourcek hx) hx |
| 169 | |
| 170 | end PoincareMT.M44 |