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.LimitCapSourceIncluded |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Blowup.Controls.BlowupControlsCapCutoff |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Blowup.Controls.BlowupControlsWindow |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Canonical.Cap.CanonicalCapComparisonTolerance |
| 6 | |
| 7 | /-! |
| 8 | # Prefix persistence for an arbitrary finite source |
| 9 | |
| 10 | The original induction controls discharge every persistence, scalar |
| 11 | tolerance and fixed-scale input of the finite-duration included cap |
| 12 | comparison. Its terminal map remains the actual supplied cylinder map. |
| 13 | Morgan--Tian Lemma 17.7, pp. 405-406; limit-cap-source-prefix.md. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set |
| 20 | open scoped Manifold ContDiff |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M47 |
| 25 | |
| 26 | /-- Original prefix controls give an included cap comparison for any |
| 27 | bounded finite source, preserving every original terminal point. -/ |
| 28 | theorem exists_prefix_finite_source_included_cap_cutoff |
| 29 | (P : M46Predecessors.{u}) (S : RepairedControlledSchedulesData.{u}) |
| 30 | (p : SurgeryParameterPrefix S.constants) (hp : S.SeedCompatible p) |
| 31 | {T K D : ℝ} (hT : 0 ≤ T) (hK : 0 < K) (hD : 0 ≤ D) : |
| 32 | ∃ theta1 theta2 Rcap : ℝ, |
| 33 | 1 / 2 < theta1 ∧ theta1 < theta2 ∧ theta2 < 1 ∧ |
| 34 | S.standard_initial.cylindrical_end.radius + 5 < Rcap ∧ |
| 35 | ∀ Rrequested : ℝ, ∃ A eta0 : ℝ, |
| 36 | Rrequested < A ∧ Rcap < A ∧ |
| 37 | S.standard_initial.cylindrical_end.radius + 5 < A ∧ 0 < eta0 ∧ eta0 ≤ 1 / 2 ∧ |
| 38 | ∀ eta : ℝ, 0 < eta → eta ≤ eta0 → |
| 39 | ∀ rNext : ℝ, 0 < rNext → rNext ≤ p.r (Fin.last p.i) → |
| 40 | ∃ cutoff : ℝ, 0 < cutoff ∧ cutoff ≤ p.Delta (Fin.last p.i) ∧ |
| 41 | ∀ (F : SurgeryFlowData.{u}) (O : SurgeryObservation F), |
| 42 | O.H ≤ surgeryEpochStart (p.i + 1) → |
| 43 | ∀ old : SurgeryPrefixControls p F O, |
| 44 | SurgeryFlowAdmissible F → SurgeryFlowPinched F → |
| 45 | SurgeryPostPrefixScales p F O rNext cutoff → |
| 46 | (∀ t ∈ surgeryObservationInterval O ∩ overlapInterval p, |
| 47 | F.parameters.delta t ≤ cutoff) → |
| 48 | ∀ {base Q : ℝ}, base ∈ Ico (surgeryEpochStart p.i) O.H → |
| 49 | 64 * (T + 1) ≤ Q → |
| 50 | SurgeryCanonicalOn F (surgeryObservationInterval O ∩ Iio base) rNext → |
| 51 | ∀ (C : GeneralizedSliceCarrier.{u}) {U : Set C.carrier} (_hU : IsOpen U) |
| 52 | {a : ℝ} (ha : a ∈ Ico (-T) 0), |
| 53 | ∀ E : SurgeryFlowCylinder F C base Q (Icc a 0) U, |
| 54 | (∀ s (hs : s ∈ Icc a 0), ∀ x ∈ U, |
| 55 | (F.connection (base + s / Q)).scalarCurvature (E.forward s hs x) ≤ K * Q) → |
| 56 | let bottom : a ∈ Icc a 0 := ⟨le_rfl, ha.2.le⟩ |
| 57 | let t := base + a / Q |
| 58 | let d := (base - t) / (F.parameters.h t) ^ 2 |
| 59 | ∀ (hEvent : t ∈ F.surgery_times), ∀ [Nonempty (F.slice t).carrier], |
| 60 | ∀ (i : Fin (F.event t hEvent).cap_count) (contact : C.carrier), |
| 61 | contact ∈ U → E.forward a bottom contact ∈ ((F.event t hEvent).caps i).carrier → |
| 62 | (∀ x ∈ U, (F.metric t).edist (E.forward a bottom contact) |
| 63 | (E.forward a bottom x) ≤ ENNReal.ofReal (D / Real.sqrt Q)) → |
| 64 | 0 < d ∧ d < theta1 ∧ |
| 65 | ∃ closed : SurgeryFlowCylinder F (F.slice t) t |
| 66 | ((F.parameters.h t)⁻¹ ^ 2) (Icc 0 d) |
| 67 | ((F.metric t).ball ((F.event t hEvent).caps i).tip |
| 68 | (A * F.parameters.h t)), |
| 69 | ∃ initial : SurgeryCapInitialComparison F t hEvent i A, |
| 70 | SurgeryCapFamilyComparison F |
| 71 | (O.redecorateTo old.standard_initial_eq).standard_flow |
| 72 | A eta closed initial.chart ∧ |
| 73 | (∀ hs z, z ∈ (F.metric t).ball ((F.event t hEvent).caps i).tip |
| 74 | (A * F.parameters.h t) → HEq (closed.forward 0 hs z) z) ∧ |
| 75 | (∀ x ∈ U, E.forward a bottom x ∈ |
| 76 | (F.metric t).ball ((F.event t hEvent).caps i).tip |
| 77 | (Rcap * F.parameters.h t)) ∧ |
| 78 | (∀ x ∈ U, E.forward a bottom x ∈ |
| 79 | (F.metric t).ball ((F.event t hEvent).caps i).tip |
| 80 | (A * F.parameters.h t)) ∧ |
| 81 | ∀ htop hzero x, x ∈ U → |
| 82 | HEq (closed.forward d htop (E.forward a bottom x)) |
| 83 | (E.forward 0 hzero x) := by |
| 84 | obtain ⟨c, hc, scalarTolerance⟩ := exists_blowupCap_scalarRate_tolerance S.cap_persistence |
| 85 | let P44 : M44CapPersistencePredecessors.{u} := ⟨P.m04, P.m13.ordinary_flow⟩ |
| 86 | obtain ⟨theta1, theta2, Rcap, ht1, ht12, ht2, hRcap, radii⟩ := |
| 87 | exists_finite_source_included_cap_comparison_cutoff P44 |
| 88 | S.cap_persistence.standard_cap hT hK hD hc |
| 89 | refine ⟨theta1, theta2, Rcap, ht1, ht12, ht2, hRcap, fun Rrequested => ?_⟩ |
| 90 | obtain ⟨A, etaI, deltaI, hRA, hRcapA, hA, hetaI, hetaHalf, hdeltaI, included⟩ := |
| 91 | radii Rrequested |
| 92 | have hApos : 0 < A := by linarith [S.standard_initial.cylindrical_end.radius_pos] |
| 93 | obtain ⟨etaR, hetaR, _hetaRHalf, scalarBound⟩ := scalarTolerance A hApos theta2 ht2 |
| 94 | refine ⟨A, min etaI etaR, hRA, hRcapA, hA, lt_min hetaI hetaR, |
| 95 | (min_le_left _ _).trans hetaHalf, ?_⟩ |
| 96 | intro eta heta hetaSmall rNext hrNext hrLast |
| 97 | obtain ⟨deltaCap, hdeltaCap, hdeltaLast, capControl⟩ := |
| 98 | exists_first_failure_capCutoff S p hp rNext hrNext hrLast A eta theta2 hApos heta |
| 99 | (by linarith only [ht1, ht12]) ht2 |
| 100 | let cutoff := min deltaCap (min deltaI (1 / 2)) |
| 101 | have hcutCap : cutoff ≤ deltaCap := min_le_left _ _ |
| 102 | have hcutI : cutoff ≤ deltaI := (min_le_right _ _).trans (min_le_left _ _) |
| 103 | have hcutHalf : cutoff ≤ 1 / 2 := (min_le_right _ _).trans (min_le_right _ _) |
| 104 | refine ⟨cutoff, lt_min hdeltaCap (lt_min hdeltaI (by norm_num)), |
| 105 | hcutCap.trans hdeltaLast, ?_⟩ |
| 106 | intro F O hH old hadmissible hpinch next overlap base Q hBase hScale hearlier |
| 107 | C U hU a ha E hscalar |
| 108 | dsimp only |
| 109 | intro hEvent hn i contact hcontact hcap hdistance |
| 110 | have hQ := E.scale_pos |
| 111 | have hbasepos : 0 < base := |
| 112 | (show 0 < surgeryEpochStart p.i by unfold surgeryEpochStart; positivity).trans_le hBase.1 |
| 113 | have hinitial : F.standard_initial = S.standard_initial := by |
| 114 | rw [old.standard_initial_eq, hp.setup_eq] |
| 115 | exact S.setup_standard_initial_eq |
| 116 | let raw := O.restrictTo base hbasepos hBase.2.le |
| 117 | let oldRaw : SurgeryPrefixControls p F raw := old.restrictObservation hBase.2.le |
| 118 | let short := raw.redecorateTo oldRaw.standard_initial_eq |
| 119 | have hpflow : HEq p.setup.standard_flow S.cap_persistence.standard_cap.flow := by |
| 120 | rw [hp.setup_eq] |
| 121 | exact S.setup_standard_flow_eq |
| 122 | have hmodel : HEq short.standard_flow S.cap_persistence.standard_cap.flow := |
| 123 | (Proofs.M46.redecorateTo_standard_flow raw oldRaw.standard_initial_eq).trans hpflow |
| 124 | let t := base + a / Q |
| 125 | have htBase : t < base := add_lt_of_neg_right _ (div_neg_of_neg_of_pos ha.2 hQ) |
| 126 | have htWindow : t ∈ Ico (base - T / Q) base := by |
| 127 | refine ⟨?_, htBase⟩ |
| 128 | have hdiv := div_le_div_of_nonneg_right ha.1 hQ.le |
| 129 | simp only [neg_div] at hdiv |
| 130 | dsimp only [t] |
| 131 | linarith only [hdiv] |
| 132 | have htOverlap := blowup_analytic_window_subset_overlap p hBase hT hScale |
| 133 | (le_refl Q) (by norm_num : (0 : ℝ) ≤ 1) htWindow |
| 134 | (show t ∈ Icc (t - 0 / Q) t by simp) |
| 135 | have caps := capControl F O hH old hadmissible hpinch (next.mono_delta hcutCap) |
| 136 | (fun t ht => (overlap t ht).trans hcutCap) base hbasepos hBase.2.le hearlier |
| 137 | have htRaw : t ∈ surgeryObservationInterval raw := ⟨htOverlap.1.1, htBase⟩ |
| 138 | have hpersist : SurgeryCapPersistenceAlternative F short t hEvent i A eta theta2 := |
| 139 | caps t hEvent htRaw htOverlap.2.1 i |
| 140 | have scales := old.capPersistenceScales hH hrLast next overlap |
| 141 | have hdeltaBirth : F.parameters.delta t ≤ 1 / 2 := |
| 142 | (scales.delta_le t ⟨htOverlap.1, htOverlap.2.1⟩).trans hcutHalf |
| 143 | have hdeltaSq : (F.parameters.delta t) ^ 2 ≤ 1 := by |
| 144 | have hdOne : F.parameters.delta t ≤ 1 := by linarith only [hdeltaBirth] |
| 145 | simpa only [one_pow] using |
| 146 | pow_le_pow_left₀ (F.parameters.delta_pos t htOverlap.1.1).le hdOne 2 |
| 147 | have hh : 0 < F.parameters.h t := F.parameters.h_pos t htOverlap.1.1 |
| 148 | have hheight : (F.parameters.h t) ^ 2 ≤ 1 := by |
| 149 | have hrOne : F.parameters.r t ≤ 1 := |
| 150 | (F.parameters.r_le_epsilon t htOverlap.1.1).trans |
| 151 | (by linarith [F.parameters.epsilon_le]) |
| 152 | have hhOne : F.parameters.h t ≤ 1 := calc |
| 153 | _ ≤ F.parameters.delta t ^ 2 * F.parameters.r t := F.parameters.h_le t htOverlap.1.1 |
| 154 | _ ≤ 1 * F.parameters.r t := |
| 155 | mul_le_mul_of_nonneg_right hdeltaSq (F.parameters.r_pos t htOverlap.1.1).le |
| 156 | _ = F.parameters.r t := one_mul _ |
| 157 | _ ≤ 1 := hrOne |
| 158 | simpa only [one_pow] using pow_le_pow_left₀ hh.le hhOne 2 |
| 159 | have hendpoint : short.H ∈ surgeryObservationInterval O ∩ |
| 160 | Ici (surgeryEpochStart (p.i - 1)) := |
| 161 | ⟨⟨hbasepos.le, hBase.2⟩, htOverlap.2.1.trans htBase.le⟩ |
| 162 | let _inst : Nonempty (F.slice (short.H + a / Q)).carrier := hn |
| 163 | apply included F hinitial short O hmodel hpinch p.setup scales hcutI hendpoint |
| 164 | C hU ha E hscalar hEvent i contact hcontact hcap hdistance hheight eta heta |
| 165 | (hetaSmall.trans (min_le_left _ _)) ?_ hpersist |
| 166 | intro J V f initial comparison s hs hst z hz |
| 167 | exact scalarBound F hinitial short hmodel t hEvent hn i J V f initial |
| 168 | (Proofs.M47.capFamilyComparison_mono_tolerance heta |
| 169 | (hetaSmall.trans (min_le_right _ _)) comparison) hh s hs hst z hz |
| 170 | |
| 171 | end PoincareMT.M47 |