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.Generalized.ReducedGeometry.SmallTime.Candidates.SmallTimeCandidateSmooth |
| 2 | |
| 3 | /-! |
| 4 | # Actual coordinate speeds of restricted exponential candidates |
| 5 | |
| 6 | The supplied path agrees with the smooth family on each closed short |
| 7 | square interval. Unique within derivatives at both endpoints preserve |
| 8 | the uniform coordinate-speed bound under restriction. |
| 9 | Morgan-Tian Lemma 6.22 and Corollary 6.79, pp. 115-116, 144-145. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff Bundle |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M14 |
| 20 | |
| 21 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 22 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 23 | {T : ℝ} {x : G.Point} |
| 24 | |
| 25 | /-- Restricting the common coordinate derivative bound gives the |
| 26 | actual supplied path's speed bound through both closed short-time |
| 27 | endpoints, Lemma 6.22 and Corollary 6.79, pp. 115-116, 144-145. -/ |
| 28 | theorem smallTimeCandidate_coordinate_speed_le (E : M14ExponentialFamily G T x) |
| 29 | (b : G.gaugeCover.index) |
| 30 | (lift : G.Point → (G.timeIntervals.interval (G.gaugeCover.interval b)).Point × |
| 31 | G.gaugeCover.spatial b) |
| 32 | (W : G.Horizontal x) {s d M : ℝ} (hs : 0 < s) (hsd : s ≤ d) |
| 33 | (hD : (W, s) ∈ E.domain) |
| 34 | (hcoord : ContDiffOn ℝ ∞ (fun r => (lift (E.gamma W r)).2.val) (Icc 0 d)) |
| 35 | (hM : ∀ r ∈ Icc 0 d, |
| 36 | ‖derivWithin (fun t => (lift (E.gamma W t)).2.val) (Icc 0 d) r‖ ≤ M) : |
| 37 | ∀ r ∈ Icc 0 s, |
| 38 | ‖derivWithin (fun t => (lift ((E.path W s hD hs).curve (t ^ 2))).2.val) |
| 39 | (Icc 0 s) r‖ ≤ M := by |
| 40 | have hsub : Icc 0 s ⊆ Icc 0 d := fun _ hr => ⟨hr.1, hr.2.trans hsd⟩ |
| 41 | have heq : EqOn (fun t => (lift ((E.path W s hD hs).curve (t ^ 2))).2.val) |
| 42 | (fun t => (lift (E.gamma W t)).2.val) (Icc 0 s) := by |
| 43 | intro t ht |
| 44 | have hsq : t ^ 2 ∈ Icc 0 (s ^ 2) := |
| 45 | ⟨sq_nonneg t, (sq_le_sq₀ ht.1 hs.le).mpr ht.2⟩ |
| 46 | change (lift ((E.path W s hD hs).curve (t ^ 2))).2.val = (lift (E.gamma W t)).2.val |
| 47 | rw [E.path_coherent W s hD hs (t ^ 2) hsq, Real.sqrt_sq ht.1] |
| 48 | intro r hr |
| 49 | rw [derivWithin_congr heq (heq hr), derivWithin_subset hsub |
| 50 | (uniqueDiffOn_Icc hs r hr) ((hcoord r (hsub hr)).differentiableWithinAt (by simp))] |
| 51 | exact hM r (hsub hr) |
| 52 | |
| 53 | end PoincareMT.M14 |