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.Translation |
| 3 | import PoincareLib.Geometry.CurveShortening.Ramp.Analysis.HeatKernel |
| 4 | import Mathlib.MeasureTheory.Integral.Bochner.ContinuousLinearMap |
| 5 | |
| 6 | /-! |
| 7 | # Gaussian averaging on the actual periodic function space |
| 8 | |
| 9 | M03's positive normalized Gaussian gives a contraction on continuous |
| 10 | periodic functions, strongly continuous through initial time. MT2007 |
| 11 | Claim 19.1, p. 437; contract block 8 and |
| 12 | `2026-09-21-periodic-gaussian-initial-trace.md`, statements 3-8. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open MeasureTheory |
| 18 | |
| 19 | namespace PoincareMT.M63 |
| 20 | |
| 21 | variable {L : ℝ} [Fact (0 < L)] |
| 22 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] |
| 23 | |
| 24 | omit [CompleteSpace E] in |
| 25 | /-- The actual continuous-function-valued Gaussian integrand is Bochner |
| 26 | integrable, including at zero time. MT2007 Claim 19.1, p. 437; Gaussian |
| 27 | trace derivation, statement 3. -/ |
| 28 | theorem integrable_periodicGaussian (t : ℝ) (f : C(AddCircle L, E)) : |
| 29 | Integrable (fun s : ℝ => gaussianHeatKernel 1 s • |
| 30 | periodicTranslation (2 * Real.sqrt t * s) f) := by |
| 31 | have hK : Integrable (gaussianHeatKernel 1) := |
| 32 | (integrable_exp_neg_mul_sq (by norm_num : (0 : ℝ) < 1)).const_mul _ |
| 33 | have hc : Continuous (fun s : ℝ => gaussianHeatKernel 1 s • |
| 34 | periodicTranslation (2 * Real.sqrt t * s) f) := by |
| 35 | have hKc : Continuous (gaussianHeatKernel 1) := |
| 36 | continuous_iff_continuousAt.mpr (fun _ => gaussianHeatKernel_hasDerivAt.continuousAt) |
| 37 | have htrans : Continuous (fun s : ℝ => periodicTranslation (2 * Real.sqrt t * s) f) := |
| 38 | continuous_periodicTranslation.comp |
| 39 | ((continuous_const.mul continuous_id).prodMk continuous_const) |
| 40 | exact hKc.smul htrans |
| 41 | apply (hK.mul_const ‖f‖).mono' hc.stronglyMeasurable.aestronglyMeasurable |
| 42 | filter_upwards [] with s |
| 43 | rw [norm_smul, (periodicTranslation _).norm_map, Real.norm_eq_abs, |
| 44 | abs_of_pos (gaussianHeatKernel_pos (by norm_num) s)] |
| 45 | |
| 46 | omit [CompleteSpace E] in |
| 47 | /-- The normalized Gaussian bounds the norm of its actual Bochner |
| 48 | average. MT2007 Claim 19.1, p. 437; Gaussian trace derivation, statement 4. -/ |
| 49 | theorem norm_integral_periodicGaussian_le (t : ℝ) (f : C(AddCircle L, E)) : |
| 50 | ‖∫ s : ℝ, gaussianHeatKernel 1 s • |
| 51 | periodicTranslation (2 * Real.sqrt t * s) f‖ ≤ ‖f‖ := by |
| 52 | have hK : Integrable (gaussianHeatKernel 1) := |
| 53 | (integrable_exp_neg_mul_sq (by norm_num : (0 : ℝ) < 1)).const_mul _ |
| 54 | calc |
| 55 | _ ≤ ∫ s : ℝ, gaussianHeatKernel 1 s * ‖f‖ := by |
| 56 | apply norm_integral_le_of_norm_le (hK.mul_const _) |
| 57 | filter_upwards [] with s |
| 58 | rw [norm_smul, (periodicTranslation _).norm_map, Real.norm_eq_abs, |
| 59 | abs_of_pos (gaussianHeatKernel_pos (by norm_num) s)] |
| 60 | _ = ‖f‖ := by |
| 61 | rw [integral_mul_const, integral_gaussianHeatKernel (by norm_num), one_mul] |
| 62 | |
| 63 | /-- Gaussian averaging is the continuous linear map defined by the |
| 64 | actual Bochner integral. MT2007 Claim 19.1, p. 437; Gaussian trace |
| 65 | derivation, statement 5. -/ |
| 66 | noncomputable def periodicGaussianHeat (t : ℝ) : |
| 67 | C(AddCircle L, E) →L[ℝ] C(AddCircle L, E) := |
| 68 | LinearMap.mkContinuous |
| 69 | { toFun := fun f => ∫ s : ℝ, gaussianHeatKernel 1 s • |
| 70 | periodicTranslation (2 * Real.sqrt t * s) f |
| 71 | map_add' := by |
| 72 | intro f g |
| 73 | simp only [map_add, smul_add] |
| 74 | exact integral_add (integrable_periodicGaussian t f) (integrable_periodicGaussian t g) |
| 75 | map_smul' := by |
| 76 | intro c f |
| 77 | simp only [map_smul, RingHom.id_apply, smul_comm (gaussianHeatKernel 1 _) c] |
| 78 | exact integral_smul c _ } |
| 79 | 1 (fun f => by simpa using norm_integral_periodicGaussian_le t f) |
| 80 | |
| 81 | /-- Evaluation of the actual Gaussian average commutes with its Bochner |
| 82 | integral. MT2007 Claim 19.1, p. 437; Gaussian trace derivation, statement 6. -/ |
| 83 | theorem periodicGaussianHeat_apply (t : ℝ) (f : C(AddCircle L, E)) (x : AddCircle L) : |
| 84 | periodicGaussianHeat t f x = ∫ s : ℝ, gaussianHeatKernel 1 s • |
| 85 | f (x - ((2 * Real.sqrt t * s : ℝ) : AddCircle L)) := by |
| 86 | exact ((ContinuousMap.evalCLM ℝ x).integral_comp_comm |
| 87 | (integrable_periodicGaussian t f)).symm |
| 88 | |
| 89 | /-- The actual Gaussian average is contractive, fixes initial data at |
| 90 | zero, and is strongly continuous in real time. MT2007 Claim 19.1, p. 437; |
| 91 | Gaussian trace derivation, statement 7. -/ |
| 92 | theorem periodicGaussianHeat_properties (f : C(AddCircle L, E)) : |
| 93 | (∀ t : ℝ, ‖periodicGaussianHeat t f‖ ≤ ‖f‖) ∧ |
| 94 | periodicGaussianHeat 0 f = f ∧ Continuous (fun t : ℝ => periodicGaussianHeat t f) := by |
| 95 | refine ⟨fun t => norm_integral_periodicGaussian_le t f, ?_, ?_⟩ |
| 96 | · ext x |
| 97 | rw [periodicGaussianHeat_apply] |
| 98 | simp only [Real.sqrt_zero, mul_zero, zero_mul, AddCircle.coe_zero, sub_zero] |
| 99 | rw [integral_smul_const, integral_gaussianHeatKernel (by norm_num), one_smul] |
| 100 | · have hK : Integrable (gaussianHeatKernel 1) := |
| 101 | (integrable_exp_neg_mul_sq (by norm_num : (0 : ℝ) < 1)).const_mul _ |
| 102 | apply continuous_of_dominated (fun t => (integrable_periodicGaussian t f).aestronglyMeasurable) |
| 103 | (bound := fun s => gaussianHeatKernel 1 s * ‖f‖) |
| 104 | · intro t |
| 105 | filter_upwards [] with s |
| 106 | rw [norm_smul, (periodicTranslation _).norm_map, Real.norm_eq_abs, |
| 107 | abs_of_pos (gaussianHeatKernel_pos (by norm_num) s)] |
| 108 | · exact hK.mul_const _ |
| 109 | · filter_upwards [] with s |
| 110 | have htrans : Continuous (fun t : ℝ => periodicTranslation (2 * Real.sqrt t * s) f) := |
| 111 | continuous_periodicTranslation.comp |
| 112 | (((continuous_const.mul Real.continuous_sqrt).mul continuous_const).prodMk |
| 113 | continuous_const) |
| 114 | exact (continuous_const : Continuous (fun _ : ℝ => gaussianHeatKernel 1 s)).smul htrans |
| 115 | |
| 116 | variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] |
| 117 | |
| 118 | /-- Every bounded real linear postcomposition commutes with actual |
| 119 | Gaussian averaging. MT2007 Claim 19.1, p. 437; Gaussian trace derivation, |
| 120 | statement 8. -/ |
| 121 | theorem periodicGaussianHeat_comp (A : E →L[ℝ] F) (t : ℝ) (f : C(AddCircle L, E)) : |
| 122 | periodicGaussianHeat t (A.compLeftContinuous ℝ (AddCircle L) f) = |
| 123 | A.compLeftContinuous ℝ (AddCircle L) (periodicGaussianHeat t f) := by |
| 124 | change (∫ s : ℝ, gaussianHeatKernel 1 s • periodicTranslation (2 * Real.sqrt t * s) |
| 125 | (A.compLeftContinuous ℝ (AddCircle L) f)) = |
| 126 | A.compLeftContinuous ℝ (AddCircle L) |
| 127 | (∫ s : ℝ, gaussianHeatKernel 1 s • periodicTranslation (2 * Real.sqrt t * s) f) |
| 128 | rw [← (A.compLeftContinuous ℝ (AddCircle L)).integral_comp_comm |
| 129 | (integrable_periodicGaussian t f)] |
| 130 | congr 1 |
| 131 | funext s |
| 132 | ext x |
| 133 | exact (A.map_smul (gaussianHeatKernel 1 s) _).symm |
| 134 | |
| 135 | end PoincareMT.M63 |