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.Convergence |
| 2 | import PoincareLib.Topology.Sequences.Diagonal |
| 3 | |
| 4 | /-! |
| 5 | # Subsequences of pointed Ricci flows |
| 6 | |
| 7 | All frozen compactness hypotheses survive passage to a strictly increasing |
| 8 | subsequence. A geometric limit of that subsequence is a geometric limit of |
| 9 | the original sequence, with exactly the same limit flow and exhaustion. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | namespace PoincareMT |
| 15 | |
| 16 | namespace PointedFlowSequence |
| 17 | |
| 18 | /-- Reindex a sequence without changing any of its pointed flows. -/ |
| 19 | def subsequence {n : ℕ} {T' T : ℝ} (S : PointedFlowSequence n T' T) |
| 20 | (φ : ℕ → ℕ) : PointedFlowSequence n T' T where |
| 21 | carrier k := S.carrier (φ k) |
| 22 | flow k := S.flow (φ k) |
| 23 | |
| 24 | end PointedFlowSequence |
| 25 | |
| 26 | namespace PointedRicciFlowCompactnessHypotheses |
| 27 | |
| 28 | /-- The eventual compactness, curvature, and volume hypotheses are preserved |
| 29 | by a strictly increasing reindexing. -/ |
| 30 | def subsequence {n : ℕ} {T' T : ℝ} |
| 31 | (H : PointedRicciFlowCompactnessHypotheses n T' T) |
| 32 | (φ : ℕ → ℕ) (hφ : StrictMono φ) : |
| 33 | PointedRicciFlowCompactnessHypotheses n T' T where |
| 34 | time_bounds := H.time_bounds |
| 35 | sequence := H.sequence.subsequence φ |
| 36 | volume_compatibility k := H.volume_compatibility (φ k) |
| 37 | zero_time_ball_compact A hA := hφ.tendsto_atTop.eventually (H.zero_time_ball_compact A hA) |
| 38 | spacetime_control A hA I hI hIc hI0 hIt := by |
| 39 | obtain ⟨K, hK, he⟩ := H.spacetime_control A hA I hI hIc hI0 hIt |
| 40 | exact ⟨K, hK, hφ.tendsto_atTop.eventually he⟩ |
| 41 | all_time_curvature_control A hA := by |
| 42 | obtain ⟨K, hK, hbound⟩ := H.all_time_curvature_control A hA |
| 43 | exact ⟨K, hK, hφ.tendsto_atTop.eventually hbound⟩ |
| 44 | noncollapsing := by |
| 45 | obtain ⟨r, κ, hr, hκ, hvolume⟩ := H.noncollapsing |
| 46 | exact ⟨r, κ, hr, hκ, hφ.tendsto_atTop.eventually hvolume⟩ |
| 47 | |
| 48 | end PointedRicciFlowCompactnessHypotheses |
| 49 | |
| 50 | namespace PointedGeometricConvergence |
| 51 | |
| 52 | /-- Compose subsequences while preserving all convergence and embedding data. -/ |
| 53 | def ofSubsequence {n : ℕ} {T' T : ℝ} {S : PointedFlowSequence n T' T} |
| 54 | {φ : ℕ → ℕ} (hφ : StrictMono φ) |
| 55 | (L : PointedGeometricConvergence (S.subsequence φ)) : |
| 56 | PointedGeometricConvergence S where |
| 57 | limitCarrier := L.limitCarrier |
| 58 | limitFlow := L.limitFlow |
| 59 | subsequence := φ ∘ L.subsequence |
| 60 | subsequence_strictMono := hφ.comp L.subsequence_strictMono |
| 61 | exhaustion := L.exhaustion |
| 62 | exhaustion_open := L.exhaustion_open |
| 63 | exhaustion_connected := L.exhaustion_connected |
| 64 | exhaustion_compactClosure := L.exhaustion_compactClosure |
| 65 | exhaustion_increasing := L.exhaustion_increasing |
| 66 | exhaustion_covers := L.exhaustion_covers |
| 67 | embedding := L.embedding |
| 68 | base_in_exhaustion := L.base_in_exhaustion |
| 69 | base_preserving := L.base_preserving |
| 70 | pullback_metric_converges := L.pullback_metric_converges |
| 71 | pullback_metric_CInfinity := L.pullback_metric_CInfinity |
| 72 | |
| 73 | end PointedGeometricConvergence |
| 74 | |
| 75 | /-- Completeness is unchanged when a subsequential limit is regarded as a |
| 76 | limit of the original sequence. -/ |
| 77 | def PointedRicciFlowCompactnessConclusion.ofSubsequence |
| 78 | {n : ℕ} {T' T : ℝ} {H : PointedRicciFlowCompactnessHypotheses n T' T} |
| 79 | {φ : ℕ → ℕ} {hφ : StrictMono φ} |
| 80 | (L : PointedRicciFlowCompactnessConclusion (H.subsequence φ hφ)) : |
| 81 | PointedRicciFlowCompactnessConclusion H where |
| 82 | geometric_limit := L.geometric_limit.ofSubsequence hφ |
| 83 | complete_interior := L.complete_interior |
| 84 | |
| 85 | end PoincareMT |