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.SourceNames.Normalization |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Limit.Cylinder.CylinderCoordinateEstimates |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Limit.Compactness.CompactnessFeedJets |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Limit.Coordinates.RicciTimeGluing |
| 5 | |
| 6 | /-! |
| 7 | # The actual surgery-cylinder data used in compactness |
| 8 | |
| 9 | Each sample retains its physical surgery cap, exact-ball birth comparison, |
| 10 | surviving cylinder, and normalized ordinary flow. Its coefficient field is |
| 11 | the actual pullback in the fixed birth chart. No limit or analytic estimate |
| 12 | is stored in this record. Morgan--Tian, Claim 16.6 and Lemma 16.8, |
| 13 | pp. 371-373; M44 derivation 88. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter TopologicalSpace |
| 20 | open scoped Manifold ContDiff Topology ENNReal |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M44 |
| 25 | |
| 26 | open SpacetimeBounds |
| 27 | |
| 28 | local notation "E" => StandardCapSpace |
| 29 | |
| 30 | noncomputable local instance cylinderFeedCoefficientNorm : |
| 31 | NormedAddCommGroup (MetricCoefficient 3) := ContinuousLinearMap.toNormedAddCommGroup |
| 32 | |
| 33 | noncomputable local instance cylinderFeedCoefficientSpace : |
| 34 | NormedSpace ℝ (MetricCoefficient 3) := ContinuousLinearMap.toNormedSpace |
| 35 | |
| 36 | /-- One actual normalized surgery-cylinder sample with its initial |
| 37 | M36 exact-ball chart. Source: Claim 16.6 and Lemma 16.8; |
| 38 | M44 derivation 88. -/ |
| 39 | structure CylinderCompactnessSample (g0 : StandardInitialMetric) |
| 40 | (F : SurgeryFlowData.{u}) (a : ℝ) (ha : a ∈ F.surgery_times) |
| 41 | [Nonempty (F.slice a).carrier] (i : Fin (F.event a ha).cap_count) where |
| 42 | /-- The fixed initial standard metric. -/ |
| 43 | standard_initial_eq : F.standard_initial = g0 |
| 44 | /-- The actual birth-chart radius. -/ |
| 45 | radius : ℝ |
| 46 | /-- Its positive radius. -/ |
| 47 | radius_pos : 0 < radius |
| 48 | /-- The actual comparison tolerance. -/ |
| 49 | eta : ℝ |
| 50 | /-- The chart fits strictly inside the comparison domain. -/ |
| 51 | radius_lt : radius < eta⁻¹ |
| 52 | /-- The actual normalized survival duration. -/ |
| 53 | lifetime : ℝ |
| 54 | /-- The surviving cylinder has a positive duration. -/ |
| 55 | lifetime_pos : 0 < lifetime |
| 56 | /-- The certificate uses the actual local surgery result. -/ |
| 57 | comparison : SurgeryCapClose F.standard_initial |
| 58 | ((F.event a ha).local_result i).output ((F.event a ha).local_result i).metric |
| 59 | ((F.event a ha).local_result i).tip (((F.event a ha).necks i).neck.scale) eta |
| 60 | /-- The corrected birth comparison preserves every included ball. -/ |
| 61 | image_ball : ∀ r : ℝ, 0 < r → r ≤ eta⁻¹ → |
| 62 | comparison.map '' F.standard_initial.metric.ball 0 r = |
| 63 | ((F.event a ha).local_result i).metric.ball ((F.event a ha).local_result i).tip |
| 64 | (((F.event a ha).necks i).neck.scale * r) |
| 65 | /-- The physical birth chart in the actual post-surgery slice. -/ |
| 66 | chart : PartialDiffeomorph (𝓡 3) (𝓡 3) E (F.slice a).carrier ∞ |
| 67 | /-- Its literal standard-coordinate domain. -/ |
| 68 | chart_source : chart.source = F.standard_initial.metric.ball 0 radius |
| 69 | /-- The chart is the actual local surgery embedding. -/ |
| 70 | chart_eq : ∀ y, chart y = (F.event a ha).local_embed i (comparison.map y) |
| 71 | /-- The actual tracked physical region. -/ |
| 72 | region : Set (F.slice a).carrier |
| 73 | /-- Its surviving cylinder. -/ |
| 74 | cylinder : SurgeryFlowCylinder F (F.slice a) a ((F.parameters.h a)⁻¹ ^ 2) |
| 75 | (Ico 0 lifetime) region |
| 76 | /-- The whole chart target is tracked. -/ |
| 77 | chart_target_subset : chart.target ⊆ region |
| 78 | /-- The cylinder starts at the actual birth points. -/ |
| 79 | birth_identity : ∀ h y, y ∈ region → HEq (cylinder.forward 0 h y) y |
| 80 | /-- The normalized Ricci flow on the physical chart target. -/ |
| 81 | ordinary : CylinderRicciFlow cylinder chart |
| 82 | /-- A target point only totalizes the coordinate map off its source. -/ |
| 83 | target_point : (⟨chart.target, chart.open_target⟩ : Opens (F.slice a).carrier) |
| 84 | |
| 85 | namespace CylinderCompactnessSample |
| 86 | |
| 87 | variable {g0 : StandardInitialMetric} {F : SurgeryFlowData.{u}} {a : ℝ} |
| 88 | {ha : a ∈ F.surgery_times} [Nonempty (F.slice a).carrier] |
| 89 | {i : Fin (F.event a ha).cap_count} |
| 90 | |
| 91 | /-- The actual normalized coefficient family. Source: the fixed |
| 92 | birth charts in Lemma 16.8; M44 derivation 88. -/ |
| 93 | noncomputable def coefficients (D : CylinderCompactnessSample g0 F a ha i) : |
| 94 | ℝ × E → MetricCoefficient 3 := fun p => |
| 95 | (D.ordinary.flow.metric p.1).pullbackCoefficients (targetChart D.chart D.target_point) p.2 |
| 96 | |
| 97 | /-- The source uses the fixed standard initial metric. Source: |
| 98 | Corollary 16.7 and Lemma 16.8; M44 derivation 88. -/ |
| 99 | theorem source_eq (D : CylinderCompactnessSample g0 F a ha i) : |
| 100 | D.chart.source = g0.metric.ball 0 D.radius := by |
| 101 | rw [D.chart_source, D.standard_initial_eq] |
| 102 | |
| 103 | /-- The actual coefficient field is smooth on its full included |
| 104 | birth cylinder. Source: Lemma 16.8; M44 derivation 88. -/ |
| 105 | theorem coefficients_smooth (D : CylinderCompactnessSample g0 F a ha i) : |
| 106 | ContDiffOn ℝ ∞ D.coefficients (Ico 0 D.lifetime ×ˢ D.chart.source) := |
| 107 | contDiffOn_pullbackCoefficients_within D.ordinary.flow D.chart.open_source |
| 108 | (contMDiffOn_targetChart D.chart D.target_point) |
| 109 | |
| 110 | /-- The target-valued birth chart has invertible differential on |
| 111 | its actual source. Source: Claim 16.6; M44 derivation 88. -/ |
| 112 | theorem target_derivative_invertible (D : CylinderCompactnessSample g0 F a ha i) |
| 113 | {x : E} (hx : x ∈ D.chart.source) : |
| 114 | (mfderiv (𝓡 3) (𝓡 3) (targetChart D.chart D.target_point) x).IsInvertible := by |
| 115 | have h := (targetPartialDiffeomorph D.chart D.target_point).isLocalDiffeomorphAt |
| 116 | (𝓡 3) (𝓡 3) ∞ hx |
| 117 | exact ⟨h.mfderivToContinuousLinearEquiv (by simp), rfl⟩ |
| 118 | |
| 119 | /-- Positive actual metrics have invertible coordinate coefficients. |
| 120 | Source: Claim 16.6; M44 derivation 88. -/ |
| 121 | theorem coefficients_invertible (D : CylinderCompactnessSample g0 F a ha i) |
| 122 | (t : ℝ) {x : E} (hx : x ∈ D.chart.source) : |
| 123 | (D.coefficients (t, x)).IsInvertible := |
| 124 | (D.ordinary.flow.metric t).isInvertible_pullbackCoefficients |
| 125 | (D.target_derivative_invertible hx).injective |
| 126 | |
| 127 | /-- Symmetry is inherited from the actual normalized metric at |
| 128 | every argument. Source: Claim 16.6; M44 derivation 88. -/ |
| 129 | theorem coefficients_symmetric (D : CylinderCompactnessSample g0 F a ha i) |
| 130 | (p : ℝ × E) (v w : E) : D.coefficients p v w = D.coefficients p w v := |
| 131 | (D.ordinary.flow.metric p.1).symm _ _ _ |
| 132 | |
| 133 | /-- Restriction to the actual open time interior gives the native |
| 134 | coordinate Ricci equation. Source: Lemma 16.8; derivation 88. -/ |
| 135 | theorem coefficients_evolution (D : CylinderCompactnessSample g0 F a ha i) |
| 136 | {t : ℝ} (ht : t ∈ Ioo 0 D.lifetime) {x : E} (hx : x ∈ D.chart.source) : |
| 137 | HasDerivAt (fun s => D.coefficients (s, x)) |
| 138 | (ricciFlowOperator 3 (metricTwoJet (fun y => D.coefficients (t, y)) x)) t := by |
| 139 | let G := Poincare.Geometry.RicciFlow.Harnack.restrictFlow D.ordinary.flow |
| 140 | (show Ioo (0 : ℝ) D.lifetime ⊆ Ico 0 D.lifetime from Ioo_subset_Ico_self) |
| 141 | ordConnected_Ioo (Ioo_infinite D.lifetime_pos).nontrivial |
| 142 | exact hasDerivAt_pullbackCoefficients_ricci G isOpen_Ioo D.chart.open_source |
| 143 | (contMDiffOn_targetChart D.chart D.target_point) |
| 144 | (fun _ hy => D.target_derivative_invertible hy) ht hx |
| 145 | |
| 146 | /-- At birth the actual normalized coefficient field equals the |
| 147 | M36 comparison field on the full open chart. Source: Corollary 16.7; |
| 148 | M44 derivation 88. -/ |
| 149 | theorem initial_coefficients (D : CylinderCompactnessSample g0 F a ha i) |
| 150 | {x : E} (hx : x ∈ D.chart.source) : |
| 151 | D.coefficients (0, x) = D.comparison.normalizedCoefficients x := by |
| 152 | have hh := F.parameters.h_pos a (F.time_domain_nonnegative (F.surgery_times_subset ha)) |
| 153 | have hscale : 0 < (F.parameters.h a)⁻¹ ^ 2 := sq_pos_of_pos (inv_pos.mpr hh) |
| 154 | let g := m01RescaledMetric (F.metric a) ((F.parameters.h a)⁻¹ ^ 2) hscale |
| 155 | have hg (y) (v w) : g.inner y v w = |
| 156 | (F.parameters.h a)⁻¹ ^ 2 * (F.metric a).inner y v w := rfl |
| 157 | have hdomain : D.chart.source ⊆ F.standard_initial.metric.ball 0 D.eta⁻¹ := by |
| 158 | rw [D.chart_source] |
| 159 | exact fun _ hy => hy.trans_le (ENNReal.ofReal_le_ofReal D.radius_lt.le) |
| 160 | exact (D.ordinary.initial_pullback_eq ⟨le_rfl, D.lifetime_pos⟩ |
| 161 | D.chart_target_subset D.birth_identity g hg D.target_point hx).trans |
| 162 | (physical_birth_pullback_eq F a ha i D.comparison g hg D.chart.open_source hdomain |
| 163 | (fun y _ => D.chart_eq y) hx) |
| 164 | |
| 165 | /-- Every actual birth spatial jet is the corresponding M36 |
| 166 | comparison jet. Source: Corollary 16.7; M44 derivation 88. -/ |
| 167 | theorem initial_spatial_jet (D : CylinderCompactnessSample g0 F a ha i) |
| 168 | {x : E} (hx : x ∈ D.chart.source) (m : ℕ) : |
| 169 | iteratedFDeriv ℝ m (fun y => D.coefficients (0, y)) x = |
| 170 | iteratedFDeriv ℝ m D.comparison.normalizedCoefficients x := by |
| 171 | have heq : (fun y => D.coefficients (0, y)) =ᶠ[𝓝 x] |
| 172 | D.comparison.normalizedCoefficients := |
| 173 | eventually_of_mem (D.chart.open_source.mem_nhds hx) (fun _ hy => D.initial_coefficients hy) |
| 174 | exact (heq.iteratedFDeriv ℝ m).eq_of_nhds |
| 175 | |
| 176 | /-- Rewriting the fixed initial-metric label leaves the physical |
| 177 | comparison data unchanged. Source: Corollary 16.7; derivation 88. -/ |
| 178 | def fixedComparison (D : CylinderCompactnessSample g0 F a ha i) : |
| 179 | SurgeryCapClose g0 ((F.event a ha).local_result i).output |
| 180 | ((F.event a ha).local_result i).metric ((F.event a ha).local_result i).tip |
| 181 | (((F.event a ha).necks i).neck.scale) D.eta := |
| 182 | Eq.mp (congrArg (fun g : StandardInitialMetric => |
| 183 | SurgeryCapClose g ((F.event a ha).local_result i).output |
| 184 | ((F.event a ha).local_result i).metric ((F.event a ha).local_result i).tip |
| 185 | (((F.event a ha).necks i).neck.scale) D.eta) D.standard_initial_eq) D.comparison |
| 186 | |
| 187 | end CylinderCompactnessSample |
| 188 | |
| 189 | /-- Transport in the standard-initial-metric parameter leaves the |
| 190 | actual normalized coefficients unchanged. Source: Corollary 16.7; |
| 191 | the fixed initial comparison in M44 derivation 88. -/ |
| 192 | theorem normalizedCoefficients_cast_initial |
| 193 | {g0 g1 : StandardInitialMetric} (h : g0 = g1) |
| 194 | {S : GeneralizedSliceCarrier.{u}} {g : RiemannianMetric 3 S.carrier} |
| 195 | {tip : S.carrier} {scale eta : ℝ} (Q : SurgeryCapClose g0 S g tip scale eta) : |
| 196 | (Eq.mp (congrArg (fun g' : StandardInitialMetric => |
| 197 | SurgeryCapClose g' S g tip scale eta) h) Q).normalizedCoefficients = |
| 198 | Q.normalizedCoefficients := by |
| 199 | subst g1 |
| 200 | rfl |
| 201 | |
| 202 | end PoincareMT.M44 |