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.Comparison.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.Analysis.Periodic.SobolevJets |
| 3 | import PoincareLib.Geometry.CurveShortening.Ramp.Analysis.Complex.LpRealification |
| 4 | import PoincareLib.Analysis.Parabolic.Quasilinear.Heat.SpectralScale |
| 5 | |
| 6 | /-! |
| 7 | # Real periodic realization of the spectral state |
| 8 | |
| 9 | The actual real Fourier jets realize M03's square-summable state and |
| 10 | commute with its spectral scale decoder. MT2007 Claim 19.1, p. 437; |
| 11 | contract review block 8 and `2026-09-21-real-periodic-spectral-bridge.md`. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open AddCircle PoincareMT.SpectralHeatNative |
| 17 | open scoped ENNReal |
| 18 | |
| 19 | namespace PoincareMT.M63 |
| 20 | |
| 21 | /-- The actual periodic Laplacian spectrum, repeated for the real and |
| 22 | imaginary coordinates. MT2007 Claim 19.1, p. 437; real periodic spectral |
| 23 | bridge derivation, statement 1. -/ |
| 24 | noncomputable def periodicSpectrum (L : ℝ) (p : ℤ × Fin 2) : NNReal := |
| 25 | ⟨(2 * Real.pi * (p.1 : ℝ) / L) ^ 2, sq_nonneg _⟩ |
| 26 | |
| 27 | variable {L : ℝ} [Fact (0 < L)] |
| 28 | |
| 29 | /-- Actual real-valued periodic reconstruction of a spatial jet. |
| 30 | MT2007 Claim 19.1, p. 437; real periodic spectral bridge, statement 2. |
| 31 | Taking real parts does not assert injectivity on arbitrary states. -/ |
| 32 | noncomputable def realPeriodicJet (k j : ℕ) (hj : j ≤ k) : |
| 33 | State (ℤ × Fin 2) →L[ℝ] C(AddCircle L, ℝ) := |
| 34 | (Complex.reCLM.compLeftContinuous ℝ (AddCircle L)).comp |
| 35 | (((periodicSobolevJet (L := L) k j hj).restrictScalars ℝ).comp |
| 36 | complexLpRealEquiv.symm.toContinuousLinearEquiv.toContinuousLinearMap) |
| 37 | |
| 38 | /-- One actual decay-weight constant bounds every allowed real jet. |
| 39 | MT2007 Claim 19.1, p. 437; real periodic spectral bridge, statement 3. -/ |
| 40 | theorem norm_realPeriodicJet_le (k j : ℕ) (hj : j ≤ k) (u : State (ℤ × Fin 2)) : |
| 41 | ‖realPeriodicJet (L := L) k j hj u‖ ≤ |
| 42 | ‖(⟨(fun n : ℤ => 1 / Real.sqrt (1 + (2 * Real.pi * (n : ℝ) / L) ^ 2)), |
| 43 | memℓp_periodic_decayWeight (Fact.out : 0 < L)⟩ : lp (fun _ : ℤ => ℝ) 2)‖ * ‖u‖ := by |
| 44 | have hnorm : ‖realPeriodicJet (L := L) k j hj u‖ ≤ |
| 45 | ‖periodicSobolevJet (L := L) k j hj (complexLpRealEquiv.symm u)‖ := by |
| 46 | apply (ContinuousMap.norm_le _ (norm_nonneg _)).mpr |
| 47 | intro x |
| 48 | exact (Complex.abs_re_le_norm _).trans (ContinuousMap.norm_coe_le_norm _ x) |
| 49 | exact hnorm.trans (by simpa using |
| 50 | norm_periodicSobolevJet_le (L := L) k j hj (complexLpRealEquiv.symm u)) |
| 51 | |
| 52 | /-- Consecutive real Fourier jets are actual derivatives of the lift. |
| 53 | MT2007 Claim 19.1, p. 437; real periodic spectral bridge, statement 4. -/ |
| 54 | theorem hasDerivAt_realPeriodicJet {k j : ℕ} (hj : j < k) |
| 55 | (u : State (ℤ × Fin 2)) (x : ℝ) : |
| 56 | HasDerivAt (fun y : ℝ => realPeriodicJet (L := L) k j hj.le u (y : AddCircle L)) |
| 57 | (realPeriodicJet (L := L) k (j + 1) hj u (x : AddCircle L)) x := by |
| 58 | exact Complex.reCLM.hasFDerivAt.comp_hasDerivAt x |
| 59 | (hasDerivAt_periodicSobolevJet hj (complexLpRealEquiv.symm u) x) |
| 60 | |
| 61 | /-- The real reconstruction is periodic and has precisely its stated |
| 62 | finite spatial jets. MT2007 Claim 19.1, p. 437; real periodic spectral |
| 63 | bridge, statement 5. The top-order jet is only asserted continuous. -/ |
| 64 | theorem realPeriodicJet_regular (k : ℕ) (u : State (ℤ × Fin 2)) : |
| 65 | let U := fun x : ℝ => realPeriodicJet (L := L) k 0 (Nat.zero_le k) u (x : AddCircle L) |
| 66 | Function.Periodic U L ∧ ContDiff ℝ k U ∧ |
| 67 | ∀ j (hj : j ≤ k), iteratedDeriv j U = |
| 68 | fun x : ℝ => realPeriodicJet (L := L) k j hj u (x : AddCircle L) := by |
| 69 | dsimp only |
| 70 | have heq : ∀ j (hj : j ≤ k), |
| 71 | iteratedDeriv j (fun x : ℝ => |
| 72 | realPeriodicJet (L := L) k 0 (Nat.zero_le k) u (x : AddCircle L)) = |
| 73 | fun x : ℝ => realPeriodicJet (L := L) k j hj u (x : AddCircle L) := by |
| 74 | intro j |
| 75 | induction j with |
| 76 | | zero => intro hj; rw [iteratedDeriv_zero] |
| 77 | | succ j ih => |
| 78 | intro hj |
| 79 | have hj' : j < k := Nat.lt_of_succ_le hj |
| 80 | rw [iteratedDeriv_succ, ih hj'.le] |
| 81 | funext x |
| 82 | exact (hasDerivAt_realPeriodicJet hj' u x).deriv |
| 83 | refine ⟨?_, contDiff_nat_iff_iteratedDeriv.mpr ⟨?_, ?_⟩, heq⟩ |
| 84 | · intro x |
| 85 | dsimp only |
| 86 | rw [coe_add_period] |
| 87 | · intro j hj |
| 88 | rw [heq j hj] |
| 89 | exact (realPeriodicJet (L := L) k j hj u).continuous.comp |
| 90 | (AddCircle.continuous_mk' L) |
| 91 | · intro j hj |
| 92 | rw [heq j hj.le] |
| 93 | exact fun x => (hasDerivAt_realPeriodicJet hj u x).differentiableAt |
| 94 | |
| 95 | omit [Fact (0 < L)] in |
| 96 | /-- M03's real scale decoder acts by the exact complex periodic weight. |
| 97 | MT2007 Claim 19.1, p. 437; real periodic spectral bridge, statement 6. |
| 98 | This coefficient identity also retains l=0 and the zero mode. -/ |
| 99 | theorem complexLpRealEquiv_scaleDecode (l : ℕ) (u : State (ℤ × Fin 2)) (n : ℤ) : |
| 100 | complexLpRealEquiv.symm (scaleDecode (periodicSpectrum L) l u) n = |
| 101 | (((Real.sqrt (1 + (2 * Real.pi * (n : ℝ) / L) ^ 2) ^ l)⁻¹ : ℝ) : ℂ) * |
| 102 | complexLpRealEquiv.symm u n := by |
| 103 | simp only [complexLpRealEquiv_symm_apply, scaleDecode_apply] |
| 104 | let a := (Real.sqrt (1 + (2 * Real.pi * (n : ℝ) / L) ^ 2) ^ l)⁻¹ |
| 105 | change ((a * u (n, 0) : ℝ) : ℂ) + Complex.I * ((a * u (n, 1) : ℝ) : ℂ) = |
| 106 | (a : ℂ) * ((u (n, 0) : ℂ) + Complex.I * (u (n, 1) : ℂ)) |
| 107 | simp only [Complex.ofReal_mul] |
| 108 | ring |
| 109 | |
| 110 | /-- Spectral decoding shifts the actual real periodic Sobolev order. |
| 111 | MT2007 Claim 19.1, p. 437; real periodic spectral bridge, statement 7. |
| 112 | Both sides are identified by their witnessed convergent Fourier series. -/ |
| 113 | theorem realPeriodicJet_scaleDecode (k j l : ℕ) (hj : j ≤ k) |
| 114 | (u : State (ℤ × Fin 2)) : |
| 115 | realPeriodicJet (L := L) k j hj (scaleDecode (periodicSpectrum L) l u) = |
| 116 | realPeriodicJet (L := L) (k + l) j (hj.trans (Nat.le_add_right k l)) u := by |
| 117 | have hc (n : ℤ) : |
| 118 | periodicSobolevMoment L k j n * |
| 119 | complexLpRealEquiv.symm (scaleDecode (periodicSpectrum L) l u) n = |
| 120 | periodicSobolevMoment L (k + l) j n * complexLpRealEquiv.symm u n := by |
| 121 | rw [complexLpRealEquiv_scaleDecode] |
| 122 | simp only [periodicSobolevMoment, Complex.ofReal_inv, Complex.ofReal_pow] |
| 123 | rw [show k + l + 1 = (k + 1) + l by omega, pow_add] |
| 124 | simp only [div_eq_mul_inv, mul_inv_rev] |
| 125 | ring |
| 126 | have hs := weightedFourier_hasSum (L := L) |
| 127 | ⟨periodicSobolevMoment L k j, (periodicSobolevMoment_bound hj).2⟩ |
| 128 | (complexLpRealEquiv.symm (scaleDecode (periodicSpectrum L) l u)) |
| 129 | change HasSum (fun n : ℤ => (periodicSobolevMoment L k j n * |
| 130 | complexLpRealEquiv.symm (scaleDecode (periodicSpectrum L) l u) n) • fourier n) |
| 131 | (periodicSobolevJet (L := L) k j hj |
| 132 | (complexLpRealEquiv.symm (scaleDecode (periodicSpectrum L) l u))) at hs |
| 133 | simp_rw [hc] at hs |
| 134 | have heq := hs.unique (weightedFourier_hasSum (L := L) |
| 135 | ⟨periodicSobolevMoment L (k + l) j, |
| 136 | (periodicSobolevMoment_bound (hj.trans (Nat.le_add_right k l))).2⟩ |
| 137 | (complexLpRealEquiv.symm u)) |
| 138 | exact congrArg (Complex.reCLM.compLeftContinuous ℝ (AddCircle L)) heq |
| 139 | |
| 140 | end PoincareMT.M63 |