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.TraceNormalCurvatureLimit |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.C2.TraceNormalFirstLimits |
| 3 | |
| 4 | /-! |
| 5 | # Synchronized spectral normal geometric fields |
| 6 | |
| 7 | One spectral family and one limiting label displacement supply closed |
| 8 | position, unit-tangent and curvature paths on the physical time slab. |
| 9 | MT2007 Claim 19.1, p. 437, Lemma 19.6, pp. 441-442; |
| 10 | `2026-09-22-spectral-normal-geometric-fields.md`. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Topology |
| 18 | |
| 19 | universe u v |
| 20 | |
| 21 | namespace PoincareMT.M63 |
| 22 | |
| 23 | open SpectralHeatNative |
| 24 | |
| 25 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] [T2Space M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 27 | {ι : Type v} [Fintype ι] {a b L S R m0 V0 : ℝ} [Fact (0 < L)] |
| 28 | |
| 29 | local notation "W" => EuclideanSpace ℝ ι |
| 30 | local notation "StateV" => State ((ℤ × Fin 2) × ι) |
| 31 | local notation "X" => C(AddCircle L, W) |
| 32 | local notation "Y" => C(AddCircle curvePeriod, W) |
| 33 | |
| 34 | /-- The same spectral and label sequences give all three actual geometric |
| 35 | field paths on the physical closed interval, with the exact initial |
| 36 | position. MT2007 Claim 19.1, p. 437; spectral geometric-fields assembly. -/ |
| 37 | theorem exists_closed_normal_geometric_fields_of_spectral_family |
| 38 | (F : RicciFlow n M (Icc a b)) (hcompact : IsCompact (univ : Set M)) |
| 39 | (hS : 0 < S) (hSone : S ≤ 1) (hSb : a + S < b) |
| 40 | (hR : 0 ≤ R) (hm0 : 0 < m0) (hmV : m0 ≤ V0) |
| 41 | {e : M → W} (he : ContMDiff (𝓡 n) 𝓘(ℝ, W) ∞ e) |
| 42 | {U : Set W} (hU : IsOpen U) (heU : range e ⊆ U) {ρ : W → M} |
| 43 | (hρ : ContMDiffOn 𝓘(ℝ, W) (𝓡 n) ∞ ρ U) (hρe : ∀ p, ρ (e p) = p) |
| 44 | (Vn : ℕ → C(Icc (0 : ℝ) S, StateV)) (V : C(Icc (0 : ℝ) S, StateV)) |
| 45 | (D : ℕ → C(Icc (0 : ℝ) S, C(AddCircle L, ℝ))) |
| 46 | (d : C(Icc (0 : ℝ) S, C(AddCircle L, ℝ))) |
| 47 | (psi : ℕ → ℝ → ℝ → ℝ) (c : ℕ → ℝ → ℝ → M) (vinit : ℕ → ℝ) |
| 48 | (hV : Tendsto Vn atTop (𝓝 V)) (hD : Tendsto D atTop (𝓝 d)) |
| 49 | (hphase : ∀ j (t : Icc (0 : ℝ) S), DifferentiableAt ℝ |
| 50 | (fun r : ℝ => vectorPeriodicSpectralTranslation (L := L) r (Vn j t)) 0) : |
| 51 | let _ : Fact (0 < curvePeriod) := ⟨by unfold curvePeriod; positivity⟩ |
| 52 | let E := (PiLp.continuousLinearEquiv 2 ℝ (fun _ : ι => ℝ)).symm |
| 53 | let D0 := (E.toContinuousLinearMap.compLeftContinuous ℝ (AddCircle L)).comp |
| 54 | (vectorPeriodicJet (L := L) 1 0 (by omega)) |
| 55 | let D1 := (E.toContinuousLinearMap.compLeftContinuous ℝ (AddCircle L)).comp |
| 56 | (vectorPeriodicJet (L := L) 1 1 (by omega)) |
| 57 | let qn := fun j (t : Icc (0 : ℝ) S) (x : ℝ) => D0 (Vn j t) (x : AddCircle L) |
| 58 | let pn := fun j (t : Icc (0 : ℝ) S) (x : ℝ) => D1 (Vn j t) (x : AddCircle L) |
| 59 | let q := fun (t : Icc (0 : ℝ) S) (x : ℝ) => D0 (V t) (x : AddCircle L) |
| 60 | let p := fun (t : Icc (0 : ℝ) S) (x : ℝ) => D1 (V t) (x : AddCircle L) |
| 61 | let t0 : Icc (0 : ℝ) S := ⟨0, le_rfl, hS.le⟩ |
| 62 | let f := q t0 |
| 63 | (∀ j t x, qn j t x ∈ U ∧ |
| 64 | mfderiv 𝓘(ℝ, W) (𝓡 n) ρ (qn j t x) (pn j t x) ≠ 0) → |
| 65 | (∀ j t x, qn j t x = e (ρ (qn j t x))) → |
| 66 | (∀ t x, q t x ∈ U ∧ mfderiv 𝓘(ℝ, W) (𝓡 n) ρ (q t x) (p t x) ≠ 0) → |
| 67 | ContDiff ℝ 2 f → |
| 68 | (∀ eps > 0, ∃ N : ℕ, ∀ j ≥ N, ∀ x, |
| 69 | ‖deriv (deriv (qn j t0)) x - deriv (deriv f) x‖ < eps) → |
| 70 | ∀ ell : ℝ, 0 < ell → |
| 71 | (∀ j (t : Icc (0 : ℝ) S), ContDiff ℝ 1 (psi j t)) → |
| 72 | (∀ j (t : Icc (0 : ℝ) S) x, ell ≤ deriv (psi j t) x) → |
| 73 | (∀ j (t : Icc (0 : ℝ) S) (x : ℝ), D j t (x : AddCircle L) = psi j t x - x) → |
| 74 | (∀ j x, psi j 0 x = x) → |
| 75 | (∀ j, M62ShrinkingCurve F (c j)) → |
| 76 | (∀ j, vinit j ∈ Icc m0 V0) → |
| 77 | (∀ j x, curveSpeed F (c j) a x = vinit j) → |
| 78 | (∀ j t, t ∈ Ioo a b → ∀ x, m62CurvatureSquared F (c j) t x ≤ R) → |
| 79 | (∀ j (t : Icc (0 : ℝ) S) x, |
| 80 | c j x (a + t) = ρ (qn j t (psi j t ((L / curvePeriod) * x)))) → |
| 81 | d t0 = 0 → |
| 82 | ∃ (Rn Sn Hn : ℕ → C(Icc a (a + S), Y)) (r s h : C(Icc a (a + S), Y)), |
| 83 | Tendsto Rn atTop (𝓝 r) ∧ Tendsto Sn atTop (𝓝 s) ∧ Tendsto Hn atTop (𝓝 h) ∧ |
| 84 | (∀ j (t : Icc a (a + S)) (x : ℝ), |
| 85 | Rn j t (x : AddCircle curvePeriod) = e (c j x t)) ∧ |
| 86 | (∀ j (t : Icc a (a + S)) (x : ℝ), Sn j t (x : AddCircle curvePeriod) = |
| 87 | mfderiv (𝓡 n) 𝓘(ℝ, W) e (c j x t) (spatialUnitTangent F (c j) t x)) ∧ |
| 88 | (∀ j (t : Icc a (a + S)) (x : ℝ), Hn j t (x : AddCircle curvePeriod) = |
| 89 | mfderiv (𝓡 n) 𝓘(ℝ, W) e (c j x t) (m62CurvatureVector F (c j) t x)) ∧ |
| 90 | (∀ (t : Icc a (a + S)) z, r t z ∈ U) ∧ |
| 91 | ∀ x : ℝ, r ⟨a, le_rfl, le_add_of_nonneg_right hS.le⟩ (x : AddCircle curvePeriod) = |
| 92 | f ((L / curvePeriod) * x) := by |
| 93 | classical |
| 94 | let : Fact (0 < curvePeriod) := ⟨by unfold curvePeriod; positivity⟩ |
| 95 | dsimp only |
| 96 | intro hguard hfixed hguard0 hf hsecond ell hell hpsi hderiv hDrep hpsi0 hc |
| 97 | hvinit hinitial hcurv hslice hd0 |
| 98 | let E := (PiLp.continuousLinearEquiv 2 ℝ (fun _ : ι => ℝ)).symm |
| 99 | let D0 : StateV →L[ℝ] X := |
| 100 | (E.toContinuousLinearMap.compLeftContinuous ℝ (AddCircle L)).comp |
| 101 | (vectorPeriodicJet (L := L) 1 0 (by omega)) |
| 102 | let D1 : StateV →L[ℝ] X := |
| 103 | (E.toContinuousLinearMap.compLeftContinuous ℝ (AddCircle L)).comp |
| 104 | (vectorPeriodicJet (L := L) 1 1 (by omega)) |
| 105 | let Q := fun j => D0.compLeftContinuous ℝ (Icc (0 : ℝ) S) (Vn j) |
| 106 | let P := fun j => D1.compLeftContinuous ℝ (Icc (0 : ℝ) S) (Vn j) |
| 107 | let q := D0.compLeftContinuous ℝ (Icc (0 : ℝ) S) V |
| 108 | let p := D1.compLeftContinuous ℝ (Icc (0 : ℝ) S) V |
| 109 | have hQ : Tendsto Q atTop (𝓝 q) := |
| 110 | (D0.compLeftContinuous ℝ (Icc (0 : ℝ) S)).continuous.tendsto V |>.comp hV |
| 111 | have hP : Tendsto P atTop (𝓝 p) := |
| 112 | (D1.compLeftContinuous ℝ (Icc (0 : ℝ) S)).continuous.tendsto V |>.comp hV |
| 113 | obtain ⟨_hfirst0, _secondFields, hjets, _hjetlim⟩ := |
| 114 | exists_spectral_approximation_jets Vn V hV hphase |
| 115 | have hQguard (j : ℕ) (t : Icc (0 : ℝ) S) (z : AddCircle L) : |
| 116 | Q j t z ∈ U ∧ mfderiv 𝓘(ℝ, W) (𝓡 n) ρ (Q j t z) (P j t z) ≠ 0 := by |
| 117 | obtain ⟨x, rfl⟩ := QuotientAddGroup.mk_surjective z |
| 118 | exact hguard j t x |
| 119 | have hqguard (t : Icc (0 : ℝ) S) (z : AddCircle L) : |
| 120 | q t z ∈ U ∧ mfderiv 𝓘(ℝ, W) (𝓡 n) ρ (q t z) (p t z) ≠ 0 := by |
| 121 | obtain ⟨x, rfl⟩ := QuotientAddGroup.mk_surjective z |
| 122 | exact hguard0 t x |
| 123 | have hQfixed (j : ℕ) (t : Icc (0 : ℝ) S) (z : AddCircle L) : |
| 124 | Q j t z = e (ρ (Q j t z)) := by |
| 125 | obtain ⟨x, rfl⟩ := QuotientAddGroup.mk_surjective z |
| 126 | exact hfixed j t x |
| 127 | obtain ⟨R0, S0, r0, s0, hR0, hS0, hR0rep, hS0rep, hvalue⟩ := |
| 128 | exists_closed_normal_value_unitTangent_limits F hS hSb.le he hU heU hρ hρe |
| 129 | Q P q p D d psi c hQ hP hD (fun j t x => (hjets j t).2.1 x) |
| 130 | hQguard hqguard hQfixed hpsi (fun j t x => hell.trans_le (hderiv j t x)) |
| 131 | hDrep hslice |
| 132 | obtain ⟨Hreal, hreal, _hinit, hHcont, hHrep, _hinitrep, _hHstart, |
| 133 | hhcont, _hhstart, hHlim, _htrace⟩ := |
| 134 | exists_closed_normalCurvature_limit_of_spectral_family F hcompact hS hSone hSb |
| 135 | hR hm0 hmV he hU heU hρ hρe Vn V D d psi c vinit hV hD hphase |
| 136 | hguard hfixed hguard0 hf hsecond ell hell hpsi hderiv hDrep hpsi0 |
| 137 | hc hvinit hinitial hcurv hslice |
| 138 | let shift : C(Icc a (a + S), Icc (0 : ℝ) S) := |
| 139 | ⟨fun t => ⟨t - a, sub_nonneg.mpr t.property.1, by linarith only [t.property.2]⟩, |
| 140 | (continuous_subtype_val.sub continuous_const).subtype_mk _⟩ |
| 141 | have htime (t : Icc a (a + S)) : a + (shift t : ℝ) = t := by |
| 142 | change a + ((t : ℝ) - a) = t |
| 143 | ring |
| 144 | let Rn := fun j => (R0 j).comp shift |
| 145 | let Sn := fun j => (S0 j).comp shift |
| 146 | let r := r0.comp shift |
| 147 | let s := s0.comp shift |
| 148 | let Hn : ℕ → C(Icc a (a + S), Y) := fun j => ⟨_, (hHcont j).domRestrict⟩ |
| 149 | let h : C(Icc a (a + S), Y) := ⟨_, hhcont.domRestrict⟩ |
| 150 | have hRn : Tendsto Rn atTop (𝓝 r) := (shift.continuous_precomp.tendsto r0).comp hR0 |
| 151 | have hSn : Tendsto Sn atTop (𝓝 s) := (shift.continuous_precomp.tendsto s0).comp hS0 |
| 152 | have hHn : Tendsto Hn atTop (𝓝 h) := |
| 153 | (hhcont.tendsto_domRestrict_iff_tendstoUniformlyOn hHcont).mpr hHlim |
| 154 | refine ⟨Rn, Sn, Hn, r, s, h, hRn, hSn, hHn, ?_, ?_, ?_, ?_, ?_⟩ |
| 155 | · intro j t x |
| 156 | change R0 j (shift t) (x : AddCircle curvePeriod) = e (c j x t) |
| 157 | simpa only [htime] using hR0rep j (shift t) x |
| 158 | · intro j t x |
| 159 | change S0 j (shift t) (x : AddCircle curvePeriod) = _ |
| 160 | refine (hS0rep j (shift t) x).trans ?_ |
| 161 | exact congrArg (fun u : ℝ => (mfderiv (𝓡 n) 𝓘(ℝ, W) e (c j x u) |
| 162 | (spatialUnitTangent F (c j) u x) : W)) (htime t) |
| 163 | · intro j t x |
| 164 | exact hHrep j t t.property x |
| 165 | · intro t z |
| 166 | obtain ⟨x, rfl⟩ := QuotientAddGroup.mk_surjective z |
| 167 | change r0 (shift t) (x : AddCircle curvePeriod) ∈ U |
| 168 | rw [(hvalue (shift t) x).1] |
| 169 | exact (hqguard (shift t) _).1 |
| 170 | · intro x |
| 171 | let ta : Icc a (a + S) := ⟨a, le_rfl, le_add_of_nonneg_right hS.le⟩ |
| 172 | let t0 : Icc (0 : ℝ) S := ⟨0, le_rfl, hS.le⟩ |
| 173 | have hshift : shift ta = t0 := by |
| 174 | apply Subtype.ext |
| 175 | change a - a = 0 |
| 176 | exact sub_self a |
| 177 | change r0 (shift ta) (x : AddCircle curvePeriod) = _ |
| 178 | rw [hshift, (hvalue t0 x).1] |
| 179 | change d t0 = 0 at hd0 |
| 180 | rw [hd0] |
| 181 | simp only [ContinuousMap.zero_apply, add_zero] |
| 182 | rfl |
| 183 | |
| 184 | end PoincareMT.M63 |