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.Surgery.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.ExistenceData |
| 3 | import PoincareLib.Geometry.RicciFlow.Positivity.PointwiseFlatness |
| 4 | import PoincareLib.Geometry.Riemannian.MetricComparison |
| 5 | import Mathlib.Analysis.Calculus.Deriv.MeanValue |
| 6 | |
| 7 | /-! |
| 8 | # Metric contraction on the actual standard flow |
| 9 | |
| 10 | Morgan-Tian Proposition 12.31, pp. 325-326, uses decreasing distances to |
| 11 | keep a fixed regular region in one fixed-radius ball. Nonnegative |
| 12 | sectional curvature and the actual Ricci-flow equation make every metric |
| 13 | quadratic form decrease. The resulting norm and ball comparisons require |
| 14 | no terminal metric or geodesic-existence assumption. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open Set |
| 20 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 21 | |
| 22 | namespace PoincareMT.RepairedStandardCapExistenceData |
| 23 | |
| 24 | /-- Proposition 12.31, pp. 325-326: the selected standard metric decreases |
| 25 | as a quadratic form along the actual flow. -/ |
| 26 | theorem metric_inner_antitone {g₀ : StandardInitialMetric} |
| 27 | (E : RepairedStandardCapExistenceData g₀) (x : StandardCapSpace) |
| 28 | (v : TangentSpace (𝓡 3) x) : |
| 29 | AntitoneOn (fun t => (E.flow.metric t).inner x v v) (Ico 0 E.flow.base.lifetime) := by |
| 30 | apply antitoneOn_of_hasDerivWithinAt_nonpos (convex_Ico 0 E.flow.base.lifetime) |
| 31 | (fun t ht => (E.flow.base.flow.equation t ht x v v).continuousWithinAt) |
| 32 | (fun t ht => (E.flow.base.flow.equation t (interior_subset ht) x v v).mono interior_subset) |
| 33 | intro t ht |
| 34 | exact mul_nonpos_of_nonpos_of_nonneg (by norm_num) |
| 35 | (M04.nonneg_ricci_of_nonnegativeSectionalAt (E.flow.connection t) x |
| 36 | (E.nonnegative_sectional t (interior_subset ht) x) v) |
| 37 | |
| 38 | /-- Proposition 12.31, pp. 325-326: every fixed tangent norm decreases |
| 39 | between two times of the selected standard flow. -/ |
| 40 | theorem tangentNorm_le_of_time_le {g₀ : StandardInitialMetric} |
| 41 | (E : RepairedStandardCapExistenceData g₀) {s t : ℝ} |
| 42 | (hs : s ∈ Ico 0 E.flow.base.lifetime) (ht : t ∈ Ico 0 E.flow.base.lifetime) |
| 43 | (hst : s ≤ t) (x : StandardCapSpace) (v : TangentSpace (𝓡 3) x) : |
| 44 | (E.flow.metric t).tangentNorm x v ≤ (E.flow.metric s).tangentNorm x v := |
| 45 | Real.sqrt_le_sqrt (E.metric_inner_antitone x v hs ht hst) |
| 46 | |
| 47 | /-- Proposition 12.31, pp. 325-326: an earlier fixed ball remains inside |
| 48 | the later ball of the same radius because the actual metric contracts. -/ |
| 49 | theorem ball_subset_of_time_le {g₀ : StandardInitialMetric} |
| 50 | (E : RepairedStandardCapExistenceData g₀) {s t : ℝ} |
| 51 | (hs : s ∈ Ico 0 E.flow.base.lifetime) (ht : t ∈ Ico 0 E.flow.base.lifetime) |
| 52 | (hst : s ≤ t) (x : StandardCapSpace) (r : ℝ) : |
| 53 | (E.flow.metric s).ball x r ⊆ (E.flow.metric t).ball x r := by |
| 54 | simpa only [one_mul] using |
| 55 | (E.flow.metric s).ball_subset_ball_of_tangentNorm_le (E.flow.metric t) x r 1 |
| 56 | zero_lt_one (fun y _ v => by simpa only [one_mul] using |
| 57 | E.tangentNorm_le_of_time_le hs ht hst y v) |
| 58 | |
| 59 | end PoincareMT.RepairedStandardCapExistenceData |