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.Analysis.Smooth.ClosedExtension |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.Analysis.Translated.LpConvergence |
| 3 | |
| 4 | /-! |
| 5 | # Strong smooth approximation by inward translations |
| 6 | |
| 7 | The smooth extensions retain the actual translated germs along the |
| 8 | closed set, while the original value and derivative L2 classes give |
| 9 | strong convergence. No smooth boundary trace is required. |
| 10 | Source: Morrey ICM 1950, pp. 181-185; Lemaire 1982, p. 102; |
| 11 | M64 derivation `2026-09-26-inward-boundary-approximation.md`. |
| 12 | |
| 13 | Morgan--Tian context: Lemma 19.15, printed pp. 447-449. This project analytic helper |
| 14 | supports the actual annular minimizer and boundary regularity construction. |
| 15 | -/ |
| 16 | |
| 17 | noncomputable section |
| 18 | set_option autoImplicit false |
| 19 | set_option warningAsError true |
| 20 | |
| 21 | open Set Filter MeasureTheory |
| 22 | open scoped Topology ContDiff |
| 23 | |
| 24 | namespace PoincareMT |
| 25 | |
| 26 | variable {d : ℕ} {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 27 | |
| 28 | local notation "X" => EuclideanSpace ℝ (Fin d) |
| 29 | |
| 30 | /-- A C1 interior map with L2 value and derivatives has global C1 |
| 31 | approximants equal to its inward translates near the closed set. |
| 32 | The value and every coordinate derivative converge strongly there. |
| 33 | Source: Morrey ICM pp. 181-185; M64 inward approximation derivation. -/ |
| 34 | theorem m64_exists_contDiff_inward_approximation |
| 35 | {O K : Set X} (hO : IsOpen O) (hK : IsClosed K) |
| 36 | {u : X → E} (hs : ContDiffOn ℝ 1 u O) |
| 37 | (hu : MemLp u 2 (volume.restrict O)) |
| 38 | (hD : ∀ i : Fin d, MemLp (fun x => fderiv ℝ u x (EuclideanSpace.single i 1)) |
| 39 | 2 (volume.restrict O)) |
| 40 | {h : ℕ → X} {a : X} (hh : Tendsto h atTop (𝓝 a)) |
| 41 | (hbase : ∀ᵐ x ∂volume.restrict K, x + a ∈ O) |
| 42 | (hshift : ∀ j, MapsTo (fun x => x + h j) K O) : |
| 43 | ∃ f : ℕ → X → E, (∀ j, ContDiff ℝ 1 (f j)) ∧ |
| 44 | (∀ j x, x ∈ K → f j =ᶠ[𝓝 x] fun y => u (y + h j)) ∧ |
| 45 | Tendsto (fun j => eLpNorm (fun x => f j x - u (x + a)) |
| 46 | 2 (volume.restrict K)) atTop (𝓝 0) ∧ |
| 47 | ∀ i : Fin d, Tendsto (fun j => eLpNorm (fun x => |
| 48 | fderiv ℝ (f j) x (EuclideanSpace.single i 1) - |
| 49 | fderiv ℝ u (x + a) (EuclideanSpace.single i 1)) |
| 50 | 2 (volume.restrict K)) atTop (𝓝 0) := by |
| 51 | have hex (j : ℕ) : ∃ f : X → E, ContDiff ℝ 1 f ∧ |
| 52 | ∀ x ∈ K, f =ᶠ[𝓝 x] fun y => u (y + h j) := by |
| 53 | apply m64_exists_contDiff_eq_nhds_of_isClosed hK |
| 54 | (hO.preimage (continuous_id.add continuous_const)) (hshift j) |
| 55 | exact hs.comp (contDiff_id.add contDiff_const).contDiffOn (fun _ hx => hx) |
| 56 | choose f hf hmatch using hex |
| 57 | refine ⟨f, hf, hmatch, ?_, ?_⟩ |
| 58 | · have hlim := m64MemLp_add_restrict_tendsto hO.measurableSet hK.measurableSet |
| 59 | hu hh hbase hshift |
| 60 | apply hlim.congr |
| 61 | intro j |
| 62 | apply eLpNorm_congr_ae |
| 63 | filter_upwards [ae_restrict_mem hK.measurableSet] with x hx |
| 64 | rw [(hmatch j x hx).self_of_nhds] |
| 65 | · intro i |
| 66 | have hlim := m64MemLp_add_restrict_tendsto hO.measurableSet hK.measurableSet |
| 67 | (hD i) hh hbase hshift |
| 68 | apply hlim.congr |
| 69 | intro j |
| 70 | apply eLpNorm_congr_ae |
| 71 | filter_upwards [ae_restrict_mem hK.measurableSet] with x hx |
| 72 | rw [(hmatch j x hx).fderiv_eq, fderiv_comp_add_right] |
| 73 | |
| 74 | end PoincareMT |