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.Soliton.TwoDimensional.Ancient.Sequence.Infimum |
| 2 | import PoincareLib.Geometry.Riemannian.Surface.Norm |
| 3 | |
| 4 | /-! |
| 5 | # Compact-time confinement of reduced-length sublevels |
| 6 | |
| 7 | The constant spatial path gives one comparator on each finite backward-time |
| 8 | interval. Coercivity in the complete time-zero metric confines the resulting |
| 9 | sublevels to one compact spatial set. This is the compactness input in |
| 10 | Morgan--Tian, Claim 7.11, pp. 155--156. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | namespace PoincareMT.AncientKappaSolution |
| 20 | |
| 21 | variable {M : Type*} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin 2)) M] [IsManifold (𝓡 2) ∞ M] |
| 23 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 24 | [SecondCountableTopology M] [ConnectedSpace M] |
| 25 | |
| 26 | /-- The constant spatial path controls the spatial infimum on every finite interval. -/ |
| 27 | theorem exists_reducedLength_self_le_on_interval (K : AncientKappaSolution 2 M) |
| 28 | (p : M) (B : ℝ) : |
| 29 | ∃ C : ℝ, 0 ≤ C ∧ ∀ tau : ℝ, 0 < tau → tau ≤ B → |
| 30 | reducedLength K.flow 0 p p tau ≤ C * tau / 2 := by |
| 31 | have hR : ContinuousOn (fun s => (K.flow.connection (-s)).scalarCurvature p) |
| 32 | (Icc 0 B) := |
| 33 | (K.flow.continuousOn_scalarCurvature_ancient_surface p).comp |
| 34 | continuous_neg.continuousOn (fun _ hs => neg_nonpos.mpr hs.1) |
| 35 | obtain ⟨A, hA⟩ := isCompact_Icc.bddAbove_image hR |
| 36 | refine ⟨max A 0, le_max_right _ _, ?_⟩ |
| 37 | intro tau htau htauB |
| 38 | apply K.reducedLength_self_le_of_scalar_le p htau (le_max_right A 0) |
| 39 | intro s hs |
| 40 | exact (hA (mem_image_of_mem _ ⟨hs.1, hs.2.trans htauB⟩)).trans (le_max_left A 0) |
| 41 | |
| 42 | /-- One comparator bound works throughout a bounded backward-time interval. -/ |
| 43 | theorem exists_uniform_reducedLength_comparator (K : AncientKappaSolution 2 M) |
| 44 | (p : M) (B : ℝ) : |
| 45 | ∃ L : ℝ, 0 ≤ L ∧ ∀ tau : ℝ, 0 < tau → tau ≤ B → |
| 46 | reducedLength K.flow 0 p p tau ≤ L := by |
| 47 | obtain ⟨C, hC, hbound⟩ := K.exists_reducedLength_self_le_on_interval p B |
| 48 | refine ⟨C * max B 0 / 2, by positivity, ?_⟩ |
| 49 | intro tau htau htauB |
| 50 | apply (hbound tau htau htauB).trans |
| 51 | exact div_le_div_of_nonneg_right |
| 52 | (mul_le_mul_of_nonneg_left (htauB.trans (le_max_left _ _)) hC) (by norm_num) |
| 53 | |
| 54 | /-- All sublevels at bounded positive times lie in a single compact set. -/ |
| 55 | theorem exists_compact_reducedLength_sublevels (K : AncientKappaSolution 2 M) |
| 56 | (p : M) (B A : ℝ) : |
| 57 | ∃ S : Set M, IsCompact S ∧ ∀ tau : ℝ, 0 < tau → tau ≤ B → |
| 58 | {q | reducedLength K.flow 0 p q tau ≤ A} ⊆ S := by |
| 59 | let R := Real.sqrt (4 * max B 0 * max A 0) |
| 60 | refine ⟨{q | (K.flow.metric 0).edist p q ≤ ENNReal.ofReal R}, |
| 61 | (K.flow.metric 0).isCompact_closedBall_of_metricComplete (K.complete 0 le_rfl) p R, ?_⟩ |
| 62 | intro tau htau htauB q hq |
| 63 | have hq' : reducedLength K.flow 0 p q tau ≤ max A 0 := |
| 64 | hq.trans (le_max_left _ _) |
| 65 | change (K.flow.metric 0).edist p q ≤ ENNReal.ofReal R |
| 66 | apply le_trans (K.reducedLength_sublevel_subset_closedBall p htau (max A 0) hq') |
| 67 | apply ENNReal.ofReal_le_ofReal |
| 68 | apply Real.sqrt_le_sqrt |
| 69 | exact mul_le_mul_of_nonneg_right |
| 70 | (mul_le_mul_of_nonneg_left (htauB.trans (le_max_left _ _)) (by norm_num)) |
| 71 | (le_max_right _ _) |
| 72 | |
| 73 | /-- Sublevels over a bounded interval of backward times have compact closure in spacetime. -/ |
| 74 | theorem isCompact_closure_spacetime_reducedLength_sublevel (K : AncientKappaSolution 2 M) |
| 75 | (p : M) (B A : ℝ) : |
| 76 | IsCompact (closure {z : M × ℝ | |
| 77 | 0 < z.2 ∧ z.2 ≤ B ∧ reducedLength K.flow 0 p z.1 z.2 ≤ A}) := by |
| 78 | obtain ⟨S, hS, hsub⟩ := K.exists_compact_reducedLength_sublevels p B A |
| 79 | have hcompact := hS.prod (isCompact_Icc (a := (0 : ℝ)) (b := B)) |
| 80 | apply hcompact.of_isClosed_subset isClosed_closure |
| 81 | apply closure_minimal _ hcompact.isClosed |
| 82 | rintro ⟨q, tau⟩ ⟨htau, htauB, hq⟩ |
| 83 | exact ⟨hsub tau htau htauB hq, htau.le, htauB⟩ |
| 84 | |
| 85 | /-- Scalar curvature is jointly continuous on each closed ancient time slab. -/ |
| 86 | theorem continuousOn_scalarCurvature_spacetime_Icc (K : AncientKappaSolution 2 M) |
| 87 | {B : ℝ} (hB : 0 < B) : |
| 88 | ContinuousOn (fun z : ℝ × M => (K.flow.connection z.1).scalarCurvature z.2) |
| 89 | (Icc (-B) 0 ×ˢ univ) := by |
| 90 | have hab : -B < 0 := neg_lt_zero.mpr hB |
| 91 | let F := Poincare.Geometry.RicciFlow.Harnack.restrictFlow K.flow |
| 92 | (show Icc (-B) 0 ⊆ Iic 0 from fun _ ht => ht.2) ordConnected_Icc |
| 93 | ⟨-B, ⟨le_rfl, hab.le⟩, 0, ⟨hab.le, le_rfl⟩, hab.ne⟩ |
| 94 | exact (F.contMDiffOn_scalarCurvature_surface_Icc hab).continuousOn |
| 95 | |
| 96 | set_option backward.isDefEq.respectTransparency true in |
| 97 | /-- The curvature is uniformly bounded on every compact spatial set and finite time slab. -/ |
| 98 | theorem exists_curvature_bound_on_compact (K : AncientKappaSolution 2 M) |
| 99 | {S : Set M} (hS : IsCompact S) {B : ℝ} (hB : 0 < B) : |
| 100 | ∃ C : ℝ, 0 ≤ C ∧ ∀ t ∈ Icc (-B) 0, ∀ q ∈ S, |
| 101 | |(K.flow.connection t).curvatureTensorNorm q| ≤ C := by |
| 102 | have hR : ContinuousOn (fun z : ℝ × M => |(K.flow.connection z.1).scalarCurvature z.2|) |
| 103 | (Icc (-B) 0 ×ˢ S) := |
| 104 | (K.continuousOn_scalarCurvature_spacetime_Icc hB).abs.mono |
| 105 | (prod_mono Subset.rfl (subset_univ S)) |
| 106 | obtain ⟨C, hC⟩ := (isCompact_Icc.prod hS).bddAbove_image hR |
| 107 | refine ⟨max C 0, le_max_right _ _, ?_⟩ |
| 108 | intro t ht q hq |
| 109 | have hnorm : |(K.flow.connection t).curvatureTensorNorm q| = |
| 110 | |(K.flow.connection t).scalarCurvature q| := |
| 111 | (congrArg abs ((K.flow.connection t).curvatureTensorNorm_eq_abs_scalarCurvature q)).trans |
| 112 | (abs_abs _) |
| 113 | have hscalar : |(K.flow.connection t).scalarCurvature q| ≤ C := |
| 114 | hC ⟨(t, q), ⟨ht, hq⟩, rfl⟩ |
| 115 | exact hnorm.le.trans (hscalar.trans (le_max_left C 0)) |
| 116 | |
| 117 | /-- The potential in square-root time is continuous through the initial endpoint. -/ |
| 118 | theorem regularizedPotential_continuousOn (K : AncientKappaSolution 2 M) |
| 119 | {a b : ℝ} (ha : 0 ≤ a) (hab : a ≤ b) (S : Set M) : |
| 120 | ContinuousOn (fun z : ℝ × M => |
| 121 | 2 * z.1 ^ 2 * (K.flow.connection (0 - z.1 ^ 2)).scalarCurvature z.2) |
| 122 | (Icc a b ×ˢ S) := by |
| 123 | have hB : 0 < b ^ 2 + 1 := by positivity |
| 124 | have hparam : Continuous (fun z : ℝ × M => (0 - z.1 ^ 2, z.2)) := |
| 125 | (continuous_const.sub (continuous_fst.pow 2)).prodMk continuous_snd |
| 126 | have hscalar := (K.continuousOn_scalarCurvature_spacetime_Icc hB).comp |
| 127 | hparam.continuousOn (show MapsTo (fun z : ℝ × M => (0 - z.1 ^ 2, z.2)) |
| 128 | (Icc a b ×ˢ S) (Icc (-(b ^ 2 + 1)) 0 ×ˢ univ) from by |
| 129 | intro z hz |
| 130 | have hsq := (sq_le_sq₀ (ha.trans hz.1.1) (ha.trans hab)).mpr hz.1.2 |
| 131 | exact ⟨⟨by linarith, by nlinarith [sq_nonneg z.1]⟩, mem_univ _⟩) |
| 132 | exact (continuous_const.mul (continuous_fst.pow 2)).continuousOn.mul hscalar |
| 133 | |
| 134 | end PoincareMT.AncientKappaSolution |