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.SourceNames.LGeometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Ordinary.Capture.OrdinaryCaptureAction |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Path.PathCongruence |
| 4 | |
| 5 | /-! |
| 6 | # Captured action values and minimality |
| 7 | |
| 8 | Morgan-Tian Definitions 6.1-6.2, pp. 105-106, Definition 6.45, p. 129, |
| 9 | and Lemma 7.2, p. 150. Exact transport of the actual competitor classes |
| 10 | identifies both action infima and minimizing paths. No attainment or |
| 11 | boundedness hypothesis is substituted for equality of those classes. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M14 |
| 22 | |
| 23 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 24 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 25 | {C : Type u} [TopologicalSpace C] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) C] [IsManifold (𝓡 n) ∞ C] |
| 27 | [T3Space C] [ConnectedSpace C] [SecondCountableTopology C] |
| 28 | [MeasurableSpace C] [BorelSpace C] {K : SpacetimeInterval} |
| 29 | {e : CompatibleSpacetimeCylinder G.spacetime (G.timeIntervals.interval K) C} |
| 30 | {g : SpacetimeCylinderMetric e} {F : RicciFlow n C K.domain} {T τmax : ℝ} |
| 31 | (D : M14OrdinaryCaptureData G C K e g F T τmax) |
| 32 | (hCoordinates : SpacetimeGaugeTheory.{u, u} G.leafwise G.timeIntervals) |
| 33 | |
| 34 | include hCoordinates |
| 35 | |
| 36 | /-- A lifted ordinary competitor has exactly its original action, |
| 37 | Definitions 6.1-6.2, pp. 105-106. -/ |
| 38 | theorem ordinaryCapture_lift_action {τ₁ τ₂ : ℝ} {x y : G.Point} |
| 39 | (hx : x ∈ range e.toSpacetime) (hy : y ∈ range e.toSpacetime) |
| 40 | (htx : G.spacetime.timeFunction x = T - τ₁) |
| 41 | (hty : G.spacetime.timeFunction y = T - τ₂) |
| 42 | (q : BackwardTimePath F T τ₁ τ₂) |
| 43 | (hq₁ : q.curve τ₁ = D.point_map x) (hq₂ : q.curve τ₂ = D.point_map y) : |
| 44 | ∃ p : M14BackwardPath G T τ₁ τ₂ x y, |
| 45 | backwardLLength F T τ₁ τ₂ q.curve = M14BackwardLAction G p := by |
| 46 | obtain ⟨p, hc, hp⟩ := ordinaryCapture_exists_mapped_lift D hx hy htx hty q hq₁ hq₂ |
| 47 | exact ⟨p, (M08.backwardLLength_congr F T q.ordered.le hp).symm.trans |
| 48 | (ordinaryCapture_action_transport D hCoordinates p hc)⟩ |
| 49 | |
| 50 | /-- Generalized and ordinary action sets coincide under capture, using |
| 51 | their actual fixed endpoints, Definitions 6.1-6.2, pp. 105-106. -/ |
| 52 | theorem ordinaryCapture_actionSet_transport {τ₁ τ₂ : ℝ} {x y : G.Point} |
| 53 | (hmax : τ₂ ≤ τmax) (hx : x ∈ range e.toSpacetime) |
| 54 | (hy : y ∈ range e.toSpacetime) |
| 55 | (htx : G.spacetime.timeFunction x = T - τ₁) |
| 56 | (hty : G.spacetime.timeFunction y = T - τ₂) : |
| 57 | M14ActionSet G T τ₁ τ₂ x y = |
| 58 | {a | ∃ q : BackwardTimePath F T τ₁ τ₂, |
| 59 | q.curve τ₁ = D.point_map x ∧ q.curve τ₂ = D.point_map y ∧ |
| 60 | a = backwardLLength F T τ₁ τ₂ q.curve} := by |
| 61 | ext a |
| 62 | constructor |
| 63 | · rintro ⟨p, hp⟩ |
| 64 | let hc := D.capture_from_start τ₁ τ₂ x y hmax hx p |
| 65 | refine ⟨D.path_map τ₁ τ₂ x y p hc, D.path_start_eq τ₁ τ₂ x y p hc, |
| 66 | D.path_end_eq τ₁ τ₂ x y p hc, ?_⟩ |
| 67 | exact hp.symm.trans (ordinaryCapture_action_transport D hCoordinates p hc).symm |
| 68 | · rintro ⟨q, hq₁, hq₂, ha⟩ |
| 69 | obtain ⟨p, hp⟩ := ordinaryCapture_lift_action D hCoordinates hx hy htx hty q hq₁ hq₂ |
| 70 | exact ⟨p, hp.symm.trans ha.symm⟩ |
| 71 | |
| 72 | /-- Positive-time reduced lengths agree for the actual captured |
| 73 | spacetime endpoints, Definition 6.45, p. 129. -/ |
| 74 | theorem ordinaryCapture_reducedLength_transport {τ : ℝ} {x y : G.Point} |
| 75 | (hτ : 0 < τ) (hmax : τ ≤ τmax) |
| 76 | (htx : G.spacetime.timeFunction x = T) |
| 77 | (hty : G.spacetime.timeFunction y = T - τ) |
| 78 | (hx : x ∈ range e.toSpacetime) (hy : y ∈ range e.toSpacetime) : |
| 79 | M14ReducedLengthValue G T 0 τ x y = |
| 80 | reducedLength F T (D.point_map x) (D.point_map y) τ := by |
| 81 | have htx' : G.spacetime.timeFunction x = T - 0 := by simpa only [sub_zero] using htx |
| 82 | unfold M14ReducedLengthValue M14ActionValue |
| 83 | rw [ordinaryCapture_actionSet_transport D hCoordinates hmax hx hy htx' hty] |
| 84 | simp only [reducedLength, dif_pos hτ] |
| 85 | |
| 86 | /-- Captured generalized minimality is exactly ordinary minimality |
| 87 | for the supplied mapped path, Definitions 6.1-6.2 and Lemma 7.2, |
| 88 | pp. 105-106, 150. -/ |
| 89 | theorem ordinaryCapture_minimizing_transport {τ₁ τ₂ : ℝ} {x y : G.Point} |
| 90 | (hmax : τ₂ ≤ τmax) (hx : x ∈ range e.toSpacetime) |
| 91 | (p : M14BackwardPath G T τ₁ τ₂ x y) |
| 92 | (hc : ∀ s ∈ Icc τ₁ τ₂, p.curve s ∈ range e.toSpacetime) : |
| 93 | M14IsMinimizing p ↔ |
| 94 | IsMinimizingBackwardLPath F T τ₁ τ₂ (D.path_map τ₁ τ₂ x y p hc) := by |
| 95 | have hy : y ∈ range e.toSpacetime := by |
| 96 | have h := hc τ₂ ⟨p.tau_lt.le, le_rfl⟩ |
| 97 | rwa [p.curve_end] at h |
| 98 | constructor |
| 99 | · intro hp q hq₁ hq₂ |
| 100 | obtain ⟨r, hr⟩ := ordinaryCapture_lift_action D hCoordinates hx hy |
| 101 | p.base_time p.endpoint_time q |
| 102 | (hq₁.trans (D.path_start_eq τ₁ τ₂ x y p hc)) |
| 103 | (hq₂.trans (D.path_end_eq τ₁ τ₂ x y p hc)) |
| 104 | rw [ordinaryCapture_action_transport D hCoordinates p hc, hr] |
| 105 | exact hp r |
| 106 | · intro hp r |
| 107 | let hr := D.capture_from_start τ₁ τ₂ x y hmax hx r |
| 108 | rw [← ordinaryCapture_action_transport D hCoordinates p hc, |
| 109 | ← ordinaryCapture_action_transport D hCoordinates r hr] |
| 110 | apply hp (D.path_map τ₁ τ₂ x y r hr) |
| 111 | · exact (D.path_start_eq τ₁ τ₂ x y r hr).trans |
| 112 | (D.path_start_eq τ₁ τ₂ x y p hc).symm |
| 113 | · exact (D.path_end_eq τ₁ τ₂ x y r hr).trans |
| 114 | (D.path_end_eq τ₁ τ₂ x y p hc).symm |
| 115 | |
| 116 | end PoincareMT.M14 |