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.Stability.StrictPrefix |
| 2 | |
| 3 | /-! |
| 4 | # Full stable carriers at earlier positive times |
| 5 | |
| 6 | The actual time range supplies a slice point even when the stable |
| 7 | carrier is empty. Strict-prefix stability and the retained minimizing |
| 8 | path then give backward carrier inclusion and the exact endpoint |
| 9 | clause. Morgan-Tian Proposition 6.30, pp. 118-119, and the backward |
| 10 | star argument in Proposition 6.81, pp. 145-146. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 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 | /-- Every allowed positive slice has its full stable-set record, |
| 26 | including an empty stable carrier, Proposition 6.28, p. 117. -/ |
| 27 | theorem stableSet_nonempty_of_allowed (E : M14ExponentialFamily G T x) |
| 28 | (hτ : 0 < τ) (hallowed : T - τ ∈ I.domain) : |
| 29 | Nonempty (M14StableSet G T τ x E) := by |
| 30 | have hrange : range G.spacetime.timeFunction = I.domain := G.spacetime.time_range |
| 31 | obtain ⟨q, hq⟩ := hrange.symm ▸ hallowed |
| 32 | exact ⟨stableSetOfSlicePoint E hτ ⟨q, hq⟩⟩ |
| 33 | |
| 34 | /-- A full terminal stable record makes every intermediate time |
| 35 | allowed, even without a member of its carrier, Proposition 6.81, |
| 36 | pp. 145-146. -/ |
| 37 | theorem stableSet_past_allowed (E : M14ExponentialFamily G T x) |
| 38 | (H : M14StableSet G T τ x E) : Icc (T - τ) T ⊆ I.domain := by |
| 39 | have hrange : range G.spacetime.timeFunction = I.domain := G.spacetime.time_range |
| 40 | have hleft : T - τ ∈ I.domain := hrange ▸ |
| 41 | (show T - τ ∈ range G.spacetime.timeFunction from |
| 42 | ⟨(H.endpoint_slice_map 0).val, (H.endpoint_slice_map 0).property⟩) |
| 43 | have hright : T ∈ I.domain := hrange ▸ |
| 44 | (show T ∈ range G.spacetime.timeFunction from ⟨x, E.base_time⟩) |
| 45 | exact I.ordConnected.out hleft hright |
| 46 | |
| 47 | /-- Every earlier full stable carrier contains the later one, |
| 48 | Proposition 6.30, pp. 118-119. -/ |
| 49 | theorem stableSet_carrier_mono_backward |
| 50 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 51 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 52 | (E : M14ExponentialFamily G T x) (H : M14StableSet G T τ x E) |
| 53 | (Hσ : M14StableSet G T σ x E) (hle : σ ≤ τ) : |
| 54 | H.carrier ⊆ Hσ.carrier := by |
| 55 | intro Z hZ |
| 56 | apply (Hσ.carrier_exact Z).mpr |
| 57 | rcases hle.eq_or_lt with heq | hlt |
| 58 | · subst σ |
| 59 | exact (H.carrier_exact Z).mp hZ |
| 60 | · exact stableInitialVector_prefix hCoordinates hM04 hM12 E Hσ.tau_pos hlt |
| 61 | ((H.carrier_exact Z).mp hZ) |
| 62 | |
| 63 | /-- A full stable carrier exists at every earlier positive time and |
| 64 | contains the supplied terminal carrier, Proposition 6.81, pp. 145-146. -/ |
| 65 | theorem exists_stableSet_backward |
| 66 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 67 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 68 | (E : M14ExponentialFamily G T x) (H : M14StableSet G T τ x E) |
| 69 | (hσ : 0 < σ) (hle : σ ≤ τ) : |
| 70 | ∃ Hσ : M14StableSet G T σ x E, H.carrier ⊆ Hσ.carrier := by |
| 71 | obtain ⟨Hσ⟩ := stableSet_nonempty_of_allowed E hσ |
| 72 | (stableSet_past_allowed E H ⟨sub_le_sub_left hle T, sub_le_self T hσ.le⟩) |
| 73 | exact ⟨Hσ, stableSet_carrier_mono_backward hCoordinates hM04 hM12 E H Hσ hle⟩ |
| 74 | |
| 75 | /-- One actual minimizing path realizes every earlier stable endpoint, |
| 76 | the backward-star clause used in Proposition 6.81, pp. 145-146. -/ |
| 77 | theorem stableSet_backward_star |
| 78 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 79 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 80 | (E : M14ExponentialFamily G T x) (H : M14StableSet G T τ x E) |
| 81 | {Z : G.Horizontal x} (hZ : Z ∈ H.carrier) : |
| 82 | ∃ p : M14BackwardPath G T 0 τ x (H.endpoint_map Z), M14IsMinimizing p ∧ |
| 83 | ∀ σ ∈ Ioc 0 τ, ∃ Hσ : M14StableSet G T σ x E, |
| 84 | Z ∈ Hσ.carrier ∧ p.curve σ = Hσ.endpoint_map Z := by |
| 85 | obtain ⟨p, hcurve, hmin, _⟩ := H.minimizing_path Z hZ |
| 86 | refine ⟨p, hmin, ?_⟩ |
| 87 | intro σ hσ |
| 88 | obtain ⟨Hσ, hsub⟩ := exists_stableSet_backward hCoordinates hM04 hM12 E H hσ.1 hσ.2 |
| 89 | exact ⟨Hσ, hsub hZ, (hcurve ⟨hσ.1.le, hσ.2⟩).trans (Hσ.endpoint_map_eq Z (hsub hZ)).symm⟩ |
| 90 | |
| 91 | end PoincareMT.M14 |