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.ReducedLength.Theory |
| 2 | import Mathlib.Topology.Semicontinuity.Defs |
| 3 | |
| 4 | /-! |
| 5 | # Upper semicontinuity from touching reduced-length barriers |
| 6 | |
| 7 | This is the upper semicontinuity part of M10's regularity construction, |
| 8 | using the barriers of Morgan-Tian Proposition 7.8 toward Proposition 7.5. |
| 9 | Lower semicontinuity and local Lipschitz regularity remain separate steps. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 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 : ℝ} {p q : M} {τ : ℝ} |
| 23 | |
| 24 | /-- A genuine continuous touching upper barrier gives upper semicontinuity. -/ |
| 25 | theorem reducedLength_upperSemicontinuousAt_of_barrier |
| 26 | (B : ReducedLengthUpperBarrier F T p q τ) : |
| 27 | UpperSemicontinuousAt (fun z : M × ℝ ↦ reducedLength F T p z.1 z.2) (q, τ) := by |
| 28 | intro c hc |
| 29 | have hBc : B.representative (q, τ) < c := B.touches.trans_lt hc |
| 30 | have hnear := B.representative_spacetime_smooth.continuousAt |
| 31 | (eventually_lt_nhds hBc) |
| 32 | filter_upwards [B.neighborhood_open.mem_nhds B.center_mem, hnear] with z hz hzc |
| 33 | exact (B.dominates z hz).trans_lt hzc |
| 34 | |
| 35 | /-- M09 supplies a touching barrier at each interior point of spacetime. -/ |
| 36 | theorem reducedLength_upperSemicontinuousAt [ConnectedSpace M] |
| 37 | (hDifferential : ReducedLengthDifferentialTheory F T τmax) |
| 38 | (hτ : 0 < τ) (hmax : τ < τmax) : |
| 39 | UpperSemicontinuousAt (fun z : M × ℝ ↦ reducedLength F T p z.1 z.2) (q, τ) := by |
| 40 | obtain ⟨B, _⟩ := hDifferential.upper_barrier_extension p q τ hτ hmax 1 zero_lt_one |
| 41 | exact reducedLength_upperSemicontinuousAt_of_barrier B |
| 42 | |
| 43 | /-- Upper semicontinuity on the entire strict time window. -/ |
| 44 | theorem reducedLength_upperSemicontinuousOn [ConnectedSpace M] |
| 45 | (hDifferential : ReducedLengthDifferentialTheory F T τmax) (p : M) : |
| 46 | UpperSemicontinuousOn (fun z : M × ℝ ↦ reducedLength F T p z.1 z.2) |
| 47 | (Set.univ ×ˢ Set.Ioo 0 τmax) := by |
| 48 | intro z hz |
| 49 | exact UpperSemicontinuousAt.upperSemicontinuousWithinAt _ |
| 50 | (reducedLength_upperSemicontinuousAt hDifferential hz.2.1 hz.2.2) |
| 51 | |
| 52 | end PoincareMT.ReducedVolume |