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.StageFamilyComparison |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Cutoff.MaximalAlternative |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Cutoff.ObservationModels |
| 5 | |
| 6 | /-! |
| 7 | # Contradicting the exact failed cap alternative |
| 8 | |
| 9 | A controlled stage beyond the limiting inner duration controls the |
| 10 | entire maximal outer cylinder. Moving comparison and terminal removal |
| 11 | then give the exact frozen alternative at an actual counterexample. |
| 12 | Morgan--Tian, Proposition 16.5, pp. 373-375; M44 derivation 113. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Topology ENNReal |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M44 |
| 24 | |
| 25 | /-- A prepared sequence cannot have a controlled stage strictly |
| 26 | beyond its limiting inner lifetime. All comparisons and the removal |
| 27 | alternative concern the original physical cap and observation. |
| 28 | Source: Proposition 16.5, pp. 373-375; M44 derivation 113. -/ |
| 29 | theorem prepared_counterexamples_contradiction |
| 30 | (P : M44CapPersistencePredecessors.{u}) |
| 31 | {constants : MetricSurgeryConstants} (setup : SurgeryControlSetup constants) |
| 32 | (standard : RepairedStandardCapExistenceData setup.standard_initial) |
| 33 | (unique : RepairedStandardCapUniquenessData setup.standard_initial standard) |
| 34 | {start rNext A eta theta Rinner : ℝ} |
| 35 | (hA : 0 < A) (hetaTarget : 0 < eta) (htheta : 0 < theta) (htheta1 : theta < 1) |
| 36 | {cutoffs : ℕ → ℝ} |
| 37 | (X : ∀ n, PreparedCapCounterexample.{u} |
| 38 | setup start rNext A eta theta (cutoffs n) Rinner) |
| 39 | (hcutoffs : Tendsto cutoffs atTop (𝓝 0)) |
| 40 | (heta : Tendsto (fun n => (X n).sample.eta) atTop (𝓝 0)) |
| 41 | {c R0 T K : ℝ} (hc : 0 ≤ c) (hctheta : c ≤ theta) |
| 42 | (hlim : Tendsto (fun n => (X n).sample.lifetime) atTop (𝓝 c)) |
| 43 | (hinnerR0 : Rinner < R0) (hT : 0 < T) (hcT : c < T) (hK : 0 < K) |
| 44 | (hstage : CapSequenceStage X R0 T K) : False := by |
| 45 | obtain ⟨Ralt, accuracy, compact, hARalt, haccuracy, hcompact, hinside, halt⟩ := |
| 46 | exists_maximal_cap_alternative_cutoff P standard (eta := eta) |
| 47 | hA htheta.le htheta1 hK |
| 48 | let R := max R0 Ralt |
| 49 | have hR0 : R0 ≤ R := le_max_left _ _ |
| 50 | have hRalt : Ralt ≤ R := le_max_right _ _ |
| 51 | obtain ⟨eta0, delta0, heta0, hdelta0, halternative⟩ := halt R hRalt |
| 52 | let closedBall := {x : StandardCapSpace | |
| 53 | setup.standard_initial.metric.edist 0 x ≤ ENNReal.ofReal A} |
| 54 | have hclosed : IsCompact closedBall := |
| 55 | M36.standard_closed_ball_compact setup.standard_initial hA.le |
| 56 | have herrorPos : 0 < eta ^ 2 := sq_pos_of_pos hetaTarget |
| 57 | have hsphere := eventually_stage_twoJet_comparison P standard unique hstage heta hlim |
| 58 | hT hK htheta htheta1 hc hctheta hcompact haccuracy |
| 59 | have hjets := eventually_stage_metricJetError_le P standard unique hstage heta hlim |
| 60 | hT hK htheta htheta1 hc hctheta ⌊eta⁻¹⌋₊ hclosed herrorPos |
| 61 | have hfalse : ∀ᶠ _n in (atTop : Filter ℕ), False := by |
| 62 | filter_upwards [hstage R hR0, hcutoffs.eventually (gt_mem_nhds hdelta0), |
| 63 | heta.eventually (gt_mem_nhds heta0), hlim.eventually (gt_mem_nhds hcT), |
| 64 | hsphere, hjets] with n hn hdeltaN hetaN hlifeN hsphereN hjetsN |
| 65 | obtain ⟨D⟩ := hn |
| 66 | have hinnerRadius : (X n).sample.radius ≤ D.outer.radius := by |
| 67 | rw [(X n).radius_eq, D.radius_eq] |
| 68 | exact hinnerR0.le.trans hR0 |
| 69 | have hlife : D.outer.lifetime = (X n).sample.lifetime := |
| 70 | le_antisymm ((X n).sample.lifetime_antitone D.outer hinnerRadius) |
| 71 | (by simpa only [min_eq_left hlifeN.le] using D.survival) |
| 72 | have htime {s : ℝ} (hs : s ∈ Ico (0 : ℝ) D.outer.lifetime) : |
| 73 | s ∈ Ico (0 : ℝ) (min (X n).sample.lifetime T) := by |
| 74 | rw [min_eq_left hlifeN.le, ← hlife] |
| 75 | exact hs |
| 76 | have hcurv : ∀ s ∈ Ico (0 : ℝ) D.outer.lifetime, ∀ y, |
| 77 | (D.outer.ordinary.flow.connection s).curvatureTensorNorm y ≤ K := |
| 78 | fun s hs y => D.curvature s (htime hs) y |
| 79 | have hsource {x : StandardCapSpace} |
| 80 | (hx : x ∈ setup.standard_initial.metric.ball 0 R) : x ∈ D.outer.chart.source := by |
| 81 | rwa [D.outer.toCylinderCompactnessSample.source_eq, D.radius_eq] |
| 82 | have hsphereD := fun s (hs : s ∈ Ico (0 : ℝ) D.outer.lifetime) |
| 83 | x (hx : x ∈ compact) => |
| 84 | hsphereN D.outer.toCylinderCompactnessSample D.comparison_eq s (htime hs) hs.2 x hx |
| 85 | (hsource ((hinside hx).trans_le (ENNReal.ofReal_le_ofReal hRalt))) |
| 86 | have hfamily : ∃ bound : ℝ, bound < eta ^ 2 ∧ |
| 87 | ∀ s (hs : s ∈ Ico (0 : ℝ) D.outer.lifetime), |
| 88 | ∀ x ∈ (X n).data.flow.standard_initial.metric.ball 0 A, |
| 89 | singularMetricJetErrorSquared ((X n).data.observation.standard_flow.metric s) |
| 90 | ((X n).data.observation.standard_flow.connection s) |
| 91 | (fun y v => D.outer.cylinder.pullbackInner s hs (D.outer.chart y) |
| 92 | (mfderiv (𝓡 3) (𝓡 3) D.outer.chart y (v 0)) |
| 93 | (mfderiv (𝓡 3) (𝓡 3) D.outer.chart y (v 1))) ⌊eta⁻¹⌋₊ x ≤ bound := by |
| 94 | refine ⟨eta ^ 2 / 2, half_lt_self herrorPos, ?_⟩ |
| 95 | intro s hs x hx |
| 96 | have hxA : x ∈ setup.standard_initial.metric.ball 0 A := by |
| 97 | simpa only [(X n).data.fixed_scales.standard_initial_eq] using hx |
| 98 | have hxClosed : x ∈ closedBall := by |
| 99 | have hxStrict : setup.standard_initial.metric.edist 0 x < ENNReal.ofReal A := hxA |
| 100 | change setup.standard_initial.metric.edist 0 x ≤ ENNReal.ofReal A |
| 101 | exact hxStrict.le |
| 102 | have hxSource : x ∈ D.outer.chart.source := |
| 103 | hsource (hxA.trans_le (ENNReal.ofReal_le_ofReal (hARalt.le.trans hRalt))) |
| 104 | have hsOne : s ∈ Ico (0 : ℝ) 1 := |
| 105 | ⟨hs.1, (hs.2.trans_le |
| 106 | (D.outer.lifetime_le.trans (X n).data.assignedDuration_le)).trans htheta1⟩ |
| 107 | exact hjetsN D.outer.toCylinderCompactnessSample D.comparison_eq s (htime hs) hs.2 |
| 108 | x hxClosed hxSource ((X n).data.observation.standard_flow.metric s) |
| 109 | ((X n).data.observation_metric_eq standard unique hsOne) |
| 110 | ((X n).data.observation.standard_flow.connection s) |
| 111 | have hlink : (((X n).data.flow.event (X n).data.time (X n).data.is_surgery).necks |
| 112 | (X n).data.cap).neck.epsilon ≤ |
| 113 | (X n).data.flow.local_constants.comparison_delta D.outer.eta := by |
| 114 | simpa only [D.eta_eq] using (X n).comparison_neck |
| 115 | exact (X n).data.failure (halternative (X n).data.flow (X n).data.observation setup |
| 116 | (X n).data.fixed_scales hdeltaN.le (X n).data.time (X n).data.is_surgery |
| 117 | (X n).data.cap (fun _ hs => (X n).data.assigned_time_mem hs) (X n).data.pinched |
| 118 | D.outer D.radius_eq (by simpa only [D.eta_eq] using hetaN.le) hlink |
| 119 | (X n).data.observation_lifetime_one hcurv hsphereD hfamily) |
| 120 | exact hfalse.exists.choose_spec |
| 121 | |
| 122 | end PoincareMT.M44 |