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.Analysis.Periodic.H2JetCoordinates |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.Analysis.Periodic.H1Product |
| 3 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Vector.PeriodicJets |
| 4 | |
| 5 | /-! |
| 6 | # Actual H1 coordinates for geometric coefficients |
| 7 | |
| 8 | The first two vector jets supply the existing H1 composition theorem's |
| 9 | input. The actual H1 product acts on finite real spectral states, with |
| 10 | its complex identity retained. MT2007 Claim 19.1, p. 437; |
| 11 | `2026-09-21-geometric-h1-jet-coordinates.md`, statements 4-6. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open PoincareMT.SpectralHeatNative |
| 17 | |
| 18 | namespace PoincareMT.M63 |
| 19 | |
| 20 | variable {L : ℝ} {ι : Type*} [Fintype ι] |
| 21 | |
| 22 | /-- The literal position and first-derivative H1 coordinates of a |
| 23 | finite real H2 trace state. MT2007 Claim 19.1, p. 437; geometric H1 |
| 24 | jet coordinate derivation, statement 4. -/ |
| 25 | noncomputable def vectorPeriodicH1JetCoordinates : |
| 26 | State ((ℤ × Fin 2) × ι) →L[ℝ] ((Fin 2 × ι) → lp (fun _ : ℤ => ℂ) 2) := |
| 27 | ContinuousLinearMap.pi (fun p : Fin 2 × ι => |
| 28 | ((periodicH2JetCoordinates (L := L) p.1 (by omega)).restrictScalars ℝ).comp |
| 29 | (complexLpRealEquiv.symm.toContinuousLinearEquiv.toContinuousLinearMap.comp |
| 30 | ((ContinuousLinearMap.proj p.2).comp |
| 31 | (lpFinitePiEquiv ℝ).toContinuousLinearMap))) |
| 32 | |
| 33 | variable [Fact (0 < L)] |
| 34 | |
| 35 | /-- The actual H1 first-jet map is contractive, with both complex and |
| 36 | real reconstruction identities. MT2007 Claim 19.1, p. 437; geometric |
| 37 | H1 jet coordinate derivation, statement 5. -/ |
| 38 | theorem vectorPeriodicH1JetCoordinates_spec (u : State ((ℤ × Fin 2) × ι)) : |
| 39 | ‖vectorPeriodicH1JetCoordinates (L := L) u‖ ≤ ‖u‖ ∧ |
| 40 | (∀ p : Fin 2 × ι, |
| 41 | periodicSobolevJet (L := L) 0 0 (by omega) |
| 42 | (vectorPeriodicH1JetCoordinates (L := L) u p) = |
| 43 | periodicSobolevJet (L := L) 1 p.1 (by omega) |
| 44 | (complexLpRealEquiv.symm (lpFinitePiEquiv ℝ u p.2))) ∧ |
| 45 | ∀ (p : Fin 2 × ι) (x : AddCircle L), |
| 46 | (periodicSobolevJet (L := L) 0 0 (by omega) |
| 47 | (vectorPeriodicH1JetCoordinates (L := L) u p) x).re = |
| 48 | vectorPeriodicJet (L := L) 1 p.1 (by omega) u x p.2 := by |
| 49 | have hc (p : Fin 2 × ι) := periodicH2JetCoordinates_spec (L := L) |
| 50 | p.1 (by omega) (complexLpRealEquiv.symm (lpFinitePiEquiv ℝ u p.2)) |
| 51 | refine ⟨?_, fun p => (hc p).2, ?_⟩ |
| 52 | · rw [pi_norm_le_iff_of_nonneg (norm_nonneg u)] |
| 53 | intro p |
| 54 | exact (hc p).1.trans (by |
| 55 | rw [LinearIsometryEquiv.norm_map] |
| 56 | exact (norm_le_pi_norm (lpFinitePiEquiv ℝ u) p.2).trans (norm_lpFinitePiEquiv_le ℝ u)) |
| 57 | · intro p x |
| 58 | change (periodicSobolevJet (L := L) 0 0 (by omega) |
| 59 | (periodicH2JetCoordinates (L := L) p.1 (by omega) |
| 60 | (complexLpRealEquiv.symm (lpFinitePiEquiv ℝ u p.2))) x).re = _ |
| 61 | rw [(hc p).2] |
| 62 | rfl |
| 63 | |
| 64 | /-- The completed H1 product gives an actual finite-state coefficient |
| 65 | action. Its real formula requires the decoded coefficient to be real. |
| 66 | MT2007 Claim 19.1, p. 437; geometric H1 jet coordinate derivation, |
| 67 | statement 6. No injectivity of the real decoder is used. -/ |
| 68 | theorem exists_vectorPeriodicH1_product : |
| 69 | let D := periodicSobolevJet (L := L) 0 0 (by omega) |
| 70 | let Z := fun (u : State ((ℤ × Fin 2) × ι)) (i : ι) => |
| 71 | complexLpRealEquiv.symm (lpFinitePiEquiv ℝ u i) |
| 72 | ∃ M : lp (fun _ : ℤ => ℂ) 2 →L[ℝ] |
| 73 | State ((ℤ × Fin 2) × ι) →L[ℝ] State ((ℤ × Fin 2) × ι), |
| 74 | (∀ a u i, D (Z (M a u) i) = D a * D (Z u i)) ∧ |
| 75 | ‖M‖ ≤ (1 + (Fintype.card ι : ℝ)) * 4 * |
| 76 | ‖(⟨(fun n : ℤ => 1 / Real.sqrt (1 + (2 * Real.pi * (n : ℝ) / L) ^ 2)), |
| 77 | memℓp_periodic_decayWeight (Fact.out : 0 < L)⟩ : lp (fun _ : ℤ => ℝ) 2)‖ ∧ |
| 78 | ∀ a, (∀ x, (D a x).im = 0) → ∀ u x i, |
| 79 | vectorPeriodicJet (L := L) 0 0 (by omega) (M a u) x i = |
| 80 | (D a x).re * vectorPeriodicJet (L := L) 0 0 (by omega) u x i := by |
| 81 | let H := lp (fun _ : ℤ => ℂ) 2 |
| 82 | let S := lpFinitePiEquiv (α := ℤ × Fin 2) (ι := ι) (E := ℝ) ℝ |
| 83 | let R := complexLpRealEquiv (ι := ℤ) |
| 84 | let D := periodicSobolevJet (L := L) 0 0 (by omega) |
| 85 | let Z := fun (u : State ((ℤ × Fin 2) × ι)) (i : ι) => R.symm (S u i) |
| 86 | let d := ‖(⟨(fun n : ℤ => 1 / Real.sqrt (1 + (2 * Real.pi * (n : ℝ) / L) ^ 2)), |
| 87 | memℓp_periodic_decayWeight (Fact.out : 0 < L)⟩ : lp (fun _ : ℤ => ℝ) 2)‖ |
| 88 | obtain ⟨B, hB, hBnorm⟩ := exists_periodicH1_product (L := L) |
| 89 | let BR := B.bilinearRestrictScalars ℝ |
| 90 | let W : H →ₗ[ℝ] State ((ℤ × Fin 2) × ι) →ₗ[ℝ] State ((ℤ × Fin 2) × ι) := |
| 91 | LinearMap.mk₂ ℝ (fun a u => S.symm (fun i => R (BR a (Z u i)))) |
| 92 | (by |
| 93 | intro a b u |
| 94 | simp only [map_add, add_apply, ← Pi.add_def]) |
| 95 | (by |
| 96 | intro c a u |
| 97 | simp only [map_smul, smul_apply, ← Pi.smul_def]) |
| 98 | (by |
| 99 | intro a u v |
| 100 | simp only [Z, map_add, Pi.add_apply, ← Pi.add_def]) |
| 101 | (by |
| 102 | intro c a u |
| 103 | simp only [Z, map_smul, Pi.smul_apply, ← Pi.smul_def]) |
| 104 | have hW (a : H) (u : State ((ℤ × Fin 2) × ι)) : |
| 105 | ‖W a u‖ ≤ ((1 + (Fintype.card ι : ℝ)) * 4 * d) * ‖a‖ * ‖u‖ := by |
| 106 | have hcomponent (i : ι) : ‖R (BR a (Z u i))‖ ≤ (4 * d) * ‖a‖ * ‖u‖ := by |
| 107 | rw [R.norm_map] |
| 108 | have hZ : ‖Z u i‖ ≤ ‖u‖ := by |
| 109 | change ‖R.symm (S u i)‖ ≤ _ |
| 110 | rw [R.symm.norm_map] |
| 111 | exact (norm_le_pi_norm (S u) i).trans (norm_lpFinitePiEquiv_le ℝ u) |
| 112 | calc |
| 113 | _ ≤ ‖B‖ * ‖a‖ * ‖Z u i‖ := B.le_opNorm₂ _ _ |
| 114 | _ ≤ (4 * d) * ‖a‖ * ‖u‖ := by gcongr |
| 115 | have hp : ‖(fun i => R (BR a (Z u i)))‖ ≤ (4 * d) * ‖a‖ * ‖u‖ := |
| 116 | (pi_norm_le_iff_of_nonneg (by positivity)).mpr hcomponent |
| 117 | calc |
| 118 | _ ≤ (1 + (Fintype.card ι : ℝ)) * ‖(fun i => R (BR a (Z u i)))‖ := |
| 119 | norm_lpFinitePiEquiv_symm_le ℝ _ |
| 120 | _ ≤ (1 + (Fintype.card ι : ℝ)) * ((4 * d) * ‖a‖ * ‖u‖) := by gcongr |
| 121 | _ = _ := by ring |
| 122 | let M := W.mkContinuous₂ ((1 + (Fintype.card ι : ℝ)) * 4 * d) hW |
| 123 | have hM (a : H) (u : State ((ℤ × Fin 2) × ι)) (i : ι) : |
| 124 | D (Z (M a u) i) = D a * D (Z u i) := by |
| 125 | change D (R.symm (S (S.symm (fun i => R (BR a (Z u i)))) i)) = _ |
| 126 | rw [S.apply_symm_apply, R.symm_apply_apply] |
| 127 | exact hB a (Z u i) |
| 128 | refine ⟨M, hM, W.mkContinuous₂_norm_le (by positivity) hW, ?_⟩ |
| 129 | intro a ha u x i |
| 130 | change (D (Z (M a u) i) x).re = (D a x).re * (D (Z u i) x).re |
| 131 | rw [hM] |
| 132 | change ((D a x) * (D (Z u i) x)).re = _ |
| 133 | rw [Complex.mul_re, ha x, zero_mul, sub_zero] |
| 134 | |
| 135 | end PoincareMT.M63 |