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.Analysis.Calculus.MeanValue |
| 2 | import Mathlib.Topology.Instances.ENNReal.Lemmas |
| 3 | |
| 4 | /-! |
| 5 | # Derivative bounds through continuous interval endpoints |
| 6 | |
| 7 | The interior mean-value estimate extends to the closed interval by |
| 8 | continuity. Applied to the fixed-coordinate metric jets, this gives |
| 9 | uniform control of their initial values in Morgan-Tian Theorem 12.5, |
| 10 | p. 297; see fixed-chart-endpoint.md. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | |
| 17 | /-- An interior derivative bound controls differences at both included |
| 18 | endpoints (Theorem 12.5, p. 297, endpoint calculus). -/ |
| 19 | theorem norm_sub_le_of_interior_deriv_bound_Icc |
| 20 | {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 21 | {f : ℝ → E} {a b C : ℝ} (hab : a < b) (hC : 0 ≤ C) |
| 22 | (hf : ContinuousOn f (Icc a b)) |
| 23 | (hd : ∀ t ∈ Ioo a b, DifferentiableAt ℝ f t) |
| 24 | (hb : ∀ t ∈ Ioo a b, ‖deriv f t‖ ≤ C) |
| 25 | {s t : ℝ} (hs : s ∈ Icc a b) (ht : t ∈ Icc a b) : |
| 26 | ‖f t - f s‖ ≤ C * |t - s| := by |
| 27 | have hl : LipschitzOnWith ⟨C, hC⟩ f (Ioo a b) := |
| 28 | (convex_Ioo a b).lipschitzOnWith_of_nnnorm_deriv_le hd (fun t ht => hb t ht) |
| 29 | have hc : ContinuousOn f (closure (Ioo a b)) := by rwa [closure_Ioo hab.ne] |
| 30 | have hclosed : LipschitzOnWith ⟨C, hC⟩ f (Icc a b) := by |
| 31 | simpa only [closure_Ioo hab.ne] using LipschitzOnWith.closure hc hl |
| 32 | convert! hclosed.dist_le_mul t ht s hs using 1 |
| 33 | simp only [dist_eq_norm] |