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.ReducedGeometry.ReducedVolume.Metric.Comparison.SmoothMetric |
| 2 | |
| 3 | /-! |
| 4 | # One-sided metric continuity at the terminal time |
| 5 | |
| 6 | The actual metric section is continuous within the supplied time window. |
| 7 | At its terminal endpoint this gives continuity in the fixed frame without |
| 8 | an extension of the flow beyond its domain. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open Bundle ContinuousLinearMap Filter Set |
| 14 | open scoped Manifold ContDiff Bundle Topology |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.ReducedVolume |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 22 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} |
| 23 | |
| 24 | set_option backward.isDefEq.respectTransparency false in |
| 25 | /-- The fixed-frame backward metric is continuous at zero within the closed time window. -/ |
| 26 | theorem backwardMetricCoordinates_continuousWithinAt_zero |
| 27 | (hT : T ∈ J) (hwindow : Icc (T - τmax) T ⊆ J) (p : M) : |
| 28 | ContinuousWithinAt (backwardMetricCoordinates F T p) |
| 29 | (univ ×ˢ Icc 0 τmax) (p, 0) := by |
| 30 | have hm := F.smooth.continuousOn (T, p) ⟨hT, mem_univ p⟩ |
| 31 | rw [continuousWithinAt_hom_bundle] at hm |
| 32 | have hc := hm.2 |
| 33 | have hc' : ContinuousWithinAt |
| 34 | (fun z : ℝ × M ↦ inCoordinates (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) |
| 35 | (EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 36 | (fun q ↦ TangentSpace (𝓡 n) q →L[ℝ] ℝ) |
| 37 | p z.2 p z.2 ((F.metric z.1).inner z.2)) |
| 38 | (J ×ˢ univ) (T - (0 : ℝ), p) := by |
| 39 | simpa only [sub_zero] using hc |
| 40 | apply hc'.comp (x := (p, 0)) |
| 41 | ((continuousAt_const.sub continuousAt_snd).prodMk continuousAt_fst).continuousWithinAt |
| 42 | intro z hz |
| 43 | refine ⟨hwindow ?_, mem_univ _⟩ |
| 44 | change T - τmax ≤ T - z.2 ∧ T - z.2 ≤ T |
| 45 | constructor <;> linarith [hz.2.1, hz.2.2] |
| 46 | |
| 47 | end PoincareMT.ReducedVolume |