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.Topology.Manifold.Poincare.Final.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Limit.Cap.LimitCapSourceBirth |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Limit.Cap.LimitCapSourceCapture |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Blowup.Controls.BlowupControlsCapIncluded |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Blowup.Controls.BlowupControlsCapStop |
| 6 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Blowup.Controls.BlowupControlsCapScalar |
| 7 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Canonical.Neck.CanonicalNeckCapReclock |
| 8 | |
| 9 | /-! |
| 10 | # Included cap comparison on an arbitrary actual finite-duration source |
| 11 | |
| 12 | The actual bottom distance budget gives fixed capture before the requested |
| 13 | comparison radius. Every terminal map is retained. MT Lemma 17.7; |
| 14 | limit-cap-source-included.md, C3. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set |
| 21 | open scoped Manifold ContDiff |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.M47 |
| 26 | |
| 27 | open Proofs.M46 |
| 28 | |
| 29 | /-- A bounded finite-duration source and its actual contact give one |
| 30 | included cap comparison above any requested radius. -/ |
| 31 | theorem exists_finite_source_included_cap_comparison_cutoff |
| 32 | (P : M44CapPersistencePredecessors.{u}) {g0 : StandardInitialMetric} |
| 33 | (standard : RepairedStandardCapExistenceData g0) |
| 34 | {T K D c : ℝ} (hT : 0 ≤ T) (hK : 0 < K) (hD : 0 ≤ D) (hc : 0 < c) : |
| 35 | ∃ theta1 theta2 Rcap : ℝ, |
| 36 | 1 / 2 < theta1 ∧ theta1 < theta2 ∧ theta2 < 1 ∧ |
| 37 | g0.cylindrical_end.radius + 5 < Rcap ∧ |
| 38 | ∀ Rrequested : ℝ, ∃ A eta0 delta0 : ℝ, |
| 39 | Rrequested < A ∧ Rcap < A ∧ |
| 40 | g0.cylindrical_end.radius + 5 < A ∧ 0 < eta0 ∧ eta0 ≤ 1 / 2 ∧ |
| 41 | 0 < delta0 ∧ |
| 42 | ∀ (F : SurgeryFlowData.{u}), F.standard_initial = g0 → |
| 43 | ∀ (O Oambient : SurgeryObservation F), HEq O.standard_flow standard.flow → |
| 44 | SurgeryFlowPinched F → |
| 45 | ∀ {constants : MetricSurgeryConstants} (setup : SurgeryControlSetup constants) |
| 46 | {start rNext deltaBar : ℝ}, |
| 47 | SurgeryFixedScalesOn setup F Oambient start rNext deltaBar → deltaBar ≤ delta0 → |
| 48 | O.H ∈ surgeryObservationInterval Oambient ∩ Ici start → |
| 49 | ∀ (C : GeneralizedSliceCarrier.{u}) {U : Set C.carrier} (_hU : IsOpen U) |
| 50 | {Q a : ℝ} (ha : a ∈ Ico (-T) 0), |
| 51 | ∀ E : SurgeryFlowCylinder F C O.H Q (Icc a 0) U, |
| 52 | (∀ s (hs : s ∈ Icc a 0), ∀ x ∈ U, |
| 53 | (F.connection (O.H + s / Q)).scalarCurvature (E.forward s hs x) ≤ K * Q) → |
| 54 | let bottom : a ∈ Icc a 0 := ⟨le_rfl, ha.2.le⟩ |
| 55 | let t := O.H + a / Q |
| 56 | let d := (O.H - t) / (F.parameters.h t) ^ 2 |
| 57 | ∀ (hEvent : t ∈ F.surgery_times), ∀ [Nonempty (F.slice t).carrier], |
| 58 | ∀ (i : Fin (F.event t hEvent).cap_count) (contact : C.carrier), |
| 59 | contact ∈ U → E.forward a bottom contact ∈ ((F.event t hEvent).caps i).carrier → |
| 60 | (∀ x ∈ U, (F.metric t).edist (E.forward a bottom contact) |
| 61 | (E.forward a bottom x) ≤ ENNReal.ofReal (D / Real.sqrt Q)) → |
| 62 | (F.parameters.h t) ^ 2 ≤ 1 → |
| 63 | ∀ eta : ℝ, 0 < eta → eta ≤ eta0 → |
| 64 | (∀ (J : Set ℝ) (V : Set (F.slice t).carrier) |
| 65 | (f : SurgeryFlowCylinder F (F.slice t) t ((F.parameters.h t)⁻¹ ^ 2) J V) |
| 66 | (initial : SurgeryCapInitialComparison F t hEvent i A), |
| 67 | SurgeryCapFamilyComparison F O.standard_flow A eta f initial.chart → |
| 68 | ∀ (s : ℝ) (hs : s ∈ J), s ≤ theta2 → |
| 69 | ∀ z ∈ F.standard_initial.metric.ball 0 A, |
| 70 | c / (2 * (1 - s) * (F.parameters.h t) ^ 2) ≤ |
| 71 | (F.connection (t + s / ((F.parameters.h t)⁻¹ ^ 2))).scalarCurvature |
| 72 | (f.forward s hs (initial.chart z))) → |
| 73 | SurgeryCapPersistenceAlternative F O t hEvent i A eta theta2 → |
| 74 | 0 < d ∧ d < theta1 ∧ |
| 75 | ∃ closed : SurgeryFlowCylinder F (F.slice t) t |
| 76 | ((F.parameters.h t)⁻¹ ^ 2) (Icc 0 d) |
| 77 | ((F.metric t).ball ((F.event t hEvent).caps i).tip |
| 78 | (A * F.parameters.h t)), |
| 79 | ∃ initial : SurgeryCapInitialComparison F t hEvent i A, |
| 80 | SurgeryCapFamilyComparison F O.standard_flow A eta closed initial.chart ∧ |
| 81 | (∀ hs z, z ∈ (F.metric t).ball ((F.event t hEvent).caps i).tip |
| 82 | (A * F.parameters.h t) → HEq (closed.forward 0 hs z) z) ∧ |
| 83 | (∀ x ∈ U, E.forward a bottom x ∈ |
| 84 | (F.metric t).ball ((F.event t hEvent).caps i).tip |
| 85 | (Rcap * F.parameters.h t)) ∧ |
| 86 | (∀ x ∈ U, E.forward a bottom x ∈ |
| 87 | (F.metric t).ball ((F.event t hEvent).caps i).tip |
| 88 | (A * F.parameters.h t)) ∧ |
| 89 | ∀ htop hzero x, x ∈ U → |
| 90 | HEq (closed.forward d htop (E.forward a bottom x)) |
| 91 | (E.forward 0 hzero x) := by |
| 92 | obtain ⟨theta1, theta2, ht1, ht12, ht2, _hsigma, _hsigma1, hrate⟩ := |
| 93 | exists_cap_comparison_time_margin hc hT hK.le |
| 94 | obtain ⟨Rcap, hRcap, hcapture⟩ := exists_source_bottom_cap_capture_radius g0 hD hK hc |
| 95 | refine ⟨theta1, theta2, Rcap, ht1, ht12, ht2, hRcap, ?_⟩ |
| 96 | intro Rrequested |
| 97 | obtain ⟨A, eta0, delta0, _hApos, hAmax, heta0, hetaHalf, hdelta0, hincluded⟩ := |
| 98 | exists_actualCap_included_comparison_cutoff P standard |
| 99 | (by linarith only [ht1]) (ht12.trans ht2) (max Rcap Rrequested) |
| 100 | have hRcapA : Rcap < A := (le_max_left _ _).trans_lt hAmax |
| 101 | have hRA : Rrequested < A := (le_max_right _ _).trans_lt hAmax |
| 102 | have hA := hRcap.trans hRcapA |
| 103 | refine ⟨A, eta0, delta0, hRA, hRcapA, hA, heta0, hetaHalf, hdelta0, ?_⟩ |
| 104 | intro F hinitial O Oambient hmodel hpinch constants setup start rNext deltaBar |
| 105 | hscales hdelta htime C U hU Q a ha E hscalar |
| 106 | dsimp only |
| 107 | intro hEvent hn i contact hcontact hcap hdistance hheight eta heta hetaSmall hbound hpersist |
| 108 | let bottom : a ∈ Icc a 0 := ⟨le_rfl, ha.2.le⟩ |
| 109 | let t := O.H + a / Q |
| 110 | let h := F.parameters.h t |
| 111 | let d := (O.H - t) / h ^ 2 |
| 112 | let V := E.forward a bottom '' U |
| 113 | let W := (F.metric t).ball ((F.event t hEvent).caps i).tip (A * h) |
| 114 | have hQ := E.scale_pos |
| 115 | have hh : 0 < h := |
| 116 | F.parameters.h_pos t (F.time_domain_nonnegative (F.surgery_times_subset hEvent)) |
| 117 | have htH : t < O.H := add_lt_of_neg_right _ (div_neg_of_neg_of_pos ha.2 hQ) |
| 118 | have hAactual : F.standard_initial.cylindrical_end.radius + 5 < A := hinitial.symm ▸ hA |
| 119 | have hfloor := insertedCap_scalarLower_of_persistence O hEvent i |
| 120 | (by linarith only [ht1, ht12]) hAactual htH hbound hpersist |
| 121 | (E.forward a bottom contact) hcap |
| 122 | have hfixed (x : C.carrier) (hx : x ∈ U) : |
| 123 | E.forward a bottom x ∈ (F.metric t).ball ((F.event t hEvent).caps i).tip (Rcap * h) := |
| 124 | hcapture F hinitial C ha.2 E hEvent i contact hcap hfloor |
| 125 | (hscalar a bottom contact hcontact) hdistance x hx |
| 126 | have hVcapture (x : C.carrier) (hx : x ∈ U) : E.forward a bottom x ∈ W := by |
| 127 | have hfixed' := hfixed x hx |
| 128 | change (F.metric t).edist _ _ < ENNReal.ofReal (Rcap * h) at hfixed' |
| 129 | change (F.metric t).edist _ _ < ENNReal.ofReal (A * h) |
| 130 | exact hfixed'.trans_le |
| 131 | (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right hRcapA.le hh.le)) |
| 132 | have hage := cap_stop_elapsed_lt_comparison_margin O E hU ha.2 hEvent i hAactual hK.le |
| 133 | ht1 ht12 ht2 hrate (by linarith only [ha.1]) contact hcontact hcap |
| 134 | (fun s hs => hscalar s hs contact hcontact) hbound hpersist |
| 135 | have hdtheta : d < theta1 := by |
| 136 | apply (div_lt_iff₀ (sq_pos_of_pos hh)).mpr |
| 137 | apply (mul_lt_mul_iff_right₀ hQ).mp |
| 138 | calc |
| 139 | Q * (O.H - t) = -a := by dsimp only [t]; field_simp [hQ.ne']; ring |
| 140 | _ < theta1 * (Q * h ^ 2) := hage |
| 141 | _ = Q * (theta1 * h ^ 2) := by ring |
| 142 | obtain ⟨hd, f, basedF, terminalF⟩ := |
| 143 | exists_cap_birth_cylinder_terminal_map E hU ha.2 h hh |
| 144 | have hyV : E.forward a bottom contact ∈ V := mem_image_of_mem _ hcontact |
| 145 | obtain ⟨e, initial, comparison, basedE⟩ := |
| 146 | Proofs.M47.capPersistence_persists_to_horizon O hEvent i hAactual V f basedF |
| 147 | (E.forward a bottom contact) hyV hcap (hdtheta.trans ht12) hpersist |
| 148 | have hclock : t + d / (h⁻¹ ^ 2) = O.H := by |
| 149 | rw [surgeryCap_physical_time] |
| 150 | dsimp only [d] |
| 151 | rw [div_mul_cancel₀ _ (sq_pos_of_pos hh).ne'] |
| 152 | ring |
| 153 | obtain ⟨closed, hclosed, basedClosed, _old, _contact⟩ := hincluded |
| 154 | F hinitial O.standard_flow hmodel hpinch Oambient setup hscales hdelta t hEvent hn i d |
| 155 | hd hdtheta.le W V e f initial eta heta hetaSmall comparison hheight |
| 156 | (hclock.symm ▸ htime) basedE basedF (E.forward a bottom contact) |
| 157 | (hVcapture contact hcontact) hyV |
| 158 | refine ⟨hd, hdtheta, closed, initial, hclosed, basedClosed, hfixed, hVcapture, ?_⟩ |
| 159 | intro htop hzero x hx |
| 160 | have heq : closed.forward d htop (E.forward a bottom x) = |
| 161 | f.forward d htop (E.forward a bottom x) := by |
| 162 | apply M44.cylinder_forward_eq_of_initial closed f hd.le Subset.rfl Subset.rfl |
| 163 | (E.forward a bottom x) (hVcapture x hx) (mem_image_of_mem _ hx) |
| 164 | exact eq_of_heq ((basedClosed _ _ (hVcapture x hx)).trans |
| 165 | (basedF _ _ (mem_image_of_mem _ hx)).symm) |
| 166 | exact (heq_of_eq heq).trans (terminalF htop hzero x hx) |
| 167 | |
| 168 | end PoincareMT.M47 |