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.Fixed.PeriodSpectralApproximants |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Common.AmbientSpectralFamily |
| 3 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Prescribed.NormalApproximationSlab |
| 4 | |
| 5 | /-! |
| 6 | # Actual normal approximants on one common physical slab |
| 7 | |
| 8 | One spectral branch and one tail of the actual initial sequence give |
| 9 | smooth normal approximants with a common prescribed lifespan. |
| 10 | MT2007 Claim 19.1, p. 437 and Lemma 19.6, pp. 441-442; |
| 11 | `2026-09-22-common-normal-approximants.md`. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | universe u v |
| 21 | |
| 22 | namespace PoincareMT.M63 |
| 23 | |
| 24 | open SpectralHeatNative |
| 25 | |
| 26 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 27 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 28 | {ι : Type v} [Fintype ι] {a b L : ℝ} [Fact (0 < L)] |
| 29 | |
| 30 | local notation "W" => EuclideanSpace ℝ ι |
| 31 | local notation "StateV" => State ((ℤ × Fin 2) × ι) |
| 32 | |
| 33 | /-- Actual unit-speed C2 data give strongly convergent spectral traces |
| 34 | and literal smooth normal approximants on one common interval, with |
| 35 | their positive moving labels retained. MT2007 Claim 19.1, p. 437; |
| 36 | common normal approximants derivation. -/ |
| 37 | theorem exists_common_normal_approximants |
| 38 | (F : RicciFlow n M (Icc a b)) {e : M → W} |
| 39 | (he : ContMDiff (𝓡 n) 𝓘(ℝ, W) ∞ e) {U : Set W} (hU : IsOpen U) |
| 40 | (heU : range e ⊆ U) {ρ : W → M} |
| 41 | (hρ : ContMDiffOn 𝓘(ℝ, W) (𝓡 n) ∞ ρ U) (hρe : ∀ p, ρ (e p) = p) |
| 42 | {γ : ℝ → M} (hγp : Function.Periodic γ L) |
| 43 | (hγ : ContMDiff 𝓘(ℝ, ℝ) (𝓡 n) 2 γ) |
| 44 | (himm : ∀ x, curveVelocity (n := n) γ x ≠ 0) |
| 45 | (hunit : ∀ x, curveSpeed F (fun y _ => γ y) a x = 1) |
| 46 | {Tcap : ℝ} (hTcap : 0 < Tcap) (hTcapb : Tcap < b - a) : |
| 47 | let lambda := fun p : (ℤ × Fin 2) × ι => periodicSpectrum L p.1 |
| 48 | ∃ T : ℝ, ∃ hT : 0 < T, T ≤ Tcap ∧ T ≤ 1 ∧ |
| 49 | ∃ (w : StateV) (wn : ℕ → StateV) (m : ℕ → ℝ) |
| 50 | (u : StateV → ForcingSpace ((ℤ × Fin 2) × ι) T) (ψ : ℕ → ℝ → ℝ → ℝ), |
| 51 | let V := fun z => initialResponseTrace lambda z hT.le (u z) |
| 52 | let q := initialResponseCurve (L := L) hT.le w (u w) |
| 53 | let qn := fun j => initialResponseCurve (L := L) hT.le (wn j) (u (wn j)) |
| 54 | let c0 := fun x => e (γ x) |
| 55 | let S := T / 4 |
| 56 | let κ := L / curvePeriod |
| 57 | let A := fun j t x => ambientCurvePrincipal F ρ (a + t) (qn j t x) (deriv (qn j t) x) |
| 58 | let cn := fun j x t => ρ (qn j (t - a) (ψ j (t - a) (κ * x))) |
| 59 | Tendsto wn atTop (𝓝 w) ∧ Tendsto (fun j => V (wn j)) atTop (𝓝 (V w)) ∧ |
| 60 | (∀ j, 1 / 2 ≤ m j ∧ m j ≤ 3 / 2) ∧ Tendsto m atTop (𝓝 1) ∧ |
| 61 | Continuous (Function.uncurry q) ∧ |
| 62 | Continuous (fun z : ℝ × ℝ => deriv (q z.1) z.2) ∧ |
| 63 | (∀ t, Function.Periodic (q t) L) ∧ (∀ x, q 0 x = c0 x) ∧ |
| 64 | (∀ t ∈ Icc (0 : ℝ) T, ∀ x, q t x ∈ U ∧ |
| 65 | mfderiv 𝓘(ℝ, W) (𝓡 n) ρ (q t x) (deriv (q t) x) ≠ 0) ∧ |
| 66 | (∀ eps > 0, ∃ N : ℕ, ∀ j ≥ N, ∀ x, |
| 67 | ‖qn j 0 x - c0 x‖ < eps ∧ ‖deriv (qn j 0) x - deriv c0 x‖ < eps ∧ |
| 68 | ‖deriv (deriv (qn j 0)) x - deriv (deriv c0) x‖ < eps) ∧ |
| 69 | ∀ j, |
| 70 | ContDiffOn ℝ ∞ (Function.uncurry (qn j)) (Icc (0 : ℝ) T ×ˢ univ) ∧ |
| 71 | (∀ t : Icc (0 : ℝ) T, ContDiffAt ℝ ∞ |
| 72 | (fun s : ℝ => vectorPeriodicSpectralTranslation (L := L) s (V (wn j) t)) 0) ∧ |
| 73 | (∀ t, Function.Periodic (qn j t) L) ∧ |
| 74 | (∀ t ∈ Icc (0 : ℝ) T, ∀ x, qn j t x ∈ U ∧ |
| 75 | mfderiv 𝓘(ℝ, W) (𝓡 n) ρ (qn j t x) (deriv (qn j t) x) ≠ 0) ∧ |
| 76 | (∀ t ∈ Icc (0 : ℝ) T, ∀ x, qn j t x = e (ρ (qn j t x))) ∧ |
| 77 | (∀ t ∈ Ioo (0 : ℝ) T, ∀ x, HasDerivAt (fun s => qn j s x) |
| 78 | (A j t x • deriv (deriv (qn j t)) x + |
| 79 | ambientCurveLower F e ρ (a + t) (qn j t x) (deriv (qn j t) x)) t) ∧ |
| 80 | (∀ x, curveSpeed F (fun y _ => ρ (qn j 0 y)) a x = m j) ∧ |
| 81 | (∀ x, ψ j 0 x = x) ∧ |
| 82 | (∀ t ∈ Icc (0 : ℝ) S, ∀ x, ψ j t (x + L) = ψ j t x + L) ∧ |
| 83 | ContDiffOn ℝ ∞ (Function.uncurry (ψ j)) (Icc (0 : ℝ) S ×ˢ univ) ∧ |
| 84 | (∀ t ∈ Icc (0 : ℝ) S, ∀ x, HasDerivWithinAt (fun s => ψ j s x) |
| 85 | (deriv (A j t) (ψ j t x) / 2) (Icc (0 : ℝ) S) t) ∧ |
| 86 | (∀ t ∈ Icc (0 : ℝ) S, ∀ x, 0 < deriv (ψ j t) x) ∧ |
| 87 | (∀ t ∈ Icc (0 : ℝ) S, Function.Bijective (ψ j t)) ∧ |
| 88 | M63SmoothShrinkingCurveOn F (cn j) (Icc a (a + S)) ∧ |
| 89 | (∀ x, cn j x a = ρ (qn j 0 (κ * x))) ∧ |
| 90 | ContMDiffOn 𝓘(ℝ, ℝ × ℝ) (𝓡 n) ∞ |
| 91 | (fun z : ℝ × ℝ => cn j z.1 z.2) (univ ×ˢ Icc a (a + S)) := by |
| 92 | classical |
| 93 | dsimp only |
| 94 | have hab : a < b := by linarith only [hTcap, hTcapb] |
| 95 | have ha : a ∈ Icc a b := ⟨le_rfl, hab.le⟩ |
| 96 | obtain ⟨r, m0, w, zn, hm0, hm0lim, _hr, _hrp, hrfix, _hrimm, |
| 97 | hrspeed, hrnear, hw, hzn, hznlim, hphase⟩ := |
| 98 | exists_smooth_fixedPeriod_spectral_approximants F he hU heU hρ hρe ha hγp hγ himm hunit |
| 99 | let c0 := fun x => e (γ x) |
| 100 | have hc0 : ContDiff ℝ 2 c0 := |
| 101 | ((he.of_le (ENat.natCast_le_of_coe_top_le_withTop le_rfl 2)).comp hγ).contDiff |
| 102 | have hproject (x : ℝ) : mfderiv 𝓘(ℝ, W) (𝓡 n) ρ (c0 x) (deriv c0 x) = |
| 103 | curveVelocity (n := n) γ x := by |
| 104 | have hv : curveVelocity (n := n) (fun y => ρ (c0 y)) x = |
| 105 | mfderiv 𝓘(ℝ, W) (𝓡 n) ρ (c0 x) (deriv c0 x) := by |
| 106 | change (mfderiv 𝓘(ℝ, ℝ) (𝓡 n) (ρ ∘ c0) x) 1 = _ |
| 107 | erw [mfderiv_comp x |
| 108 | ((hρ.contMDiffAt (hU.mem_nhds (heU (mem_range_self _)))).mdifferentiableAt (by simp)) |
| 109 | ((hc0.contMDiff x).mdifferentiableAt (by norm_num)), |
| 110 | ContinuousLinearMap.comp_apply, mfderiv_eq_fderiv] |
| 111 | rfl |
| 112 | have hid : (fun y => ρ (c0 y)) = γ := funext fun y => hρe (γ y) |
| 113 | rw [hid] at hv |
| 114 | exact hv.symm |
| 115 | have hprincipal (x : ℝ) : ambientCurvePrincipal F ρ a (c0 x) (deriv c0 x) = 1 := by |
| 116 | unfold ambientCurvePrincipal |
| 117 | rw [hproject] |
| 118 | change ((F.metric a).inner (ρ (e (γ x))) (curveVelocity γ x) (curveVelocity γ x))⁻¹ = 1 |
| 119 | rw [hρe, ← M62.speed_sq F (fun y _ => γ y) a x, hunit] |
| 120 | norm_num |
| 121 | let E : (ι → ℝ) ≃L[ℝ] W := (PiLp.continuousLinearEquiv 2 ℝ (fun _ : ι => ℝ)).symm |
| 122 | let jet := fun (z : StateV) (x : AddCircle L) => |
| 123 | (E (vectorPeriodicJet (L := L) 1 0 (by omega) z x), |
| 124 | E (vectorPeriodicJet (L := L) 1 1 (by omega) z x)) |
| 125 | have hwjet (x : ℝ) : jet w (x : AddCircle L) = (c0 x, deriv c0 x) := |
| 126 | Prod.ext (hw x).1 (hw x).2 |
| 127 | let K := range (jet w) |
| 128 | have hK : IsCompact K := isCompact_range |
| 129 | ((E.continuous.comp (vectorPeriodicJet (L := L) 1 0 (by omega) w).continuous).prodMk |
| 130 | (E.continuous.comp (vectorPeriodicJet (L := L) 1 1 (by omega) w).continuous)) |
| 131 | have hKsub : K ⊆ {z : W × W | |
| 132 | z.1 ∈ U ∧ mfderiv 𝓘(ℝ, W) (𝓡 n) ρ z.1 z.2 ≠ 0} := by |
| 133 | rintro z ⟨x, rfl⟩ |
| 134 | obtain ⟨y, rfl⟩ := QuotientAddGroup.mk_surjective x |
| 135 | change (jet w (y : AddCircle L)).1 ∈ U ∧ |
| 136 | mfderiv 𝓘(ℝ, W) (𝓡 n) ρ (jet w (y : AddCircle L)).1 |
| 137 | (jet w (y : AddCircle L)).2 ≠ 0 |
| 138 | rw [hwjet] |
| 139 | exact ⟨heU (mem_range_self _), by rw [hproject]; exact himm y⟩ |
| 140 | have hunitjet (x : AddCircle L) : |
| 141 | ambientCurvePrincipal F ρ a (jet w x).1 (jet w x).2 = 1 := by |
| 142 | obtain ⟨y, rfl⟩ := QuotientAddGroup.mk_surjective x |
| 143 | rw [hwjet] |
| 144 | exact hprincipal y |
| 145 | obtain ⟨T, hT, hTTcap, hT1, B, u, hB, hwB, hpath, |
| 146 | _hqc, hqxc, hperiod, hzero, hguard, hflow⟩ := |
| 147 | exists_common_ambient_spectral_family F he hU heU hρ hρe hK hKsub w hTcap hTcapb |
| 148 | (fun x => mem_range_self x) hunitjet |
| 149 | obtain ⟨N0, hN0⟩ := eventually_atTop.mp (hznlim.eventually (hB.mem_nhds hwB)) |
| 150 | let wn := fun j => zn (N0 + j) |
| 151 | let m := fun j => m0 (N0 + j) |
| 152 | have hshift : Tendsto (fun j : ℕ => N0 + j) atTop atTop := by |
| 153 | simpa only [Nat.add_comm] using tendsto_add_atTop_nat N0 |
| 154 | have hwnlim : Tendsto wn atTop (𝓝 w) := hznlim.comp hshift |
| 155 | have hwnB (j : ℕ) : wn j ∈ B := hN0 (N0 + j) (Nat.le_add_right N0 j) |
| 156 | let lambda := fun p : (ℤ × Fin 2) × ι => periodicSpectrum L p.1 |
| 157 | let V := fun z : StateV => initialResponseTrace lambda z hT.le (u z) |
| 158 | let Q := fun z : StateV => initialResponseCurve (L := L) hT.le z (u z) |
| 159 | have hVlim : Tendsto (fun j => V (wn j)) atTop (𝓝 (V w)) := |
| 160 | (hpath.continuousOn.continuousAt (hB.mem_nhds hwB)).tendsto.comp hwnlim |
| 161 | have hQxc : Continuous (fun z : ℝ × ℝ => deriv (Q w z.1) z.2) := by |
| 162 | exact ContinuousOn.comp_continuous |
| 163 | (g := fun z : StateV × (ℝ × ℝ) => deriv (Q z.1 z.2.1) z.2.2) |
| 164 | (f := fun z : ℝ × ℝ => (w, z)) (s := B ×ˢ (univ : Set (ℝ × ℝ))) |
| 165 | hqxc (continuous_const.prodMk continuous_id) (fun _ => ⟨hwB, mem_univ _⟩) |
| 166 | have hQzero (j : ℕ) : Q (wn j) 0 = r (N0 + j) := |
| 167 | funext fun x => (hzero (wn j) (hwnB j) x).trans (hzn (N0 + j) x).1 |
| 168 | have hflowj (j : ℕ) := hflow (wn j) (hwnB j) (hphase (N0 + j)).contDiffAt |
| 169 | have hfixed (j : ℕ) : ∀ t ∈ Icc (0 : ℝ) T, ∀ x, |
| 170 | Q (wn j) t x = e (ρ (Q (wn j) t x)) := by |
| 171 | apply (hflowj j).2.2.2 |
| 172 | intro x |
| 173 | change Q (wn j) 0 x = e (ρ (Q (wn j) 0 x)) |
| 174 | rw [hQzero] |
| 175 | exact (hrfix (N0 + j) x).2.symm |
| 176 | have htime (j : ℕ) : ∀ t ∈ Ioo (0 : ℝ) T, ∀ x, |
| 177 | HasDerivAt (fun s => Q (wn j) s x) |
| 178 | (ambientCurvePrincipal F ρ (a + t) (Q (wn j) t x) (deriv (Q (wn j) t) x) • |
| 179 | deriv (deriv (Q (wn j) t)) x + |
| 180 | ambientCurveLower F e ρ (a + t) (Q (wn j) t x) (deriv (Q (wn j) t) x)) t := by |
| 181 | simpa only [iteratedDeriv_succ, iteratedDeriv_zero] using (hflowj j).2.2.1 |
| 182 | have hTb : a + T ≤ b := by linarith only [hTTcap, hTcapb] |
| 183 | have hS : 0 < T / 4 := by positivity |
| 184 | have hS1 : T / 4 ≤ 1 / 2 := by linarith only [hT1] |
| 185 | have hlabels (j : ℕ) := exists_normal_curve_on_prescribed_ambient_slab |
| 186 | F he hU heU hρ hρe (Fact.out : 0 < L) hT hS hTb le_rfl hS1 |
| 187 | (hflowj j).1 (fun t _ => hperiod (wn j) (hwnB j) t) |
| 188 | (hguard (wn j) (hwnB j)) (hfixed j) (htime j) |
| 189 | choose ψ hψ using hlabels |
| 190 | refine ⟨T, hT, hTTcap, hT1, w, wn, m, u, ψ, hwnlim, hVlim, |
| 191 | fun j => hm0 (N0 + j), hm0lim.comp hshift, |
| 192 | (initialResponseCurve_spec (L := L) hT.le w (u w)).1, hQxc, |
| 193 | hperiod w hwB, fun x => (hzero w hwB x).trans (hw x).1, |
| 194 | hguard w hwB, ?_, ?_⟩ |
| 195 | · intro eps heps |
| 196 | obtain ⟨N, hN⟩ := hrnear eps heps |
| 197 | refine ⟨N, fun j hj x => ?_⟩ |
| 198 | change ‖Q (wn j) 0 x - c0 x‖ < eps ∧ |
| 199 | ‖deriv (Q (wn j) 0) x - deriv c0 x‖ < eps ∧ |
| 200 | ‖deriv (deriv (Q (wn j) 0)) x - deriv (deriv c0) x‖ < eps |
| 201 | rw [hQzero] |
| 202 | exact hN (N0 + j) (hj.trans (Nat.le_add_left j N0)) x |
| 203 | · intro j |
| 204 | refine ⟨(hflowj j).1, (hflowj j).2.1, hperiod (wn j) (hwnB j), |
| 205 | hguard (wn j) (hwnB j), hfixed j, htime j, ?_, hψ j⟩ |
| 206 | intro x |
| 207 | change curveSpeed F (fun y _ => ρ (Q (wn j) 0 y)) a x = m j |
| 208 | rw [hQzero] |
| 209 | exact hrspeed (N0 + j) x |
| 210 | |
| 211 | end PoincareMT.M63 |