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.Soliton.ThreeDimensional.Noncompact.Rigidity.Levels.Graphs.Embeddings |
| 2 | import PoincareLib.Geometry.RicciFlow.Soliton.ThreeDimensional.Noncompact.Rigidity.Levels.Graph.Metric |
| 3 | |
| 4 | /-! # Actual embedded potential level graphs -/ |
| 5 | |
| 6 | noncomputable section |
| 7 | set_option autoImplicit false |
| 8 | set_option backward.isDefEq.respectTransparency false |
| 9 | |
| 10 | open Set Filter Function |
| 11 | open scoped Manifold ContDiff Bundle Topology |
| 12 | |
| 13 | universe u |
| 14 | |
| 15 | namespace PoincareMT.ShrinkingSolitonFlow |
| 16 | |
| 17 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 18 | FlowCarrier.isManifold FlowCarrier.t3Space |
| 19 | attribute [local instance] RicciFlow.smallCarrier RicciFlow.smallChartedSpace |
| 20 | RicciFlow.smallIsManifold |
| 21 | |
| 22 | variable {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 24 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 25 | [SecondCountableTopology M] [ConnectedSpace M] |
| 26 | {S : GradientShrinkingSolitonData 3 M} (G : ShrinkingSolitonFlow S) {q : ℕ → M} |
| 27 | (L : AncientPointedGeometricConvergence |
| 28 | (fun _ => AncientRescalingSequence.smallRescalingCarrier (M := M)) |
| 29 | (fun _ => G.unscaledSourceFlow.shrink.metric) |
| 30 | (fun k => equivShrink M (q k)) 1) |
| 31 | (B : G.NormalizedPotentialLimit L) |
| 32 | {N : Type*} [TopologicalSpace N] |
| 33 | [ChartedSpace (EuclideanSpace ℝ (Fin 2)) N] [IsManifold (𝓡 2) ∞ N] |
| 34 | |
| 35 | /-- A graph in product coordinates, mapped by the retained source embedding. -/ |
| 36 | def potentialLevelGraphMap |
| 37 | (e : (N × ℝ) ≃ₘ⟮(𝓡 2).prod 𝓘(ℝ, ℝ), 𝓡 3⟯ L.limitCarrier.carrier) |
| 38 | (u : N → ℝ) (k : ℕ) (y : N) : M := |
| 39 | G.unscaledOriginalEmbedding L (B.subsequence k) (e (y, u y)) |
| 40 | |
| 41 | variable [T3Space N] [MeasurableSpace N] [BorelSpace N] |
| 42 | |
| 43 | /-- The metrics and maps retain the exact source embedding and index. |
| 44 | The offset discards the finite initial segment before the slab is embedded. -/ |
| 45 | structure PotentialLevelGraphs |
| 46 | (h : RiemannianMetric 2 N) |
| 47 | (e : (N × ℝ) ≃ₘ⟮(𝓡 2).prod 𝓘(ℝ, ℝ), 𝓡 3⟯ L.limitCarrier.carrier) |
| 48 | (base : N) where |
| 49 | offset : ℕ |
| 50 | height : ℕ → N → ℝ |
| 51 | height_contMDiff : ∀ k, ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) ∞ (height k) |
| 52 | height_mem : ∀ k y, height k y ∈ Ioo (-1) 1 |
| 53 | height_base : ∀ k, height k base = 0 |
| 54 | graph_mem : ∀ k y, e (y, height k y) ∈ L.exhaustion (B.subsequence (k + offset)) |
| 55 | graph_level : ∀ k y, |
| 56 | S.potential (G.potentialLevelGraphMap L B e (height k) (k + offset) y) = |
| 57 | S.potential (q (L.subsequence (B.subsequence (k + offset)))) |
| 58 | graph_contMDiff : ∀ k, ContMDiff (𝓡 2) (𝓡 3) ∞ |
| 59 | (G.potentialLevelGraphMap L B e (height k) (k + offset)) |
| 60 | graph_injective : ∀ k, Injective (G.potentialLevelGraphMap L B e (height k) (k + offset)) |
| 61 | graph_immersion : ∀ k y, Injective (mfderiv (𝓡 2) (𝓡 3) |
| 62 | (G.potentialLevelGraphMap L B e (height k) (k + offset)) y) |
| 63 | metric : ℕ → RiemannianMetric 2 N |
| 64 | metric_inner : ∀ k y (v w : TangentSpace (𝓡 2) y), |
| 65 | (metric k).inner y v w = |
| 66 | S.metric.inner (G.potentialLevelGraphMap L B e (height k) (k + offset) y) |
| 67 | (mfderiv (𝓡 2) (𝓡 3) (G.potentialLevelGraphMap L B e (height k) (k + offset)) y v) |
| 68 | (mfderiv (𝓡 2) (𝓡 3) (G.potentialLevelGraphMap L B e (height k) (k + offset)) y w) |
| 69 | height_tendsto_C1 : ∀ δ > 0, ∀ᶠ k in atTop, |
| 70 | (∀ y, |height k y| ≤ δ) ∧ ∀ y (v : TangentSpace (𝓡 2) y), |
| 71 | |mvfderiv (𝓡 2) (height k) y v| ≤ δ * h.tangentNorm y v |
| 72 | area_tendsto : Tendsto (fun k => (metric k).volumeMeasure.real univ) atTop |
| 73 | (𝓝 (h.volumeMeasure.real univ)) |
| 74 | |
| 75 | namespace PotentialLevelGraphs |
| 76 | |
| 77 | variable {G L B} {h : RiemannianMetric 2 N} |
| 78 | {e : (N × ℝ) ≃ₘ⟮(𝓡 2).prod 𝓘(ℝ, ℝ), 𝓡 3⟯ L.limitCarrier.carrier} |
| 79 | {base : N} (A : G.PotentialLevelGraphs L B h e base) |
| 80 | |
| 81 | def map (k : ℕ) : N → M := |
| 82 | G.potentialLevelGraphMap L B e (A.height k) (k + A.offset) |
| 83 | |
| 84 | theorem map_base (hebase : e (base, 0) = L.base) (k : ℕ) : |
| 85 | A.map k base = q (L.subsequence (B.subsequence (k + A.offset))) := by |
| 86 | change G.unscaledOriginalEmbedding L (B.subsequence (k + A.offset)) |
| 87 | (e (base, A.height k base)) = _ |
| 88 | rw [A.height_base, hebase, G.unscaledOriginalEmbedding_base] |
| 89 | |
| 90 | theorem range_isCompact [CompactSpace N] (k : ℕ) : IsCompact (range (A.map k)) := |
| 91 | isCompact_range (A.graph_contMDiff k).continuous |
| 92 | |
| 93 | end PotentialLevelGraphs |
| 94 | |
| 95 | end PoincareMT.ShrinkingSolitonFlow |