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.Metric |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Cutoff.RemovalAlternative |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Cutoff.MaximalSamples |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Removal.Continuation.RemovalCylinder |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Removal.Terminal.TerminalMovingModel |
| 6 | |
| 7 | /-! |
| 8 | # The frozen alternative from an actual maximal cap sample |
| 9 | |
| 10 | The moving sphere comparison and actual cylinder estimates give |
| 11 | terminal whole-ball removal whenever the assigned duration is not |
| 12 | attained. Source restriction then gives precisely Proposition 16.5. |
| 13 | Morgan--Tian, Corollary 16.9 and Claim 16.10, pp. 373-375; |
| 14 | M44 derivation 105. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | -- The whole-sphere comparison retains the nested native two-jet slots. |
| 20 | set_option maxSynthPendingDepth 16 |
| 21 | |
| 22 | open Set Filter TopologicalSpace |
| 23 | open scoped Manifold ContDiff Topology ENNReal |
| 24 | |
| 25 | universe u |
| 26 | |
| 27 | namespace PoincareMT.M44 |
| 28 | |
| 29 | open SpacetimeBounds |
| 30 | |
| 31 | local notation "E" => StandardCapSpace |
| 32 | |
| 33 | noncomputable local instance maximalAlternativeCoefficientNorm : |
| 34 | NormedAddCommGroup (MetricCoefficient 3) := ContinuousLinearMap.toNormedAddCommGroup |
| 35 | |
| 36 | noncomputable local instance maximalAlternativeCoefficientSpace : |
| 37 | NormedSpace ℝ (MetricCoefficient 3) := ContinuousLinearMap.toNormedSpace |
| 38 | |
| 39 | noncomputable local instance maximalAlternativeTwoJetNorm : |
| 40 | NormedAddCommGroup (MetricTwoJet 3) := Prod.normedAddCommGroup |
| 41 | |
| 42 | noncomputable local instance maximalAlternativeTwoJetSpace : |
| 43 | NormedSpace ℝ (MetricTwoJet 3) := Prod.normedSpace |
| 44 | |
| 45 | /-- Actual curvature and finite family comparison on an enlarged |
| 46 | maximal sample imply the frozen persistence alternative. All terminal |
| 47 | neck geometry is derived from moving whole-sphere comparison. |
| 48 | Source: Proposition 16.5 and Claim 16.10, pp. 370-375; |
| 49 | M44 derivation 105. -/ |
| 50 | theorem exists_maximal_cap_alternative_cutoff |
| 51 | (P : M44CapPersistencePredecessors.{u}) |
| 52 | {g0 : StandardInitialMetric} (standard : RepairedStandardCapExistenceData g0) |
| 53 | {A eta theta K : ℝ} (hA : 0 < A) (htheta0 : 0 ≤ theta) |
| 54 | (htheta : theta < 1) (hK : 0 < K) : |
| 55 | ∃ R0 accuracy : ℝ, ∃ compact : Set E, |
| 56 | A < R0 ∧ 0 < accuracy ∧ IsCompact compact ∧ compact ⊆ g0.metric.ball 0 R0 ∧ |
| 57 | ∀ R : ℝ, R0 ≤ R → ∃ eta0 delta0 : ℝ, 0 < eta0 ∧ 0 < delta0 ∧ |
| 58 | ∀ (F : SurgeryFlowData.{u}) (O : SurgeryObservation F) |
| 59 | {constants : MetricSurgeryConstants} (setup : SurgeryControlSetup constants) |
| 60 | {start rNext deltaBar : ℝ}, |
| 61 | SurgeryFixedScalesOn setup F O start rNext deltaBar → deltaBar ≤ delta0 → |
| 62 | ∀ (birth : ℝ) (hbirth : birth ∈ F.surgery_times) |
| 63 | [Nonempty (F.slice birth).carrier] (i : Fin (F.event birth hbirth).cap_count), |
| 64 | (∀ s ∈ Ico 0 (surgeryCapDuration birth O.H (F.parameters.h birth) theta), |
| 65 | birth + s / ((F.parameters.h birth)⁻¹ ^ 2) ∈ |
| 66 | surgeryObservationInterval O ∩ Ici start) → SurgeryFlowPinched F → |
| 67 | ∀ D : MaximalCapSample g0 F birth hbirth i |
| 68 | (surgeryCapDuration birth O.H (F.parameters.h birth) theta), |
| 69 | D.radius = R → D.eta ≤ eta0 → |
| 70 | ((F.event birth hbirth).necks i).neck.epsilon ≤ |
| 71 | F.local_constants.comparison_delta D.eta → |
| 72 | O.standard_flow.base.lifetime = 1 → |
| 73 | (∀ s ∈ Ico (0 : ℝ) D.lifetime, ∀ y, |
| 74 | (D.ordinary.flow.connection s).curvatureTensorNorm y ≤ K) → |
| 75 | (∀ s ∈ Ico (0 : ℝ) D.lifetime, ∀ x ∈ compact, |
| 76 | ‖metricTwoJet (fun y => D.toCylinderCompactnessSample.coefficients (s, y)) x - |
| 77 | metricTwoJet (standard.flow.metric s).euclideanCoefficients x‖ ≤ accuracy) → |
| 78 | (∃ bound : ℝ, bound < eta ^ 2 ∧ |
| 79 | ∀ s (hs : s ∈ Ico (0 : ℝ) D.lifetime), |
| 80 | ∀ x ∈ F.standard_initial.metric.ball 0 A, |
| 81 | singularMetricJetErrorSquared (O.standard_flow.metric s) (O.standard_flow.connection s) |
| 82 | (fun y v => D.cylinder.pullbackInner s hs (D.chart y) |
| 83 | (mfderiv (𝓡 3) (𝓡 3) D.chart y (v 0)) |
| 84 | (mfderiv (𝓡 3) (𝓡 3) D.chart y (v 1))) ⌊eta⁻¹⌋₊ x ≤ bound) → |
| 85 | SurgeryCapPersistenceAlternative F O birth hbirth i A eta theta := by |
| 86 | obtain ⟨length, center, N, sphereTolerance, hsphereTolerance, hmargin⟩ := |
| 87 | exists_standard_sphere_margin standard htheta0 htheta |
| 88 | let compact := range (StandardCylinderPatch.sphereMap N) |
| 89 | have hcompact : IsCompact compact := |
| 90 | isCompact_range (StandardCylinderPatch.sphereMap N).continuous |
| 91 | obtain ⟨R0, _hR0, hAR0, hinside⟩ := |
| 92 | exists_standard_ball_containing_compact g0 hcompact A |
| 93 | refine ⟨R0, sphereTolerance / 2, compact, hAR0, half_pos hsphereTolerance, |
| 94 | hcompact, hinside, ?_⟩ |
| 95 | intro R hR |
| 96 | have hRpos : 0 < R := (hA.trans hAR0).trans_le hR |
| 97 | have hAR : A ≤ R := hAR0.le.trans hR |
| 98 | let closedBall := {y : E | g0.metric.edist 0 y ≤ ENNReal.ofReal R} |
| 99 | have hclosed : IsCompact closedBall := M36.standard_closed_ball_compact g0 hRpos.le |
| 100 | obtain ⟨eta0, alpha, Z, heta0, _halpha, hZ, hcoeff⟩ := |
| 101 | exists_initial_comparison_metric_bounds.{u} g0 hclosed 0 |
| 102 | have hZpos : 0 < Z := zero_lt_one.trans_le hZ |
| 103 | have hk : (0 : ℝ) < 1 / 4 := by norm_num |
| 104 | refine ⟨eta0, cylinderRemovalCutoff.{u} g0 (H := theta) hRpos hK hZpos hk, |
| 105 | heta0, cylinderRemovalCutoff_pos.{u} g0 (H := theta) hRpos hK hZpos hk, ?_⟩ |
| 106 | intro F O constants setup start rNext deltaBar hscales hdelta birth hbirth _ i |
| 107 | hclock hpinch D hDR heta hlink hlife hcurv hnear hjets |
| 108 | have hh := F.parameters.h_pos birth (F.time_domain_nonnegative (F.surgery_times_subset hbirth)) |
| 109 | have hcTheta : D.lifetime ≤ theta := D.lifetime_le.trans (surgeryCapDuration_le hh) |
| 110 | have hsource : D.chart.source = g0.metric.ball 0 R := by |
| 111 | rw [D.toCylinderCompactnessSample.source_eq, hDR] |
| 112 | have hfsource : D.chart.source = F.standard_initial.metric.ball 0 R := by |
| 113 | rw [D.chart_source, hDR] |
| 114 | have hfit : R < D.eta⁻¹ := by simpa only [hDR] using D.radius_lt |
| 115 | have hregion : D.region = |
| 116 | (F.metric birth).ball ((F.event birth hbirth).caps i).tip (F.parameters.h birth * R) := by |
| 117 | rw [D.region_eq, hDR] |
| 118 | let outer := restrictCylinderSource D.cylinder (le_of_eq hregion.symm) |
| 119 | have hinitial : ∀ hs x, |
| 120 | x ∈ (F.metric birth).ball ((F.event birth hbirth).caps i).tip |
| 121 | (F.parameters.h birth * R) → HEq (outer.forward 0 hs x) x := |
| 122 | fun hs x hx => D.birth_identity hs x (hregion.symm ▸ hx) |
| 123 | have hstop : D.lifetime = surgeryCapDuration birth O.H (F.parameters.h birth) theta ∨ |
| 124 | birth + D.lifetime / ((F.parameters.h birth)⁻¹ ^ 2) ∈ F.surgery_times ∧ |
| 125 | SurgeryBallDisappearsAt F outer |
| 126 | (birth + D.lifetime / ((F.parameters.h birth)⁻¹ ^ 2)) := by |
| 127 | by_cases heq : D.lifetime = surgeryCapDuration birth O.H (F.parameters.h birth) theta |
| 128 | · exact Or.inl heq |
| 129 | · have hcB := lt_of_le_of_ne D.lifetime_le heq |
| 130 | have hbirthBound : ∀ y ∈ D.chart.source, |
| 131 | ‖(D.ordinary.flow.metric 0).pullbackCoefficients |
| 132 | (targetChart D.chart D.target_point) y‖ ≤ Z := by |
| 133 | intro y hy |
| 134 | have hyR : y ∈ g0.metric.ball 0 R := hsource ▸ hy |
| 135 | have hyK : y ∈ closedBall := by |
| 136 | change g0.metric.edist 0 y ≤ ENNReal.ofReal R |
| 137 | exact le_of_lt hyR |
| 138 | have hb := ((hcoeff _ _ _ _ _ D.toCylinderCompactnessSample.fixedComparison |
| 139 | heta).2 y hyK).2 0 le_rfl |
| 140 | dsimp only [CylinderCompactnessSample.fixedComparison] at hb |
| 141 | rw [normalizedCoefficients_cast_initial D.standard_initial_eq D.comparison] at hb |
| 142 | change ‖D.toCylinderCompactnessSample.coefficients (0, y)‖ ≤ Z |
| 143 | rw [D.toCylinderCompactnessSample.initial_coefficients hy] |
| 144 | simpa only [norm_iteratedFDeriv_zero] using hb |
| 145 | have hball (z : UnitTwoSphere) : |
| 146 | StandardCylinderPatch.sphereMap N z ∈ g0.metric.ball 0 R := |
| 147 | (hinside (mem_range_self z)).trans_le (ENNReal.ofReal_le_ofReal hR) |
| 148 | obtain ⟨s0, hs0, htail⟩ := exists_terminal_sphere_twoJet_tail standard htheta N |
| 149 | hsphereTolerance D.lifetime_pos hcTheta |
| 150 | (fun s y => D.toCylinderCompactnessSample.coefficients (s, y)) |
| 151 | (fun s hs z => hnear s hs _ (mem_range_self z)) |
| 152 | have hremoved := maximal_cylinder_removal_of_bounds P hRpos hK hZpos hk hpinch O setup |
| 153 | hscales hdelta hh D.cylinder D.lifetime_pos hcB hcTheta hclock D.birth_identity D.maximal |
| 154 | D.chart hsource D.target_eq D.ordinary D.target_point hcurv hbirthBound N hball |
| 155 | (fun z => metricTwoJet (standard.flow.metric D.lifetime).euclideanCoefficients |
| 156 | (StandardCylinderPatch.sphereMap N z)) hs0 |
| 157 | (hmargin D.lifetime ⟨D.lifetime_pos.le, hcTheta⟩) htail |
| 158 | exact Or.inr ⟨hremoved.1, disappears_restrict_source hremoved.2 (le_of_eq hregion.symm)⟩ |
| 159 | exact cap_persistence_alternative_of_enlarged_cylinder F O birth hbirth i hA hAR hfit htheta |
| 160 | D.lifetime_pos D.lifetime_le outer hinitial D.comparison hlink D.image_ball |
| 161 | D.chart hfsource D.chart_eq hlife hjets hstop |
| 162 | |
| 163 | end PoincareMT.M44 |