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.Spectral.SpatialJets |
| 2 | import Mathlib.Topology.Order.ProjIcc |
| 3 | |
| 4 | /-! |
| 5 | # The actual Euclidean curve decoded from the spectral response |
| 6 | |
| 7 | Clamping only extends the already constructed closed-time trace. Its |
| 8 | actual spatial derivatives give the Euclidean geometric candidate for |
| 9 | MT2007 Claim 19.1, p. 437; |
| 10 | `2026-09-22-ambient-classical-spectral-curve.md`, statements 1-3. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped ContDiff |
| 17 | |
| 18 | namespace PoincareMT.M63 |
| 19 | |
| 20 | open SpectralHeatNative |
| 21 | |
| 22 | variable {L : ℝ} [Fact (0 < L)] {ι : Type*} [Fintype ι] |
| 23 | {T : ℝ} (hT : 0 ≤ T) (w : State ((ℤ × Fin 2) × ι)) |
| 24 | (F0 : ForcingSpace ((ℤ × Fin 2) × ι) T) |
| 25 | |
| 26 | /-- The literal decoded closed spectral response, extended by clamping |
| 27 | real time and using real periodic labels. MT2007 Claim 19.1, p. 437; |
| 28 | ambient classical spectral curve derivation, definition 1. -/ |
| 29 | noncomputable def initialResponseCurve : ℝ → ℝ → EuclideanSpace ℝ ι := |
| 30 | fun t x => WithLp.toLp 2 (vectorPeriodicJet (L := L) 1 0 (by omega) |
| 31 | (initialResponseTrace (fun p : (ℤ × Fin 2) × ι => periodicSpectrum L p.1) |
| 32 | w hT F0 (projIcc 0 T hT t)) (x : AddCircle L)) |
| 33 | |
| 34 | /-- The actual candidate is jointly continuous, periodic, has the exact |
| 35 | initial value, and has its witnessed first spatial derivative at every |
| 36 | extended time. MT2007 Claim 19.1, p. 437; ambient classical spectral |
| 37 | curve derivation, statement 2. No time derivative is asserted here. -/ |
| 38 | theorem initialResponseCurve_spec : |
| 39 | let lambda := fun p : (ℤ × Fin 2) × ι => periodicSpectrum L p.1 |
| 40 | let V := initialResponseTrace lambda w hT F0 |
| 41 | let q := initialResponseCurve (L := L) hT w F0 |
| 42 | Continuous (Function.uncurry q) ∧ |
| 43 | (∀ t, Function.Periodic (q t) L) ∧ |
| 44 | (∀ x, q 0 x = WithLp.toLp 2 |
| 45 | (vectorPeriodicJet (L := L) 1 0 (by omega) w (x : AddCircle L))) ∧ |
| 46 | ∀ (t x : ℝ), HasDerivAt (q t) (WithLp.toLp 2 |
| 47 | (vectorPeriodicJet (L := L) 1 1 (by omega) |
| 48 | (V (projIcc 0 T hT t)) (x : AddCircle L))) x := by |
| 49 | dsimp only |
| 50 | let lambda := fun p : (ℤ × Fin 2) × ι => periodicSpectrum L p.1 |
| 51 | let V := initialResponseTrace lambda w hT F0 |
| 52 | let E : (ι → ℝ) ≃L[ℝ] EuclideanSpace ℝ ι := |
| 53 | (PiLp.continuousLinearEquiv 2 ℝ (fun _ : ι => ℝ)).symm |
| 54 | let D := vectorPeriodicJet (L := L) (ι := ι) 1 0 (by omega) |
| 55 | have hcont : Continuous (fun z : ℝ × ℝ => |
| 56 | D (V (projIcc 0 T hT z.1)) (z.2 : AddCircle L)) := |
| 57 | continuous_eval.comp |
| 58 | ((D.continuous.comp (V.continuous.comp |
| 59 | (continuous_projIcc.comp continuous_fst))).prodMk |
| 60 | ((AddCircle.continuous_mk' L).comp continuous_snd)) |
| 61 | refine ⟨E.continuous.comp hcont, ?_, ?_, ?_⟩ |
| 62 | · intro t x |
| 63 | change E (D (V (projIcc 0 T hT t)) ((x + L : ℝ) : AddCircle L)) = _ |
| 64 | rw [AddCircle.coe_add_period] |
| 65 | rfl |
| 66 | · intro x |
| 67 | unfold initialResponseCurve |
| 68 | rw [projIcc_left, (initialResponseTrace_spec lambda w hT F0).1] |
| 69 | · intro t x |
| 70 | exact E.toContinuousLinearMap.hasFDerivAt.comp_hasDerivAt x |
| 71 | (hasDerivAt_vectorPeriodicJet (L := L) (k := 1) (j := 0) (by omega) |
| 72 | (V (projIcc 0 T hT t)) x) |
| 73 | |
| 74 | /-- A smooth actual response orbit gives smooth spatial slices of the |
| 75 | Euclidean candidate and continuous representatives of all spatial jets |
| 76 | through the closed slab. MT2007 Claim 19.1, p. 437; ambient classical |
| 77 | spectral curve derivation, statement 3. -/ |
| 78 | theorem initialResponseCurve_spatial_jets : |
| 79 | let lambda := fun p : (ℤ × Fin 2) × ι => periodicSpectrum L p.1 |
| 80 | let q := initialResponseCurve (L := L) hT w F0 |
| 81 | ContDiffAt ℝ ∞ (fun s : ℝ => initialResponseTrace lambda |
| 82 | (vectorPeriodicSpectralTranslation (L := L) s w) hT |
| 83 | ((vectorPeriodicSpectralTranslation (L := L) s).compLpL 2 (timeMeasure T) F0)) 0 → |
| 84 | (∀ t : ℝ, ContDiff ℝ ∞ (q t)) ∧ |
| 85 | ∀ k : ℕ, ∃ J : C(Icc (0 : ℝ) T, C(AddCircle L, EuclideanSpace ℝ ι)), |
| 86 | ∀ (t : Icc (0 : ℝ) T) (x : ℝ), |
| 87 | iteratedDeriv k (q (t : ℝ)) x = J t (x : AddCircle L) := by |
| 88 | dsimp only |
| 89 | intro horbit |
| 90 | let lambda := fun p : (ℤ × Fin 2) × ι => periodicSpectrum L p.1 |
| 91 | let V := initialResponseTrace lambda w hT F0 |
| 92 | let E : (ι → ℝ) ≃L[ℝ] EuclideanSpace ℝ ι := |
| 93 | (PiLp.continuousLinearEquiv 2 ℝ (fun _ : ι => ℝ)).symm |
| 94 | let P := E.toContinuousLinearMap.compLeftContinuous ℝ (AddCircle L) |
| 95 | obtain ⟨hspace, hjets⟩ := initialResponseTrace_spatial_jets (L := L) hT w F0 horbit |
| 96 | constructor |
| 97 | · intro t |
| 98 | exact E.contDiff.comp (hspace (projIcc 0 T hT t)) |
| 99 | · intro k |
| 100 | obtain ⟨J, hJ⟩ := hjets k |
| 101 | refine ⟨⟨fun t => P (J t), P.continuous.comp J.continuous⟩, ?_⟩ |
| 102 | intro t x |
| 103 | have hq : initialResponseCurve (L := L) hT w F0 (t : ℝ) = |
| 104 | E.toContinuousLinearMap ∘ (fun y : ℝ => |
| 105 | vectorPeriodicJet (L := L) 1 0 (by omega) (V t) (y : AddCircle L)) := by |
| 106 | funext y |
| 107 | simp only [initialResponseCurve, projIcc_val] |
| 108 | rfl |
| 109 | rw [hq, iteratedDeriv_comp_clm E.toContinuousLinearMap k |
| 110 | ((hspace t).contDiffAt.of_le (ENat.natCast_le_of_coe_top_le_withTop le_rfl k)), hJ] |
| 111 | rfl |
| 112 | |
| 113 | end PoincareMT.M63 |