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.Induction.Noncollapse.Assembly.PositiveComponents.PositiveSectionalContinuation |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Removal.Terminal.TerminalMetricJets |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Removal.Sphere.PullbackPlane |
| 4 | |
| 5 | /-! |
| 6 | # The fixed sectional margin at a regular terminal limit |
| 7 | |
| 8 | Morgan--Tian Definition 15.8, pp. 361-362, and the positive-component |
| 9 | argument on p. 393. The actual terminal two-jets preserve the same |
| 10 | non-strict lower bound, hence strict positivity when the bound is positive. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | -- Coordinate two-jets and tangent pullbacks retain their selected instances. |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M04 |
| 23 | end PoincareMT.M04 |
| 24 | open PoincareMT.RicciFlowAnalysis |
| 25 | |
| 26 | namespace PoincareMT.Proofs.M46 |
| 27 | |
| 28 | open SpacetimeBounds M04 M44 |
| 29 | |
| 30 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 31 | |
| 32 | noncomputable local instance terminalSectionalCoefficientNorm : |
| 33 | NormedAddCommGroup (MetricCoefficient 3) := ContinuousLinearMap.toNormedAddCommGroup |
| 34 | |
| 35 | noncomputable local instance terminalSectionalCoefficientSpace : |
| 36 | NormedSpace ℝ (MetricCoefficient 3) := ContinuousLinearMap.toNormedSpace |
| 37 | |
| 38 | noncomputable local instance terminalSectionalJetNorm : |
| 39 | NormedAddCommGroup (MetricTwoJet 3) := Prod.normedAddCommGroup |
| 40 | |
| 41 | noncomputable local instance terminalSectionalJetSpace : |
| 42 | NormedSpace ℝ (MetricTwoJet 3) := Prod.normedSpace |
| 43 | |
| 44 | attribute [local instance] normedAddCommGroupTangentSpaceVectorSpace |
| 45 | normedSpaceTangentSpaceVectorSpace |
| 46 | |
| 47 | variable {g0 : StandardInitialMetric} {K : MetricSurgeryConstants} {P : SurgeryParameters} |
| 48 | {slice : ℝ → GeneralizedSliceCarrier.{u}} |
| 49 | {metric : ∀ t, RiemannianMetric 3 (slice t).carrier} {T : ℝ} |
| 50 | |
| 51 | set_option maxHeartbeats 1800000 in |
| 52 | -- The coordinate jet readout retains both dependent tangent-space pullbacks. |
| 53 | /-- An eventual sectional lower bound on the actual pre-flow passes to |
| 54 | the actual regular terminal metric, preserving its value, p. 393. -/ |
| 55 | theorem terminal_sectional_lower_of_preterminal |
| 56 | (event : SurgeryEventData g0 K P slice metric T) |
| 57 | {q : (slice event.tMinus).carrier} (hq : q ∈ event.regular_limit) |
| 58 | {k : ℝ} (hbound : ∀ᶠ t in 𝓝[<] T, |
| 59 | ∀ u v : TangentSpace (𝓡 3) q, |
| 60 | k * metricGram (event.pre_flow.metric t) q u v ≤ |
| 61 | (event.pre_flow.connection t).curvatureTensor q u v u v) : |
| 62 | ∀ u v : TangentSpace (𝓡 3) (event.limit_identify.map q), |
| 63 | k * metricGram event.limit_metric (event.limit_identify.map q) u v ≤ |
| 64 | event.limit_connection.curvatureTensor (event.limit_identify.map q) u v u v := by |
| 65 | let c := extChartAt (𝓡 3) q |
| 66 | let U := c.target ∩ c.symm ⁻¹' event.regular_limit |
| 67 | have hU : IsOpen U := |
| 68 | (contMDiffOn_extChartAt_symm (I := 𝓡 3) (n := ∞) q).continuousOn.isOpen_inter_preimage |
| 69 | (isOpen_extChartAt_target q) event.regular_limit_open |
| 70 | have hchart : U ⊆ c.target := inter_subset_left |
| 71 | have hregular : c.symm '' U ⊆ event.regular_limit := by |
| 72 | rintro _ ⟨x, hx, rfl⟩ |
| 73 | exact hx.2 |
| 74 | have hc : ContMDiffOn (𝓡 3) (𝓡 3) ∞ c.symm U := |
| 75 | (contMDiffOn_extChartAt_symm q).mono hchart |
| 76 | have hf : ContMDiffOn (𝓡 3) (𝓡 3) ∞ (event.limit_identify.map ∘ c.symm) U := |
| 77 | event.limit_identify.map_smooth.comp hc (fun x hx => hx.2) |
| 78 | have hi (x : E) (hx : x ∈ U) : |
| 79 | (mfderiv (𝓡 3) (𝓡 3) c.symm x).IsInvertible := by |
| 80 | simpa only [ModelWithCorners.range_eq_univ, mfderivWithin_univ] using |
| 81 | isInvertible_mfderivWithin_extChartAt_symm (hchart hx) |
| 82 | have hj (x : E) (hx : x ∈ U) : |
| 83 | (mfderiv (𝓡 3) (𝓡 3) (event.limit_identify.map ∘ c.symm) x).IsInvertible := by |
| 84 | have hreg : c.symm x ∈ interior event.regular_limit := |
| 85 | event.regular_limit_open.interior_eq.symm ▸ hx.2 |
| 86 | have hl := (regionEquivalenceInteriorChart event.limit_identify).isLocalDiffeomorphAt |
| 87 | (𝓡 3) (𝓡 3) ∞ hreg |
| 88 | have hli : (mfderiv (𝓡 3) (𝓡 3) event.limit_identify.map (c.symm x)).IsInvertible := |
| 89 | ⟨hl.mfderivToContinuousLinearEquiv (by simp), rfl⟩ |
| 90 | have hd := event.limit_identify.map_smooth.contMDiffAt |
| 91 | (event.regular_limit_open.mem_nhds hx.2) |
| 92 | rw [mfderiv_comp x (hd.mdifferentiableAt (by simp)) |
| 93 | ((hc.contMDiffAt (hU.mem_nhds hx)).mdifferentiableAt (by simp))] |
| 94 | exact hli.comp (hi x hx) |
| 95 | have hcx : c.symm (c q) = q := c.left_inv (mem_extChartAt_source q) |
| 96 | have hx : c q ∈ U := ⟨c.map_source (mem_extChartAt_source q), by |
| 97 | change c.symm (c q) ∈ event.regular_limit |
| 98 | rwa [hcx]⟩ |
| 99 | have hconv := tendsto_twoJet_of_surgeryMetricLimitOn event.metric_converges q hq |
| 100 | hU hchart hregular hf hx |
| 101 | let f := event.limit_identify.map ∘ c.symm |
| 102 | let JT := metricTwoJet (event.limit_metric.pullbackCoefficients f) (c q) |
| 103 | have hinv : JT.1.IsInvertible := |
| 104 | event.limit_metric.isInvertible_pullbackCoefficients (hj (c q) hx).injective |
| 105 | have hcoordinate (u v : E) : |
| 106 | k * collarJetGram u v JT ≤ jetCurvature JT u v u v := by |
| 107 | have hleft : Tendsto (fun t => k * collarJetGram u v |
| 108 | (metricTwoJet ((event.pre_flow.metric t).pullbackCoefficients c.symm) (c q))) |
| 109 | (𝓝[<] T) (𝓝 (k * collarJetGram u v JT)) := |
| 110 | ((continuous_const.mul (continuous_collarJetGram u v)).continuousAt.tendsto).comp hconv |
| 111 | have hright : Tendsto (fun t => jetCurvature |
| 112 | (metricTwoJet ((event.pre_flow.metric t).pullbackCoefficients c.symm) (c q)) u v u v) |
| 113 | (𝓝[<] T) (𝓝 (jetCurvature JT u v u v)) := |
| 114 | (contDiffAt_jetCurvature hinv u v u v).continuousAt.tendsto.comp hconv |
| 115 | apply le_of_tendsto_of_tendsto hleft hright |
| 116 | filter_upwards [hbound] with t ht |
| 117 | rw [jetCurvature_pullbackCoefficients (event.pre_flow.metric t) |
| 118 | (event.pre_flow.connection t) hU hc hi hx] |
| 119 | change k * metricGram (event.pre_flow.metric t) (c.symm (c q)) |
| 120 | (mfderiv (𝓡 3) (𝓡 3) c.symm (c q) u) |
| 121 | (mfderiv (𝓡 3) (𝓡 3) c.symm (c q) v) ≤ _ |
| 122 | have hforall : ∀ z : (slice event.tMinus).carrier, z = q → |
| 123 | ∀ a b : TangentSpace (𝓡 3) z, |
| 124 | k * metricGram (event.pre_flow.metric t) z a b ≤ |
| 125 | (event.pre_flow.connection t).curvatureTensor z a b a b := by |
| 126 | intro z hz |
| 127 | subst z |
| 128 | exact ht |
| 129 | exact hforall _ hcx _ _ |
| 130 | have hall : ∀ u v : TangentSpace (𝓡 3) (f (c q)), |
| 131 | k * metricGram event.limit_metric (f (c q)) u v ≤ |
| 132 | event.limit_connection.curvatureTensor (f (c q)) u v u v := by |
| 133 | intro u v |
| 134 | obtain ⟨a, ha⟩ := (hj (c q) hx).surjective u |
| 135 | obtain ⟨b, hb⟩ := (hj (c q) hx).surjective v |
| 136 | have h := hcoordinate a b |
| 137 | rw [jetCurvature_pullbackCoefficients event.limit_metric event.limit_connection |
| 138 | hU hf hj hx] at h |
| 139 | change k * metricGram event.limit_metric (f (c q)) |
| 140 | (mfderiv (𝓡 3) (𝓡 3) f (c q) a) (mfderiv (𝓡 3) (𝓡 3) f (c q) b) ≤ _ at h |
| 141 | have ha' : mfderiv (𝓡 3) (𝓡 3) f (c q) a = u := ha |
| 142 | have hb' : mfderiv (𝓡 3) (𝓡 3) f (c q) b = v := hb |
| 143 | rw [ha', hb'] at h |
| 144 | simpa only [ha, hb] using h |
| 145 | have hfq : f (c q) = event.limit_identify.map q := congrArg event.limit_identify.map hcx |
| 146 | exact hfq ▸ hall |
| 147 | |
| 148 | /-- A strictly positive uniform preterminal margin gives strictly positive |
| 149 | sectional curvature at the actual regular terminal point, p. 393. -/ |
| 150 | theorem terminal_sectional_positive_of_preterminal |
| 151 | (event : SurgeryEventData g0 K P slice metric T) |
| 152 | {q : (slice event.tMinus).carrier} (hq : q ∈ event.regular_limit) |
| 153 | {k : ℝ} (hk : 0 < k) (hbound : ∀ᶠ t in 𝓝[<] T, |
| 154 | ∀ u v : TangentSpace (𝓡 3) q, |
| 155 | k * metricGram (event.pre_flow.metric t) q u v ≤ |
| 156 | (event.pre_flow.connection t).curvatureTensor q u v u v) |
| 157 | (u v : TangentSpace (𝓡 3) (event.limit_identify.map q)) |
| 158 | (hpair : LeviCivitaData.IsOrthonormalPair event.limit_metric |
| 159 | (event.limit_identify.map q) u v) : |
| 160 | 0 < event.limit_connection.sectionalCurvature (event.limit_identify.map q) u v := by |
| 161 | have h := terminal_sectional_lower_of_preterminal event hq hbound u v |
| 162 | simp only [metricGram, hpair.1, hpair.2.1, hpair.2.2, |
| 163 | zero_pow (by decide : 2 ≠ 0), sub_zero, mul_one] at h |
| 164 | simpa only [LeviCivitaData.sectionalCurvature, hpair.1, hpair.2.1, hpair.2.2, one_mul, |
| 165 | zero_pow (by decide : 2 ≠ 0), sub_zero, div_one] using hk.trans_le h |
| 166 | |
| 167 | end PoincareMT.Proofs.M46 |