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.Compact.PartialDerivativeBounds |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Real.GeometricH1Composition |
| 3 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Time.ParameterH1Composition |
| 4 | |
| 5 | /-! |
| 6 | # Compact C2 coefficients on actual H2 trace states |
| 7 | |
| 8 | The full complex decoder identifies the tame and differentiable H1 |
| 9 | realizations. The resulting C1 maps have uniform Lipschitz constants |
| 10 | on every state ball. MT2007 Claim 19.1, p. 437; |
| 11 | `2026-09-21-compact-tame-h1-coefficients.md`. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open PoincareMT.SpectralHeatNative |
| 17 | |
| 18 | namespace PoincareMT.M63 |
| 19 | |
| 20 | variable {L : ℝ} [Fact (0 < L)] {ι : Type*} [Fintype ι] |
| 21 | |
| 22 | /-- A compact C2 scalar coefficient has an actual C1 H1 realization, |
| 23 | with a time-uniform Lipschitz bound on each state ball. MT2007 |
| 24 | Claim 19.1, p. 437; compact tame H1 derivation, statement 1. -/ |
| 25 | theorem exists_compact_scalarH1_coefficient |
| 26 | (f : ℝ × ((Fin 2 × ι) → ℝ) → ℝ) |
| 27 | (hf : ContDiff ℝ 2 f) (hc : HasCompactSupport f) : |
| 28 | ∃ G : ℝ × State ((ℤ × Fin 2) × ι) → lp (fun _ : ℤ => ℂ) 2, |
| 29 | ContDiff ℝ 1 G ∧ |
| 30 | (∀ t u x, periodicSobolevJet (L := L) 0 0 (by omega) (G (t, u)) x = |
| 31 | (f (t, fun j : Fin 2 × ι => |
| 32 | vectorPeriodicJet (L := L) 1 j.1 (by omega) u x j.2) : ℂ)) ∧ |
| 33 | ∀ R : ℝ, 0 ≤ R → ∃ K : NNReal, ∀ t u v, ‖u‖ ≤ R → ‖v‖ ≤ R → |
| 34 | ‖G (t, u) - G (t, v)‖ ≤ K * ‖u - v‖ := by |
| 35 | let J := Fin 2 × ι |
| 36 | let f1 := fun t z => (fderiv ℝ f (t, z)).comp (ContinuousLinearMap.inr ℝ ℝ (J → ℝ)) |
| 37 | obtain ⟨hfc, A, B, hfd, hfL⟩ := exists_uniform_partial_derivative_bounds hf hc |
| 38 | obtain ⟨D, _hDcont, hDdecode, hDtame⟩ := exists_realScalarH1_composition (L := L) |
| 39 | (fun t z => f (t, z)) f1 hf.continuous hfc (fun t z => (hfd t z).1) |
| 40 | A.coe_nonneg B.coe_nonneg (fun t z => (hfd t z).2) |
| 41 | (fun t z w => by simpa only [dist_eq_norm] using (hfL t).dist_le_mul z w) |
| 42 | obtain ⟨G, hG, hGdecode⟩ := exists_timeParameter_scalarH1_composition (L := L) 1 f |
| 43 | (by simpa only [Nat.cast_one, one_add_one_eq_two] using hf) |
| 44 | have hGD (t : ℝ) (u : State ((ℤ × Fin 2) × ι)) : G (t, u) = D t u := by |
| 45 | apply periodicH1Decoder_injective (L := L) |
| 46 | apply ContinuousMap.ext |
| 47 | intro x |
| 48 | rw [hGdecode, hDdecode] |
| 49 | refine ⟨G, hG, hGdecode, ?_⟩ |
| 50 | intro R hR |
| 51 | let d := ‖(⟨(fun n : ℤ => 1 / Real.sqrt (1 + (2 * Real.pi * (n : ℝ) / L) ^ 2)), |
| 52 | memℓp_periodic_decayWeight (Fact.out : 0 < L)⟩ : lp (fun _ : ℤ => ℝ) 2)‖ |
| 53 | let c : ℝ := 4 * (1 + (Fintype.card J : ℝ)) |
| 54 | have hK : 0 ≤ c * ((A : ℝ) + B * d * R) := by dsimp [c, d]; positivity |
| 55 | refine ⟨⟨c * ((A : ℝ) + B * d * R), hK⟩, ?_⟩ |
| 56 | intro t u v _hu hv |
| 57 | rw [hGD, hGD] |
| 58 | apply (hDtame t u v).trans |
| 59 | change c * ((A : ℝ) + B * d * ‖v‖) * ‖u - v‖ ≤ |
| 60 | c * ((A : ℝ) + B * d * R) * ‖u - v‖ |
| 61 | dsimp only [c, d] |
| 62 | gcongr |
| 63 | |
| 64 | /-- Compact C2 vector coefficients retain their full complex identities |
| 65 | and a uniform local Lipschitz bound in the actual state norm. MT2007 |
| 66 | Claim 19.1, p. 437; compact tame H1 derivation, statement 2. -/ |
| 67 | theorem exists_compact_vectorH1_coefficient |
| 68 | (f : ℝ × ((Fin 2 × ι) → ℝ) → (ι → ℝ)) |
| 69 | (hf : ContDiff ℝ 2 f) (hc : HasCompactSupport f) : |
| 70 | ∃ G : ℝ × State ((ℤ × Fin 2) × ι) → State ((ℤ × Fin 2) × ι), |
| 71 | ContDiff ℝ 1 G ∧ |
| 72 | (∀ t u x i, periodicSobolevJet (L := L) 0 0 (by omega) |
| 73 | (complexLpRealEquiv.symm (lpFinitePiEquiv ℝ (G (t, u)) i)) x = |
| 74 | (f (t, fun j : Fin 2 × ι => |
| 75 | vectorPeriodicJet (L := L) 1 j.1 (by omega) u x j.2) i : ℂ)) ∧ |
| 76 | ∀ R : ℝ, 0 ≤ R → ∃ K : NNReal, ∀ t u v, ‖u‖ ≤ R → ‖v‖ ≤ R → |
| 77 | ‖G (t, u) - G (t, v)‖ ≤ K * ‖u - v‖ := by |
| 78 | let J := Fin 2 × ι |
| 79 | let f1 := fun t z => (fderiv ℝ f (t, z)).comp (ContinuousLinearMap.inr ℝ ℝ (J → ℝ)) |
| 80 | obtain ⟨hfc, A, B, hfd, hfL⟩ := exists_uniform_partial_derivative_bounds hf hc |
| 81 | obtain ⟨D, _hDcont, hDdecode, hDtame⟩ := exists_realVectorH1_composition (L := L) |
| 82 | (fun t z => f (t, z)) f1 hf.continuous hfc (fun t z => (hfd t z).1) |
| 83 | A.coe_nonneg B.coe_nonneg (fun t z => (hfd t z).2) |
| 84 | (fun t z w => by simpa only [dist_eq_norm] using (hfL t).dist_le_mul z w) |
| 85 | obtain ⟨G, hG, hGdecode⟩ := exists_timeParameter_vectorH1_composition (L := L) 1 f |
| 86 | (by simpa only [Nat.cast_one, one_add_one_eq_two] using hf) |
| 87 | have hGD (t : ℝ) (u : State ((ℤ × Fin 2) × ι)) : G (t, u) = D t u := by |
| 88 | apply (lpFinitePiEquiv (α := ℤ × Fin 2) (ι := ι) (E := ℝ) ℝ).injective |
| 89 | funext i |
| 90 | apply complexLpRealEquiv.symm.injective |
| 91 | apply periodicH1Decoder_injective (L := L) |
| 92 | apply ContinuousMap.ext |
| 93 | intro x |
| 94 | rw [hGdecode, hDdecode] |
| 95 | refine ⟨G, hG, hGdecode, ?_⟩ |
| 96 | intro R hR |
| 97 | let d := ‖(⟨(fun n : ℤ => 1 / Real.sqrt (1 + (2 * Real.pi * (n : ℝ) / L) ^ 2)), |
| 98 | memℓp_periodic_decayWeight (Fact.out : 0 < L)⟩ : lp (fun _ : ℤ => ℝ) 2)‖ |
| 99 | let c : ℝ := (1 + (Fintype.card ι : ℝ)) * (4 * (1 + (Fintype.card J : ℝ))) |
| 100 | have hK : 0 ≤ c * ((A : ℝ) + B * d * R) := by dsimp [c, d]; positivity |
| 101 | refine ⟨⟨c * ((A : ℝ) + B * d * R), hK⟩, ?_⟩ |
| 102 | intro t u v _hu hv |
| 103 | rw [hGD, hGD] |
| 104 | apply (hDtame t u v).trans |
| 105 | change c * ((A : ℝ) + B * d * ‖v‖) * ‖u - v‖ ≤ |
| 106 | c * ((A : ℝ) + B * d * R) * ‖u - v‖ |
| 107 | dsimp only [c, d] |
| 108 | gcongr |
| 109 | |
| 110 | end PoincareMT.M63 |