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.Analysis.Compactness.CompactTimeModulus |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Removal.Sphere.StandardSphereMargin |
| 3 | |
| 4 | /-! |
| 5 | # Freezing the moving sphere model at a stopping time |
| 6 | |
| 7 | The actual standard flow has a uniform sphere time modulus. A |
| 8 | half-tolerance comparison with its moving two-jet gives the full |
| 9 | closed tolerance on one common terminal tail. Morgan--Tian, |
| 10 | Corollary 16.9 and Claim 16.10, pp. 373-375; M44 derivation 89. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | -- The native two-jet has nested coefficient derivative slots. |
| 16 | set_option maxSynthPendingDepth 16 |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff Topology |
| 20 | |
| 21 | namespace PoincareMT.M44 |
| 22 | |
| 23 | open SpacetimeBounds |
| 24 | |
| 25 | local notation "E" => StandardCapSpace |
| 26 | |
| 27 | noncomputable local instance movingSphereCoefficientNorm : NormedAddCommGroup |
| 28 | (MetricCoefficient 3) := ContinuousLinearMap.toNormedAddCommGroup |
| 29 | |
| 30 | noncomputable local instance movingSphereCoefficientSpace : NormedSpace ℝ |
| 31 | (MetricCoefficient 3) := ContinuousLinearMap.toNormedSpace |
| 32 | |
| 33 | noncomputable local instance movingSphereTwoJetNorm : NormedAddCommGroup |
| 34 | (MetricTwoJet 3) := Prod.normedAddCommGroup |
| 35 | |
| 36 | noncomputable local instance movingSphereTwoJetSpace : NormedSpace ℝ |
| 37 | (MetricTwoJet 3) := Prod.normedSpace |
| 38 | |
| 39 | /-- On one late-time interval, comparison to the moving standard |
| 40 | two-jet implies comparison to the fixed endpoint two-jet, uniformly |
| 41 | on the whole sphere. Source: Claim 16.10, pp. 374-375; derivation 89. -/ |
| 42 | theorem exists_terminal_sphere_twoJet_tail |
| 43 | {g0 : StandardInitialMetric} (S : RepairedStandardCapExistenceData g0) |
| 44 | {theta : ℝ} (htheta : theta < 1) |
| 45 | {length : ℝ} {center : E} (N : StandardCylinderPatch length center) |
| 46 | {d c : ℝ} (hd : 0 < d) (hc : 0 < c) (hctheta : c ≤ theta) |
| 47 | (B : ℝ → E → MetricCoefficient 3) |
| 48 | (hnear : ∀ s ∈ Ico (0 : ℝ) c, ∀ z : UnitTwoSphere, |
| 49 | ‖metricTwoJet (B s) (StandardCylinderPatch.sphereMap N z) - |
| 50 | metricTwoJet (S.flow.metric s).euclideanCoefficients |
| 51 | (StandardCylinderPatch.sphereMap N z)‖ ≤ d / 2) : |
| 52 | ∃ s0 : ℝ, s0 < c ∧ ∀ s ∈ Ico (0 : ℝ) c, s0 ≤ s → ∀ z : UnitTwoSphere, |
| 53 | ‖metricTwoJet (B s) (StandardCylinderPatch.sphereMap N z) - |
| 54 | metricTwoJet (S.flow.metric c).euclideanCoefficients |
| 55 | (StandardCylinderPatch.sphereMap N z)‖ ≤ d := by |
| 56 | have hsub : Icc (0 : ℝ) theta ⊆ Ico (0 : ℝ) S.flow.base.lifetime := by |
| 57 | rw [S.lifetime_one] |
| 58 | exact fun _ ht => ⟨ht.1, ht.2.trans_lt htheta⟩ |
| 59 | have hcont : ContinuousOn (fun p : ℝ × UnitTwoSphere => |
| 60 | metricTwoJet (S.flow.metric p.1).euclideanCoefficients |
| 61 | (StandardCylinderPatch.sphereMap N p.2)) (Icc (0 : ℝ) theta ×ˢ univ) := |
| 62 | (continuousOn_euclidean_twoJet (uniqueDiffOn_Ico 0 S.flow.base.lifetime) |
| 63 | S.flow.base.flow).comp |
| 64 | (continuous_fst.prodMk |
| 65 | ((StandardCylinderPatch.sphereMap N).continuous.comp continuous_snd)).continuousOn |
| 66 | (fun _ hp => ⟨hsub hp.1, mem_univ _⟩) |
| 67 | obtain ⟨delta, hdelta, hmod⟩ := hcont.exists_uniform_time_delta |
| 68 | isCompact_Icc isCompact_univ (half_pos hd) |
| 69 | refine ⟨c - delta / 2, sub_lt_self c (half_pos hdelta), ?_⟩ |
| 70 | intro s hs htail z |
| 71 | have hsc : |s - c| < delta := by |
| 72 | rw [abs_of_neg (sub_neg.mpr hs.2)] |
| 73 | linarith |
| 74 | have hmodel := hmod s ⟨hs.1, hs.2.le.trans hctheta⟩ c ⟨hc.le, hctheta⟩ hsc z |
| 75 | (mem_univ z) |
| 76 | rw [dist_eq_norm] at hmodel |
| 77 | calc |
| 78 | _ ≤ ‖metricTwoJet (B s) (StandardCylinderPatch.sphereMap N z) - |
| 79 | metricTwoJet (S.flow.metric s).euclideanCoefficients |
| 80 | (StandardCylinderPatch.sphereMap N z)‖ + |
| 81 | ‖metricTwoJet (S.flow.metric s).euclideanCoefficients |
| 82 | (StandardCylinderPatch.sphereMap N z) - |
| 83 | metricTwoJet (S.flow.metric c).euclideanCoefficients |
| 84 | (StandardCylinderPatch.sphereMap N z)‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ |
| 85 | _ ≤ d / 2 + d / 2 := add_le_add (hnear s hs z) hmodel.le |
| 86 | _ = d := by ring |
| 87 | |
| 88 | end PoincareMT.M44 |