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.RicciFlow.ReducedGeometry.ReducedVolume.Analysis.Smoothing.MollifierBasics |
| 2 | import Mathlib.Analysis.Calculus.FDeriv.Congr |
| 3 | |
| 4 | /-! |
| 5 | # Locality of shrinking normalized convolutions |
| 6 | |
| 7 | Small kernels only see a prescribed neighborhood. Germ equality of |
| 8 | two scalar functions therefore gives germ equality of their small |
| 9 | convolutions, and hence equality of the first two jets. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Filter Metric MeasureTheory ContinuousLinearMap |
| 15 | open scoped Topology ContDiff Convolution |
| 16 | |
| 17 | namespace PoincareMT.ReducedVolume |
| 18 | |
| 19 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 20 | [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] |
| 21 | {μ : Measure E} [Measure.IsAddHaarMeasure μ] |
| 22 | |
| 23 | /-- Equal functions on a ball have equal small convolutions on the half ball. -/ |
| 24 | theorem normed_convolution_eqOn_of_eqOn (κ : ContDiffBump (0 : E)) |
| 25 | {f g : E → ℝ} {x : E} {r : ℝ} (hκ : κ.rOut ≤ r / 2) |
| 26 | (hfg : EqOn f g (ball x r)) : |
| 27 | EqOn (κ.normed μ ⋆[lsmul ℝ ℝ, μ] f) |
| 28 | (κ.normed μ ⋆[lsmul ℝ ℝ, μ] g) (ball x (r / 2)) := by |
| 29 | intro y hy |
| 30 | apply integral_congr_ae |
| 31 | apply Eventually.of_forall |
| 32 | intro z |
| 33 | by_cases hz : κ.normed μ z = 0 |
| 34 | · simp only [hz, lsmul_apply, zero_smul] |
| 35 | · have hzn : ‖z‖ < κ.rOut := by |
| 36 | have hmem : z ∈ Function.support (κ.normed μ) := hz |
| 37 | simpa only [κ.support_normed_eq, mem_ball, dist_zero_right] using hmem |
| 38 | have hmem : y - z ∈ ball x r := by |
| 39 | rw [mem_ball_iff_norm] at hy ⊢ |
| 40 | calc |
| 41 | ‖y - z - x‖ = ‖(y - x) - z‖ := by congr 1; abel |
| 42 | _ ≤ ‖y - x‖ + ‖z‖ := norm_sub_le _ _ |
| 43 | _ < r / 2 + r / 2 := add_lt_add hy (hzn.trans_le hκ) |
| 44 | _ = r := add_halves r |
| 45 | change κ.normed μ z * f (y - z) = κ.normed μ z * g (y - z) |
| 46 | rw [hfg hmem] |
| 47 | |
| 48 | /-- Germ equality gives eventual germ equality after convolution by shrinking kernels. -/ |
| 49 | theorem eventually_normed_convolution_eventuallyEq {κ : ℕ → ContDiffBump (0 : E)} |
| 50 | (hκ : Tendsto (fun j ↦ (κ j).rOut) atTop (𝓝 0)) |
| 51 | {f g : E → ℝ} {x : E} (hfg : f =ᶠ[𝓝 x] g) : |
| 52 | ∀ᶠ j in atTop, (κ j).normed μ ⋆[lsmul ℝ ℝ, μ] f =ᶠ[𝓝 x] |
| 53 | (κ j).normed μ ⋆[lsmul ℝ ℝ, μ] g := by |
| 54 | obtain ⟨r, hr, hball⟩ := Metric.mem_nhds_iff.mp hfg |
| 55 | have he : ∀ᶠ j in atTop, (κ j).rOut < r / 2 := |
| 56 | hκ (eventually_lt_nhds (half_pos hr)) |
| 57 | filter_upwards [he] with j hj |
| 58 | exact (normed_convolution_eqOn_of_eqOn (κ j) hj.le hball).eventuallyEq_of_mem |
| 59 | (ball_mem_nhds x (half_pos hr)) |
| 60 | |
| 61 | end PoincareMT.ReducedVolume |