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.Surgery.StandardCap.Persistence.SourceNames.Metric |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Limit.Coordinates.NormalizedComparison |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Limit.Exponential.GeodesicTransport |
| 4 | import PoincareLib.Geometry.Riemannian.Coordinates.Exponential.RadialCurve |
| 5 | |
| 6 | /-! |
| 7 | # The actual normalized physical exponential family |
| 8 | |
| 9 | Compact confinement supplies smooth physical radial geodesics. Their |
| 10 | inverse-chart positions solve the normalized geodesic equation on a |
| 11 | fixed parameter ball. Morgan--Tian, Claim 16.6 and Corollary 16.7, |
| 12 | pp. 371-372; see `derivations/19-normalized-exponential-family.md`. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff Topology ENNReal |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M44 |
| 24 | |
| 25 | local notation "E" => StandardCapSpace |
| 26 | |
| 27 | variable {g₀ : StandardInitialMetric} {S : GeneralizedSliceCarrier.{u}} |
| 28 | {g : RiemannianMetric 3 S.carrier} {tip : S.carrier} {scale eta : ℝ} |
| 29 | |
| 30 | /-- The actual precompact exponential and its normalized physical |
| 31 | initial frame. The bundle asserts neither injectivity nor convergence. |
| 32 | Source: Claim 16.6, pp. 371-372. -/ |
| 33 | structure NormalizedCapExponential (Q : SurgeryCapClose g₀ S g tip scale eta) (R : ℝ) where |
| 34 | radius_pos : 0 < R |
| 35 | map : E → S.carrier |
| 36 | frame : E ≃L[ℝ] E |
| 37 | frame_inner : ∀ v w, Q.normalizedMetric.pullbackCoefficients |
| 38 | (extChartAt (𝓡 3) tip).symm (extChartAt (𝓡 3) tip tip) (frame v) (frame w) = inner ℝ v w |
| 39 | smooth : ContMDiffOn (𝓡 3) (𝓡 3) ∞ map (Metric.ball 0 R) |
| 40 | map_zero : map 0 = tip |
| 41 | initial_derivative : HasFDerivAt (fun v => extChartAt (𝓡 3) tip (map v)) |
| 42 | frame.toContinuousLinearMap 0 |
| 43 | geodesic : ∀ v ∈ Metric.ball 0 R, |
| 44 | Q.normalizedMetric.IsGeodesicOn (fun t : ℝ => map (t • v)) |
| 45 | {t | t • v ∈ Metric.ball 0 R} |
| 46 | distance_bound : ∀ v ∈ Metric.ball 0 R, ∀ t ∈ Icc (0 : ℝ) 1, |
| 47 | Q.normalizedMetric.edist tip (map (t • v)) ≤ ENNReal.ofReal ‖v‖ * ENNReal.ofReal t |
| 48 | map_mem : ∀ v ∈ Metric.ball 0 R, map v ∈ Q.map '' g₀.metric.ball 0 eta⁻¹ |
| 49 | |
| 50 | /-- The proved physical confinement supplies the actual exponential |
| 51 | family on every positive ball inside the comparison image. |
| 52 | Source: Claim 16.6, pp. 371-372. -/ |
| 53 | theorem exists_normalizedCapExponential |
| 54 | (Q : SurgeryCapClose g₀ S g tip scale eta) {R : ℝ} (hR : 0 < R) |
| 55 | (hReta : R ≤ eta⁻¹) (hcompact : IsCompact (closure (Q.normalizedMetric.ball tip R))) : |
| 56 | Nonempty (NormalizedCapExponential Q R) := by |
| 57 | obtain ⟨L, e, hL, he, he0, heD, hgeo⟩ := |
| 58 | Q.normalizedMetric.exists_orthonormal_radial_exponential_of_precompact_ball tip hR hcompact |
| 59 | refine ⟨{ |
| 60 | radius_pos := hR |
| 61 | map := e |
| 62 | frame := L |
| 63 | frame_inner := hL |
| 64 | smooth := he |
| 65 | map_zero := he0 |
| 66 | initial_derivative := heD |
| 67 | geodesic := fun v hv => (hgeo v hv).1 |
| 68 | distance_bound := fun v hv t ht => ((hgeo v hv).2 t ht).2 |
| 69 | map_mem := ?_ }⟩ |
| 70 | intro v hv |
| 71 | apply Q.normalizedComparison.image_contains |
| 72 | have hd := ((hgeo v hv).2 1 (by simp)).2 |
| 73 | simp only [one_smul, ENNReal.ofReal_one, mul_one] at hd |
| 74 | have hvR : ‖v‖ < R := by simpa only [Metric.mem_ball, dist_zero_right] using hv |
| 75 | change Q.normalizedMetric.edist tip (e v) < ENNReal.ofReal (1 * eta⁻¹) |
| 76 | simpa only [one_mul] using hd.trans_lt |
| 77 | ((ENNReal.ofReal_lt_ofReal_iff (inv_pos.mpr Q.eta_pos)).mpr (hvR.trans_le hReta)) |
| 78 | |
| 79 | /-- The quantitative comparison buffer supplies every smaller positive |
| 80 | normalized exponential domain. Source: Claim 16.6, pp. 371-372. -/ |
| 81 | theorem exists_normalizedCapExponential_of_buffer |
| 82 | (Q : SurgeryCapClose g₀ S g tip scale eta) (heta : eta < 1) |
| 83 | {r R : ℝ} (hr : 0 < r) (hrEta : r < eta⁻¹) (hR : 0 < R) |
| 84 | (hRr : R ≤ Real.sqrt (1 - eta) * r) : Nonempty (NormalizedCapExponential Q R) := by |
| 85 | have hroot : Real.sqrt (1 - eta) ≤ 1 := Real.sqrt_le_one.mpr (by linarith [Q.eta_pos]) |
| 86 | have hReta : R ≤ eta⁻¹ := hRr.trans |
| 87 | ((mul_le_mul_of_nonneg_right hroot hr.le).trans (by simpa only [one_mul] using hrEta.le)) |
| 88 | have hcompact : IsCompact (closure (Q.normalizedMetric.ball tip R)) := |
| 89 | (Q.isCompact_closure_normalized_ball heta hr hrEta).of_isClosed_subset isClosed_closure |
| 90 | (closure_mono (fun _ hx => hx.trans_le (ENNReal.ofReal_le_ofReal hRr))) |
| 91 | exact exists_normalizedCapExponential Q hR hReta hcompact |
| 92 | |
| 93 | /-- A tolerance cutoff chosen solely from the fixed radius supplies |
| 94 | the actual normalized exponential for every later comparison. |
| 95 | Source: the initial fixed-radius step of Claim 16.6, pp. 371-372. -/ |
| 96 | theorem exists_initial_exponential_threshold (R : ℝ) (hR : 0 < R) : |
| 97 | ∃ delta : ℝ, 0 < delta ∧ ∀ (g₀ : StandardInitialMetric) |
| 98 | (S : GeneralizedSliceCarrier.{u}) (g : RiemannianMetric 3 S.carrier) |
| 99 | (tip : S.carrier) (scale eta : ℝ) (Q : SurgeryCapClose g₀ S g tip scale eta), |
| 100 | eta ≤ delta → Nonempty (NormalizedCapExponential Q R) := by |
| 101 | have hden : 0 < 2 * R + 2 := by linarith |
| 102 | refine ⟨min (1 / 2) (2 * R + 2)⁻¹, lt_min (by norm_num) (inv_pos.mpr hden), ?_⟩ |
| 103 | intro g₀ S g tip scale eta Q heta |
| 104 | have hhalf : eta ≤ 1 / 2 := heta.trans (min_le_left _ _) |
| 105 | have hinv := one_div_le_one_div_of_le Q.eta_pos (heta.trans (min_le_right _ _)) |
| 106 | simp only [one_div, inv_inv] at hinv |
| 107 | have hroot : (1 / 2 : ℝ) ≤ Real.sqrt (1 - eta) := Real.le_sqrt_of_sq_le (by nlinarith) |
| 108 | apply exists_normalizedCapExponential_of_buffer Q (by linarith) (r := 2 * R + 1) |
| 109 | (by linarith) (by linarith) hR |
| 110 | calc |
| 111 | R ≤ (1 / 2) * (2 * R + 1) := by linarith |
| 112 | _ ≤ Real.sqrt (1 - eta) * (2 * R + 1) := |
| 113 | mul_le_mul_of_nonneg_right hroot (by linarith) |
| 114 | |
| 115 | namespace NormalizedCapExponential |
| 116 | |
| 117 | variable {Q : SurgeryCapClose g₀ S g tip scale eta} {R : ℝ} |
| 118 | |
| 119 | /-- The actual normalized exponential in the supplied M36 coordinates. |
| 120 | Source: the exponential adjustment for Claim 16.6, pp. 371-372. -/ |
| 121 | noncomputable def coordinateMap (D : NormalizedCapExponential Q R) : E → E := Q.inverse ∘ D.map |
| 122 | |
| 123 | /-- The actual comparison-coordinate exponential is smooth throughout |
| 124 | its fixed parameter ball; Claim 16.6, pp. 371-372. -/ |
| 125 | theorem coordinateMap_smooth (D : NormalizedCapExponential Q R) : |
| 126 | ContDiffOn ℝ ∞ D.coordinateMap (Metric.ball 0 R) := by |
| 127 | apply contMDiffOn_iff_contDiffOn.mp |
| 128 | exact Q.inverse_smooth.comp D.smooth D.map_mem |
| 129 | |
| 130 | /-- The normalized comparison-coordinate exponential fixes zero. |
| 131 | Source: Claim 16.6, pp. 371-372. -/ |
| 132 | theorem coordinateMap_zero (D : NormalizedCapExponential Q R) : D.coordinateMap 0 = 0 := by |
| 133 | have h0 : (0 : E) ∈ g₀.metric.ball 0 eta⁻¹ := by |
| 134 | rw [M36.standard_ball_eq_euclidean g₀ (inv_pos.mpr Q.eta_pos)] |
| 135 | exact Metric.mem_ball_self ((M36.radialEuclideanRadius_pos_iff g₀ _).mpr |
| 136 | (inv_pos.mpr Q.eta_pos)) |
| 137 | change Q.inverse (D.map 0) = 0 |
| 138 | exact (congrArg Q.inverse D.map_zero).trans |
| 139 | ((congrArg Q.inverse Q.map_tip.symm).trans (Q.left_inverse h0)) |
| 140 | |
| 141 | /-- The radial position and velocity expressed through the smooth |
| 142 | coordinate endpoint. Source: Claim 16.6, pp. 371-372. -/ |
| 143 | noncomputable def phase (D : NormalizedCapExponential Q R) (z : E × ℝ) : E × E := |
| 144 | (D.coordinateMap (z.2 • z.1), fderiv ℝ D.coordinateMap (z.2 • z.1) z.1) |
| 145 | |
| 146 | /-- The displayed radial velocity is the derivative of the actual |
| 147 | coordinate curve, everywhere in its domain; Claim 16.6, pp. 371-372. -/ |
| 148 | theorem phase_eq_curve_velocity (D : NormalizedCapExponential Q R) |
| 149 | {v : E} {t : ℝ} (ht : t • v ∈ Metric.ball 0 R) : |
| 150 | D.phase (v, t) = |
| 151 | (D.coordinateMap (t • v), deriv (fun s => D.coordinateMap (s • v)) t) := by |
| 152 | have hd := (D.coordinateMap_smooth.contDiffAt (Metric.isOpen_ball.mem_nhds ht)).differentiableAt |
| 153 | (by simp) |
| 154 | have hcurve := hd.hasFDerivAt.comp_hasDerivAt t ((hasDerivAt_id t).smul_const v) |
| 155 | refine Prod.ext rfl ?_ |
| 156 | simpa only [phase, Function.comp_def, id_eq, one_smul] using hcurve.deriv.symm |
| 157 | |
| 158 | /-- The actual phase family is jointly smooth on the open radial |
| 159 | parameter-time domain. Source: Claim 16.6, pp. 371-372. -/ |
| 160 | theorem phase_smooth (D : NormalizedCapExponential Q R) : |
| 161 | ContDiffOn ℝ ∞ D.phase {z : E × ℝ | z.2 • z.1 ∈ Metric.ball 0 R} := by |
| 162 | intro z hz |
| 163 | have harg : ContDiffAt ℝ ∞ (fun p : E × ℝ => p.2 • p.1) z := by fun_prop |
| 164 | have hmap := D.coordinateMap_smooth.contDiffAt (Metric.isOpen_ball.mem_nhds hz) |
| 165 | have hphase : ContDiffAt ℝ ∞ D.phase z := (hmap.comp z harg).prodMk |
| 166 | (((hmap.fderiv_right (m := ∞) (by simp)).comp z harg).clm_apply contDiffAt_fst) |
| 167 | exact hphase.contDiffWithinAt |
| 168 | |
| 169 | /-- Initial phase data are the zero position and the coordinate initial |
| 170 | frame applied to the velocity. Source: Claim 16.6, pp. 371-372. -/ |
| 171 | theorem phase_initial (D : NormalizedCapExponential Q R) (v : E) : |
| 172 | D.phase (v, 0) = (0, fderiv ℝ D.coordinateMap 0 v) := by |
| 173 | simp only [phase, zero_smul, D.coordinateMap_zero] |
| 174 | |
| 175 | /-- The phase of an actual normalized radial exponential solves the |
| 176 | coefficient equation used by compact ODE stability. The velocity is |
| 177 | the ordinary derivative of its actual inverse-chart position. |
| 178 | Source: Claim 16.6, pp. 371-372. -/ |
| 179 | theorem coordinate_phase_hasDerivAt (D : NormalizedCapExponential Q R) |
| 180 | {v : E} (hv : v ∈ Metric.ball 0 R) {t : ℝ} (ht : t • v ∈ Metric.ball 0 R) : |
| 181 | HasDerivAt (fun s => (D.coordinateMap (s • v), deriv (fun u => D.coordinateMap (u • v)) s)) |
| 182 | (coordinateGeodesicField Q.normalizedCoefficients |
| 183 | (D.coordinateMap (t • v), deriv (fun u => D.coordinateMap (u • v)) t)) t := |
| 184 | Q.hasDerivAt_normalized_geodesic_phase (D.geodesic v hv) ht (D.map_mem _ ht) |
| 185 | |
| 186 | /-- The jointly smooth actual phase family satisfies its normalized |
| 187 | geodesic ODE; Claim 16.6, pp. 371-372. -/ |
| 188 | theorem phase_hasDerivAt (D : NormalizedCapExponential Q R) |
| 189 | {v : E} (hv : v ∈ Metric.ball 0 R) {t : ℝ} (ht : t • v ∈ Metric.ball 0 R) : |
| 190 | HasDerivAt (fun s => D.phase (v, s)) |
| 191 | (coordinateGeodesicField Q.normalizedCoefficients (D.phase (v, t))) t := by |
| 192 | have hcont : ContinuousAt (fun s : ℝ => s • v) t := by fun_prop |
| 193 | have heq : (fun s => D.phase (v, s)) =ᶠ[𝓝 t] |
| 194 | (fun s => (D.coordinateMap (s • v), deriv (fun u => D.coordinateMap (u • v)) s)) := by |
| 195 | filter_upwards [hcont.preimage_mem_nhds (Metric.isOpen_ball.mem_nhds ht)] with s hs |
| 196 | exact D.phase_eq_curve_velocity hs |
| 197 | rw [D.phase_eq_curve_velocity ht] |
| 198 | exact (D.coordinate_phase_hasDerivAt hv ht).congr_of_eventuallyEq heq |
| 199 | |
| 200 | end NormalizedCapExponential |
| 201 | |
| 202 | end PoincareMT.M44 |