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 | /- |
| 2 | Adapted from AxelWorkspace revision f1cdb30cabdc8781d2d3dec86d3d99ab1820f30e. |
| 3 | Source and SHA-256: references/analysis/axel-workspace/weak-parabolic-regularity-sources.json. |
| 4 | Apache-2.0; see the license in that source directory. |
| 5 | -/ |
| 6 | import PoincareLib.Analysis.Parabolic.WeakRegularity.Basic |
| 7 | import Mathlib.Analysis.Calculus.ContDiff.Operations |
| 8 | import Mathlib.MeasureTheory.Function.LocallyIntegrable |
| 9 | import Mathlib.MeasureTheory.Integral.Bochner.Basic |
| 10 | import Mathlib.MeasureTheory.Measure.Haar.InnerProductSpace |
| 11 | |
| 12 | /-! |
| 13 | # The local parabolic equation with its canonical adjoint |
| 14 | |
| 15 | Time here is the increasing parabolic time, hence backward Ricci-flow time |
| 16 | when applying this equation to a conjugate-heat density. Both the test operator |
| 17 | and the Lebesgue pairing are defined from the coefficients. The legacy |
| 18 | `WeakParabolicSolution` is deliberately not used. |
| 19 | |
| 20 | Reference: Morgan--Tian, Proposition 9.20, proof on p. 208. |
| 21 | -/ |
| 22 | |
| 23 | open MeasureTheory Set |
| 24 | open scoped ContDiff Topology |
| 25 | |
| 26 | noncomputable section |
| 27 | |
| 28 | namespace Poincare.Analysis.Parabolic.WeakRegularity.Canonical |
| 29 | |
| 30 | variable {n : ℕ} |
| 31 | |
| 32 | def spatialDirection (i : Fin n) : Spacetime n := |
| 33 | (EuclideanSpace.single i 1, 0) |
| 34 | |
| 35 | def spatialDeriv (i : Fin n) (u : Spacetime n → ℝ) (z : Spacetime n) : ℝ := |
| 36 | fderiv ℝ u z (spatialDirection i) |
| 37 | |
| 38 | def timeDeriv (u : Spacetime n → ℝ) (z : Spacetime n) : ℝ := |
| 39 | fderiv ℝ u z (0, 1) |
| 40 | |
| 41 | /-- Coefficients of `P = ∂t - aⁱʲ∂i∂j + bⁱ∂i + c`. -/ |
| 42 | structure Coefficients (n : ℕ) where |
| 43 | principal : Fin n → Fin n → Spacetime n → ℝ |
| 44 | drift : Fin n → Spacetime n → ℝ |
| 45 | zeroth : Spacetime n → ℝ |
| 46 | |
| 47 | def Coefficients.IsSmoothOn (C : Coefficients n) (U : Set (Spacetime n)) : Prop := |
| 48 | (∀ i j, ContDiffOn ℝ ∞ (C.principal i j) U) ∧ |
| 49 | (∀ i, ContDiffOn ℝ ∞ (C.drift i) U) ∧ ContDiffOn ℝ ∞ C.zeroth U |
| 50 | |
| 51 | def Coefficients.IsUniformlyEllipticOn (C : Coefficients n) |
| 52 | (U : Set (Spacetime n)) : Prop := |
| 53 | ∃ κ : ℝ, 0 < κ ∧ ∀ z ∈ U, ∀ ξ : Euclid n, |
| 54 | κ * ‖ξ‖ ^ 2 ≤ ∑ i, ∑ j, C.principal i j z * ξ i * ξ j |
| 55 | |
| 56 | def Coefficients.operator (C : Coefficients n) (u : Spacetime n → ℝ) |
| 57 | (z : Spacetime n) : ℝ := |
| 58 | timeDeriv u z - (∑ i, ∑ j, C.principal i j z * spatialDeriv i (spatialDeriv j u) z) + |
| 59 | (∑ i, C.drift i z * spatialDeriv i u z) + C.zeroth z * u z |
| 60 | |
| 61 | def Coefficients.adjoint (C : Coefficients n) (φ : Spacetime n → ℝ) |
| 62 | (z : Spacetime n) : ℝ := |
| 63 | -timeDeriv φ z - (∑ i, ∑ j, |
| 64 | spatialDeriv j (spatialDeriv i (fun y => C.principal i j y * φ y)) z) - |
| 65 | (∑ i, spatialDeriv i (fun y => C.drift i y * φ y) z) + C.zeroth z * φ z |
| 66 | |
| 67 | /-- The distributional equation uses smooth tests compactly supported in the |
| 68 | open region and an actual Lebesgue integral. -/ |
| 69 | def WeakSolutionOn (C : Coefficients n) (u : Spacetime n → ℝ) |
| 70 | (U : Set (Spacetime n)) : Prop := |
| 71 | LocallyIntegrableOn u U volume ∧ |
| 72 | ∀ φ : Spacetime n → ℝ, ContDiff ℝ ∞ φ → HasCompactSupport φ → tsupport φ ⊆ U → |
| 73 | (∫ z, u z * C.adjoint φ z) = 0 |
| 74 | |
| 75 | end Poincare.Analysis.Parabolic.WeakRegularity.Canonical |