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.Exponential.InitialValue.InitialVector |
| 2 | |
| 3 | /-! |
| 4 | # Injectivity on a fixed stable carrier |
| 5 | |
| 6 | Morgan-Tian Definitions 6.25-6.27 and Proposition 6.28, pp. 116-117. |
| 7 | Uniqueness of the minimizing path gives branch equality; the actual initial |
| 8 | derivative then recovers the initial vector. No endpoint injectivity is assumed. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | universe u |
| 14 | |
| 15 | namespace PoincareMT.M14 |
| 16 | |
| 17 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 18 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 19 | {T τ : ℝ} {x : G.Point} |
| 20 | |
| 21 | private theorem minimizing_curves_eqOn_of_endpoint_eq {y z : G.Point} |
| 22 | (p : M14BackwardPath G T 0 τ x y) (q : M14BackwardPath G T 0 τ x z) |
| 23 | (h : y = z) |
| 24 | (hunique : ∀ r : M14BackwardPath G T 0 τ x y, |
| 25 | M14IsMinimizing r → Set.EqOn r.curve p.curve (Set.Icc 0 τ)) |
| 26 | (hq : M14IsMinimizing q) : Set.EqOn q.curve p.curve (Set.Icc 0 τ) := by |
| 27 | cases h |
| 28 | exact hunique q hq |
| 29 | |
| 30 | /-- The actual spacetime endpoint is injective on the stable carrier, |
| 31 | Morgan-Tian Proposition 6.28, p. 117. -/ |
| 32 | theorem stable_endpoint_injective {E : M14ExponentialFamily G T x} |
| 33 | (H : M14StableSet G T τ x E) : Set.InjOn H.endpoint_map H.carrier := by |
| 34 | intro Z hZ W hW heq |
| 35 | obtain ⟨p, hpcurve, _, hpunique⟩ := H.minimizing_path Z hZ |
| 36 | obtain ⟨q, hqcurve, hqmin, _⟩ := H.minimizing_path W hW |
| 37 | have hqp := minimizing_curves_eqOn_of_endpoint_eq p q heq hpunique hqmin |
| 38 | have hbranch : Set.EqOn (fun t => E.gamma Z (Real.sqrt t)) |
| 39 | (fun t => E.gamma W (Real.sqrt t)) (Set.Icc 0 τ) := by |
| 40 | intro t ht |
| 41 | exact (hpcurve ht).symm.trans ((hqp ht).symm.trans (hqcurve ht)) |
| 42 | apply initialVector_eq_of_backward_branches_eqOn E |
| 43 | (H.survivor Z hZ) (H.survivor W hW) (Real.sqrt_pos.mpr H.tau_pos) |
| 44 | simpa only [Real.sq_sqrt H.tau_pos.le] using hbranch |
| 45 | |
| 46 | /-- The endpoint in the actual earlier-time slice is injective on the same |
| 47 | stable carrier, Morgan-Tian Proposition 6.28, p. 117. -/ |
| 48 | theorem stable_slice_endpoint_injective {E : M14ExponentialFamily G T x} |
| 49 | (H : M14StableSet G T τ x E) : Set.InjOn H.endpoint_slice_map H.carrier := by |
| 50 | intro Z hZ W hW heq |
| 51 | apply stable_endpoint_injective H hZ hW |
| 52 | calc |
| 53 | H.endpoint_map Z = (H.endpoint_slice_map Z).val := |
| 54 | (H.endpoint_slice_map_val Z hZ).symm |
| 55 | _ = (H.endpoint_slice_map W).val := congrArg Subtype.val heq |
| 56 | _ = H.endpoint_map W := H.endpoint_slice_map_val W hW |
| 57 | |
| 58 | end PoincareMT.M14 |