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.Ordinary.Capture.OrdinaryCaptureRegularDomain |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Ordinary.Capture.OrdinaryCaptureRegularPoint |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Stability.StableOpenness |
| 4 | |
| 5 | /-! |
| 6 | # Identifying the canonical regular endpoint image |
| 7 | |
| 8 | Morgan-Tian Definition 6.25, Theorem 6.50 and Proposition 7.5, |
| 9 | pp. 116, 130-132, 151-152. The canonical ordinary regular image |
| 10 | lies in the exact supplied generalized stable image. Conversely, |
| 11 | the stable vector gives an ordinary regular-point record whose |
| 12 | total path is exactly the supplied captured path. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M14 |
| 23 | |
| 24 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 25 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 26 | {C : Type u} [TopologicalSpace C] |
| 27 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) C] [IsManifold (𝓡 n) ∞ C] |
| 28 | [T3Space C] [ConnectedSpace C] [SecondCountableTopology C] |
| 29 | [MeasurableSpace C] [BorelSpace C] {K : SpacetimeInterval} |
| 30 | {e : CompatibleSpacetimeCylinder G.spacetime (G.timeIntervals.interval K) C} |
| 31 | {g : SpacetimeCylinderMetric e} {F : RicciFlow n C K.domain} {τmax : ℝ} |
| 32 | (t₀ : (G.timeIntervals.interval K).Point) (c₀ : C) |
| 33 | (D : M14OrdinaryCaptureData G C K e g F t₀.val τmax) |
| 34 | (hCoordinates : SpacetimeGaugeTheory.{u, u} G.leafwise G.timeIntervals) |
| 35 | (hPath : M14PathCalculusConclusion G) |
| 36 | |
| 37 | include D hCoordinates hPath |
| 38 | |
| 39 | /-- An ordinary canonical regular endpoint in the captured slice is |
| 40 | an endpoint of the exact supplied stable set, Proposition 7.5, |
| 41 | pp. 151-152. -/ |
| 42 | theorem ordinaryCapture_regularImage_mem_stableImage |
| 43 | (E : M14ExponentialFamily G t₀.val (e.toSpacetime (t₀, c₀))) |
| 44 | {τ : ℝ} (H : M14StableSet G t₀.val τ (e.toSpacetime (t₀, c₀)) E) |
| 45 | (A : LExponentialGeometry F t₀.val τmax c₀) |
| 46 | (q : (G.slices (t₀.val - τ)).Point) (hq : q.val ∈ range e.toSpacetime) |
| 47 | (hreg : (D.point_map q.val, τ) ∈ A.regularImage) : |
| 48 | q ∈ H.endpoint_slice_map '' H.carrier := by |
| 49 | let W := (A.regular_chart.symm (D.point_map q.val, τ)).1 |
| 50 | have htime := A.regular_inverse_time (D.point_map q.val, τ) hreg |
| 51 | have hsource := A.regular_chart.map_target hreg |
| 52 | have hWreg : (W, τ) ∈ A.toLExponentialFamily.regularDomain := by |
| 53 | rw [A.regular_source] at hsource |
| 54 | change ((A.regular_chart.symm (D.point_map q.val, τ)).1, |
| 55 | (A.regular_chart.symm (D.point_map q.val, τ)).2) ∈ |
| 56 | A.toLExponentialFamily.regularDomain at hsource |
| 57 | simpa only [W, htime] using hsource |
| 58 | have hendpoint : A.gamma W τ = D.point_map q.val := by |
| 59 | have h := congrArg Prod.fst ((A.regular_forward |
| 60 | (A.regular_chart.symm (D.point_map q.val, τ))).symm.trans |
| 61 | (A.regular_chart.right_inv hreg)) |
| 62 | simpa only [W, htime] using h |
| 63 | have hstable := ordinaryCapture_stable_of_regular t₀ c₀ D hCoordinates hPath E A W hWreg |
| 64 | have hZH := (H.carrier_exact (g.spatialTangentEquiv t₀ c₀ W)).mpr hstable |
| 65 | have htransport := ordinaryCapture_unique_family_transport t₀ c₀ D hCoordinates hPath E |
| 66 | A.toLExponentialFamily W hWreg.1 |
| 67 | refine ⟨g.spatialTangentEquiv t₀ c₀ W, hZH, ?_⟩ |
| 68 | apply Subtype.ext |
| 69 | rw [H.endpoint_slice_map_val _ hZH, H.endpoint_map_eq _ hZH] |
| 70 | apply ordinaryCapture_point_injective D htransport.2.1 hq |
| 71 | · have hclock : G.spacetime.timeFunction |
| 72 | (E.gamma (g.spatialTangentEquiv t₀ c₀ W) (Real.sqrt τ)) = t₀.val - τ := by |
| 73 | simpa only [Real.sq_sqrt H.tau_pos.le] using E.clock _ _ htransport.1.1 |
| 74 | exact hclock.trans q.property.symm |
| 75 | · exact htransport.2.2.trans hendpoint |
| 76 | |
| 77 | /-- A supplied stable captured minimizing path is the exact total |
| 78 | path of an ordinary regular-point witness, Theorem 6.50 and |
| 79 | Proposition 7.5, pp. 130-132, 151-152. -/ |
| 80 | theorem ordinaryCapture_regular_point_at_cylinder |
| 81 | (hDifferential : ReducedLengthDifferentialTheory F t₀.val τmax) |
| 82 | (E : M14ExponentialFamily G t₀.val (e.toSpacetime (t₀, c₀))) |
| 83 | {τ : ℝ} (H : M14StableSet G t₀.val τ (e.toSpacetime (t₀, c₀)) E) |
| 84 | (hmax : τ < τmax) (Z : G.Horizontal (e.toSpacetime (t₀, c₀))) (hZ : Z ∈ H.carrier) |
| 85 | (p : M14BackwardPath G t₀.val 0 τ (e.toSpacetime (t₀, c₀)) (H.endpoint_map Z)) |
| 86 | (hp : M14IsMinimizing p) |
| 87 | (hc : ∀ s ∈ Icc 0 τ, p.curve s ∈ range e.toSpacetime) : |
| 88 | ∃ r : ReducedLengthRegularPoint F t₀.val τmax c₀ (D.point_map (H.endpoint_map Z)) τ, |
| 89 | r.path.curve = (D.path_map 0 τ _ _ p hc).curve := by |
| 90 | obtain ⟨A⟩ := hDifferential.exponential_geometry c₀ |
| 91 | have hstable := (H.carrier_exact Z).mp hZ |
| 92 | have hreg := ordinaryCapture_regular_of_stable t₀ c₀ D hCoordinates hPath E A |
| 93 | H.tau_pos hmax Z hstable |
| 94 | let W := (g.spatialTangentEquiv t₀ c₀).symm Z |
| 95 | have hsource : (W, τ) ∈ A.regular_chart.source := by rw [A.regular_source]; exact hreg |
| 96 | have htarget := A.regular_chart.map_source hsource |
| 97 | have htransport := ordinaryCapture_unique_branch_transport t₀ c₀ D hCoordinates hPath E A |
| 98 | H.tau_pos hmax Z (stableInitialVector_unique_branch E hstable) |
| 99 | have hpoint : A.gamma W τ = D.point_map (H.endpoint_map Z) := by |
| 100 | rw [H.endpoint_map_eq Z hZ] |
| 101 | exact htransport.2.2.symm |
| 102 | rw [A.regular_forward, hpoint] at htarget |
| 103 | let r := A.regular_point (D.point_map (H.endpoint_map Z), τ) htarget |
| 104 | let q := D.path_map 0 τ _ _ p hc |
| 105 | have hqmin := (ordinaryCapture_minimizing_transport D hCoordinates hmax.le |
| 106 | (mem_range_self _) p hc).mp hp |
| 107 | have hqstart : q.curve 0 = c₀ := |
| 108 | (D.path_start_eq 0 τ _ _ p hc).trans (D.point_map_on_cylinder t₀ c₀) |
| 109 | have hqend : q.curve τ = D.point_map (H.endpoint_map Z) := D.path_end_eq 0 τ _ _ p hc |
| 110 | have heq := (r.unique_minimizing_path q hqstart hqend hqmin).symm |
| 111 | exact ⟨ordinaryCaptureReplaceRegularPath r q heq, rfl⟩ |
| 112 | |
| 113 | end PoincareMT.M14 |