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 Mathlib.Geometry.Manifold.Riemannian.Basic |
| 2 | import PoincareLib.Geometry.Manifold.ZeroDimensional |
| 3 | |
| 4 | /-! |
| 5 | # Smooth carriers for pointed flows |
| 6 | |
| 7 | The carrier and tangent-space declarations are unchanged from the reviewed |
| 8 | snapshot in `contracts/definitions/ricci-flow/PointedRicciFlowCompactness.lean`, |
| 9 | from Mapher06/Poincare-MorganTian at |
| 10 | `b2c3c64781fee22edfd683a224d4f8d280e2e9ce`. |
| 11 | They are separated from the metric and flow definitions so purely topological |
| 12 | constructions do not depend on curvature theory. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | /-- A possibly varying smooth carrier for a generalized Ricci flow. -/ |
| 24 | structure FlowCarrier (n : ℕ) where |
| 25 | carrier : Type u |
| 26 | topologicalSpace : TopologicalSpace carrier |
| 27 | measurableSpace : MeasurableSpace carrier |
| 28 | borelSpace : @BorelSpace carrier topologicalSpace measurableSpace |
| 29 | chartedSpace : ChartedSpace (EuclideanSpace ℝ (Fin n)) carrier |
| 30 | isManifold : IsManifold (𝓡 n) ∞ carrier |
| 31 | t2Space : T2Space carrier |
| 32 | t3Space : T3Space carrier |
| 33 | secondCountable : SecondCountableTopology carrier |
| 34 | connected : IsConnected (Set.univ : Set carrier) |
| 35 | |
| 36 | abbrev FlowCarrier.tangent {n : ℕ} (C : FlowCarrier n) (x : C.carrier) := |
| 37 | @TangentSpace ℝ _ (EuclideanSpace ℝ (Fin n)) _ _ (EuclideanSpace ℝ (Fin n)) _ (𝓡 n) C.carrier |
| 38 | C.topologicalSpace C.chartedSpace x |
| 39 | |
| 40 | /-- Connected zero-dimensional flow carriers have at most one point. -/ |
| 41 | theorem FlowCarrier.subsingleton_zero (C : FlowCarrier 0) : Subsingleton C.carrier := by |
| 42 | let : TopologicalSpace C.carrier := C.topologicalSpace |
| 43 | let : ChartedSpace (EuclideanSpace ℝ (Fin 0)) C.carrier := C.chartedSpace |
| 44 | let : PreconnectedSpace C.carrier := ⟨C.connected.isPreconnected⟩ |
| 45 | exact Poincare.subsingleton_of_preconnected_euclidean_zero C.carrier |
| 46 | |
| 47 | end PoincareMT |