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.Topology.MetricSpace.Curves.CompactMetricMinimizer |
| 2 | import Mathlib.Topology.Order.IsLUB |
| 3 | |
| 4 | /-! |
| 5 | # Shortest curves in a compact focusing region |
| 6 | |
| 7 | A rectifiable competitor makes the constrained length infimum finite. |
| 8 | Arc-length normalization, compact extraction, and lower semicontinuity |
| 9 | then produce an actual shortest curve without convexity of the region. |
| 10 | |
| 11 | Morgan--Tian context: Claim 19.40, printed pp. 470-471, in the proof of Proposition |
| 12 | 19.35. The project construction retains the actual constrained path and its boundary |
| 13 | contacts. |
| 14 | -/ |
| 15 | |
| 16 | noncomputable section |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Topology ENNReal NNReal |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | /-- A compact region containing a rectifiable connecting curve contains a shortest |
| 25 | connecting curve. The comparison includes competitors of infinite variation. The minimizing |
| 26 | curve has constant-speed Lipschitz normalization. Source: MT Claim 19.40, pp. 470-471; |
| 27 | `proof-work/tasks/M64/reports/2026-09-24-intrinsic-radial-scalar.md`, Actual compact-region |
| 28 | constrained minimizers. -/ |
| 29 | theorem m64Intrinsic_exists_compact_constrained_minimizer |
| 30 | {X : Type*} [MetricSpace X] {K : Set X} (hK : IsCompact K) |
| 31 | {z y : X} {σ : ℝ → X} |
| 32 | (hc : ContinuousOn σ (Icc 0 1)) (h0 : σ 0 = z) (h1 : σ 1 = y) |
| 33 | (hconf : MapsTo σ (Icc 0 1) K) |
| 34 | (hv : BoundedVariationOn σ (Icc 0 1)) : |
| 35 | ∃ γ : ℝ → X, γ 0 = z ∧ γ 1 = y ∧ MapsTo γ (Icc 0 1) K ∧ |
| 36 | LipschitzOnWith (eVariationOn γ (Icc 0 1)).toNNReal γ (Icc 0 1) ∧ |
| 37 | BoundedVariationOn γ (Icc 0 1) ∧ |
| 38 | ∀ τ : ℝ → X, ContinuousOn τ (Icc 0 1) → τ 0 = z → τ 1 = y → |
| 39 | MapsTo τ (Icc 0 1) K → |
| 40 | eVariationOn γ (Icc 0 1) ≤ eVariationOn τ (Icc 0 1) := by |
| 41 | classical |
| 42 | let S : Set ℝ≥0∞ := {l | ∃ τ : ℝ → X, |
| 43 | ContinuousOn τ (Icc 0 1) ∧ τ 0 = z ∧ τ 1 = y ∧ |
| 44 | MapsTo τ (Icc 0 1) K ∧ BoundedVariationOn τ (Icc 0 1) ∧ |
| 45 | eVariationOn τ (Icc 0 1) = l} |
| 46 | have hS : S.Nonempty := ⟨_, σ, hc, h0, h1, hconf, hv, rfl⟩ |
| 47 | have hSbelow : BddBelow S := ⟨0, fun _ _ => bot_le⟩ |
| 48 | obtain ⟨l, hlanti, hlconv, hlS⟩ := exists_seq_tendsto_sInf hS hSbelow |
| 49 | choose τ hτc hτ0 hτ1 hτconf hτv hτlength using hlS |
| 50 | have hlfinite (n : ℕ) : l n ≠ ⊤ := by |
| 51 | rw [← hτlength n] |
| 52 | exact hτv n |
| 53 | choose η hη0 hη1 hηimage hηlip using |
| 54 | (fun n => Poincare.MetricCurves.exists_normalized_path (hτc n) (hτv n)) |
| 55 | have hηconf (n : ℕ) : MapsTo (η n) (Icc 0 1) K := by |
| 56 | intro t ht |
| 57 | obtain ⟨s, hs, heq⟩ := (hηimage n).subset (mem_image_of_mem (η n) ht) |
| 58 | exact heq ▸ hτconf n hs |
| 59 | have hηcommon (n : ℕ) : LipschitzOnWith (l 0).toNNReal (η n) (Icc 0 1) := by |
| 60 | apply (hηlip n).weaken |
| 61 | rw [hτlength n] |
| 62 | exact ENNReal.toNNReal_mono (hlfinite 0) (hlanti (Nat.zero_le n)) |
| 63 | obtain ⟨φ, γ, hφ, hconv, hγlip, hγ0, hγ1, hγconf⟩ := |
| 64 | Poincare.MetricCurves.exists_confined_uniform_limit hK hηcommon |
| 65 | (fun n => (hη0 n).trans (hτ0 n)) |
| 66 | (fun n => (hη1 n).trans (hτ1 n)) hηconf |
| 67 | have hvar : eVariationOn γ (Icc 0 1) ≤ sInf S := |
| 68 | Poincare.MetricCurves.eVariationOn_le_of_tendsto_bounds hconv |
| 69 | (fun n => (Poincare.MetricCurves.eVariationOn_le_of_lipschitzOnWith |
| 70 | (hηlip (φ n))).trans (by |
| 71 | rw [hτlength (φ n)] |
| 72 | exact ENNReal.coe_toNNReal_le_self)) |
| 73 | (hlconv.comp hφ.tendsto_atTop) |
| 74 | have hγv : BoundedVariationOn γ (Icc 0 1) := |
| 75 | ne_top_of_le_ne_top (hlfinite 0) (hvar.trans |
| 76 | (sInf_le ⟨τ 0, hτc 0, hτ0 0, hτ1 0, hτconf 0, hτv 0, hτlength 0⟩)) |
| 77 | have hmin (τ' : ℝ → X) (hc' : ContinuousOn τ' (Icc 0 1)) |
| 78 | (h0' : τ' 0 = z) (h1' : τ' 1 = y) (hconf' : MapsTo τ' (Icc 0 1) K) : |
| 79 | eVariationOn γ (Icc 0 1) ≤ eVariationOn τ' (Icc 0 1) := by |
| 80 | by_cases hv' : BoundedVariationOn τ' (Icc 0 1) |
| 81 | · exact hvar.trans (sInf_le ⟨τ', hc', h0', h1', hconf', hv', rfl⟩) |
| 82 | · have htop : eVariationOn τ' (Icc 0 1) = ⊤ := by |
| 83 | simpa only [BoundedVariationOn, not_not] using hv' |
| 84 | rw [htop] |
| 85 | exact le_top |
| 86 | obtain ⟨ν, hν0, hν1, hνimage, hνlip⟩ := |
| 87 | Poincare.MetricCurves.exists_normalized_path hγlip.continuousOn hγv |
| 88 | have hνconf : MapsTo ν (Icc 0 1) K := by |
| 89 | intro t ht |
| 90 | obtain ⟨s, hs, heq⟩ := hνimage.subset (mem_image_of_mem ν ht) |
| 91 | exact heq ▸ hγconf hs |
| 92 | have hνlength : eVariationOn ν (Icc 0 1) = eVariationOn γ (Icc 0 1) := by |
| 93 | apply le_antisymm |
| 94 | · exact (Poincare.MetricCurves.eVariationOn_le_of_lipschitzOnWith hνlip).trans |
| 95 | ENNReal.coe_toNNReal_le_self |
| 96 | · exact hmin ν hνlip.continuousOn (hν0.trans hγ0) (hν1.trans hγ1) hνconf |
| 97 | refine ⟨ν, hν0.trans hγ0, hν1.trans hγ1, hνconf, ?_, ?_, ?_⟩ |
| 98 | · rw [hνlength] |
| 99 | exact hνlip |
| 100 | · change eVariationOn ν (Icc 0 1) ≠ ⊤ |
| 101 | rw [hνlength] |
| 102 | exact hγv |
| 103 | · intro τ' hc' h0' h1' hconf' |
| 104 | rw [hνlength] |
| 105 | exact hmin τ' hc' h0' h1' hconf' |
| 106 | |
| 107 | /-- The constrained minimizer admits unit-speed parametrization on its attained length |
| 108 | interval. No ambient distance-realizing hypothesis is used. Source: MT Claim 19.40, pp. |
| 109 | 470-471; `proof-work/tasks/M64/reports/2026-09-24-intrinsic-radial-scalar.md`, Actual |
| 110 | compact-region constrained minimizers. -/ |
| 111 | theorem m64Intrinsic_exists_unit_speed_constrained_minimizer |
| 112 | {X : Type*} [MetricSpace X] {K : Set X} (hK : IsCompact K) |
| 113 | {z y : X} {σ : ℝ → X} |
| 114 | (hc : ContinuousOn σ (Icc 0 1)) (h0 : σ 0 = z) (h1 : σ 1 = y) |
| 115 | (hconf : MapsTo σ (Icc 0 1) K) |
| 116 | (hv : BoundedVariationOn σ (Icc 0 1)) : |
| 117 | ∃ (η : ℝ → X) (L : ℝ), 0 ≤ L ∧ η 0 = z ∧ η L = y ∧ |
| 118 | MapsTo η (Icc 0 L) K ∧ HasUnitSpeedOn η (Icc 0 L) ∧ |
| 119 | LipschitzOnWith 1 η (Icc 0 L) ∧ |
| 120 | eVariationOn η (Icc 0 L) = ENNReal.ofReal L ∧ |
| 121 | (∀ τ : ℝ → X, ContinuousOn τ (Icc 0 1) → τ 0 = z → τ 1 = y → |
| 122 | MapsTo τ (Icc 0 1) K → ENNReal.ofReal L ≤ eVariationOn τ (Icc 0 1)) := by |
| 123 | obtain ⟨γ, hγ0, hγ1, hγconf, hγlip, hγv, hγmin⟩ := |
| 124 | m64Intrinsic_exists_compact_constrained_minimizer hK hc h0 h1 hconf hv |
| 125 | obtain ⟨η, hη0, hη1, hηimage, hηunit, hηlip⟩ := |
| 126 | Poincare.MetricCurves.exists_arcLength_representative (by norm_num : (0 : ℝ) ≤ 1) |
| 127 | hγlip.continuousOn hγv |
| 128 | let L := (eVariationOn γ (Icc 0 1)).toReal |
| 129 | have hL : 0 ≤ L := ENNReal.toReal_nonneg |
| 130 | have hunit : eVariationOn η (Icc 0 L) = ENNReal.ofReal L := by |
| 131 | have h := hηunit (show (0 : ℝ) ∈ Icc 0 L from ⟨le_rfl, hL⟩) |
| 132 | (show L ∈ Icc 0 L from ⟨hL, le_rfl⟩) |
| 133 | simpa only [L, inter_self, NNReal.coe_one, one_mul, sub_zero] using h |
| 134 | refine ⟨η, L, hL, hη0.trans hγ0, hη1.trans hγ1, ?_, hηunit, hηlip, hunit, ?_⟩ |
| 135 | · intro t ht |
| 136 | obtain ⟨s, hs, heq⟩ := hηimage.subset (mem_image_of_mem η ht) |
| 137 | exact heq ▸ hγconf hs |
| 138 | · intro τ hc' h0' h1' hconf' |
| 139 | rw [show ENNReal.ofReal L = eVariationOn γ (Icc 0 1) from |
| 140 | ENNReal.ofReal_toReal hγv] |
| 141 | exact hγmin τ hc' h0' h1' hconf' |
| 142 | |
| 143 | end PoincareMT |