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.Compactness.GeometricLimit.Stages.SpacetimeEmbedding |
| 2 | |
| 3 | /-! |
| 4 | # Pointed Ricci-flow compactness in dimension zero |
| 5 | |
| 6 | Every connected zero-dimensional carrier is a single point. The first flow |
| 7 | therefore supplies a geometric limit for the whole sequence, with the full |
| 8 | carrier as every exhaustion stage. Its metrics are complete at every time. |
| 9 | This is the dimension-zero case of Morgan--Tian, Theorem 5.15, pp. 91--92. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff Topology |
| 16 | |
| 17 | namespace PoincareMT |
| 18 | |
| 19 | /-- Every Riemannian metric on a connected zero-dimensional carrier is complete. -/ |
| 20 | theorem FlowCarrier.metricComplete_of_dimension_zero (C : FlowCarrier 0) (g : C.metric) : |
| 21 | C.metricComplete g := by |
| 22 | let : Subsingleton C.carrier := C.subsingleton_zero |
| 23 | unfold FlowCarrier.metricComplete |
| 24 | infer_instance |
| 25 | |
| 26 | /-- The first flow of a zero-dimensional sequence is a pointed geometric limit |
| 27 | of the entire sequence. -/ |
| 28 | noncomputable def PointedFlowSequence.geometricConvergence_zero |
| 29 | {T' T : ℝ} (S : PointedFlowSequence 0 T' T) : PointedGeometricConvergence S := by |
| 30 | let : ∀ k, TopologicalSpace (S.carrier k).carrier := fun k => (S.carrier k).topologicalSpace |
| 31 | let : ∀ k, ChartedSpace (EuclideanSpace ℝ (Fin 0)) (S.carrier k).carrier := |
| 32 | fun k => (S.carrier k).chartedSpace |
| 33 | let : ∀ k, IsManifold (𝓡 0) ∞ (S.carrier k).carrier := fun k => (S.carrier k).isManifold |
| 34 | let : ∀ k, Subsingleton (S.carrier k).carrier := fun k => (S.carrier k).subsingleton_zero |
| 35 | let e : ∀ k, (S.carrier 0).carrier ≃ₘ⟮𝓡 0, 𝓡 0⟯ (S.carrier k).carrier := fun k => |
| 36 | { toEquiv := |
| 37 | { toFun := fun _ => (S.flow k).base |
| 38 | invFun := fun _ => (S.flow 0).base |
| 39 | left_inv := fun _ => Subsingleton.elim _ _ |
| 40 | right_inv := fun _ => Subsingleton.elim _ _ } |
| 41 | contMDiff_toFun := contMDiff_const |
| 42 | contMDiff_invFun := contMDiff_const } |
| 43 | have hemb (k : ℕ) : Topology.IsOpenEmbedding |
| 44 | (fun x : (univ : Set (S.carrier 0).carrier) => e k x) := |
| 45 | (e k).toHomeomorph.isOpenEmbedding.comp isOpen_univ.isOpenEmbedding_subtypeVal |
| 46 | have hsmooth (k : ℕ) : IsLocalDiffeomorphOn (𝓡 0) (𝓡 0) ∞ (e k) univ := |
| 47 | (e k).isLocalDiffeomorph.isLocalDiffeomorphOn univ |
| 48 | refine |
| 49 | { limitCarrier := S.carrier 0 |
| 50 | limitFlow := S.flow 0 |
| 51 | subsequence := id |
| 52 | subsequence_strictMono := strictMono_id |
| 53 | exhaustion := fun _ => univ |
| 54 | exhaustion_open := fun _ => isOpen_univ |
| 55 | exhaustion_connected := fun _ => (S.carrier 0).connected |
| 56 | exhaustion_compactClosure := fun _ => by simpa only [closure_univ] using isCompact_univ |
| 57 | exhaustion_increasing := fun _ => subset_rfl |
| 58 | exhaustion_covers := iUnion_const univ |
| 59 | embedding := fun k => SmoothSpacetimeEmbedding.of_spatial (S.flow 0) (S.flow k) |
| 60 | isOpen_univ (e k) (hemb k) (hsmooth k) (Ioo T' T) |
| 61 | base_in_exhaustion := fun _ => mem_univ _ |
| 62 | base_preserving := fun _ => rfl |
| 63 | pullback_metric_converges := ?_ |
| 64 | pullback_metric_CInfinity := ?_ } |
| 65 | · intro j K I _ _ _ _ ε hε |
| 66 | refine ⟨j, le_rfl, ?_⟩ |
| 67 | intro k _ t _ x _ v w _ _ |
| 68 | have hv : v = 0 := @Subsingleton.elim (EuclideanSpace ℝ (Fin 0)) _ v 0 |
| 69 | simpa only [pullbackInnerValue, FlowCarrier.metricInner, hv, map_zero, zero_apply, |
| 70 | sub_self, abs_zero] using hε |
| 71 | · intro q j r K _ _ ε _ |
| 72 | refine ⟨j, le_rfl, ?_⟩ |
| 73 | intro k _ a |
| 74 | exact a.elim0 |
| 75 | |
| 76 | /-- The frozen pointed compactness conclusion holds in dimension zero without |
| 77 | additional chart or analytic assumptions. -/ |
| 78 | theorem pointedRicciFlowCompactness_zero |
| 79 | {T' T : ℝ} (H : PointedRicciFlowCompactnessHypotheses 0 T' T) : |
| 80 | Nonempty (PointedRicciFlowCompactnessConclusion H) := by |
| 81 | refine ⟨{ geometric_limit := H.sequence.geometricConvergence_zero |
| 82 | complete_interior := ?_ }⟩ |
| 83 | intro t _ |
| 84 | exact (H.sequence.carrier 0).metricComplete_of_dimension_zero |
| 85 | ((H.sequence.flow 0).metricAt t) |
| 86 | |
| 87 | end PoincareMT |