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.Restart.Evolution |
| 2 | import PoincareLib.Geometry.Riemannian.Metric.LocalExtension |
| 3 | import PoincareLib.Geometry.Riemannian.Curvature.LocalIsometry |
| 4 | |
| 5 | /-! |
| 6 | # Metric-general 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 approximating flow'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.MetricFlowApproximation |
| 23 | |
| 24 | open SpacetimeBounds |
| 25 | |
| 26 | variable {ginit : RiemannianMetric 3 StandardCapSpace} {Mfamily : ℕ → Type} |
| 27 | [∀ k, TopologicalSpace (Mfamily k)] [∀ k, ChartedSpace StandardCapSpace (Mfamily k)] |
| 28 | [∀ k, IsManifold (𝓡 3) ∞ (Mfamily k)] (A : MetricFlowApproximation ginit Mfamily) |
| 29 | |
| 30 | /-- A chart's actual coefficients are spatially smooth wherever its |
| 31 | differential is defined, at every total time (Theorem 12.5, p. 297). -/ |
| 32 | theorem contDiffOn_coefficients_slice (k : ℕ) (t : ℝ) : |
| 33 | ContDiffOn ℝ ∞ (A.coefficients k t) (A.source k) := by |
| 34 | intro x hx |
| 35 | exact (((A.flow k).metric t).contDiffAt_pullbackCoefficients |
| 36 | ((A.chart_smooth k).contMDiffAt |
| 37 | ((A.source_isOpen k).mem_nhds hx))).contDiffWithinAt |
| 38 | |
| 39 | /-- At each authorized point a global Euclidean metric realizes the |
| 40 | two-jet and retains the compact approximation's full curvature bound |
| 41 | (Theorem 12.5, p. 297). -/ |
| 42 | theorem exists_metric_twoJet_realization (k : ℕ) {t : ℝ} (ht : t ∈ Icc 0 A.time) |
| 43 | {x : StandardCapSpace} (hx : x ∈ A.source k) : |
| 44 | ∃ (g : RiemannianMetric 3 StandardCapSpace) (D : LeviCivitaData g), |
| 45 | metricTwoJet g.euclideanCoefficients x = metricTwoJet (A.coefficients k t) x ∧ |
| 46 | D.curvatureTensorNorm x ≤ A.curvature_bound 0 := by |
| 47 | obtain ⟨g, D, V, hV, hxV, hVU, heq⟩ := RiemannianMetric.exists_local_realization |
| 48 | (A.source_isOpen k) hx (A.coefficients k t) |
| 49 | (A.contDiffOn_coefficients_slice k t) |
| 50 | (fun _ _ _ _ => ((A.flow k).metric t).symm _ _ _) (fun y hy v hv => by |
| 51 | apply ((A.flow k).metric t).pos |
| 52 | intro hz |
| 53 | apply hv |
| 54 | apply (A.chart_invertible k _ hy).injective |
| 55 | rw [map_zero] |
| 56 | convert! hz using 1) |
| 57 | refine ⟨g, D, ?_, ?_⟩ |
| 58 | · apply metricTwoJet_congr_of_eventuallyEq |
| 59 | filter_upwards [hV.mem_nhds hxV] with y hy |
| 60 | exact heq y hy |
| 61 | · have hnorm := D.curvatureTensorNorm_eq_of_local_isometry ((A.flow k).connection t) |
| 62 | hV ((A.chart_smooth k).mono hVU) |
| 63 | (fun y hy u v => congrArg (fun B => B u v) (heq y hy)) hxV |
| 64 | rw [hnorm] |
| 65 | exact A.full_curvature_le k ht _ |
| 66 | |
| 67 | end PoincareMT.M34.MetricFlowApproximation |