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.Calculus.CurveExtension |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Path.RegularizedAction |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Barrier.SmoothJoinAction |
| 4 | |
| 5 | /-! Adapted from Mapher `PoincareMT/Proofs/M15/Thm8_10_PathJoin.lean` at |
| 6 | `0c5d5c4e1ecbc12703b1994e226df1b15d2e8d39`. See the source mapping in |
| 7 | `references/ricci-flow/mapher/noncollapse/import.json`. -/ |
| 8 | |
| 9 | /-! |
| 10 | # Joining regularized backward paths with arbitrarily small action error |
| 11 | |
| 12 | Morgan-Tian Theorem 8.10, p. 177, appends a controlled short path to an |
| 13 | L-minimizer. M09 supplies the smooth join; M08 identifies its regularized |
| 14 | action with the frozen backward action on each original interval. |
| 15 | See `references/ricci-flow/mapher/noncollapse/derivations/2026-09-21-compact-path-join.md`. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Set |
| 21 | open scoped Manifold ContDiff Bundle intervalIntegral |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.Generalized.Noncollapse |
| 26 | |
| 27 | /-- Adjacent square-root regular paths admit a smooth concatenation with |
| 28 | arbitrarily small action error. Source: Morgan-Tian Theorem 8.10, p. 177, |
| 29 | using the M08 action identity and the M09 smooth-join theorem. -/ |
| 30 | theorem exists_backwardPath_concat_approx |
| 31 | {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 32 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 33 | {J : Set ℝ} (F : RicciFlow n M J) |
| 34 | (hM04 : RicciFlowCurvatureTheory.{u}) (T taumax : ℝ) |
| 35 | (htau : 0 < taumax) (hwindow : Icc (T - taumax) T ⊆ J) |
| 36 | {c b : ℝ} (hc : 0 < c) (hcb : c < b) (hb : b < taumax) |
| 37 | (P : BackwardTimePath F T 0 c) (Q : BackwardTimePath F T c b) |
| 38 | (RP : SqrtRegularPath P) (RQ : SqrtRegularPath Q) |
| 39 | (hjoin : P.curve c = Q.curve c) (eta : ℝ) (heta : 0 < eta) : |
| 40 | ∃ R : BackwardTimePath F T 0 b, |
| 41 | R.curve 0 = P.curve 0 ∧ R.curve b = Q.curve b ∧ |
| 42 | backwardLLength F T 0 b R.curve ≤ |
| 43 | backwardLLength F T 0 c P.curve + |
| 44 | backwardLLength F T c b Q.curve + eta := by |
| 45 | obtain ⟨α, hα, heqα⟩ := RP.smooth.exists_global_extension_Icc |
| 46 | (Real.sqrt_le_sqrt P.ordered.le) RP.open_domain RP.interval_subset |
| 47 | obtain ⟨β, hβ, heqβ⟩ := RQ.smooth.exists_global_extension_Icc |
| 48 | (Real.sqrt_le_sqrt Q.ordered.le) RQ.open_domain RQ.interval_subset |
| 49 | let RA : SqrtRegularPath P := { |
| 50 | curve := α |
| 51 | domain := univ |
| 52 | open_domain := isOpen_univ |
| 53 | interval_subset := subset_univ _ |
| 54 | smooth := hα.contMDiffOn |
| 55 | agrees := fun s hs => (heqα hs).trans (RP.agrees s hs) |
| 56 | } |
| 57 | let RB : SqrtRegularPath Q := { |
| 58 | curve := β |
| 59 | domain := univ |
| 60 | open_domain := isOpen_univ |
| 61 | interval_subset := subset_univ _ |
| 62 | smooth := hβ.contMDiffOn |
| 63 | agrees := fun s hs => (heqβ hs).trans (RQ.agrees s hs) |
| 64 | } |
| 65 | have hα0 : α 0 = P.curve 0 := by |
| 66 | simpa only [RA, Real.sqrt_zero, zero_pow (by decide : 2 ≠ 0)] using |
| 67 | RA.agrees 0 (show 0 ∈ sqrtParameterInterval 0 c from |
| 68 | ⟨by simp, Real.sqrt_nonneg c⟩) |
| 69 | have hαc : α (Real.sqrt c) = P.curve c := by |
| 70 | simpa only [RA, Real.sq_sqrt hc.le] using |
| 71 | RA.agrees (Real.sqrt c) (right_mem_Icc.mpr (Real.sqrt_le_sqrt hc.le)) |
| 72 | have hβc : β (Real.sqrt c) = Q.curve c := by |
| 73 | simpa only [RB, Real.sq_sqrt hc.le] using |
| 74 | RB.agrees (Real.sqrt c) (left_mem_Icc.mpr (Real.sqrt_le_sqrt hcb.le)) |
| 75 | have hβb : β (Real.sqrt b) = Q.curve b := by |
| 76 | simpa only [RB, Real.sq_sqrt (hc.trans hcb).le] using |
| 77 | RB.agrees (Real.sqrt b) (right_mem_Icc.mpr (Real.sqrt_le_sqrt hcb.le)) |
| 78 | obtain ⟨R, hR0, hRb, hRaction⟩ := ReducedLength.exists_backwardPath_smoothJoin_action_le |
| 79 | F hM04 T taumax htau hwindow b (hc.trans hcb) hb α β univ isOpen_univ |
| 80 | (subset_univ _) hα.contMDiffOn hβ.contMDiffOn (Real.sqrt c) |
| 81 | ⟨Real.sqrt_pos.mpr hc, Real.sqrt_lt_sqrt hc.le hcb⟩ |
| 82 | (hαc.trans (hjoin.trans hβc.symm)) eta heta |
| 83 | have hA := LGeometry.regularizedLAction_eq_backwardLLength RA |
| 84 | have hB := LGeometry.regularizedLAction_eq_backwardLLength RB |
| 85 | change (∫ s in Real.sqrt 0..Real.sqrt c, ReducedLength.squareCurveActionDensity F T α s) = |
| 86 | backwardLLength F T 0 c P.curve at hA |
| 87 | rw [Real.sqrt_zero] at hA |
| 88 | change (∫ s in Real.sqrt c..Real.sqrt b, ReducedLength.squareCurveActionDensity F T β s) = |
| 89 | backwardLLength F T c b Q.curve at hB |
| 90 | rw [hA, hB] at hRaction |
| 91 | exact ⟨R, hR0.trans hα0, hRb.trans hβb, hRaction⟩ |
| 92 | |
| 93 | end PoincareMT.Generalized.Noncollapse |