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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.PartialLimits.Coordinates.MetricConvergence |
| 3 | |
| 4 | /-! |
| 5 | # Partial pointed flow convergence on an included time window |
| 6 | |
| 7 | The actual flow and every mixed within jet augment the spatial partial |
| 8 | limit on the same carrier. This fixed-window record retains time |
| 9 | endpoints and finite-radius source boundary control without asserting |
| 10 | completeness. It supports Morgan--Tian Definition 5.12 and Proposition |
| 11 | 5.14, pp. 90-91; see task derivation 09. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M28 |
| 22 | |
| 23 | /-- Actual partial convergence on one included time window, extending |
| 24 | the spatial limit at the included base time. This is the fixed-window |
| 25 | form used for Morgan--Tian Definition 5.12, pp. 90-91 (derivation 09). -/ |
| 26 | structure PartialPointedFlowConvergence {n : ℕ} {M : ℕ → Type u} |
| 27 | [∀ k, TopologicalSpace (M k)] |
| 28 | [∀ k, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M k)] |
| 29 | [∀ k, IsManifold (𝓡 n) ∞ (M k)] |
| 30 | {J : Set ℝ} (F : ∀ k, RicciFlow n (M k) J) |
| 31 | (p : ∀ k, M k) (A t₀ : ℝ) extends |
| 32 | PartialPointedMetricConvergence (fun k => (F k).metric t₀) p A where |
| 33 | /-- The spatial base time belongs to the specified flow interval. -/ |
| 34 | baseTime_mem : t₀ ∈ J |
| 35 | /-- A genuine Ricci flow on the same partial limit carrier. -/ |
| 36 | limitFlow : @RicciFlow n limitCarrier.carrier limitCarrier.topologicalSpace |
| 37 | limitCarrier.chartedSpace limitCarrier.isManifold J |
| 38 | /-- Its base-time metric is the metric of the spatial partial limit. -/ |
| 39 | metric_at_baseTime : letI := limitCarrier.topologicalSpace |
| 40 | letI := limitCarrier.chartedSpace |
| 41 | letI := limitCarrier.isManifold |
| 42 | limitFlow.metric t₀ = limitMetric |
| 43 | /-- Every actual mixed within jet converges in each chosen limit chart. -/ |
| 44 | spacetime_metric_jets : letI := limitCarrier.topologicalSpace |
| 45 | letI := limitCarrier.chartedSpace |
| 46 | letI := limitCarrier.isManifold |
| 47 | ∀ q m K, IsCompact K → K ⊆ J ×ˢ (extChartAt (𝓡 n) q).target → |
| 48 | TendstoUniformlyOn |
| 49 | (fun j => iteratedFDerivWithin ℝ m |
| 50 | (fun z : ℝ × EuclideanSpace ℝ (Fin n) => |
| 51 | ((F (subsequence j)).metric z.1).pullbackCoefficients |
| 52 | (embedding j ∘ (extChartAt (𝓡 n) q).symm) z.2) |
| 53 | (J ×ˢ (extChartAt (𝓡 n) q).target)) |
| 54 | (iteratedFDerivWithin ℝ m |
| 55 | (fun z : ℝ × EuclideanSpace ℝ (Fin n) => |
| 56 | (limitFlow.metric z.1).pullbackCoefficients (extChartAt (𝓡 n) q).symm z.2) |
| 57 | (J ×ˢ (extChartAt (𝓡 n) q).target)) atTop K |
| 58 | |
| 59 | /-- A partial flow limit of a strict subsequence is a limit of the |
| 60 | original source sequence, retaining all included-time jets |
| 61 | (Morgan--Tian Definition 5.12, pp. 90-91; derivation 09). -/ |
| 62 | noncomputable def PartialPointedFlowConvergence.reindex |
| 63 | {n : ℕ} {M : ℕ → Type u} [∀ k, TopologicalSpace (M k)] |
| 64 | [∀ k, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M k)] |
| 65 | [∀ k, IsManifold (𝓡 n) ∞ (M k)] |
| 66 | {J : Set ℝ} {F : ∀ k, RicciFlow n (M k) J} |
| 67 | {p : ∀ k, M k} {A t₀ : ℝ} {φ : ℕ → ℕ} (hφ : StrictMono φ) |
| 68 | (G : PartialPointedFlowConvergence (fun k => F (φ k)) (fun k => p (φ k)) A t₀) : |
| 69 | PartialPointedFlowConvergence F p A t₀ where |
| 70 | toPartialPointedMetricConvergence := G.toPartialPointedMetricConvergence.reindex hφ |
| 71 | baseTime_mem := G.baseTime_mem |
| 72 | limitFlow := G.limitFlow |
| 73 | metric_at_baseTime := G.metric_at_baseTime |
| 74 | spacetime_metric_jets := G.spacetime_metric_jets |
| 75 | |
| 76 | end PoincareMT.M28 |