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.Paths.Action.LLength |
| 2 | |
| 3 | /-! |
| 4 | # Restricting an admissible generalized backward path |
| 5 | |
| 6 | Morgan-Tian Definition 6.2, p. 106, and the action decomposition used in |
| 7 | Proposition 6.30, p. 118. Restriction preserves the actual curve and horizontal |
| 8 | velocity; it does not introduce a corner or assert prefix minimality. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped intervalIntegral |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | namespace PoincareMT.M14 |
| 18 | |
| 19 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 20 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 21 | {T τ₁ τ₂ : ℝ} {x y : G.Point} |
| 22 | |
| 23 | /-- Restrict a backward path to a nondegenerate closed subinterval, retaining |
| 24 | the absolute backward clock; Morgan-Tian Definition 6.2, p. 106. -/ |
| 25 | def restrictPath (p : M14BackwardPath G T τ₁ τ₂ x y) |
| 26 | (a b : ℝ) (ha : τ₁ ≤ a) (hab : a < b) (hb : b ≤ τ₂) : |
| 27 | M14BackwardPath G T a b (p.curve a) (p.curve b) where |
| 28 | tau_nonneg := p.tau_nonneg.trans ha |
| 29 | tau_lt := hab |
| 30 | base_time := p.curve_time a ⟨ha, hab.le.trans hb⟩ |
| 31 | endpoint_time := p.curve_time b ⟨ha.trans hab.le, hb⟩ |
| 32 | curve := p.curve |
| 33 | curve_start := rfl |
| 34 | curve_end := rfl |
| 35 | curve_time := fun t ht => p.curve_time t ⟨ha.trans ht.1, ht.2.trans hb⟩ |
| 36 | curve_continuous := p.curve_continuous.mono |
| 37 | (fun _ ht => ⟨ha.trans ht.1, ht.2.trans hb⟩) |
| 38 | curve_regular := p.curve_regular.mono |
| 39 | (fun _ ht => ⟨ha.trans_lt ht.1, ht.2.trans_le hb⟩) |
| 40 | horizontal_velocity := p.horizontal_velocity |
| 41 | derivative_eq := fun t ht => p.derivative_eq t |
| 42 | ⟨ha.trans_lt ht.1, ht.2.trans_le hb⟩ |
| 43 | action_integrable := p.action_integrable.mono_set (by |
| 44 | rw [Set.uIcc_of_le hab.le, Set.uIcc_of_le p.tau_lt.le] |
| 45 | exact fun _ ht => ⟨ha.trans ht.1, ht.2.trans hb⟩) |
| 46 | |
| 47 | /-- Restricted action is the original density integrated over the subinterval, |
| 48 | Morgan-Tian Definition 6.2, p. 106. -/ |
| 49 | theorem action_restrictPath (p : M14BackwardPath G T τ₁ τ₂ x y) |
| 50 | (a b : ℝ) (ha : τ₁ ≤ a) (hab : a < b) (hb : b ≤ τ₂) : |
| 51 | M14BackwardLAction G (restrictPath p a b ha hab hb) = |
| 52 | ∫ t in a..b, M14BackwardLIntegrand G p t := rfl |
| 53 | |
| 54 | /-- Actions add exactly when an admissible path is split at an interior time, |
| 55 | as used in Morgan-Tian Proposition 6.30, p. 118. -/ |
| 56 | theorem action_split (p : M14BackwardPath G T τ₁ τ₂ x y) |
| 57 | {a : ℝ} (ha : a ∈ Set.Ioo τ₁ τ₂) : |
| 58 | M14BackwardLAction G (restrictPath p τ₁ a le_rfl ha.1 ha.2.le) + |
| 59 | M14BackwardLAction G (restrictPath p a τ₂ ha.1.le ha.2 le_rfl) = |
| 60 | M14BackwardLAction G p := by |
| 61 | exact intervalIntegral.integral_add_adjacent_intervals |
| 62 | (restrictPath p τ₁ a le_rfl ha.1 ha.2.le).action_integrable |
| 63 | (restrictPath p a τ₂ ha.1.le ha.2 le_rfl).action_integrable |
| 64 | |
| 65 | end PoincareMT.M14 |