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 Mathlib.MeasureTheory.Function.LpSpace.ContinuousCompMeasurePreserving |
| 2 | import Mathlib.MeasureTheory.Function.LpSpace.Complete |
| 3 | import Mathlib.MeasureTheory.Function.LpSpace.Indicator |
| 4 | import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace |
| 5 | import Mathlib.MeasureTheory.Group.Integral |
| 6 | |
| 7 | /-! |
| 8 | # Strong convergence of inward translations |
| 9 | |
| 10 | Continuity of the actual translation action on L2 passes to a restricted |
| 11 | set. The original open-domain function is extended by zero only in L2; |
| 12 | no derivative of that zero extension is asserted. |
| 13 | Source: Morrey ICM 1950, pp. 181-185; M64 inward-boundary-approximation |
| 14 | derivation, translation and extension step. |
| 15 | |
| 16 | Morgan--Tian context: Lemma 19.15, printed pp. 447-449. This project analytic helper |
| 17 | supports the actual annular minimizer and boundary regularity construction. |
| 18 | -/ |
| 19 | |
| 20 | noncomputable section |
| 21 | set_option autoImplicit false |
| 22 | set_option warningAsError true |
| 23 | |
| 24 | open Set Filter MeasureTheory |
| 25 | open scoped Topology |
| 26 | |
| 27 | namespace PoincareMT |
| 28 | |
| 29 | variable {d : ℕ} {E : Type*} [NormedAddCommGroup E] |
| 30 | {J : Type*} {l : Filter J} |
| 31 | |
| 32 | local notation "X" => EuclideanSpace ℝ (Fin d) |
| 33 | |
| 34 | /-- The literal translates of an L2 function converge in L2 when their translation vectors |
| 35 | converge. This is Mathlib's continuous composition action specialized to Euclidean |
| 36 | translations; see the M64 inward boundary approximation derivation. Source/construction: |
| 37 | proof-work/tasks/M64/derivations/2026-09-26-inward-boundary-approximation.md, Translation |
| 38 | and extension. -/ |
| 39 | theorem m64MemLp_add_tendsto {u : X → E} (hu : MemLp u 2 volume) |
| 40 | {h : J → X} {a : X} (hh : Tendsto h l (𝓝 a)) : |
| 41 | Tendsto (fun j => eLpNorm (fun x => u (x + h j) - u (x + a)) 2 volume) |
| 42 | l (𝓝 0) := by |
| 43 | let shift : C(X, C(X, X)) := |
| 44 | (⟨fun p : X × X => p.2 + p.1, continuous_snd.add continuous_fst⟩ : C(X × X, X)).curry |
| 45 | have hc : Continuous (fun v : X => |
| 46 | Lp.compMeasurePreserving (fun x => x + v) |
| 47 | (measurePreserving_add_right volume v) (hu.toLp u)) := |
| 48 | continuous_const.compMeasurePreservingLp shift.continuous |
| 49 | (fun v => measurePreserving_add_right volume v) (by norm_num) |
| 50 | have hlim := (hc.tendsto a).comp hh |
| 51 | have hmem (v : X) : MemLp (fun x => u (x + v)) 2 volume := |
| 52 | hu.comp_measurePreserving (measurePreserving_add_right volume v) |
| 53 | have heq (v : X) : Lp.compMeasurePreserving (fun x => x + v) |
| 54 | (measurePreserving_add_right volume v) (hu.toLp u) = |
| 55 | (hmem v).toLp (fun x => u (x + v)) := |
| 56 | Lp.toLp_compMeasurePreserving hu (measurePreserving_add_right volume v) |
| 57 | simp_rw [heq] at hlim |
| 58 | exact (Lp.tendsto_Lp_iff_tendsto_eLpNorm'' |
| 59 | (fun j x => u (x + h j)) (fun j => hmem (h j)) |
| 60 | (fun x => u (x + a)) (hmem a)).mp hlim |
| 61 | |
| 62 | /-- Inward translations converge strongly on a measurable set whose |
| 63 | unshifted image lies almost everywhere in the original domain. The |
| 64 | shifted images lie there pointwise, including the physical boundary. |
| 65 | Source: Morrey ICM pp. 181-185; M64 inward approximation derivation. -/ |
| 66 | theorem m64MemLp_add_restrict_tendsto {O K : Set X} |
| 67 | (hO : MeasurableSet O) (hK : MeasurableSet K) |
| 68 | {u : X → E} (hu : MemLp u 2 (volume.restrict O)) |
| 69 | {h : J → X} {a : X} (hh : Tendsto h l (𝓝 a)) |
| 70 | (hbase : ∀ᵐ x ∂volume.restrict K, x + a ∈ O) |
| 71 | (hshift : ∀ j, MapsTo (fun x => x + h j) K O) : |
| 72 | Tendsto (fun j => eLpNorm (fun x => u (x + h j) - u (x + a)) |
| 73 | 2 (volume.restrict K)) l (𝓝 0) := by |
| 74 | classical |
| 75 | let U := O.indicator u |
| 76 | have hU : MemLp U 2 volume := (memLp_indicator_iff_restrict hO).mpr hu |
| 77 | have hlim := m64MemLp_add_tendsto hU hh |
| 78 | have hb (j : J) : |
| 79 | eLpNorm (fun x => u (x + h j) - u (x + a)) 2 (volume.restrict K) ≤ |
| 80 | eLpNorm (fun x => U (x + h j) - U (x + a)) 2 volume := by |
| 81 | calc |
| 82 | _ = eLpNorm (fun x => U (x + h j) - U (x + a)) 2 (volume.restrict K) := by |
| 83 | apply eLpNorm_congr_ae |
| 84 | filter_upwards [ae_restrict_mem hK, hbase] with x hx ha |
| 85 | simp only [U, indicator_of_mem (hshift j hx), indicator_of_mem ha] |
| 86 | _ ≤ _ := eLpNorm_mono_measure _ Measure.restrict_le_self |
| 87 | exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hlim |
| 88 | (fun _ => bot_le) hb |
| 89 | |
| 90 | end PoincareMT |