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.Paths.ShortCurve |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.SmoothSquarePath |
| 3 | |
| 4 | /-! Adapted from Mapher `PoincareMT/Proofs/M15/Thm8_10_ShortTail.lean` at |
| 5 | `0c5d5c4e1ecbc12703b1994e226df1b15d2e8d39`. See the source mapping in |
| 6 | `references/ricci-flow/mapher/noncollapse/import.json`. -/ |
| 7 | |
| 8 | /-! |
| 9 | # Uniform action control for a short backward tail |
| 10 | |
| 11 | Morgan-Tian Theorem 8.10, p. 177. An initial-metric short curve is |
| 12 | traversed over a positive backward-time interval. Metric and scalar |
| 13 | bounds give an explicit action bound. M09 supplies integrability before |
| 14 | the estimate is applied. |
| 15 | See `references/ricci-flow/mapher/noncollapse/derivations/2026-09-21-short-tail.md`. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Set Filter MeasureTheory |
| 21 | open scoped Manifold ContDiff Bundle Topology intervalIntegral |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.Generalized.Noncollapse |
| 26 | |
| 27 | set_option backward.isDefEq.respectTransparency false in |
| 28 | /-- An initial-metric short path gives a square-root regular backward |
| 29 | tail with a uniform action bound. Source: Morgan-Tian Theorem 8.10, |
| 30 | p. 177, the path appended to the reduced-length minimum. -/ |
| 31 | theorem exists_backwardPath_short_tail |
| 32 | {n : ℕ} {M : Type u} [TopologicalSpace M] [T2Space M] |
| 33 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 34 | {J : Set ℝ} (F : RicciFlow n M J) |
| 35 | (hM04 : RicciFlowCurvatureTheory.{u}) (T taumax : ℝ) |
| 36 | (htau : 0 < taumax) (hwindow : Icc (T - taumax) T ⊆ J) |
| 37 | {c b : ℝ} (hc : 0 < c) (hcb : c < b) (hb : b < taumax) |
| 38 | (g : RiemannianMetric n M) (p q : M) {R C S : ℝ} |
| 39 | (hR : 0 < R) (hC : 0 ≤ C) (hS : 0 ≤ S) |
| 40 | (hcompact : IsCompact (closure (g.ball p R))) (hq : q ∈ g.ball p R) |
| 41 | (hnorm : ∀ t ∈ Icc c b, ∀ x (v : TangentSpace (𝓡 n) x), |
| 42 | (F.metric (T - t)).tangentNorm x v ≤ C * g.tangentNorm x v) |
| 43 | (hscalar : ∀ t ∈ Icc c b, ∀ x, |
| 44 | (F.connection (T - t)).scalarCurvature x ≤ S) : |
| 45 | ∃ Q : BackwardTimePath F T c b, Nonempty (SqrtRegularPath Q) ∧ |
| 46 | Q.curve c = p ∧ Q.curve b = q ∧ |
| 47 | backwardLLength F T c b Q.curve ≤ |
| 48 | Real.sqrt b * (S + (C * R / (b - c)) ^ 2) * (b - c) := by |
| 49 | obtain ⟨γ, hγ, hγ0, hγ1, hspeed⟩ := g.exists_smooth_short_curve p q hR hcompact hq |
| 50 | have hbc : 0 < b - c := sub_pos.mpr hcb |
| 51 | let α : ℝ → M := fun s => γ ((s ^ 2 - c) / (b - c)) |
| 52 | have hα : ContMDiff 𝓘(ℝ) (𝓡 n) ∞ α := |
| 53 | hγ.comp (((contMDiff_id.pow 2).sub contMDiff_const).div_const (b - c)) |
| 54 | obtain ⟨P, hP, _⟩ := ReducedLength.exists_backwardPath_of_smoothSquareCurve F hM04 |
| 55 | T taumax htau hwindow b (hc.trans hcb) hb α univ isOpen_univ |
| 56 | (subset_univ _) hα.contMDiffOn |
| 57 | have hsub : Icc c b ⊆ Icc 0 b := fun _ ht => ⟨hc.le.trans ht.1, ht.2⟩ |
| 58 | let Q : BackwardTimePath F T c b := { |
| 59 | curve := P.curve |
| 60 | nonnegative := hc.le |
| 61 | ordered := hcb |
| 62 | terminal_mem := P.terminal_mem |
| 63 | time_mem := fun t ht => P.time_mem t (hsub ht) |
| 64 | continuous := P.continuous.mono hsub |
| 65 | regular := P.regular.mono (fun _ ht => ⟨hc.trans ht.1, ht.2⟩) |
| 66 | l_integrable := P.l_integrable.mono_set (by |
| 67 | rw [uIcc_of_le hcb.le, uIcc_of_le (hc.trans hcb).le] |
| 68 | exact hsub) |
| 69 | } |
| 70 | have hQ (t : ℝ) (ht : 0 ≤ t) : Q.curve t = γ ((t - c) / (b - c)) := by |
| 71 | change P.curve t = _ |
| 72 | rw [hP] |
| 73 | dsimp only [α] |
| 74 | rw [Real.sq_sqrt ht] |
| 75 | have hregular : Nonempty (SqrtRegularPath Q) := ⟨{ |
| 76 | curve := α |
| 77 | domain := univ |
| 78 | open_domain := isOpen_univ |
| 79 | interval_subset := subset_univ _ |
| 80 | smooth := hα.contMDiffOn |
| 81 | agrees := fun s _ => by rw [hQ _ (sq_nonneg s)] |
| 82 | }⟩ |
| 83 | have hQc : Q.curve c = p := by simpa only [hQ c hc.le, sub_self, zero_div] using hγ0 |
| 84 | have hQb : Q.curve b = q := by |
| 85 | simpa only [hQ b (hc.trans hcb).le, div_self hbc.ne'] using hγ1 |
| 86 | refine ⟨Q, hregular, hQc, hQb, ?_⟩ |
| 87 | have hintegrand (t : ℝ) (ht : t ∈ Icc c b) : |
| 88 | backwardLIntegrand F T Q.curve t ≤ |
| 89 | Real.sqrt b * (S + (C * R / (b - c)) ^ 2) := by |
| 90 | have htpos : 0 < t := hc.trans_le ht.1 |
| 91 | have hparam : (t - c) / (b - c) ∈ Icc (0 : ℝ) 1 := |
| 92 | ⟨div_nonneg (sub_nonneg.mpr ht.1) hbc.le, |
| 93 | (div_le_one hbc).mpr (sub_le_sub_right ht.2 c)⟩ |
| 94 | have heq : Q.curve =ᶠ[𝓝 t] (fun s => γ ((s - c) / (b - c))) := |
| 95 | Filter.eventually_of_mem (Ioi_mem_nhds htpos) (fun s hs => hQ s hs.le) |
| 96 | have hd : HasDerivAt (fun s : ℝ => (s - c) / (b - c)) (1 / (b - c)) t := |
| 97 | ((hasDerivAt_id t).sub_const c).div_const (b - c) |
| 98 | have hmap : mfderiv 𝓘(ℝ) 𝓘(ℝ) (fun s : ℝ => (s - c) / (b - c)) t 1 = |
| 99 | (1 / (b - c)) • (1 : ℝ) := by |
| 100 | rw [hd.hasFDerivAt.hasMFDerivAt.mfderiv] |
| 101 | change (ContinuousLinearMap.toSpanSingleton ℝ (1 / (b - c))) (1 : ℝ) = |
| 102 | (1 / (b - c)) * 1 |
| 103 | simp only [ContinuousLinearMap.toSpanSingleton_apply, one_smul, mul_one] |
| 104 | have hvelocity : curveVelocity (n := n) Q.curve t = |
| 105 | (1 / (b - c)) • curveVelocity (n := n) γ ((t - c) / (b - c)) := by |
| 106 | unfold curveVelocity |
| 107 | rw [heq.mfderiv_eq] |
| 108 | have hm := mfderiv_comp_apply (I := 𝓘(ℝ)) (I' := 𝓘(ℝ)) (I'' := 𝓡 n) |
| 109 | t (f := fun s : ℝ => (s - c) / (b - c)) (g := γ) |
| 110 | (hγ.contMDiffAt.mdifferentiableAt (by simp)) hd.differentiableAt.mdifferentiableAt |
| 111 | (1 : ℝ) |
| 112 | rw [hmap, map_smul] at hm |
| 113 | exact hm |
| 114 | have hgnorm : g.tangentNorm (Q.curve t) (curveVelocity Q.curve t) = |
| 115 | (1 / (b - c)) * |
| 116 | g.tangentNorm (γ ((t - c) / (b - c))) |
| 117 | (curveVelocity γ ((t - c) / (b - c))) := by |
| 118 | rw [hvelocity, hQ t htpos.le] |
| 119 | simp only [RiemannianMetric.tangentNorm, map_smul, smul_apply, smul_eq_mul] |
| 120 | rw [← mul_assoc, ← pow_two, Real.sqrt_mul (sq_nonneg (1 / (b - c))), |
| 121 | Real.sqrt_sq (by positivity : 0 ≤ 1 / (b - c))] |
| 122 | have hflow : (F.metric (T - t)).tangentNorm (Q.curve t) (curveVelocity Q.curve t) ≤ |
| 123 | C * R / (b - c) := by |
| 124 | calc |
| 125 | _ ≤ C * g.tangentNorm (Q.curve t) (curveVelocity Q.curve t) := |
| 126 | hnorm t ht _ _ |
| 127 | _ = C * ((1 / (b - c)) * |
| 128 | g.tangentNorm (γ ((t - c) / (b - c))) |
| 129 | (curveVelocity γ ((t - c) / (b - c)))) := by rw [hgnorm] |
| 130 | _ ≤ C * ((1 / (b - c)) * R) := mul_le_mul_of_nonneg_left |
| 131 | (mul_le_mul_of_nonneg_left (hspeed _ hparam) (by positivity)) hC |
| 132 | _ = C * R / (b - c) := by ring |
| 133 | have henergy : (F.metric (T - t)).inner (Q.curve t) |
| 134 | (curveVelocity Q.curve t) (curveVelocity Q.curve t) ≤ |
| 135 | (C * R / (b - c)) ^ 2 := by |
| 136 | have hnonneg : 0 ≤ (F.metric (T - t)).inner (Q.curve t) |
| 137 | (curveVelocity Q.curve t) (curveVelocity Q.curve t) := by |
| 138 | by_cases hv : curveVelocity (n := n) Q.curve t = 0 |
| 139 | · simp [hv] |
| 140 | · exact ((F.metric (T - t)).pos _ _ hv).le |
| 141 | have hsquare : ((F.metric (T - t)).tangentNorm (Q.curve t) |
| 142 | (curveVelocity Q.curve t)) ^ 2 = |
| 143 | (F.metric (T - t)).inner (Q.curve t) |
| 144 | (curveVelocity Q.curve t) (curveVelocity Q.curve t) := Real.sq_sqrt hnonneg |
| 145 | rw [← hsquare] |
| 146 | exact pow_le_pow_left₀ (Real.sqrt_nonneg _) hflow 2 |
| 147 | unfold backwardLIntegrand |
| 148 | calc |
| 149 | _ ≤ Real.sqrt t * (S + (C * R / (b - c)) ^ 2) := |
| 150 | mul_le_mul_of_nonneg_left (add_le_add (hscalar t ht _) henergy) (Real.sqrt_nonneg t) |
| 151 | _ ≤ Real.sqrt b * (S + (C * R / (b - c)) ^ 2) := |
| 152 | mul_le_mul_of_nonneg_right (Real.sqrt_le_sqrt ht.2) (add_nonneg hS (sq_nonneg _)) |
| 153 | have hi := intervalIntegral.integral_mono_on hcb.le Q.l_integrable |
| 154 | (intervalIntegrable_const : IntervalIntegrable |
| 155 | (fun _ : ℝ => Real.sqrt b * (S + (C * R / (b - c)) ^ 2)) volume c b) hintegrand |
| 156 | simpa only [backwardLLength, intervalIntegral.integral_const, smul_eq_mul, mul_comm] using hi |
| 157 | |
| 158 | end PoincareMT.Generalized.Noncollapse |