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.Noncollapse.Compact.Product.PathProjection |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.Noncollapse.ReducedVolume.SmallPart.Action |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.PathCongruence |
| 4 | |
| 5 | /-! Adapted from Mapher `PoincareMT/Proofs/M15/Thm8_10_StableAction.lean` at |
| 6 | `0c5d5c4e1ecbc12703b1994e226df1b15d2e8d39`. See the source mapping in |
| 7 | `references/ricci-flow/mapher/noncollapse/import.json`. -/ |
| 8 | |
| 9 | /-! |
| 10 | # Actual stable branch action in the ordinary product |
| 11 | |
| 12 | Morgan-Tian Definitions 6.1-6.2, pp. 105-106, and Proposition 6.28, |
| 13 | p. 117, as used in Theorem 8.10, p. 177. Action congruence identifies |
| 14 | the selected exponential path with the stable minimizing trace. |
| 15 | See `references/ricci-flow/mapher/noncollapse/derivations/2026-09-21-product-stable-paths.md`. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Set |
| 21 | open scoped Manifold ContDiff Bundle |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.Generalized.Noncollapse |
| 26 | |
| 27 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 28 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 29 | {I : SpacetimeInterval} |
| 30 | |
| 31 | /-- Actual product action depends only on the closed path trace. |
| 32 | Source: Definitions 6.1-6.2, pp. 105-106, and Proposition 6.28, p. 117. -/ |
| 33 | theorem ordinaryProduct_backwardLAction_congr |
| 34 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 35 | (F : RicciFlow n M I.domain) |
| 36 | (P : OrdinaryProductRicciGeometry F.metric I) |
| 37 | {T a b : ℝ} {x y : (ordinaryProductTransport F P).Point} |
| 38 | (p q : M14BackwardPath (ordinaryProductTransport F P) T a b x y) |
| 39 | (hcurve : EqOn p.curve q.curve (Icc a b)) : |
| 40 | M14BackwardLAction (ordinaryProductTransport F P) p = |
| 41 | M14BackwardLAction (ordinaryProductTransport F P) q := by |
| 42 | have haction (r : M14BackwardPath (ordinaryProductTransport F P) T a b x y) : |
| 43 | M14BackwardLAction (ordinaryProductTransport F P) r = |
| 44 | backwardLLength F T a b (fun s => (r.curve s).2) := by |
| 45 | apply intervalIntegral.integral_congr_Ioo_of_le r.tau_lt.le |
| 46 | intro s hs |
| 47 | exact (ordinaryProduct_backwardIntegrand_eq hM12 F P r hs).symm |
| 48 | rw [haction p, haction q] |
| 49 | exact backwardLLength_eq_of_eqOn p.tau_lt.le |
| 50 | (fun s hs => congrArg Prod.snd (hcurve hs)) |
| 51 | |
| 52 | /-- The selected stable branch has the global reduced length, with |
| 53 | normalization at the same positive time. Source: Proposition 6.28, |
| 54 | p. 117, and Theorem 8.10, p. 177. -/ |
| 55 | theorem ordinaryProduct_stable_reducedLength_eq |
| 56 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 57 | (F : RicciFlow n M I.domain) |
| 58 | (P : OrdinaryProductRicciGeometry F.metric I) |
| 59 | {T tau : ℝ} {x : (ordinaryProductTransport F P).Point} |
| 60 | {E : M14ExponentialFamily (ordinaryProductTransport F P) T x} |
| 61 | (H : M14StableSet (ordinaryProductTransport F P) T tau x E) |
| 62 | {Z : (ordinaryProductTransport F P).Horizontal x} (hZ : Z ∈ H.carrier) : |
| 63 | E.reduced_length Z (Real.sqrt tau) = |
| 64 | M14ReducedLengthValue (ordinaryProductTransport F P) T 0 tau x |
| 65 | (H.endpoint_map Z) := by |
| 66 | have ht : Real.sqrt tau ^ 2 = tau := Real.sq_sqrt H.tau_pos.le |
| 67 | have hpos : 0 < Real.sqrt tau := Real.sqrt_pos.mpr H.tau_pos |
| 68 | have hs := H.survivor Z hZ |
| 69 | obtain ⟨p, htrace, hp, _⟩ := H.minimizing_path Z hZ |
| 70 | have haction : E.action Z (Real.sqrt tau) = |
| 71 | M14ActionValue (ordinaryProductTransport F P) T 0 tau x (H.endpoint_map Z) := by |
| 72 | rw [actionValue_eq_of_minimizing p hp] |
| 73 | have hex : ∃ q : M14BackwardPath (ordinaryProductTransport F P) T 0 |
| 74 | (Real.sqrt tau ^ 2) x (E.gamma Z (Real.sqrt tau)), |
| 75 | EqOn q.curve (fun s => E.gamma Z (Real.sqrt s)) (Icc 0 (Real.sqrt tau ^ 2)) ∧ |
| 76 | E.action Z (Real.sqrt tau) = M14BackwardLAction (ordinaryProductTransport F P) q := |
| 77 | ⟨E.path Z (Real.sqrt tau) hs hpos, |
| 78 | E.path_coherent Z (Real.sqrt tau) hs hpos, |
| 79 | E.action_eq Z (Real.sqrt tau) hs hpos⟩ |
| 80 | rw [ht, ← H.endpoint_map_eq Z hZ] at hex |
| 81 | obtain ⟨hq, hqtrace, hqa⟩ := hex |
| 82 | exact hqa.trans (ordinaryProduct_backwardLAction_congr hM12 F P hq p |
| 83 | (fun _ hsmem => (hqtrace hsmem).trans (htrace hsmem).symm)) |
| 84 | rw [E.reduced_length_eq Z (Real.sqrt tau) hs hpos, haction] |
| 85 | rfl |
| 86 | |
| 87 | end PoincareMT.Generalized.Noncollapse |