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.Existence.Construction.Flow.ApproximationEvolution |
| 2 | import PoincareLib.Geometry.Riemannian.Metric.LocalExtension |
| 3 | import PoincareLib.Geometry.Riemannian.Curvature.LocalIsometry |
| 4 | |
| 5 | /-! |
| 6 | # Actual local metrics realizing the approximation coefficients |
| 7 | |
| 8 | Each authorized chart germ is realized by a global Euclidean metric |
| 9 | with a genuine compatible connection. Its curvature norm at the base |
| 10 | point is the compact double's norm, by local isometry. These witnesses |
| 11 | allow passage of the full curvature bound to the limit in Theorem 12.5, |
| 12 | p. 297, without asserting global positivity of a truncated chart. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | set_option maxSynthPendingDepth 8 |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Topology |
| 21 | |
| 22 | namespace PoincareMT.M34.CompactCapApproximation |
| 23 | |
| 24 | open SpacetimeBounds |
| 25 | |
| 26 | variable {g0 : StandardInitialMetric} (A : CompactCapApproximation g0) |
| 27 | |
| 28 | /-- A chart's actual coefficients are spatially smooth wherever its |
| 29 | differential is defined, at every total time (Theorem 12.5, p. 297). -/ |
| 30 | theorem contDiffOn_coefficients_slice (k : ℕ) (t : ℝ) : |
| 31 | ContDiffOn ℝ ∞ (A.coefficients k t) (compactCapSource g0 k) := by |
| 32 | intro x hx |
| 33 | exact (((A.flow k).metric t).contDiffAt_pullbackCoefficients |
| 34 | ((compactCapChart_contMDiffOn g0 k).contMDiffAt |
| 35 | ((compactCapSource_isOpen g0 k).mem_nhds hx))).contDiffWithinAt |
| 36 | |
| 37 | /-- At each authorized point a global Euclidean metric realizes the |
| 38 | two-jet and retains the compact approximation's full curvature bound |
| 39 | (Theorem 12.5, p. 297). -/ |
| 40 | theorem exists_metric_twoJet_realization (k : ℕ) {t : ℝ} (ht : t ∈ Icc 0 A.time) |
| 41 | {x : StandardCapSpace} (hx : x ∈ compactCapSource g0 k) : |
| 42 | ∃ (g : RiemannianMetric 3 StandardCapSpace) (D : LeviCivitaData g), |
| 43 | metricTwoJet g.euclideanCoefficients x = metricTwoJet (A.coefficients k t) x ∧ |
| 44 | D.curvatureTensorNorm x ≤ A.curvature_bound 0 := by |
| 45 | obtain ⟨g, D, V, hV, hxV, hVU, heq⟩ := RiemannianMetric.exists_local_realization |
| 46 | (compactCapSource_isOpen g0 k) hx (A.coefficients k t) |
| 47 | (A.contDiffOn_coefficients_slice k t) |
| 48 | (fun _ _ _ _ => ((A.flow k).metric t).symm _ _ _) (fun y hy v hv => by |
| 49 | apply ((A.flow k).metric t).pos |
| 50 | intro hz |
| 51 | apply hv |
| 52 | apply (compactCapChart_mfderiv_isInvertible g0 k hy).injective |
| 53 | rw [map_zero] |
| 54 | convert! hz using 1) |
| 55 | refine ⟨g, D, ?_, ?_⟩ |
| 56 | · apply metricTwoJet_congr_of_eventuallyEq |
| 57 | filter_upwards [hV.mem_nhds hxV] with y hy |
| 58 | exact heq y hy |
| 59 | · have hnorm := D.curvatureTensorNorm_eq_of_local_isometry ((A.flow k).connection t) |
| 60 | hV ((compactCapChart_contMDiffOn g0 k).mono hVU) |
| 61 | (fun y hy u v => congrArg (fun B => B u v) (heq y hy)) hxV |
| 62 | rw [hnorm] |
| 63 | exact A.full_curvature_le k ht _ |
| 64 | |
| 65 | end PoincareMT.M34.CompactCapApproximation |