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.Curvature.Calculus |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.AncientVolume.Splitting.SelectedLine |
| 3 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.AncientVolume.Splitting.SmallRescaledLimit |
| 4 | |
| 5 | /-! |
| 6 | # Selected lines through the actual shrinking equivalence |
| 7 | |
| 8 | Distance distortion constructs earlier minimizing segments in the original |
| 9 | source universe. Their actual images under the shrinking diffeomorphism have |
| 10 | the same distances, endpoint cosines, and corresponding-side inequalities. |
| 11 | They therefore give a line in the same previously constructed ancient limit, |
| 12 | including after a further source subsequence. Curvature theory is required |
| 13 | only in the original universe. |
| 14 | |
| 15 | References: Kleiner--Lott (corrected 2013), Proposition 41.13, p. 2678, |
| 16 | and Appendix G, p. 2852; Morgan--Tian, arXiv math/0607607v2, |
| 17 | Theorem 5.35, pp. 122--123. |
| 18 | -/ |
| 19 | |
| 20 | noncomputable section |
| 21 | set_option autoImplicit false |
| 22 | set_option backward.isDefEq.respectTransparency false |
| 23 | |
| 24 | open Set Filter |
| 25 | open scoped Manifold ContDiff Topology |
| 26 | |
| 27 | universe u |
| 28 | |
| 29 | namespace PoincareMT.RicciFlow |
| 30 | |
| 31 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 32 | FlowCarrier.isManifold |
| 33 | attribute [local instance] smallCarrier smallChartedSpace smallIsManifold |
| 34 | |
| 35 | set_option maxHeartbeats 600000 in |
| 36 | /-- Terminal segments in the original universe give a minimizing line in the |
| 37 | same buffered limit of the actual shrunk flows. Earlier segments and their |
| 38 | cosine limit are constructed in the original flow, then transported by the |
| 39 | shrinking diffeomorphism. Earlier corresponding-side comparison remains explicit. -/ |
| 40 | theorem exists_isometric_line_of_small_selected_terminal_segments |
| 41 | {m : ℕ} {M : Type u} [TopologicalSpace M] [T3Space M] |
| 42 | [SecondCountableTopology M] [ConnectedSpace M] [MeasurableSpace M] [BorelSpace M] |
| 43 | [ChartedSpace (EuclideanSpace ℝ (Fin (m + 1))) M] [IsManifold (𝓡 (m + 1)) ∞ M] |
| 44 | (hC : RicciFlowCurvatureCalculus.{u}) (hm : 0 < m) |
| 45 | (J : ℕ → Set ℝ) (F : ∀ i, RicciFlow (m + 1) M (J i)) |
| 46 | {δ Λ scale : ℝ} (hδ : 0 < δ) (hΛ : 0 ≤ Λ) (hscale : 0 < scale) |
| 47 | (hpast : ∀ i a, Icc a 0 ⊆ J i) |
| 48 | (hJ : ∀ i, Icc (-δ) 0 ⊆ interior (J i)) |
| 49 | (hcomplete : ∀ i t, t ∈ Icc (-δ) 0 → MetricComplete ((F i).metric t)) |
| 50 | (hRic : ∀ i t, t ∈ Icc (-δ) 0 → ∀ x : M, ∀ v : TangentSpace (𝓡 (m + 1)) x, |
| 51 | 0 ≤ ((F i).connection t).ricci x v v) |
| 52 | (q : ℕ → M) (L : ℕ → ℝ) |
| 53 | (hupper : ∀ i t, t ∈ Icc (-δ) 0 → ∀ z ∈ ((F i).metric 0).ball (q i) (L i), |
| 54 | ∀ v : TangentSpace (𝓡 (m + 1)) z, |
| 55 | ((F i).connection t).ricci z v v ≤ Λ * ((F i).metric t).inner z v v) |
| 56 | (G : AncientPointedGeometricConvergence |
| 57 | (fun _ => (FlowCarrier.ofConnectedManifold (m + 1) M).shrink) |
| 58 | (fun i t => (F i).shrink.metric (t - δ)) (fun i => equivShrink M (q i)) δ) |
| 59 | (hGcomplete : G.limitCarrier.metricComplete (G.limitFlow.metric 0)) |
| 60 | (σ : ℕ → ℕ) (hσ : StrictMono σ) |
| 61 | (r : ℕ → ℝ) (hr : ∀ i, 0 < r i) |
| 62 | (hmargin : ∀ i, 4 * Real.exp (Λ * δ) * r i ≤ L (G.subsequence (σ i))) |
| 63 | (minus plus : ℕ → ℝ → M) (a b : ℕ → ℝ) |
| 64 | (ha : ∀ i, 0 < a i) (hb : ∀ i, 0 < b i) |
| 65 | (hminus0 : ∀ i, minus i 0 = q (G.subsequence (σ i))) |
| 66 | (hplus0 : ∀ i, plus i 0 = q (G.subsequence (σ i))) |
| 67 | (hminus : ∀ i, ∀ s ∈ Icc (0 : ℝ) (a i), ∀ t ∈ Icc (0 : ℝ) (a i), |
| 68 | (((F (G.subsequence (σ i))).metric 0).edist (minus i s) (minus i t)).toReal = |s - t|) |
| 69 | (hplus : ∀ i, ∀ s ∈ Icc (0 : ℝ) (b i), ∀ t ∈ Icc (0 : ℝ) (b i), |
| 70 | (((F (G.subsequence (σ i))).metric 0).edist (plus i s) (plus i t)).toReal = |s - t|) |
| 71 | (hx : ∀ i, minus i (a i) ∈ |
| 72 | ((F (G.subsequence (σ i))).metric 0).ball (q (G.subsequence (σ i))) (r i)) |
| 73 | (hy : ∀ i, plus i (b i) ∈ |
| 74 | ((F (G.subsequence (σ i))).metric 0).ball (q (G.subsequence (σ i))) (r i)) |
| 75 | (haTop : Tendsto a atTop atTop) (hbTop : Tendsto b atTop atTop) |
| 76 | (hcos : Tendsto (fun i => |
| 77 | (a i ^ 2 + b i ^ 2 - (((F (G.subsequence (σ i))).metric 0).edist |
| 78 | (minus i (a i)) (plus i (b i))).toReal ^ 2) / (2 * a i * b i)) atTop (𝓝 (-1))) |
| 79 | (hcomparison : ∀ i (u v : ℝ → M) (A B : ℝ), 0 < A → 0 < B → |
| 80 | u 0 = q (G.subsequence (σ i)) → v 0 = q (G.subsequence (σ i)) → |
| 81 | (∀ s ∈ Icc (0 : ℝ) A, ∀ t ∈ Icc (0 : ℝ) A, |
| 82 | (((F (G.subsequence (σ i))).metric (-δ)).edist (u s) (u t)).toReal = |s - t|) → |
| 83 | (∀ s ∈ Icc (0 : ℝ) B, ∀ t ∈ Icc (0 : ℝ) B, |
| 84 | (((F (G.subsequence (σ i))).metric (-δ)).edist (v s) (v t)).toReal = |s - t|) → |
| 85 | ∀ s ∈ Icc (0 : ℝ) A, ∀ t ∈ Icc (0 : ℝ) B, |
| 86 | s ^ 2 + t ^ 2 - 2 * s * t * |
| 87 | ((A ^ 2 + B ^ 2 - (((F (G.subsequence (σ i))).metric (-δ)).edist |
| 88 | (u A) (v B)).toReal ^ 2) / (2 * A * B)) ≤ |
| 89 | (((F (G.subsequence (σ i))).metric (-δ)).edist (u s) (v t)).toReal ^ 2) : |
| 90 | letI := G.limitCarrier.metricSpaceOf (G.limitFlow.metric 0) |
| 91 | ∃ gamma : ℝ → G.limitCarrier.carrier, Isometry gamma ∧ gamma 0 = G.base := by |
| 92 | obtain ⟨hAB, hATop, hBTop, hangle, u, v, hend, hu, hv⟩ := |
| 93 | exists_buffered_opposite_minimizing_segments hC hm |
| 94 | (fun i => J (G.subsequence (σ i))) (fun i => F (G.subsequence (σ i))) |
| 95 | hδ hΛ hscale (fun i => hJ (G.subsequence (σ i))) |
| 96 | (fun i => hcomplete (G.subsequence (σ i))) (fun i => hRic (G.subsequence (σ i))) |
| 97 | (fun i => q (G.subsequence (σ i))) r (fun i => L (G.subsequence (σ i))) |
| 98 | hr hmargin (fun i => hupper (G.subsequence (σ i))) |
| 99 | minus plus a b ha hb hminus0 hplus0 hminus hplus hx hy haTop hbTop hcos |
| 100 | let A := fun i => (((F (G.subsequence (σ i))).metric (-δ)).edist |
| 101 | (q (G.subsequence (σ i))) (minus i (a i))).toReal |
| 102 | let B := fun i => (((F (G.subsequence (σ i))).metric (-δ)).edist |
| 103 | (q (G.subsequence (σ i))) (plus i (b i))).toReal |
| 104 | let us : ℕ → ℝ → Shrink.{0} M := fun i t => equivShrink M (u i t) |
| 105 | let vs : ℕ → ℝ → Shrink.{0} M := fun i t => equivShrink M (v i t) |
| 106 | have htime : ∀ c d : ℝ, d < δ → ∀ᶠ i in atTop, |
| 107 | Icc c d ⊆ (fun t : ℝ => t - δ) ⁻¹' J i := by |
| 108 | intro c d hd |
| 109 | exact Eventually.of_forall fun i t ht => |
| 110 | hpast i (c - δ) ⟨sub_le_sub_right ht.1 δ, by linarith [ht.2]⟩ |
| 111 | apply AncientPointedGeometricConvergence.exists_isometric_line_of_subsequence_opposite_segments |
| 112 | (C := fun _ => (FlowCarrier.ofConnectedManifold (m + 1) M).shrink) |
| 113 | (fun i => (F i).shrink.bufferedExpandingFlow δ) G hδ htime hGcomplete σ hσ us vs |
| 114 | (fun i => congrArg (equivShrink M) (hend i).1) |
| 115 | (fun i => congrArg (equivShrink M) (hend i).2.2.1) hATop hBTop |
| 116 | · intro i s hs t ht |
| 117 | change (((F (G.subsequence (σ i))).shrink.metric (0 - δ)).edist |
| 118 | (equivShrink M (u i s)) (equivShrink M (u i t))).toReal = |s - t| |
| 119 | rw [shrink_edist, Equiv.symm_apply_apply, Equiv.symm_apply_apply, zero_sub] |
| 120 | exact hu i s hs t ht |
| 121 | · intro i s hs t ht |
| 122 | change (((F (G.subsequence (σ i))).shrink.metric (0 - δ)).edist |
| 123 | (equivShrink M (v i s)) (equivShrink M (v i t))).toReal = |s - t| |
| 124 | rw [shrink_edist, Equiv.symm_apply_apply, Equiv.symm_apply_apply, zero_sub] |
| 125 | exact hv i s hs t ht |
| 126 | · change Tendsto (fun i => |
| 127 | (A i ^ 2 + B i ^ 2 - (((F (G.subsequence (σ i))).shrink.metric (0 - δ)).edist |
| 128 | (equivShrink M (u i (A i))) (equivShrink M (v i (B i)))).toReal ^ 2) / |
| 129 | (2 * A i * B i)) atTop (𝓝 (-1)) |
| 130 | simp only [shrink_edist, Equiv.symm_apply_apply, zero_sub] |
| 131 | simpa only [A, B, (hend _).2.1, (hend _).2.2.2] using hangle |
| 132 | · intro i s hs t ht |
| 133 | change s ^ 2 + t ^ 2 - 2 * s * t * |
| 134 | ((A i ^ 2 + B i ^ 2 - (((F (G.subsequence (σ i))).shrink.metric (0 - δ)).edist |
| 135 | (equivShrink M (u i (A i))) (equivShrink M (v i (B i)))).toReal ^ 2) / |
| 136 | (2 * A i * B i)) ≤ |
| 137 | (((F (G.subsequence (σ i))).shrink.metric (0 - δ)).edist |
| 138 | (equivShrink M (u i s)) (equivShrink M (v i t))).toReal ^ 2 |
| 139 | simp only [shrink_edist, Equiv.symm_apply_apply, zero_sub] |
| 140 | exact hcomparison i (u i) (v i) (A i) (B i) (hAB i).1 (hAB i).2.1 |
| 141 | (hend i).1 (hend i).2.2.1 (hu i) (hv i) s hs t ht |
| 142 | |
| 143 | end PoincareMT.RicciFlow |