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.Domain.JointNeighborhood |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Stability.StableOpenness |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.Action.PathCongruence |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Paths.Action.LLength |
| 5 | |
| 6 | /-! |
| 7 | # Actual minimizing branches on the joint domain |
| 8 | |
| 9 | The stable graph supplies a stable set at exactly the squared joint |
| 10 | time. Its minimizing branch agrees with the selected exponential |
| 11 | path, so the selected action and reduced length are the actual |
| 12 | infima. Morgan-Tian Proposition 6.28, p. 117, and Definition 6.45, |
| 13 | p. 129. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set |
| 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 | {T : ℝ} {x : G.Point} |
| 27 | |
| 28 | /-- Every joint-domain point belongs to a stable carrier at its exact |
| 29 | squared time, Proposition 6.28, p. 117. -/ |
| 30 | theorem jointDomain_stableSet (E : M14ExponentialFamily G T x) |
| 31 | {Z : G.Horizontal x} {s : ℝ} (hz : (Z, s) ∈ M14JointDomain G E) : |
| 32 | ∃ H : M14StableSet G T (s ^ 2) x E, Z ∈ H.carrier := by |
| 33 | obtain ⟨τ, H, hτ, hZ, hs⟩ := hz.1 |
| 34 | change s = Real.sqrt τ at hs |
| 35 | have heq : τ = s ^ 2 := by rw [hs, Real.sq_sqrt hτ.le] |
| 36 | subst τ |
| 37 | exact ⟨H, hZ⟩ |
| 38 | |
| 39 | /-- The actual selected branch on the joint domain minimizes, and its |
| 40 | action and reduced length are the global values at that endpoint, |
| 41 | Proposition 6.28, p. 117, and Definition 6.45, p. 129. -/ |
| 42 | theorem jointDomain_action_branch (E : M14ExponentialFamily G T x) |
| 43 | {Z : G.Horizontal x} {s : ℝ} (hz : (Z, s) ∈ M14JointDomain G E) : |
| 44 | ∃ H : M14StableSet G T (s ^ 2) x E, Z ∈ H.carrier ∧ |
| 45 | ∃ p : M14BackwardPath G T 0 (s ^ 2) x (E.gamma Z s), |
| 46 | M14IsMinimizing p ∧ E.action Z s = M14BackwardLAction G p ∧ |
| 47 | E.reduced_length Z s = M14ReducedLengthValue G T 0 (s ^ 2) x (E.gamma Z s) := by |
| 48 | have hpos : 0 < s := jointDomain_time_pos E hz |
| 49 | have hsurv := jointDomain_subset_domain E hz |
| 50 | obtain ⟨H, hZH⟩ := jointDomain_stableSet E hz |
| 51 | have hb := stableInitialVector_unique_branch E ((H.carrier_exact Z).mp hZH) |
| 52 | unfold M14UniqueMinimizingBranch at hb |
| 53 | rw [Real.sqrt_sq hpos.le] at hb |
| 54 | obtain ⟨_, p, hpcurve, hpmin, _⟩ := hb |
| 55 | let R := E.path Z s hsurv hpos |
| 56 | have hcurve : EqOn R.curve p.curve (Ioo 0 (s ^ 2)) := by |
| 57 | intro r hr |
| 58 | exact (E.path_coherent Z s hsurv hpos r (Ioo_subset_Icc_self hr)).trans |
| 59 | (hpcurve (Ioo_subset_Icc_self hr)).symm |
| 60 | have hmin : M14IsMinimizing R := (isMinimizing_iff_of_curve_eqOn R p hcurve).mpr hpmin |
| 61 | refine ⟨H, hZH, R, hmin, E.action_eq Z s hsurv hpos, ?_⟩ |
| 62 | calc |
| 63 | E.reduced_length Z s = E.action Z s / (2 * s) := E.reduced_length_eq Z s hsurv hpos |
| 64 | _ = M14BackwardLAction G R / (2 * Real.sqrt (s ^ 2)) := by |
| 65 | rw [Real.sqrt_sq hpos.le, E.action_eq Z s hsurv hpos] |
| 66 | _ = M14ReducedLengthValue G T 0 (s ^ 2) x (E.gamma Z s) := |
| 67 | (reducedLengthValue_eq_of_minimizing R hmin).symm |
| 68 | |
| 69 | end PoincareMT.M14 |