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.Removal.Sphere.StandardSphereMargin |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Collar.Initial.InitialChartBounds |
| 3 | |
| 4 | /-! |
| 5 | # A radius-independent scalar ceiling for standard-flow comparison |
| 6 | |
| 7 | The actual standard flow has one scalar bound on each closed time |
| 8 | interval before one. Compactness of its two-jet image gives a positive |
| 9 | comparison tolerance on each fixed spatial compact set, while the |
| 10 | scalar ceiling is chosen before that set. Morgan--Tian, Lemma 16.8 |
| 11 | and Corollary 16.9, pp. 372-373; M44 derivation 99. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | -- Native metric two-jets retain nested continuous-linear slots. |
| 17 | set_option maxSynthPendingDepth 16 |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Topology |
| 21 | |
| 22 | namespace PoincareMT.M44 |
| 23 | |
| 24 | open SpacetimeBounds |
| 25 | |
| 26 | local notation "E" => StandardCapSpace |
| 27 | |
| 28 | noncomputable local instance scalarModelCoefficientNorm : |
| 29 | NormedAddCommGroup (MetricCoefficient 3) := ContinuousLinearMap.toNormedAddCommGroup |
| 30 | |
| 31 | noncomputable local instance scalarModelCoefficientSpace : |
| 32 | NormedSpace ℝ (MetricCoefficient 3) := ContinuousLinearMap.toNormedSpace |
| 33 | |
| 34 | noncomputable local instance scalarModelTwoJetNorm : |
| 35 | NormedAddCommGroup (MetricTwoJet 3) := Prod.normedAddCommGroup |
| 36 | |
| 37 | noncomputable local instance scalarModelTwoJetSpace : |
| 38 | NormedSpace ℝ (MetricTwoJet 3) := Prod.normedSpace |
| 39 | |
| 40 | /-- The standard scalar ceiling is independent of the spatial |
| 41 | radius and restart time. Source: Lemma 16.8 and Corollary 16.9, |
| 42 | pp. 372-373; M44 derivation 99. -/ |
| 43 | theorem exists_global_standard_scalar_bound {g0 : StandardInitialMetric} |
| 44 | (S : RepairedStandardCapExistenceData g0) {H : ℝ} (hH0 : 0 ≤ H) (hH1 : H < 1) : |
| 45 | ∃ M : ℝ, 0 < M ∧ ∀ t ∈ Icc (0 : ℝ) H, ∀ x : E, |
| 46 | (S.flow.connection t).scalarCurvature x ≤ M := by |
| 47 | obtain ⟨K, hK, hcurv⟩ := S.flow.base.curvature_locally_bounded H hH0 |
| 48 | (by rwa [S.lifetime_one]) |
| 49 | refine ⟨9 * K + 1, by positivity, ?_⟩ |
| 50 | intro t ht x |
| 51 | have hscalar := abs_scalar_le_curvatureTensorNorm (S.flow.connection t) x |
| 52 | norm_num at hscalar |
| 53 | have hnorm := (le_abs_self _).trans (hcurv t ht x) |
| 54 | calc |
| 55 | _ ≤ |(S.flow.connection t).scalarCurvature x| := le_abs_self _ |
| 56 | _ ≤ 9 * (S.flow.connection t).curvatureTensorNorm x := hscalar |
| 57 | _ ≤ 9 * K := mul_le_mul_of_nonneg_left hnorm (by norm_num) |
| 58 | _ ≤ 9 * K + 1 := by linarith |
| 59 | |
| 60 | /-- A compact family of invertible metric jets with scalar at most |
| 61 | M has a common closed neighborhood with scalar below M+1. Source: |
| 62 | Corollary 16.9, p. 373; M44 derivation 99. -/ |
| 63 | theorem exists_uniform_scalar_jet_upper_margin {C : Set (MetricTwoJet 3)} |
| 64 | (hC : IsCompact C) {M : ℝ} |
| 65 | (hinv : ∀ J ∈ C, J.1.IsInvertible) |
| 66 | (hbound : ∀ J ∈ C, jetScalarCurvature J ≤ M) : |
| 67 | ∃ delta : ℝ, 0 < delta ∧ ∀ J ∈ C, ∀ J' : MetricTwoJet 3, |
| 68 | ‖J' - J‖ ≤ delta → jetScalarCurvature J' < M + 1 := by |
| 69 | let U : Set (MetricTwoJet 3) := |
| 70 | {J | J.1.IsInvertible ∧ jetScalarCurvature J < M + 1} |
| 71 | have hU : IsOpen U := by |
| 72 | rw [isOpen_iff_mem_nhds] |
| 73 | intro J hJ |
| 74 | have hi := (isOpen_ricciFlowOperator_domain 3).mem_nhds hJ.1 |
| 75 | have hs := (contDiffAt_jetScalarCurvature hJ.1).continuousAt.eventually |
| 76 | (gt_mem_nhds hJ.2) |
| 77 | filter_upwards [hi, hs] with J' hI hS |
| 78 | exact ⟨hI, hS⟩ |
| 79 | have hCU : C ⊆ U := fun J hJ => |
| 80 | ⟨hinv J hJ, (hbound J hJ).trans_lt (lt_add_one M)⟩ |
| 81 | obtain ⟨delta, hdelta, hinside⟩ := hC.exists_cthickening_subset_open hU hCU |
| 82 | refine ⟨delta, hdelta, ?_⟩ |
| 83 | intro J hJ J' hnear |
| 84 | exact (hinside (Metric.mem_cthickening_of_dist_le J' J delta C hJ |
| 85 | (by simpa only [dist_eq_norm] using hnear))).2 |
| 86 | |
| 87 | /-- On a fixed compact standard-coordinate region, one tolerance |
| 88 | works for every model time. Only this tolerance depends on the |
| 89 | region; M remains the global standard scalar bound. Source: |
| 90 | Corollary 16.9, p. 373; M44 derivation 99. -/ |
| 91 | theorem exists_standard_scalar_comparison_tolerance {g0 : StandardInitialMetric} |
| 92 | (S : RepairedStandardCapExistenceData g0) {H M : ℝ} (hH1 : H < 1) |
| 93 | (hbound : ∀ t ∈ Icc (0 : ℝ) H, ∀ x : E, |
| 94 | (S.flow.connection t).scalarCurvature x ≤ M) |
| 95 | {C : Set E} (hC : IsCompact C) : |
| 96 | ∃ delta : ℝ, 0 < delta ∧ ∀ t ∈ Icc (0 : ℝ) H, ∀ x ∈ C, |
| 97 | ∀ J : MetricTwoJet 3, |
| 98 | ‖J - metricTwoJet (S.flow.metric t).euclideanCoefficients x‖ ≤ delta → |
| 99 | jetScalarCurvature J < M + 1 := by |
| 100 | let jet : ℝ × E → MetricTwoJet 3 := fun p => |
| 101 | metricTwoJet (S.flow.metric p.1).euclideanCoefficients p.2 |
| 102 | have hsub : Icc (0 : ℝ) H ⊆ Ico (0 : ℝ) S.flow.base.lifetime := by |
| 103 | rw [S.lifetime_one] |
| 104 | exact fun _ ht => ⟨ht.1, ht.2.trans_lt hH1⟩ |
| 105 | have hcont : ContinuousOn jet (Icc (0 : ℝ) H ×ˢ C) := |
| 106 | (continuousOn_euclidean_twoJet (uniqueDiffOn_Ico 0 S.flow.base.lifetime) |
| 107 | S.flow.base.flow).mono (prod_mono hsub (subset_univ C)) |
| 108 | have hcompact : IsCompact (jet '' (Icc (0 : ℝ) H ×ˢ C)) := |
| 109 | (isCompact_Icc.prod hC).image_of_continuousOn hcont |
| 110 | obtain ⟨delta, hdelta, hmargin⟩ := exists_uniform_scalar_jet_upper_margin hcompact |
| 111 | (M := M) (by |
| 112 | rintro _ ⟨p, _hp, rfl⟩ |
| 113 | exact (S.flow.metric p.1).inner_isInvertible p.2) (by |
| 114 | rintro _ ⟨p, hp, rfl⟩ |
| 115 | change jetScalarCurvature (metricTwoJet |
| 116 | (S.flow.metric p.1).euclideanCoefficients p.2) ≤ M |
| 117 | rw [jetScalarCurvature_metricTwoJet (S.flow.connection p.1)] |
| 118 | exact hbound p.1 hp.1 p.2) |
| 119 | exact ⟨delta, hdelta, fun t ht x hx J hnear => |
| 120 | hmargin (jet (t, x)) (mem_image_of_mem jet ⟨ht, hx⟩) J hnear⟩ |
| 121 | |
| 122 | end PoincareMT.M44 |