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.Induction.Noncollapse.Compat.GeneralizedEquation |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.CapEntry.TruncatedCapEntry |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.CapEntry.HistoryComparison |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.CapEntry.DisappearingImage |
| 5 | |
| 6 | /-! |
| 7 | # The actual cap window supplied by persistence and comparison |
| 8 | |
| 9 | Proposition 16.13 and Lemma 16.15, pp. 377-382. The original M44 |
| 10 | alternative produces the lifted physical cap with both quantitative |
| 11 | readouts. Its only possible top boundaries are retained explicitly. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set MeasureTheory |
| 18 | open scoped Manifold ContDiff Topology ENNReal intervalIntegral |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.Proofs.M12 |
| 23 | end PoincareMT.Proofs.M12 |
| 24 | open PoincareMT.EpochExtension.Spacetime |
| 25 | |
| 26 | namespace PoincareMT.Proofs.M46 |
| 27 | |
| 28 | open PoincareMT.Proofs.M12 |
| 29 | |
| 30 | /-- Actual geometric data used by the cap-entry estimate, all on the |
| 31 | selected history and full physical birth ball. Source: Proposition |
| 32 | 16.13 and Lemma 16.15, pp. 377-382. -/ |
| 33 | structure CapBarrierWindow {F : GeneralizedRicciFlowData.{u}} |
| 34 | (G : FlowBoxRicciGeometry F) (C : GeneralizedSliceCarrier.{u}) |
| 35 | (gBirth : RiemannianMetric 3 C.carrier) (center : C.carrier) |
| 36 | (origin T A h c mu theta : ℝ) where |
| 37 | top : ℝ |
| 38 | top_gt : origin < top |
| 39 | top_le_test : top ≤ T |
| 40 | top_le_model : top ≤ origin + theta * h ^ 2 |
| 41 | source : TopologicalSpace.Opens C.carrier |
| 42 | source_eq : (source : Set C.carrier) = gBirth.ball center (A * h) |
| 43 | interval : SpacetimeInterval |
| 44 | cylinder : GeneralizedFlowCylinder F C origin (h⁻¹ ^ 2) interval.domain source |
| 45 | physical_eq : (cylinderPhysicalInterval origin (h⁻¹ ^ 2) |
| 46 | cylinder.scale_pos interval).domain = Ioo origin top |
| 47 | time_subset : (cylinderPhysicalInterval origin (h⁻¹ ^ 2) |
| 48 | cylinder.scale_pos interval).domain ⊆ F.interval |
| 49 | metric_lower : ∀ (s : ℝ) (hs : s ∈ interval.domain) (z : source) |
| 50 | (v : TangentSpace (𝓡 3) z.val), |
| 51 | (h⁻¹ ^ 2) * (mu * gBirth.inner z.val v v) ≤ cylinder.pullbackInner s hs z.val v v |
| 52 | scalar_lower : ∀ w : (G.realization.timeIntervals.interval |
| 53 | (cylinderPhysicalInterval origin (h⁻¹ ^ 2) cylinder.scale_pos interval)).Point × source, |
| 54 | c / (2 * (1 - (w.1.val - origin) / h ^ 2) * h ^ 2) ≤ |
| 55 | horizontalScalarCurvature G.toLGeometry.leafwise (rawCylinderMap G.realization cylinder w) |
| 56 | top_kind : top = T ∨ top = origin + theta * h ^ 2 ∨ |
| 57 | ∀ v : G.toLGeometry.Point, G.realization.spacetime.timeFunction v = top → |
| 58 | v ∉ closure (Set.range (rawCylinderMap G.realization cylinder)) |
| 59 | |
| 60 | /-- The same physical persistence cylinder underlying the lifted cap |
| 61 | window. Its included birth is retained for the later neighborhood |
| 62 | argument. Source: Proposition 16.5 and Lemma 16.15, pp. 370 and 381. -/ |
| 63 | structure CapBarrierOriginData |
| 64 | {F : SurgeryFlowData.{u}} {W : M33RegularHistoryWindow F} |
| 65 | (H : M33RegularHistoryData W) {G : FlowBoxRicciGeometry H.generalized} |
| 66 | {origin T A h c mu theta : ℝ} {center : (F.slice origin).carrier} |
| 67 | (Q : CapBarrierWindow G (F.slice origin) (F.metric origin) center |
| 68 | origin T A h c mu theta) where |
| 69 | originalTop : ℝ |
| 70 | top_le_original : Q.top ≤ originalTop |
| 71 | original : SurgeryFlowCylinder F (F.slice origin) origin (h⁻¹ ^ 2) |
| 72 | (Ico 0 ((originalTop - origin) / h ^ 2)) Q.source |
| 73 | based : ∀ hzero x, x ∈ Q.source → HEq (original.forward 0 hzero x) x |
| 74 | interval_eq : Q.interval.domain = Ioo 0 ((Q.top - origin) / h ^ 2) |
| 75 | interval_subset : Q.interval.domain ⊆ Ico 0 ((originalTop - origin) / h ^ 2) |
| 76 | time_mem : ∀ s ∈ Q.interval.domain, origin + s / (h⁻¹ ^ 2) ∈ H.generalized.interval |
| 77 | forward : ∀ s hs x, x ∈ Q.source → |
| 78 | H.history.forward (origin + s / (h⁻¹ ^ 2)) (time_mem s hs) |
| 79 | (Q.cylinder.forward s hs x) = original.forward s (interval_subset hs) x |
| 80 | |
| 81 | /-- Substitute the literal M44 alternative and the actual finite-jet |
| 82 | comparison estimates into the cap window. No action confinement or |
| 83 | crossing exclusion is assumed. Source: Lemma 16.15, pp. 379-382. -/ |
| 84 | theorem exists_capBarrierWindow_of_persistence |
| 85 | {F : SurgeryFlowData.{u}} {W : M33RegularHistoryWindow F} |
| 86 | (H : M33RegularHistoryData W) (G : FlowBoxRicciGeometry H.generalized) |
| 87 | (hM13 : GeneralizedParabolicRescalingTheory.{u} 3) (O : SurgeryObservation F) |
| 88 | {t T A eta theta c mu : ℝ} (hT : t ∈ F.surgery_times) |
| 89 | [Nonempty (F.slice t).carrier] (i : Fin (F.event t hT).cap_count) |
| 90 | (htT : t < T) (hTH : T < O.H) (htheta : 0 < theta) |
| 91 | (hwindow : Icc 0 T ⊆ H.generalized.interval) |
| 92 | (hmetric : ∀ (I : Set ℝ) (U : Set (F.slice t).carrier) |
| 93 | (e : SurgeryFlowCylinder F (F.slice t) t ((F.parameters.h t)⁻¹ ^ 2) I U) |
| 94 | (initial : SurgeryCapInitialComparison F t hT i A), |
| 95 | SurgeryCapFamilyComparison F O.standard_flow A eta e initial.chart → |
| 96 | ∀ hzero : (0 : ℝ) ∈ I, ∀ (s : ℝ) (hs : s ∈ I), s ≤ theta → |
| 97 | ∀ x ∈ F.standard_initial.metric.ball 0 A, ∀ v : StandardCapSpace, |
| 98 | mu * capComparisonCoefficients e initial.chart 0 hzero x v v ≤ |
| 99 | capComparisonCoefficients e initial.chart s hs x v v) |
| 100 | (hscalar : ∀ (I : Set ℝ) (U : Set (F.slice t).carrier) |
| 101 | (e : SurgeryFlowCylinder F (F.slice t) t ((F.parameters.h t)⁻¹ ^ 2) I U) |
| 102 | (initial : SurgeryCapInitialComparison F t hT i A), |
| 103 | SurgeryCapFamilyComparison F O.standard_flow A eta e initial.chart → |
| 104 | ∀ (s : ℝ) (hs : s ∈ I), s ≤ theta → |
| 105 | ∀ x ∈ F.standard_initial.metric.ball 0 A, |
| 106 | c / (2 * (1 - s) * (F.parameters.h t) ^ 2) ≤ |
| 107 | (F.connection (t + s / ((F.parameters.h t)⁻¹ ^ 2))).scalarCurvature |
| 108 | (e.forward s hs (initial.chart x))) |
| 109 | (control : SurgeryCapPersistenceAlternative F O t hT i A eta theta) : |
| 110 | ∃ Q : CapBarrierWindow G (F.slice t) (F.metric t) ((F.event t hT).caps i).tip |
| 111 | t T A (F.parameters.h t) c mu theta, Nonempty (CapBarrierOriginData H Q) := by |
| 112 | have ht0 : 0 ≤ t := F.time_domain_nonnegative (F.surgery_times_subset hT) |
| 113 | have hh : 0 < F.parameters.h t := F.parameters.h_pos t ht0 |
| 114 | have hsq : 0 < (F.parameters.h t) ^ 2 := sq_pos_of_pos hh |
| 115 | obtain ⟨top, httop, htopmodel, e, initial, comparison, based, kind⟩ := |
| 116 | exists_capPersistence_source_window O i hh (htT.trans hTH) htheta control |
| 117 | have hU : IsOpen ((F.metric t).ball ((F.event t hT).caps i).tip |
| 118 | (A * F.parameters.h t)) := by |
| 119 | rw [← comparison.choose_spec.2.2.2.1] |
| 120 | exact (capInitialPartialDiffeomorph initial).open_target |
| 121 | let U : TopologicalSpace.Opens (F.slice t).carrier := |
| 122 | ⟨(F.metric t).ball ((F.event t hT).caps i).tip (A * F.parameters.h t), hU⟩ |
| 123 | let J := capOpenInterval t (min T top) (F.parameters.h t) (lt_min htT httop) hh |
| 124 | have hwindow' : Ioo t (min T top) ⊆ H.generalized.interval := by |
| 125 | intro s hs |
| 126 | exact hwindow ⟨ht0.trans hs.1.le, hs.2.le.trans (min_le_left _ _)⟩ |
| 127 | obtain ⟨hJI, htime, d, forward, metric⟩ := |
| 128 | exists_capCylinder_test_window_lift H hU hh httop htT hwindow' e |
| 129 | have hphysical : (cylinderPhysicalInterval t ((F.parameters.h t)⁻¹ ^ 2) |
| 130 | d.scale_pos J).domain = Ioo t (min T top) := |
| 131 | capOpenInterval_physical t (min T top) (F.parameters.h t) (lt_min htT httop) hh d.scale_pos |
| 132 | have hzero : (0 : ℝ) ∈ Ico 0 ((top - t) / (F.parameters.h t) ^ 2) := |
| 133 | ⟨le_rfl, div_pos (sub_pos.mpr httop) hsq⟩ |
| 134 | have hsTheta (s : ℝ) (hs : s ∈ J.domain) : s ≤ theta := by |
| 135 | apply (hJI hs).2.le.trans |
| 136 | exact (div_le_iff₀ hsq).mpr (by linarith) |
| 137 | refine ⟨{ |
| 138 | top := min T top |
| 139 | top_gt := lt_min htT httop |
| 140 | top_le_test := min_le_left _ _ |
| 141 | top_le_model := (min_le_right _ _).trans htopmodel |
| 142 | source := U |
| 143 | source_eq := rfl |
| 144 | interval := J |
| 145 | cylinder := d |
| 146 | physical_eq := hphysical |
| 147 | time_subset := hphysical ▸ hwindow' |
| 148 | metric_lower := ?_ |
| 149 | scalar_lower := ?_ |
| 150 | top_kind := ?_ |
| 151 | }, ?_⟩ |
| 152 | · intro s hs z v |
| 153 | rw [metric s hs z.val z.property v v] |
| 154 | exact capCylinder_physicalBirth_lower e initial comparison hzero |
| 155 | (based hzero) (hJI hs) |
| 156 | (hmetric _ _ e initial comparison hzero s (hJI hs) (hsTheta s hs)) z.property v |
| 157 | · intro w |
| 158 | let s := cylinderClockHomeomorph t ((F.parameters.h t)⁻¹ ^ 2) d.scale_pos J w.1 |
| 159 | have hread := historyCylinder_scalar_pullback H G hM13 e d hJI htime forward |
| 160 | s.property w.2.property |
| 161 | change c / (2 * (1 - (w.1.val - t) / (F.parameters.h t) ^ 2) * |
| 162 | (F.parameters.h t) ^ 2) ≤ |
| 163 | horizontalScalarCurvature G.toLGeometry.leafwise (d.pointMap s.val s.property w.2.val) |
| 164 | rw [hread] |
| 165 | have hclock : (w.1.val - t) / (F.parameters.h t) ^ 2 = s.val := by |
| 166 | change (w.1.val - t) / (F.parameters.h t) ^ 2 = |
| 167 | parabolicTime ((F.parameters.h t)⁻¹ ^ 2) t w.1.val |
| 168 | unfold parabolicTime |
| 169 | simp only [inv_pow, div_eq_mul_inv, mul_comm] |
| 170 | rw [hclock] |
| 171 | exact capCylinder_physicalScalar_lower e initial comparison (hJI s.property) |
| 172 | (hscalar _ _ e initial comparison s.val (hJI s.property) (hsTheta s.val s.property)) |
| 173 | w.2.property |
| 174 | · by_cases htest : T ≤ top |
| 175 | · exact Or.inl (min_eq_left htest) |
| 176 | have hmin : min T top = top := min_eq_right (le_of_not_ge htest) |
| 177 | rcases kind with hobs | hfull | hdisappears |
| 178 | · have : T ≤ top := by rw [hobs]; exact hTH.le |
| 179 | exact (htest this).elim |
| 180 | · exact Or.inr (Or.inl (hmin.trans hfull)) |
| 181 | · right |
| 182 | right |
| 183 | intro v hv |
| 184 | apply rawCylinder_closure_excludes_disappearing_top (U := U) (J := J) |
| 185 | G.realization H.history e d hJI htime forward hdisappears _ v (hv.trans hmin) |
| 186 | intro s hs |
| 187 | rw [inv_pow, div_inv_eq_mul] |
| 188 | have h := (lt_div_iff₀ hsq).mp hs.2 |
| 189 | linarith |
| 190 | · exact ⟨{ |
| 191 | originalTop := top |
| 192 | top_le_original := min_le_right _ _ |
| 193 | original := e |
| 194 | based := based |
| 195 | interval_eq := rfl |
| 196 | interval_subset := hJI |
| 197 | time_mem := htime |
| 198 | forward := forward |
| 199 | }⟩ |
| 200 | |
| 201 | end PoincareMT.Proofs.M46 |