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.CurveShortening.Ramp.LocalFlow.C2.TraceLabelVelocityLp |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.Analysis.Periodic.LabelCompactness |
| 3 | |
| 4 | /-! |
| 5 | # Synchronized spectral label displacements |
| 6 | |
| 7 | The actual spectral label velocity gives one uniformly convergent |
| 8 | subsequence of compact displacement paths, retaining the same spectral |
| 9 | indices and exact zero initial displacement. MT2007 Claim 19.1, p. 437, |
| 10 | and Lemma 19.6, pp. 441-442; `2026-09-22-spectral-label-compactness.md`. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter MeasureTheory AddCircle PoincareMT.SpectralHeatNative |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | universe u v |
| 19 | |
| 20 | namespace PoincareMT.M63 |
| 21 | |
| 22 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 24 | {ι : Type v} [Fintype ι] {a b : ℝ} |
| 25 | |
| 26 | local notation "W" => EuclideanSpace ℝ ι |
| 27 | local notation "H" => State ((ℤ × Fin 2) × ι) |
| 28 | |
| 29 | /-- Actual positive spectral labels admit compact displacement limits |
| 30 | along one common state subsequence. No derivative of the limiting label |
| 31 | is assumed or asserted. MT2007 Claim 19.1, p. 437; spectral label |
| 32 | compactness derivation. -/ |
| 33 | theorem exists_compact_spectral_label_displacements |
| 34 | (F : RicciFlow n M (Icc a b)) {U : Set W} (hU : IsOpen U) {ρ : W → M} |
| 35 | (hρ : ContMDiffOn 𝓘(ℝ, W) (𝓡 n) ∞ ρ U) |
| 36 | {S L : ℝ} (hS : 0 < S) (hSb : S < b - a) [Fact (0 < L)] |
| 37 | {K : Set (W × W)} (hK : IsCompact K) |
| 38 | (hKU : K ⊆ {z : W × W | z.1 ∈ U ∧ |
| 39 | mfderiv 𝓘(ℝ, W) (𝓡 n) ρ z.1 z.2 ≠ 0}) |
| 40 | (Vn : ℕ → C(Icc (0 : ℝ) S, H)) (V : C(Icc (0 : ℝ) S, H)) |
| 41 | (hV : Tendsto Vn atTop (𝓝 V)) (qn : ℕ → ℝ → ℝ → W) |
| 42 | (hq : ∀ j, ContDiffOn ℝ ∞ (Function.uncurry (qn j)) (Icc 0 S ×ˢ univ)) |
| 43 | (hqzero : ∀ j (t : Icc (0 : ℝ) S) (x : ℝ), qn j t.1 x = |
| 44 | WithLp.toLp 2 (vectorPeriodicJet (L := L) 1 0 (by omega) |
| 45 | (Vn j t) (x : AddCircle L))) |
| 46 | (hphase : ∀ j (t : Icc (0 : ℝ) S), DifferentiableAt ℝ |
| 47 | (fun r : ℝ => vectorPeriodicSpectralTranslation (L := L) r (Vn j t)) 0) |
| 48 | (hjets : ∀ j (t : Icc (0 : ℝ) S) (x : AddCircle L), |
| 49 | (WithLp.toLp 2 (vectorPeriodicJet (L := L) 1 0 (by omega) (Vn j t) x), |
| 50 | WithLp.toLp 2 (vectorPeriodicJet (L := L) 1 1 (by omega) (Vn j t) x)) ∈ K) |
| 51 | (psi : ℕ → ℝ → ℝ → ℝ) |
| 52 | (hpsi : ∀ j, ContDiffOn ℝ 1 (Function.uncurry (psi j)) (Icc 0 S ×ˢ univ)) |
| 53 | (hshift : ∀ j t, t ∈ Icc 0 S → ∀ x, |
| 54 | psi j t (x + L) = psi j t x + L) |
| 55 | (hinitial : ∀ j x, psi j 0 x = x) |
| 56 | (htime : ∀ j t, t ∈ Ioo 0 S → ∀ x, |
| 57 | HasDerivAt (fun r => psi j r x) |
| 58 | (deriv (fun y => ambientCurvePrincipal F ρ (a + t) |
| 59 | (qn j t y) (deriv (qn j t) y)) (psi j t x) / 2) t) |
| 60 | {ell upper : ℝ} (hell : 0 < ell) |
| 61 | (hlower : ∀ j t, t ∈ Icc 0 S → ∀ x, ell ≤ deriv (psi j t) x) |
| 62 | (hupper : ∀ j t, t ∈ Icc 0 S → ∀ x, deriv (psi j t) x ≤ upper) : |
| 63 | ∃ (sigma : ℕ → ℕ) |
| 64 | (Dn : ℕ → C(Icc (0 : ℝ) S, C(AddCircle L, ℝ))) |
| 65 | (d : C(Icc (0 : ℝ) S, C(AddCircle L, ℝ))), |
| 66 | StrictMono sigma ∧ |
| 67 | Tendsto (fun j => Vn (sigma j)) atTop (𝓝 V) ∧ |
| 68 | Tendsto Dn atTop (𝓝 d) ∧ |
| 69 | (∀ j (t : Icc (0 : ℝ) S) (x : ℝ), |
| 70 | Dn j t (x : AddCircle L) = psi (sigma j) t x - x) ∧ |
| 71 | d ⟨0, le_rfl, hS.le⟩ = 0 := by |
| 72 | classical |
| 73 | obtain ⟨B, hB, w, hw, hwrep, hwbound⟩ := |
| 74 | exists_uniform_spectral_labelVelocity_L2_bound F hU hρ hS hSb hK hKU |
| 75 | Vn V hV qn hq hqzero hphase hjets |
| 76 | have hwopen (j : ℕ) : ContinuousOn (w j) (Ioo 0 S) := |
| 77 | (hw j).mono Ioo_subset_Icc_self |
| 78 | have hode (j : ℕ) (t : ℝ) (ht : t ∈ Ioo 0 S) (x : ℝ) : |
| 79 | HasDerivAt (fun r => psi j r x) (w j t (psi j t x : AddCircle L)) t := by |
| 80 | rw [hwrep j t (Ioo_subset_Icc_self ht) (psi j t x)] |
| 81 | exact htime j t ht x |
| 82 | have hnorm (j : ℕ) (t : ℝ) (ht : t ∈ Ioo 0 S) : |
| 83 | ‖ContinuousMap.toLp 2 haarAddCircle ℝ (w j t)‖ ≤ B := |
| 84 | hwbound j t (Ioo_subset_Icc_self ht) |
| 85 | obtain ⟨D, _velocity, hDc, hDrep, _hVc, _hVrep, _hDder, _hVbound, _hL2⟩ := |
| 86 | exists_periodicLabel_displacement_L2_control (P := L) (a := 0) (b := S) |
| 87 | hS psi w hpsi hshift hwopen hode hell hB hlower hnorm |
| 88 | obtain ⟨sigma, d0, hsigma, hdc, hdzero, _hphic, _hperiod, _hinc, huniform⟩ := |
| 89 | exists_uniform_periodicLabel_subsequence (P := L) (a := 0) (b := S) |
| 90 | hS psi w hpsi hshift hwopen hode hell hB hlower hnorm hupper hinitial |
| 91 | let Dn : ℕ → C(Icc (0 : ℝ) S, C(AddCircle L, ℝ)) := fun j => |
| 92 | ⟨fun t => D (sigma j) t, (hDc (sigma j)).domRestrict⟩ |
| 93 | let d : C(Icc (0 : ℝ) S, C(AddCircle L, ℝ)) := |
| 94 | ⟨fun t => d0 t, hdc.domRestrict⟩ |
| 95 | have hconv : Tendsto Dn atTop (𝓝 d) := by |
| 96 | apply Metric.tendsto_atTop.mpr |
| 97 | intro eps heps |
| 98 | obtain ⟨N, hN⟩ := huniform (eps / 2) (half_pos heps) |
| 99 | refine ⟨N, ?_⟩ |
| 100 | intro j hj |
| 101 | have hdist : dist (Dn j) d ≤ eps / 2 := by |
| 102 | apply (ContinuousMap.dist_le (half_pos heps).le).mpr |
| 103 | intro t |
| 104 | apply (ContinuousMap.dist_le (half_pos heps).le).mpr |
| 105 | intro z |
| 106 | obtain ⟨x, rfl⟩ := QuotientAddGroup.mk_surjective z |
| 107 | have hx : |psi (sigma j) t x - (x + d0 t (x : AddCircle L))| < eps / 2 := |
| 108 | hN j hj t t.property x |
| 109 | change dist (D (sigma j) t (x : AddCircle L)) (d0 t (x : AddCircle L)) ≤ eps / 2 |
| 110 | rw [Real.dist_eq, hDrep (sigma j) t t.property x] |
| 111 | simpa only [sub_sub] using hx.le |
| 112 | exact hdist.trans_lt (half_lt_self heps) |
| 113 | refine ⟨sigma, Dn, d, hsigma, hV.comp hsigma.tendsto_atTop, hconv, ?_, ?_⟩ |
| 114 | · intro j t x |
| 115 | exact hDrep (sigma j) t t.property x |
| 116 | · change d0 0 = 0 |
| 117 | exact hdzero |
| 118 | |
| 119 | end PoincareMT.M63 |