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.ReducedGeometry.ReducedVolume.Minimum.MinimumInitialLimit |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Metric.Hessian.HessianMinimum |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedVolume.Regularity.Lipschitz.BarrierLipschitz |
| 4 | |
| 5 | /-! |
| 6 | # The sharp bound from attained spatial minima |
| 7 | |
| 8 | Morgan-Tian Theorem 7.10 and Claim 7.11. At an attained minimum the |
| 9 | actual upper barrier has nonnegative Laplacian. Its time-weighted value |
| 10 | is an upper support for the time-weighted spatial infimum. One-sided |
| 11 | slope comparison and the produced initial limit give the sharp bound. |
| 12 | Attainment and continuity remain explicit inputs to this intermediate step. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.ReducedVolume |
| 23 | |
| 24 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 26 | [ConnectedSpace M] [T3Space M] |
| 27 | {J : Set ℝ} {F : RicciFlow n M J} {T τmax : ℝ} {p : M} |
| 28 | |
| 29 | /-- The weighted spatial infimum grows at most at rate `n / 2` between positive times. -/ |
| 30 | theorem sInf_reducedLength_mul_sub_le |
| 31 | (hL : LGeodesicTheory F T τmax) (G : LExponentialGeometry F T τmax p) |
| 32 | (hDifferential : ReducedLengthDifferentialTheory F T τmax) |
| 33 | (hcurvature : CompleteBoundedCurvatureOn F (Icc (T - τmax) T)) |
| 34 | (hcont : ContinuousOn (fun s : ℝ ↦ sInf (range (fun q ↦ reducedLength F T p q s))) |
| 35 | (Ioo 0 τmax)) |
| 36 | (hattain : ∀ s ∈ Ioo 0 τmax, ∃ q : M, |
| 37 | reducedLength F T p q s = sInf (range (fun y ↦ reducedLength F T p y s))) |
| 38 | {a b : ℝ} (ha : 0 < a) (hab : a ≤ b) (hb : b < τmax) : |
| 39 | b * sInf (range (fun q ↦ reducedLength F T p q b)) - |
| 40 | a * sInf (range (fun q ↦ reducedLength F T p q a)) ≤ |
| 41 | (n : ℝ) / 2 * (b - a) := by |
| 42 | let m := fun s : ℝ ↦ sInf (range (fun q ↦ reducedLength F T p q s)) |
| 43 | have hcomparison : ∀ x ∈ Icc a b, x * m x ≤ a * m a + (n : ℝ) / 2 * (x - a) := by |
| 44 | apply image_le_of_liminf_slope_right_le_deriv_boundary |
| 45 | (continuousOn_id.mul (hcont.mono (fun s hs ↦ ⟨ha.trans_le hs.1, hs.2.trans_lt hb⟩))) |
| 46 | (B' := fun _ ↦ (n : ℝ) / 2) |
| 47 | · simp [m] |
| 48 | · fun_prop |
| 49 | · intro x _ |
| 50 | simpa only [mul_one, id_eq] using |
| 51 | ((((hasDerivAt_id x).sub_const a).const_mul ((n : ℝ) / 2)).const_add |
| 52 | (a * m a)).hasDerivWithinAt |
| 53 | · intro x hx r hr |
| 54 | have hxI : x ∈ Ioo 0 τmax := ⟨ha.trans_le hx.1, hx.2.trans hb⟩ |
| 55 | let ε : ℝ := (r - (n : ℝ) / 2) / (2 * x) |
| 56 | have hε : 0 < ε := div_pos (sub_pos.mpr hr) (mul_pos (by norm_num) hxI.1) |
| 57 | obtain ⟨q, hq⟩ := hattain x hxI |
| 58 | obtain ⟨B, hres⟩ := hDifferential.upper_barrier_extension p q x hxI.1 hxI.2 ε hε |
| 59 | have hmin : IsLocalMin (fun y ↦ B.representative (y, x)) q := by |
| 60 | have hnear := (continuous_id.prodMk continuous_const).continuousAt |
| 61 | (B.neighborhood_open.mem_nhds B.center_mem) |
| 62 | change ∀ᶠ y in 𝓝 q, B.representative (q, x) ≤ B.representative (y, x) |
| 63 | filter_upwards [hnear] with y hy |
| 64 | rw [B.touches, hq] |
| 65 | exact (csInf_le (reducedLength_range_bddBelow hL G hcurvature hxI.1 hxI.2) |
| 66 | (mem_range_self y)).trans (B.dominates (y, x) hy) |
| 67 | have hlap := laplacian_nonneg_of_isLocalMin (F.metric (T - x)) (F.connection (T - x)) |
| 68 | (B.representative_space_smooth.of_le (by decide : (2 : ℕ∞ω) ≤ ∞)) hmin |
| 69 | obtain ⟨d, hd⟩ := B.representative_time_derivative |
| 70 | have hS : HasDerivAt (fun s : ℝ ↦ s * B.representative (q, s)) |
| 71 | (B.representative (q, x) + x * d) x := by |
| 72 | simpa only [Pi.mul_def, id_eq, one_mul] using! (hasDerivAt_id x).mul hd |
| 73 | have heq : x * B.representative (q, x) = x * m x := by rw [B.touches, hq] |
| 74 | have hupper : ∀ᶠ s in 𝓝 x, s * m s ≤ s * B.representative (q, s) := by |
| 75 | have hnear := (continuous_const.prodMk continuous_id).continuousAt |
| 76 | (B.neighborhood_open.mem_nhds B.center_mem) |
| 77 | filter_upwards [hnear, isOpen_Ioo.mem_nhds hxI] with s hs hstime |
| 78 | apply mul_le_mul_of_nonneg_left _ hstime.1.le |
| 79 | exact (csInf_le (reducedLength_range_bddBelow hL G hcurvature hstime.1 hstime.2) |
| 80 | (mem_range_self q)).trans (B.dominates (q, s) hs) |
| 81 | have hderiv : B.representative (q, x) + x * d < r := by |
| 82 | change deriv (fun s ↦ B.representative (q, s)) x + |
| 83 | (F.connection (T - x)).laplacian (fun y ↦ B.representative (y, x)) q - |
| 84 | ((n : ℝ) / 2 - B.representative (q, x)) / x ≤ ε at hres |
| 85 | rw [hd.deriv] at hres |
| 86 | have hmul := mul_le_mul_of_nonneg_left hres hxI.1.le |
| 87 | have hcancel : x * (((n : ℝ) / 2 - B.representative (q, x)) / x) = |
| 88 | (n : ℝ) / 2 - B.representative (q, x) := by field_simp [hxI.1.ne'] |
| 89 | rw [mul_sub, mul_add, hcancel] at hmul |
| 90 | have hεx : x * ε = (r - (n : ℝ) / 2) / 2 := by |
| 91 | dsimp only [ε] |
| 92 | field_simp [hxI.1.ne'] |
| 93 | rw [hεx] at hmul |
| 94 | nlinarith only [hmul, mul_nonneg hxI.1.le hlap, hr] |
| 95 | exact frequently_slope_lt_of_upper_support hS heq hupper hderiv |
| 96 | exact sub_le_iff_le_add.mpr |
| 97 | (by simpa only [add_comm] using hcomparison b ⟨hab, le_rfl⟩) |
| 98 | |
| 99 | /-- Attainment and continuity, together with the actual barriers, give the sharp minimum bound. -/ |
| 100 | theorem reducedLength_minimum_bound_of_attainment |
| 101 | (hL : LGeodesicTheory F T τmax) (G : LExponentialGeometry F T τmax p) |
| 102 | (hDifferential : ReducedLengthDifferentialTheory F T τmax) |
| 103 | (hmax : 0 < τmax) (hT : T ∈ J) (hwindow : Icc (T - τmax) T ⊆ J) |
| 104 | (hcurvature : CompleteBoundedCurvatureOn F (Icc (T - τmax) T)) |
| 105 | (hcont : ContinuousOn (fun s : ℝ ↦ sInf (range (fun q ↦ reducedLength F T p q s))) |
| 106 | (Ioo 0 τmax)) |
| 107 | (hattain : ∀ s ∈ Ioo 0 τmax, ∃ q : M, |
| 108 | reducedLength F T p q s = sInf (range (fun y ↦ reducedLength F T p y s))) |
| 109 | {b : ℝ} (hb : 0 < b) (hbmax : b < τmax) : |
| 110 | ∃ q : M, (∀ y : M, reducedLength F T p q b ≤ reducedLength F T p y b) ∧ |
| 111 | reducedLength F T p q b ≤ (n : ℝ) / 2 := by |
| 112 | let m := fun s : ℝ ↦ sInf (range (fun q ↦ reducedLength F T p q s)) |
| 113 | have hzero := sInf_reducedLength_tendsto_zero hL G hmax hT hwindow hcurvature |
| 114 | have hid : Tendsto (id : ℝ → ℝ) (𝓝[>] (0 : ℝ)) (𝓝 0) := |
| 115 | tendsto_id.mono_left nhdsWithin_le_nhds |
| 116 | have hlim : Tendsto (fun a : ℝ ↦ a * m a + (n : ℝ) / 2 * (b - a)) |
| 117 | (𝓝[>] (0 : ℝ)) (𝓝 ((n : ℝ) / 2 * b)) := by |
| 118 | simpa only [zero_mul, sub_zero, zero_add, id_eq, m] using |
| 119 | (hid.mul hzero).add ((tendsto_const_nhds.sub hid).const_mul ((n : ℝ) / 2)) |
| 120 | have hbound : b * m b ≤ (n : ℝ) / 2 * b := by |
| 121 | apply ge_of_tendsto hlim |
| 122 | filter_upwards [Ioo_mem_nhdsGT hb] with a ha |
| 123 | have h := sInf_reducedLength_mul_sub_le hL G hDifferential hcurvature hcont hattain |
| 124 | ha.1 ha.2.le hbmax |
| 125 | dsimp only [m] |
| 126 | linarith only [h] |
| 127 | obtain ⟨q, hq⟩ := hattain b ⟨hb, hbmax⟩ |
| 128 | refine ⟨q, ?_, ?_⟩ |
| 129 | · intro y |
| 130 | rw [hq] |
| 131 | exact csInf_le (reducedLength_range_bddBelow hL G hcurvature hb hbmax) (mem_range_self y) |
| 132 | · rw [hq] |
| 133 | change m b ≤ (n : ℝ) / 2 |
| 134 | nlinarith only [hbound, hb] |
| 135 | |
| 136 | end PoincareMT.ReducedVolume |