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.Vector.SecondDerivativeLp |
| 2 | |
| 3 | /-! |
| 4 | # Actual jets of convergent spectral families |
| 5 | |
| 6 | Strong convergence of the same spectral paths gives uniform first |
| 7 | jets and L2 second jets. Full phase germs identify actual derivatives |
| 8 | of the approximants. MT2007 Claim 19.1, p. 437; |
| 9 | `2026-09-22-spectral-approximation-jets.md`. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open AddCircle Filter MeasureTheory PoincareMT.SpectralHeatNative |
| 15 | open scoped Topology ContDiff |
| 16 | |
| 17 | universe u v |
| 18 | |
| 19 | namespace PoincareMT.M63 |
| 20 | |
| 21 | variable {L : ℝ} [Fact (0 < L)] {ι : Type u} [Fintype ι] |
| 22 | {Z : Type v} [TopologicalSpace Z] [CompactSpace Z] |
| 23 | |
| 24 | local notation "S" => State ((ℤ × Fin 2) × ι) |
| 25 | local notation "W" => EuclideanSpace ℝ ι |
| 26 | |
| 27 | /-- Actual first derivatives and actual approximating second derivatives |
| 28 | converge uniformly in a compact parameter, with the second derivatives |
| 29 | measured in L2. MT2007 Claim 19.1, p. 437; spectral approximation jets |
| 30 | derivation. No second derivative of the limiting state is assumed. -/ |
| 31 | theorem exists_spectral_approximation_jets |
| 32 | (Vn : ℕ → C(Z, S)) (V : C(Z, S)) |
| 33 | (hV : Tendsto Vn atTop (𝓝 V)) |
| 34 | (hphase : ∀ j z, DifferentiableAt ℝ |
| 35 | (fun s : ℝ => vectorPeriodicSpectralTranslation (L := L) s (Vn j z)) 0) : |
| 36 | let E := (PiLp.continuousLinearEquiv 2 ℝ (fun _ : ι => ℝ)).symm |
| 37 | let D0 := (E.toContinuousLinearMap.compLeftContinuous ℝ (AddCircle L)).comp |
| 38 | (vectorPeriodicJet (L := L) 1 0 (by omega)) |
| 39 | let D1 := (E.toContinuousLinearMap.compLeftContinuous ℝ (AddCircle L)).comp |
| 40 | (vectorPeriodicJet (L := L) 1 1 (by omega)) |
| 41 | let D2 := vectorPeriodicSecondDerivativeLp (L := L) (ι := ι) |
| 42 | (∀ z (x : ℝ), HasDerivAt (fun y : ℝ => D0 (V z) (y : AddCircle L)) |
| 43 | (D1 (V z) (x : AddCircle L)) x) ∧ |
| 44 | ∃ r : ℕ → Z → C(AddCircle L, W), |
| 45 | (∀ j z, |
| 46 | ContDiff ℝ 2 (fun x : ℝ => D0 (Vn j z) (x : AddCircle L)) ∧ |
| 47 | (∀ x : ℝ, HasDerivAt (fun y : ℝ => D0 (Vn j z) (y : AddCircle L)) |
| 48 | (D1 (Vn j z) (x : AddCircle L)) x) ∧ |
| 49 | (∀ x : ℝ, HasDerivAt (fun y : ℝ => D1 (Vn j z) (y : AddCircle L)) |
| 50 | (r j z (x : AddCircle L)) x) ∧ |
| 51 | (∀ x : ℝ, iteratedDeriv 2 |
| 52 | (fun y : ℝ => D0 (Vn j z) (y : AddCircle L)) x = |
| 53 | r j z (x : AddCircle L)) ∧ |
| 54 | D2 (Vn j z) = ContinuousMap.toLp 2 haarAddCircle ℝ (r j z)) ∧ |
| 55 | ∀ eps > 0, ∃ N : ℕ, ∀ j ≥ N, ∀ z, |
| 56 | ‖D0 (Vn j z) - D0 (V z)‖ < eps ∧ |
| 57 | ‖D1 (Vn j z) - D1 (V z)‖ < eps ∧ |
| 58 | ‖ContinuousMap.toLp 2 haarAddCircle ℝ (r j z) - D2 (V z)‖ < eps := by |
| 59 | classical |
| 60 | dsimp only |
| 61 | let E := (PiLp.continuousLinearEquiv 2 ℝ (fun _ : ι => ℝ)).symm |
| 62 | let D0 : S →L[ℝ] C(AddCircle L, W) := |
| 63 | (E.toContinuousLinearMap.compLeftContinuous ℝ (AddCircle L)).comp |
| 64 | (vectorPeriodicJet (L := L) 1 0 (by omega)) |
| 65 | let D1 : S →L[ℝ] C(AddCircle L, W) := |
| 66 | (E.toContinuousLinearMap.compLeftContinuous ℝ (AddCircle L)).comp |
| 67 | (vectorPeriodicJet (L := L) 1 1 (by omega)) |
| 68 | let D2 := vectorPeriodicSecondDerivativeLp (L := L) (ι := ι) |
| 69 | have hfirst (u : S) (x : ℝ) : |
| 70 | HasDerivAt (fun y : ℝ => D0 u (y : AddCircle L)) (D1 u (x : AddCircle L)) x := |
| 71 | E.toContinuousLinearMap.hasFDerivAt.comp_hasDerivAt x |
| 72 | (hasDerivAt_vectorPeriodicJet (L := L) (by omega : 0 < 1) u x) |
| 73 | choose r hr using fun j z => vectorPeriodicSecondDerivativeLp_spec (Vn j z) (hphase j z) |
| 74 | have hspec (j : ℕ) (z : Z) : |
| 75 | ContDiff ℝ 2 (fun x : ℝ => D0 (Vn j z) (x : AddCircle L)) ∧ |
| 76 | (∀ x : ℝ, HasDerivAt (fun y : ℝ => D1 (Vn j z) (y : AddCircle L)) |
| 77 | (r j z (x : AddCircle L)) x) ∧ |
| 78 | (∀ x : ℝ, iteratedDeriv 2 (fun y : ℝ => D0 (Vn j z) (y : AddCircle L)) x = |
| 79 | r j z (x : AddCircle L)) ∧ |
| 80 | D2 (Vn j z) = ContinuousMap.toLp 2 haarAddCircle ℝ (r j z) := hr j z |
| 81 | refine ⟨fun z => hfirst (V z), r, ?_, ?_⟩ |
| 82 | · intro j z |
| 83 | exact ⟨(hspec j z).1, hfirst (Vn j z), (hspec j z).2⟩ |
| 84 | · have h0 := (D0.compLeftContinuous ℝ Z).continuous.tendsto V |>.comp hV |
| 85 | have h1 := (D1.compLeftContinuous ℝ Z).continuous.tendsto V |>.comp hV |
| 86 | have h2 := (D2.compLeftContinuous ℝ Z).continuous.tendsto V |>.comp hV |
| 87 | intro eps heps |
| 88 | obtain ⟨N0, hN0⟩ := |
| 89 | (Metric.tendsto_atTop (α := C(Z, C(AddCircle L, W)))).mp h0 eps heps |
| 90 | obtain ⟨N1, hN1⟩ := |
| 91 | (Metric.tendsto_atTop (α := C(Z, C(AddCircle L, W)))).mp h1 eps heps |
| 92 | obtain ⟨N2, hN2⟩ := |
| 93 | (Metric.tendsto_atTop (α := C(Z, Lp W 2 (@haarAddCircle L _)))).mp h2 eps heps |
| 94 | refine ⟨max N0 (max N1 N2), ?_⟩ |
| 95 | intro j hj z |
| 96 | have hj0 : N0 ≤ j := (le_max_left _ _).trans hj |
| 97 | have hj1 : N1 ≤ j := (le_max_left _ _).trans ((le_max_right _ _).trans hj) |
| 98 | have hj2 : N2 ≤ j := (le_max_right _ _).trans ((le_max_right _ _).trans hj) |
| 99 | have hn0 : ‖D0.compLeftContinuous ℝ Z (Vn j) - D0.compLeftContinuous ℝ Z V‖ < eps := by |
| 100 | rw [← dist_eq_norm (D0.compLeftContinuous ℝ Z (Vn j)) (D0.compLeftContinuous ℝ Z V)] |
| 101 | exact hN0 j hj0 |
| 102 | have hn1 : ‖D1.compLeftContinuous ℝ Z (Vn j) - D1.compLeftContinuous ℝ Z V‖ < eps := by |
| 103 | rw [← dist_eq_norm (D1.compLeftContinuous ℝ Z (Vn j)) (D1.compLeftContinuous ℝ Z V)] |
| 104 | exact hN1 j hj1 |
| 105 | have h0z := ((D0.compLeftContinuous ℝ Z (Vn j) - |
| 106 | D0.compLeftContinuous ℝ Z V).norm_coe_le_norm z).trans_lt |
| 107 | hn0 |
| 108 | have h1z := ((D1.compLeftContinuous ℝ Z (Vn j) - |
| 109 | D1.compLeftContinuous ℝ Z V).norm_coe_le_norm z).trans_lt |
| 110 | hn1 |
| 111 | have h2z := ((D2.compLeftContinuous ℝ Z (Vn j) - |
| 112 | D2.compLeftContinuous ℝ Z V).norm_coe_le_norm z).trans_lt |
| 113 | (by simpa +instances only [Function.comp_apply, dist_eq_norm] using! hN2 j hj2) |
| 114 | refine ⟨h0z, h1z, ?_⟩ |
| 115 | change ‖D2 (Vn j z) - D2 (V z)‖ < eps at h2z |
| 116 | rwa [(hspec j z).2.2.2] at h2z |
| 117 | |
| 118 | end PoincareMT.M63 |