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.Tube.IntrinsicGeometry.IntrinsicCompactSegment |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.IntrinsicGeometry.IntrinsicLocalPaths |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.IntrinsicGeometry.IntrinsicSplicing |
| 5 | import Mathlib.Topology.UnitInterval |
| 6 | |
| 7 | /-! |
| 8 | # A C1 intrinsic minimizer from confined competitors |
| 9 | |
| 10 | For Claims 10.3--10.4 of Morgan--Tian, printed pp. 248-250, the compact |
| 11 | metric segment is replaced along a finite interval subdivision by actual |
| 12 | local minimizing geodesics. Exact-length C1 splicing gives the region |
| 13 | minimizer needed for relative A.8. No affine geodesic regularity of the |
| 14 | extracted segment is assumed or claimed. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Topology ENNReal Bundle unitInterval |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.M28 |
| 26 | |
| 27 | variable {M : Type u} [TopologicalSpace M] [T2Space M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 29 | [IsManifold (𝓡 3) ∞ M] |
| 30 | |
| 31 | /-- A region metric segment gives a C1 minimizer by finite exact-length |
| 32 | splicing of the actual local minimizing paths. -/ |
| 33 | theorem exists_intrinsic_minimizer_of_metric_segment (g : RiemannianMetric 3 M) |
| 34 | (U : TopologicalSpace.Opens M) {p q : M} {η : ℝ → M} |
| 35 | (hη0 : η 0 = p) (hη1 : η 1 = q) |
| 36 | (hη : ContinuousOn η (Icc (0 : ℝ) 1)) |
| 37 | (hηU : MapsTo η (Icc (0 : ℝ) 1) (U : Set M)) |
| 38 | (hsegment : ∀ s ∈ Icc (0 : ℝ) 1, ∀ t ∈ Icc (0 : ℝ) 1, |
| 39 | intrinsicEDist g (U : Set M) (η s) (η t) = |
| 40 | ENNReal.ofReal |s - t| * intrinsicEDist g (U : Set M) p q) : |
| 41 | ∃ γ : ℝ → M, γ 0 = p ∧ γ 1 = q ∧ |
| 42 | ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 γ (Icc (0 : ℝ) 1) ∧ |
| 43 | MapsTo γ (Icc (0 : ℝ) 1) (U : Set M) ∧ |
| 44 | g.pathELength γ 0 1 = intrinsicEDist g (U : Set M) p q := by |
| 45 | classical |
| 46 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 47 | ⟨g.toRiemannianMetric⟩ |
| 48 | choose W hWopen hxW hWU hpaths using fun x : U => |
| 49 | exists_open_intrinsic_minimizing_paths g U.isOpen x.property |
| 50 | let c (x : U) : Set unitInterval := (fun t : unitInterval => η t) ⁻¹' W x |
| 51 | have hcopen (x : U) : IsOpen (c x) := (hWopen x).preimage hη.domRestrict |
| 52 | have hcover : (univ : Set unitInterval) ⊆ ⋃ x : U, c x := by |
| 53 | intro t _ |
| 54 | exact mem_iUnion.mpr ⟨⟨η t, hηU t.property⟩, hxW _⟩ |
| 55 | obtain ⟨t, ht0, hmono, ⟨n, hn⟩, hsub⟩ := |
| 56 | exists_monotone_Icc_subset_open_cover_unitInterval hcopen hcover |
| 57 | let D := intrinsicEDist g (U : Set M) p q |
| 58 | have hpaths' (k : ℕ) : ∃ γ : ℝ → M, γ 0 = p ∧ γ 1 = η (t k) ∧ |
| 59 | ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 γ (Icc (0 : ℝ) 1) ∧ |
| 60 | MapsTo γ (Icc (0 : ℝ) 1) (U : Set M) ∧ |
| 61 | g.pathELength γ 0 1 = ENNReal.ofReal (t k : ℝ) * D := by |
| 62 | induction k with |
| 63 | | zero => |
| 64 | refine ⟨fun _ => p, rfl, ?_, contMDiff_const.contMDiffOn, ?_, ?_⟩ |
| 65 | · simpa only [ht0, Set.Icc.coe_zero] using hη0.symm |
| 66 | · intro s _ |
| 67 | exact hη0 ▸ hηU (by norm_num) |
| 68 | · simp [ht0, RiemannianMetric.pathELength, Manifold.pathELength] |
| 69 | | succ k ih => |
| 70 | obtain ⟨α, hα0, hα1, hα, hαU, hαlength⟩ := ih |
| 71 | obtain ⟨x, hx⟩ := hsub k |
| 72 | have hleft : η (t k) ∈ W x := hx ⟨le_rfl, hmono (Nat.le_succ k)⟩ |
| 73 | have hright : η (t (k + 1)) ∈ W x := hx ⟨hmono (Nat.le_succ k), le_rfl⟩ |
| 74 | obtain ⟨β, hβ0, hβ1, hβ, hβU, hβlength⟩ := hpaths x _ hleft _ hright |
| 75 | obtain ⟨γ, hγ0, hγ1, hγ, hγU, hγlength⟩ := |
| 76 | exists_intrinsic_splice g hα hβ hαU hβU (hα1.trans hβ0.symm) |
| 77 | refine ⟨γ, hγ0.trans hα0, hγ1.trans hβ1, hγ, hγU, ?_⟩ |
| 78 | have hstep : (t k : ℝ) ≤ (t (k + 1) : ℝ) := hmono (Nat.le_succ k) |
| 79 | have hdiff : 0 ≤ (t (k + 1) : ℝ) - (t k : ℝ) := sub_nonneg.mpr hstep |
| 80 | rw [hsegment (t k) (t k).property (t (k + 1)) (t (k + 1)).property, |
| 81 | abs_sub_comm, abs_of_nonneg hdiff] at hβlength |
| 82 | rw [hγlength, hαlength, hβlength, ← add_mul, |
| 83 | ← ENNReal.ofReal_add (t k).property.1 hdiff] |
| 84 | have hsum : (t k : ℝ) + ((t (k + 1) : ℝ) - (t k : ℝ)) = |
| 85 | (t (k + 1) : ℝ) := by ring |
| 86 | rw [hsum] |
| 87 | obtain ⟨γ, hγ0, hγ1, hγ, hγU, hγlength⟩ := hpaths' n |
| 88 | have htn : t n = 1 := hn n le_rfl |
| 89 | refine ⟨γ, hγ0, ?_, hγ, hγU, ?_⟩ |
| 90 | · exact hγ1.trans (by simpa only [htn, Set.Icc.coe_one] using hη1) |
| 91 | · simpa only [htn, Set.Icc.coe_one, ENNReal.ofReal_one, one_mul] using hγlength |
| 92 | |
| 93 | /-- Genuine compact confinement of minimizing competitors produces the |
| 94 | actual finite C1 intrinsic minimizer needed by relative A.8. The sequence |
| 95 | limit is the frozen region distance, not ambient distance. -/ |
| 96 | theorem exists_intrinsic_minimizer_of_compact_sequence |
| 97 | (g : RiemannianMetric 3 M) (U : TopologicalSpace.Opens M) |
| 98 | {p q : M} {K : Set M} (hK : IsCompact K) (hKU : K ⊆ (U : Set M)) |
| 99 | {L : ℝ} {paths : ℕ → ℝ → M} |
| 100 | (hpaths : ∀ k, ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 (paths k) (Icc (0 : ℝ) 1)) |
| 101 | (h0 : ∀ k, paths k 0 = p) (h1 : ∀ k, paths k 1 = q) |
| 102 | (hconf : ∀ k, MapsTo (paths k) (Icc (0 : ℝ) 1) K) |
| 103 | (hbound : ∀ k, g.pathELength (paths k) 0 1 < ENNReal.ofReal L) |
| 104 | (hlength : Tendsto (fun k => g.pathELength (paths k) 0 1) atTop |
| 105 | (𝓝 (intrinsicEDist g (U : Set M) p q))) : |
| 106 | ∃ γ : ℝ → M, γ 0 = p ∧ γ 1 = q ∧ |
| 107 | ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 γ (Icc (0 : ℝ) 1) ∧ |
| 108 | MapsTo γ (Icc (0 : ℝ) 1) (U : Set M) ∧ |
| 109 | g.pathELength γ 0 1 = intrinsicEDist g (U : Set M) p q ∧ |
| 110 | g.pathELength γ 0 1 ≠ ⊤ := by |
| 111 | obtain ⟨η, hη0, hη1, hη, hηK, hsegment⟩ := |
| 112 | exists_intrinsic_metric_segment_of_compact_sequence g U hK hKU hpaths h0 h1 |
| 113 | hconf hbound hlength |
| 114 | obtain ⟨γ, hγ0, hγ1, hγ, hγU, hγlength⟩ := |
| 115 | exists_intrinsic_minimizer_of_metric_segment g U hη0 hη1 hη |
| 116 | (fun t ht => hKU (hηK ht)) hsegment |
| 117 | refine ⟨γ, hγ0, hγ1, hγ, hγU, hγlength, ?_⟩ |
| 118 | rw [hγlength] |
| 119 | have hle := intrinsicEDist_le_pathELength g zero_le_one (hpaths 0) |
| 120 | (fun t ht => hKU (hconf 0 ht)) |
| 121 | rw [h0 0, h1 0] at hle |
| 122 | exact ne_top_of_lt ((hle.trans_lt (hbound 0)).trans_le le_top) |
| 123 | |
| 124 | end PoincareMT.M28 |