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.Comparison.Smoothing.Basepoint.Euclidean |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Comparison.Smoothing.Charts.Perturbation |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Comparison.Distance.PathBounds |
| 4 | import Mathlib.Geometry.Manifold.ContMDiffMFDeriv |
| 5 | import Mathlib.Geometry.Manifold.MFDeriv.Atlas |
| 6 | |
| 7 | /-! |
| 8 | # Exact point correction on a Riemannian manifold |
| 9 | |
| 10 | Conjugate a supported coordinate correction and its homotopy by a smooth |
| 11 | chart. Compact support controls the chart boundary uniformly in time. |
| 12 | The metric estimate uses the actual pullback tangent norm. This is the |
| 13 | exact-basepoint step of the 2026-09-18 SurgeryComparison.Transport quantitative approximation |
| 14 | contract following Morgan-Tian Claim 18.22, printed p. 433. The derivation |
| 15 | is `proof-work/tasks/SurgeryComparison.Transport/derivations/2026-09-20-helper-point-correction-manifold.md`. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Function Set Filter Bundle Manifold |
| 21 | open scoped Topology Manifold ContDiff ENNReal unitInterval Bundle |
| 22 | |
| 23 | namespace PoincareMT.SurgeryComparison.Transport |
| 24 | |
| 25 | section ChartCorrection |
| 26 | |
| 27 | variable {M E A : Type*} [TopologicalSpace M] [T2Space M] |
| 28 | [NormedAddCommGroup E] [NormedSpace ℝ E] [TopologicalSpace A] |
| 29 | |
| 30 | /-- Conjugate a coordinate correction on its chart and use the identity |
| 31 | elsewhere; SurgeryComparison.Transport exact-point correction, Claim 18.22, p. 433. -/ |
| 32 | noncomputable def chartCorrection (e : OpenPartialHomeomorph M E) (f : E → E) : M → M := |
| 33 | chartPerturb e e.source id (fun x => f (e x) - e x) |
| 34 | |
| 35 | /-- The chart correction has its conjugation formula on the chart |
| 36 | source; SurgeryComparison.Transport point-correction derivation, Claim 18.22, p. 433. -/ |
| 37 | theorem chartCorrection_of_mem (e : OpenPartialHomeomorph M E) (f : E → E) |
| 38 | {x : M} (hx : x ∈ e.source) : chartCorrection e f x = e.symm (f (e x)) := by |
| 39 | rw [chartCorrection, chartPerturb_of_mem e e.source id _ hx] |
| 40 | congr 1 |
| 41 | dsimp only [id_eq] |
| 42 | abel |
| 43 | |
| 44 | /-- Outside the chart source the correction is the identity; SurgeryComparison.Transport |
| 45 | point-correction derivation, Claim 18.22, p. 433. -/ |
| 46 | theorem chartCorrection_of_not_mem (e : OpenPartialHomeomorph M E) (f : E → E) |
| 47 | {x : M} (hx : x ∉ e.source) : chartCorrection e f x = x := by |
| 48 | simp [chartCorrection, chartPerturb, hx] |
| 49 | |
| 50 | /-- A coordinate map fixed off `K` gives a manifold map fixed off the |
| 51 | inverse-chart image of `K`; Claim 18.22, p. 433. -/ |
| 52 | theorem chartCorrection_eq_self (e : OpenPartialHomeomorph M E) {f : E → E} {K : Set E} |
| 53 | (hfix : ∀ z ∉ K, f z = z) {x : M} (hx : x ∉ e.symm '' K) : |
| 54 | chartCorrection e f x = x := by |
| 55 | by_cases hxs : x ∈ e.source |
| 56 | · have hex : e x ∉ K := fun h => hx ⟨e x, h, e.left_inv hxs⟩ |
| 57 | rw [chartCorrection_of_mem e f hxs, hfix _ hex, e.left_inv hxs] |
| 58 | · exact chartCorrection_of_not_mem e f hxs |
| 59 | |
| 60 | /-- The compact support's inverse-chart image controls a neighborhood |
| 61 | on which the manifold correction is the identity; Claim 18.22, p. 433. -/ |
| 62 | theorem chartCorrection_eventuallyEq (e : OpenPartialHomeomorph M E) |
| 63 | {f : E → E} {K : Set E} (hK : IsCompact K) (hKe : K ⊆ e.target) |
| 64 | (hfix : ∀ z ∉ K, f z = z) {x : M} (hx : x ∉ e.symm '' K) : |
| 65 | chartCorrection e f =ᶠ[𝓝 x] id := by |
| 66 | have hc : IsCompact (e.symm '' K) := |
| 67 | hK.image_of_continuousOn (e.continuousOn_symm.mono hKe) |
| 68 | filter_upwards [hc.isClosed.isOpen_compl.mem_nhds hx] with y hy |
| 69 | exact chartCorrection_eq_self e hfix hy |
| 70 | |
| 71 | /-- A continuous family of supported coordinate corrections conjugates |
| 72 | to a continuous family on the manifold. The compact support is common to |
| 73 | every parameter; SurgeryComparison.Transport homotopy gluing, Claim 18.22, p. 433. -/ |
| 74 | theorem continuous_chartCorrection_family (e : OpenPartialHomeomorph M E) |
| 75 | {F : A → E → E} (hF : Continuous (uncurry F)) |
| 76 | {K : Set E} (hK : IsCompact K) (hKe : K ⊆ e.target) |
| 77 | (hrange : ∀ a, MapsTo (F a) e.target e.target) |
| 78 | (hfix : ∀ a z, z ∉ K → F a z = z) : |
| 79 | Continuous (fun p : A × M => chartCorrection e (F p.1) p.2) := by |
| 80 | have hc : IsCompact (e.symm '' K) := |
| 81 | hK.image_of_continuousOn (e.continuousOn_symm.mono hKe) |
| 82 | have himage : e.symm '' K ⊆ e.source := by |
| 83 | rintro _ ⟨z, hz, rfl⟩ |
| 84 | exact e.map_target (hKe hz) |
| 85 | apply continuous_iff_continuousAt.mpr |
| 86 | rintro ⟨a, x⟩ |
| 87 | by_cases hx : x ∈ e.source |
| 88 | · have hcoord : ContinuousAt (fun p : A × M => F p.1 (e p.2)) (a, x) := |
| 89 | hF.continuousAt.comp (f := fun p : A × M => (p.1, e p.2)) |
| 90 | (continuous_fst.continuousAt.prodMk |
| 91 | ((e.continuousAt hx).comp continuous_snd.continuousAt)) |
| 92 | apply ((e.continuousAt_symm (hrange a (e.map_source hx))).comp |
| 93 | (f := fun p : A × M => F p.1 (e p.2)) hcoord).congr_of_eventuallyEq |
| 94 | filter_upwards [(e.open_source.preimage continuous_snd).mem_nhds hx] with p hp |
| 95 | exact chartCorrection_of_mem e (F p.1) hp |
| 96 | · have hxK : x ∉ e.symm '' K := fun h => hx (himage h) |
| 97 | apply continuous_snd.continuousAt.congr_of_eventuallyEq |
| 98 | filter_upwards [(hc.isClosed.isOpen_compl.preimage continuous_snd).mem_nhds hxK] with p hp |
| 99 | exact chartCorrection_eq_self e (hfix p.1) hp |
| 100 | |
| 101 | /-- A supported continuous coordinate self-map preserving the chart |
| 102 | target gives a continuous manifold self-map; Claim 18.22, p. 433. -/ |
| 103 | theorem continuous_chartCorrection (e : OpenPartialHomeomorph M E) {f : E → E} |
| 104 | (hf : Continuous f) {K : Set E} (hK : IsCompact K) (hKe : K ⊆ e.target) |
| 105 | (hrange : MapsTo f e.target e.target) (hfix : ∀ z ∉ K, f z = z) : |
| 106 | Continuous (chartCorrection e f) := by |
| 107 | have hc := continuous_chartCorrection_family (A := Unit) e |
| 108 | (F := fun _ => f) (hf.comp continuous_snd) hK hKe (fun _ => hrange) (fun _ => hfix) |
| 109 | exact hc.comp |
| 110 | ((continuous_const : Continuous (fun _ : M => Unit.unit)).prodMk continuous_id) |
| 111 | |
| 112 | /-- The coordinate homotopy glues across the chart boundary because it |
| 113 | is fixed off one compact coordinate set; Claim 18.22, p. 433. -/ |
| 114 | noncomputable def chartCorrectionHomotopy (e : OpenPartialHomeomorph M E) |
| 115 | {f : C(E, E)} (H : (ContinuousMap.id E).Homotopy f) |
| 116 | {K : Set E} (hK : IsCompact K) (hKe : K ⊆ e.target) |
| 117 | (hrange : ∀ t : unitInterval, MapsTo (fun z => H (t, z)) e.target e.target) |
| 118 | (hfix : ∀ (t : unitInterval) z, z ∉ K → H (t, z) = z) : |
| 119 | (ContinuousMap.id M).Homotopy |
| 120 | ⟨chartCorrection e f, continuous_chartCorrection e f.continuous hK hKe |
| 121 | (by intro z hz; simpa only [H.apply_one] using (hrange 1 hz)) |
| 122 | (by intro z hz; simpa only [H.apply_one] using (hfix 1 z hz))⟩ where |
| 123 | toFun p := chartCorrection e (fun z => H (p.1, z)) p.2 |
| 124 | continuous_toFun := continuous_chartCorrection_family e (F := fun t z => H (t, z)) |
| 125 | H.continuous hK hKe hrange hfix |
| 126 | map_zero_left x := by |
| 127 | change chartCorrection e (fun z => H (0, z)) x = x |
| 128 | by_cases hx : x ∈ e.source |
| 129 | · rw [chartCorrection_of_mem e _ hx, H.apply_zero] |
| 130 | exact e.left_inv hx |
| 131 | · exact chartCorrection_of_not_mem e _ hx |
| 132 | map_one_left x := by |
| 133 | change chartCorrection e (fun z => H (1, z)) x = chartCorrection e f x |
| 134 | congr 1 |
| 135 | funext z |
| 136 | exact H.apply_one z |
| 137 | |
| 138 | end ChartCorrection |
| 139 | |
| 140 | section SmoothChartCorrection |
| 141 | |
| 142 | variable {M E H : Type*} [TopologicalSpace M] [T2Space M] |
| 143 | [NormedAddCommGroup E] [NormedSpace ℝ E] [TopologicalSpace H] [ChartedSpace H M] |
| 144 | {J : ModelWithCorners ℝ E H} |
| 145 | |
| 146 | /-- A supported smooth coordinate map gives a smooth manifold map. At |
| 147 | the chart boundary it agrees locally with the identity; SurgeryComparison.Transport point |
| 148 | correction, Claim 18.22, p. 433. -/ |
| 149 | theorem contMDiff_chartCorrection (e : OpenPartialHomeomorph M E) {f : E → E} |
| 150 | (hf : ContDiff ℝ ∞ f) |
| 151 | (he : ContMDiffOn J 𝓘(ℝ, E) ∞ e e.source) |
| 152 | (hei : ContMDiffOn 𝓘(ℝ, E) J ∞ e.symm e.target) |
| 153 | {K : Set E} (hK : IsCompact K) (hKe : K ⊆ e.target) |
| 154 | (hrange : MapsTo f e.target e.target) (hfix : ∀ z ∉ K, f z = z) : |
| 155 | ContMDiff J J ∞ (chartCorrection e f) := by |
| 156 | intro x |
| 157 | by_cases hx : x ∈ e.source |
| 158 | · have he_at := (he x hx).contMDiffAt (e.open_source.mem_nhds hx) |
| 159 | have hcoord : ContMDiffAt J 𝓘(ℝ, E) ∞ |
| 160 | (fun y => e (id y) + (f (e y) - e y)) x := by |
| 161 | convert hf.contMDiff.contMDiffAt.comp x he_at using 1 |
| 162 | funext y |
| 163 | dsimp only [id_eq] |
| 164 | abel |
| 165 | apply contMDiffAt_chartPerturb_of_mem e e.open_source hx hcoord hei |
| 166 | have hsum : e x + (f (e x) - e x) = f (e x) := by abel |
| 167 | simpa only [id_eq, hsum] using hrange (e.map_source hx) |
| 168 | · have hxK : x ∉ e.symm '' K := by |
| 169 | rintro ⟨z, hz, rfl⟩ |
| 170 | exact hx (e.map_target (hKe hz)) |
| 171 | exact contMDiffAt_id.congr_of_eventuallyEq |
| 172 | (chartCorrection_eventuallyEq e hK hKe hfix hxK) |
| 173 | |
| 174 | end SmoothChartCorrection |
| 175 | |
| 176 | section RiemannianCoordinates |
| 177 | |
| 178 | variable {M : Type*} [TopologicalSpace M] |
| 179 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 180 | |
| 181 | /-- The actual metric norm pulled back by an inverse chart. This avoids |
| 182 | replacing the target metric by a coordinate norm in the SurgeryComparison.Transport correction, |
| 183 | Claim 18.22, p. 433. -/ |
| 184 | noncomputable def chartPullbackNorm (g : RiemannianMetric 3 M) |
| 185 | (e : OpenPartialHomeomorph M (EuclideanSpace ℝ (Fin 3))) |
| 186 | (p : EuclideanSpace ℝ (Fin 3) × EuclideanSpace ℝ (Fin 3)) : ℝ := |
| 187 | g.tangentNorm (e.symm p.1) (mfderiv (𝓡 3) (𝓡 3) e.symm p.1 p.2) |
| 188 | |
| 189 | /-- Continuity of the tangent map and of the supplied metric gives the |
| 190 | continuous coordinate norm needed by point correction, Claim 18.22, |
| 191 | p. 433. All derivatives are restricted to the open chart target. -/ |
| 192 | theorem continuousOn_chartPullbackNorm (g : RiemannianMetric 3 M) |
| 193 | (e : OpenPartialHomeomorph M (EuclideanSpace ℝ (Fin 3))) |
| 194 | (hei : ContMDiffOn (𝓡 3) (𝓡 3) ∞ e.symm e.target) : |
| 195 | ContinuousOn (chartPullbackNorm g e) (e.target ×ˢ univ) := by |
| 196 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 197 | ⟨g.toRiemannianMetric⟩ |
| 198 | letI : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin 3)) |
| 199 | (TangentSpace (𝓡 3) : M → Type _) := |
| 200 | { exists_continuous := ⟨g.inner, g.contMDiff.continuous, fun _ _ _ => rfl⟩ } |
| 201 | let V : EuclideanSpace ℝ (Fin 3) × EuclideanSpace ℝ (Fin 3) → TangentBundle (𝓡 3) M := |
| 202 | fun p => ⟨e.symm p.1, mfderiv (𝓡 3) (𝓡 3) e.symm p.1 p.2⟩ |
| 203 | have hV : ContinuousOn V (e.target ×ˢ univ) := by |
| 204 | have hT := hei.continuousOn_tangentMapWithin (by simp) e.open_target.uniqueMDiffOn |
| 205 | have hc := hT.comp |
| 206 | (tangentBundleModelSpaceHomeomorph (𝓡 3)).symm.continuous.continuousOn |
| 207 | (s := e.target ×ˢ univ) (fun p hp => hp.1) |
| 208 | apply hc.congr |
| 209 | intro p hp |
| 210 | change (⟨e.symm p.1, mfderiv (𝓡 3) (𝓡 3) e.symm p.1 p.2⟩ : TangentBundle (𝓡 3) M) = |
| 211 | ⟨e.symm p.1, mfderivWithin (𝓡 3) (𝓡 3) e.symm e.target p.1 p.2⟩ |
| 212 | rw [mfderivWithin_of_isOpen e.open_target hp.1] |
| 213 | have hi : ContinuousOn |
| 214 | (fun p : EuclideanSpace ℝ (Fin 3) × EuclideanSpace ℝ (Fin 3) => |
| 215 | g.inner (e.symm p.1) (mfderiv (𝓡 3) (𝓡 3) e.symm p.1 p.2) |
| 216 | (mfderiv (𝓡 3) (𝓡 3) e.symm p.1 p.2)) (e.target ×ˢ univ) := |
| 217 | hV.inner_bundle hV |
| 218 | exact hi.sqrt |
| 219 | |
| 220 | /-- Inverse-chart derivative injectivity makes the pullback norm |
| 221 | positive on nonzero coordinate vectors; Claim 18.22, p. 433. -/ |
| 222 | theorem chartPullbackNorm_pos (g : RiemannianMetric 3 M) |
| 223 | (e : OpenPartialHomeomorph M (EuclideanSpace ℝ (Fin 3))) |
| 224 | (he : e.MDifferentiable (𝓡 3) (𝓡 3)) |
| 225 | {z : EuclideanSpace ℝ (Fin 3)} (hz : z ∈ e.target) |
| 226 | {w : EuclideanSpace ℝ (Fin 3)} (hw : w ≠ 0) : |
| 227 | 0 < chartPullbackNorm g e (z, w) := by |
| 228 | apply Real.sqrt_pos.mpr |
| 229 | apply g.pos |
| 230 | intro hzero |
| 231 | apply hw |
| 232 | change (w : TangentSpace (𝓡 3) z) = 0 |
| 233 | apply he.symm.mfderiv_injective hz |
| 234 | exact hzero.trans (map_zero (mfderiv (𝓡 3) (𝓡 3) e.symm z)).symm |
| 235 | |
| 236 | /-- The actual coordinate norm is absolutely homogeneous, including |
| 237 | at zero; SurgeryComparison.Transport point correction, Claim 18.22, p. 433. -/ |
| 238 | theorem chartPullbackNorm_smul (g : RiemannianMetric 3 M) |
| 239 | (e : OpenPartialHomeomorph M (EuclideanSpace ℝ (Fin 3))) |
| 240 | (z w : EuclideanSpace ℝ (Fin 3)) (c : ℝ) : |
| 241 | chartPullbackNorm g e (z, c • w) = |c| * chartPullbackNorm g e (z, w) := by |
| 242 | let D : EuclideanSpace ℝ (Fin 3) →L[ℝ] EuclideanSpace ℝ (Fin 3) := |
| 243 | mfderiv (𝓡 3) (𝓡 3) e.symm z |
| 244 | let B : EuclideanSpace ℝ (Fin 3) →L[ℝ] EuclideanSpace ℝ (Fin 3) →L[ℝ] ℝ := |
| 245 | g.inner (e.symm z) |
| 246 | change Real.sqrt (B (D (c • w)) (D (c • w))) = |
| 247 | |c| * Real.sqrt (B (D w) (D w)) |
| 248 | simp only [map_smul, ContinuousLinearMap.smul_apply, smul_eq_mul] |
| 249 | rw [← mul_assoc, ← pow_two, Real.sqrt_mul (sq_nonneg c), Real.sqrt_sq_eq_abs] |
| 250 | |
| 251 | end RiemannianCoordinates |
| 252 | |
| 253 | section RiemannianCorrection |
| 254 | |
| 255 | variable {M : Type*} [TopologicalSpace M] [T2Space M] |
| 256 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 257 | |
| 258 | /-- Differentiate the literal chart conjugation on the chart source. |
| 259 | This transfers the point-correction estimate to actual tangent vectors, |
| 260 | Claim 18.22, p. 433. -/ |
| 261 | theorem mfderiv_chartCorrection |
| 262 | (e : OpenPartialHomeomorph M (EuclideanSpace ℝ (Fin 3))) |
| 263 | {f : EuclideanSpace ℝ (Fin 3) → EuclideanSpace ℝ (Fin 3)} |
| 264 | (hf : ContDiff ℝ ∞ f) (he : e.MDifferentiable (𝓡 3) (𝓡 3)) |
| 265 | (hrange : MapsTo f e.target e.target) {x : M} (hx : x ∈ e.source) : |
| 266 | mfderiv (𝓡 3) (𝓡 3) (chartCorrection e f) x = |
| 267 | (mfderiv (𝓡 3) (𝓡 3) e.symm (f (e x))).comp |
| 268 | ((fderiv ℝ f (e x)).comp (mfderiv (𝓡 3) (𝓡 3) e x)) := by |
| 269 | have heq : chartCorrection e f =ᶠ[𝓝 x] e.symm ∘ (f ∘ e) := by |
| 270 | filter_upwards [e.open_source.mem_nhds hx] with y hy |
| 271 | exact chartCorrection_of_mem e f hy |
| 272 | rw [heq.mfderiv_eq] |
| 273 | have hfm : MDifferentiableAt (𝓡 3) (𝓡 3) f (e x) := |
| 274 | hf.contMDiff.mdifferentiableAt (by simp) |
| 275 | rw [mfderiv_comp x (he.mdifferentiableAt_symm (hrange (e.map_source hx))) |
| 276 | (hfm.comp x (he.mdifferentiableAt hx)), |
| 277 | mfderiv_comp x hfm (he.mdifferentiableAt hx), mfderiv_eq_fderiv] |
| 278 | rfl |
| 279 | |
| 280 | /-- A coordinate norm estimate for a supported correction is the exact |
| 281 | quadratic pullback bound for the supplied metric. Off its compact support |
| 282 | the map is locally the identity; Claim 18.22, p. 433. -/ |
| 283 | theorem chartCorrection_pullback_le (g : RiemannianMetric 3 M) |
| 284 | (e : OpenPartialHomeomorph M (EuclideanSpace ℝ (Fin 3))) |
| 285 | {f : EuclideanSpace ℝ (Fin 3) → EuclideanSpace ℝ (Fin 3)} |
| 286 | (hf : ContDiff ℝ ∞ f) (he : e.MDifferentiable (𝓡 3) (𝓡 3)) |
| 287 | {K : Set (EuclideanSpace ℝ (Fin 3))} (hK : IsCompact K) (hKe : K ⊆ e.target) |
| 288 | (hrange : MapsTo f e.target e.target) (hfix : ∀ z ∉ K, f z = z) |
| 289 | {C : ℝ} (hC : 1 ≤ C) |
| 290 | (hbound : ∀ z ∈ e.target, ∀ w, |
| 291 | chartPullbackNorm g e (f z, fderiv ℝ f z w) ≤ C * chartPullbackNorm g e (z, w)) : |
| 292 | ∀ x : M, ∀ v : TangentSpace (𝓡 3) x, |
| 293 | g.inner (chartCorrection e f x) (mfderiv (𝓡 3) (𝓡 3) (chartCorrection e f) x v) |
| 294 | (mfderiv (𝓡 3) (𝓡 3) (chartCorrection e f) x v) ≤ C ^ 2 * g.inner x v v := by |
| 295 | -- Fixed model-space types keep point equalities out of the linear-map instances. |
| 296 | let B : M → EuclideanSpace ℝ (Fin 3) →L[ℝ] EuclideanSpace ℝ (Fin 3) →L[ℝ] ℝ := |
| 297 | fun y => g.inner y |
| 298 | let D : M → EuclideanSpace ℝ (Fin 3) →L[ℝ] EuclideanSpace ℝ (Fin 3) := |
| 299 | fun y => mfderiv (𝓡 3) (𝓡 3) (chartCorrection e f) y |
| 300 | have hg_nonneg (x : M) (v : EuclideanSpace ℝ (Fin 3)) : 0 ≤ B x v v := by |
| 301 | by_cases hv : v = 0 |
| 302 | · simp [hv] |
| 303 | · exact (g.pos x v hv).le |
| 304 | intro x v |
| 305 | change B (chartCorrection e f x) (D x v) (D x v) ≤ C ^ 2 * B x v v |
| 306 | by_cases hx : x ∈ e.source |
| 307 | · have hpoint := chartCorrection_of_mem e f hx |
| 308 | have hderiv := mfderiv_chartCorrection e hf he hrange hx |
| 309 | let Dinv : EuclideanSpace ℝ (Fin 3) → |
| 310 | EuclideanSpace ℝ (Fin 3) →L[ℝ] EuclideanSpace ℝ (Fin 3) := |
| 311 | fun z => mfderiv (𝓡 3) (𝓡 3) e.symm z |
| 312 | let w : EuclideanSpace ℝ (Fin 3) := mfderiv (𝓡 3) (𝓡 3) e x v |
| 313 | have hinv : Dinv (e x) w = v := |
| 314 | congrArg (fun L : EuclideanSpace ℝ (Fin 3) →L[ℝ] EuclideanSpace ℝ (Fin 3) => L v) |
| 315 | (he.symm_comp_deriv hx) |
| 316 | have hderiv_v : D x v = Dinv (f (e x)) (fderiv ℝ f (e x) w) := |
| 317 | congrArg (fun L : EuclideanSpace ℝ (Fin 3) →L[ℝ] EuclideanSpace ℝ (Fin 3) => L v) |
| 318 | hderiv |
| 319 | have hb := hbound (e x) (e.map_source hx) w |
| 320 | change Real.sqrt (B (e.symm (f (e x))) |
| 321 | (Dinv (f (e x)) (fderiv ℝ f (e x) w)) |
| 322 | (Dinv (f (e x)) (fderiv ℝ f (e x) w))) ≤ |
| 323 | C * Real.sqrt (B (e.symm (e x)) (Dinv (e x) w) (Dinv (e x) w)) at hb |
| 324 | rw [hinv, e.left_inv hx] at hb |
| 325 | have hn : Real.sqrt (B (chartCorrection e f x) (D x v) (D x v)) ≤ |
| 326 | C * Real.sqrt (B x v v) := by |
| 327 | rw [hpoint, hderiv_v] |
| 328 | exact hb |
| 329 | have hsquare := mul_self_le_mul_self (Real.sqrt_nonneg _) hn |
| 330 | simpa only [← pow_two, mul_pow, |
| 331 | Real.sq_sqrt (hg_nonneg (chartCorrection e f x) (D x v)), |
| 332 | Real.sq_sqrt (hg_nonneg x v)] using hsquare |
| 333 | · have hxK : x ∉ e.symm '' K := by |
| 334 | rintro ⟨z, hz, rfl⟩ |
| 335 | exact hx (e.map_target (hKe hz)) |
| 336 | have heq := chartCorrection_eventuallyEq e hK hKe hfix hxK |
| 337 | have hpoint : chartCorrection e f x = x := heq.eq_of_nhds |
| 338 | have heqD : D x = |
| 339 | (mfderiv (𝓡 3) (𝓡 3) (id : M → M) x : |
| 340 | EuclideanSpace ℝ (Fin 3) →L[ℝ] EuclideanSpace ℝ (Fin 3)) := heq.mfderiv_eq |
| 341 | have hid : |
| 342 | (mfderiv (𝓡 3) (𝓡 3) (id : M → M) x : |
| 343 | EuclideanSpace ℝ (Fin 3) →L[ℝ] EuclideanSpace ℝ (Fin 3)) = |
| 344 | ContinuousLinearMap.id ℝ (EuclideanSpace ℝ (Fin 3)) := mfderiv_id |
| 345 | have hderiv : D x = ContinuousLinearMap.id ℝ (EuclideanSpace ℝ (Fin 3)) := |
| 346 | heqD.trans hid |
| 347 | rw [hpoint, hderiv] |
| 348 | change B x v v ≤ C ^ 2 * B x v v |
| 349 | exact le_mul_of_one_le_left (hg_nonneg x v) (by nlinarith) |
| 350 | |
| 351 | /-- A nearby point can be moved to a specified point by a smooth map |
| 352 | homotopic to the identity, with arbitrarily small multiplicative loss in |
| 353 | the actual Riemannian distance. The radius is chosen before the nearby |
| 354 | point, as needed for SurgeryComparison.Transport exact-basepoint smoothing, Claim 18.22, p. 433. -/ |
| 355 | theorem exists_smooth_pointCorrection [RegularSpace M] |
| 356 | (g : RiemannianMetric 3 M) (b : M) {η : ℝ} (hη : 0 < η) : |
| 357 | ∃ r : ℝ, 0 < r ∧ ∀ a : M, g.edist a b < ENNReal.ofReal r → |
| 358 | ∃ p : C(M, M), ContMDiff (𝓡 3) (𝓡 3) ∞ p ∧ p a = b ∧ |
| 359 | ContinuousMap.Homotopic p (ContinuousMap.id M) ∧ |
| 360 | ∀ x y : M, g.edist (p x) (p y) ≤ ENNReal.ofReal (1 + η) * g.edist x y := by |
| 361 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 362 | ⟨g.toRiemannianMetric⟩ |
| 363 | letI : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin 3)) |
| 364 | (TangentSpace (𝓡 3) : M → Type _) := |
| 365 | { exists_continuous := ⟨g.inner, g.contMDiff.continuous, fun _ _ _ => rfl⟩ } |
| 366 | let e : OpenPartialHomeomorph M (EuclideanSpace ℝ (Fin 3)) := |
| 367 | chartAt (EuclideanSpace ℝ (Fin 3)) b |
| 368 | have hbe : b ∈ e.source := mem_chart_source _ _ |
| 369 | have he : ContMDiffOn (𝓡 3) (𝓡 3) ∞ e e.source := contMDiffOn_chart |
| 370 | have hei : ContMDiffOn (𝓡 3) (𝓡 3) ∞ e.symm e.target := contMDiffOn_chart_symm |
| 371 | have heM : e.MDifferentiable (𝓡 3) (𝓡 3) := |
| 372 | ⟨he.mdifferentiableOn (by simp), hei.mdifferentiableOn (by simp)⟩ |
| 373 | obtain ⟨ρ, hρ, hcor⟩ := exists_contDiff_pointCorrection_metric e.open_target |
| 374 | (e.map_source hbe) (chartPullbackNorm g e) (continuousOn_chartPullbackNorm g e hei) |
| 375 | (fun z hz w hw => chartPullbackNorm_pos g e heM hz hw) |
| 376 | (fun z _ c w => chartPullbackNorm_smul g e z w c) hη |
| 377 | have hs : e.source ∩ e ⁻¹' Metric.ball (e b) ρ ∈ 𝓝 b := |
| 378 | inter_mem (e.open_source.mem_nhds hbe) |
| 379 | ((e.continuousAt hbe).preimage_mem_nhds (Metric.ball_mem_nhds _ hρ)) |
| 380 | obtain ⟨r, hr, hrS⟩ := setOfPred_riemannianEDist_lt_subset_nhds (𝓡 3) hs |
| 381 | refine ⟨(r : ℝ), by exact_mod_cast hr, fun a ha => ?_⟩ |
| 382 | have hba : Manifold.riemannianEDist (𝓡 3) b a < (r : ℝ≥0∞) := by |
| 383 | change Manifold.riemannianEDist (𝓡 3) a b < ENNReal.ofReal (r : ℝ) at ha |
| 384 | rw [Manifold.riemannianEDist_comm] at ha |
| 385 | simpa only [ENNReal.ofReal_coe_nnreal] using ha |
| 386 | have haS := hrS hba |
| 387 | obtain ⟨f, hf, hfa, _, _, _, hfbound, H, hH, K, hK, hKe, hfixH⟩ := hcor (e a) haS.2 |
| 388 | have hrange : MapsTo f e.target e.target := by |
| 389 | intro z hz |
| 390 | have hh : H (1, z) ∈ e.target := hH 1 hz |
| 391 | simpa only [H.apply_one] using hh |
| 392 | have hfix : ∀ z ∉ K, f z = z := by |
| 393 | intro z hz |
| 394 | simpa only [H.apply_one] using (hfixH 1 z hz) |
| 395 | have hp : ContMDiff (𝓡 3) (𝓡 3) ∞ (chartCorrection e f) := |
| 396 | contMDiff_chartCorrection e hf he hei hK hKe hrange hfix |
| 397 | let p : C(M, M) := ⟨chartCorrection e f, hp.continuous⟩ |
| 398 | have hhom : (ContinuousMap.id M).Homotopy p := |
| 399 | chartCorrectionHomotopy e H hK hKe hH hfixH |
| 400 | refine ⟨p, hp, ?_, ⟨hhom.symm⟩, ?_⟩ |
| 401 | · change chartCorrection e f a = b |
| 402 | rw [chartCorrection_of_mem e f haS.1, hfa, e.left_inv hbe] |
| 403 | · intro x y |
| 404 | exact SurgeryComparison.metric_edist_le_mul_of_pullback g g (by linarith) hp |
| 405 | (chartCorrection_pullback_le g e hf heM hK hKe hrange hfix (by linarith) hfbound) x y |
| 406 | |
| 407 | /-- Correct a smooth approximant's basepoint by postcomposition. The |
| 408 | target radius is independent of the approximant and its source basepoint; |
| 409 | the metric factors multiply. This is the exact-point assembly step in |
| 410 | the 2026-09-18 SurgeryComparison.Transport contract, following Claim 18.22, p. 433. -/ |
| 411 | theorem exists_smooth_pointCorrected_map [RegularSpace M] |
| 412 | {X : Type*} [TopologicalSpace X] |
| 413 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) X] [IsManifold (𝓡 3) ∞ X] |
| 414 | (g : RiemannianMetric 3 X) (h : RiemannianMetric 3 M) |
| 415 | (b : M) {η : ℝ} (hη : 0 < η) : |
| 416 | ∃ r : ℝ, 0 < r ∧ ∀ (f : C(X, M)), ContMDiff (𝓡 3) (𝓡 3) ∞ f → |
| 417 | ∀ x₀ : X, h.edist (f x₀) b < ENNReal.ofReal r → |
| 418 | ∀ C : ℝ, (∀ x y, h.edist (f x) (f y) ≤ ENNReal.ofReal C * g.edist x y) → |
| 419 | ∃ f' : C(X, M), ContMDiff (𝓡 3) (𝓡 3) ∞ f' ∧ f' x₀ = b ∧ |
| 420 | ContinuousMap.Homotopic f' f ∧ |
| 421 | ∀ x y, h.edist (f' x) (f' y) ≤ |
| 422 | ENNReal.ofReal ((1 + η) * C) * g.edist x y := by |
| 423 | obtain ⟨r, hr, hcor⟩ := exists_smooth_pointCorrection h b hη |
| 424 | refine ⟨r, hr, fun f hf x₀ hclose C hbound => ?_⟩ |
| 425 | obtain ⟨p, hp, hpbase, hhom, hpbound⟩ := hcor (f x₀) hclose |
| 426 | refine ⟨p.comp f, hp.comp hf, hpbase, ?_, ?_⟩ |
| 427 | · simpa only [ContinuousMap.id_comp] using |
| 428 | hhom.comp (ContinuousMap.Homotopic.refl f) |
| 429 | · intro x y |
| 430 | calc |
| 431 | h.edist (p (f x)) (p (f y)) ≤ |
| 432 | ENNReal.ofReal (1 + η) * h.edist (f x) (f y) := hpbound _ _ |
| 433 | _ ≤ ENNReal.ofReal (1 + η) * (ENNReal.ofReal C * g.edist x y) := |
| 434 | mul_le_mul' le_rfl (hbound x y) |
| 435 | _ = ENNReal.ofReal ((1 + η) * C) * g.edist x y := by |
| 436 | rw [ENNReal.ofReal_mul (by linarith : 0 ≤ 1 + η), mul_assoc] |
| 437 | |
| 438 | /-- Reserve an additive error budget before selecting a smooth map and |
| 439 | then correct its basepoint within the desired final metric factor. This |
| 440 | is the quantitative exact-point step of the 2026-09-18 SurgeryComparison.Transport contract, |
| 441 | following Claim 18.22, p. 433. -/ |
| 442 | theorem exists_smooth_pointCorrected_map_with_loss [RegularSpace M] |
| 443 | {X : Type*} [TopologicalSpace X] |
| 444 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) X] [IsManifold (𝓡 3) ∞ X] |
| 445 | (g : RiemannianMetric 3 X) (h : RiemannianMetric 3 M) (b : M) |
| 446 | {L ε : ℝ} (hL : 0 ≤ L) (hε : 0 < ε) : |
| 447 | ∃ loss : ℝ, 0 < loss ∧ ∃ r : ℝ, 0 < r ∧ |
| 448 | ∀ (f : C(X, M)), ContMDiff (𝓡 3) (𝓡 3) ∞ f → |
| 449 | ∀ x₀ : X, h.edist (f x₀) b < ENNReal.ofReal r → |
| 450 | (∀ x y, h.edist (f x) (f y) ≤ ENNReal.ofReal (L + loss) * g.edist x y) → |
| 451 | ∃ f' : C(X, M), ContMDiff (𝓡 3) (𝓡 3) ∞ f' ∧ f' x₀ = b ∧ |
| 452 | ContinuousMap.Homotopic f' f ∧ |
| 453 | ∀ x y, h.edist (f' x) (f' y) ≤ ENNReal.ofReal (L + ε) * g.edist x y := by |
| 454 | have hden : 0 < L + 2 := by linarith |
| 455 | let loss : ℝ := min 1 (ε / (L + 2)) |
| 456 | have hloss : 0 < loss := lt_min zero_lt_one (div_pos hε hden) |
| 457 | have hloss1 : loss ≤ 1 := min_le_left _ _ |
| 458 | have hlosse : loss * (L + 2) ≤ ε := |
| 459 | (le_div_iff₀ hden).mp (min_le_right _ _) |
| 460 | have hbudget : (1 + loss) * (L + loss) ≤ L + ε := by |
| 461 | nlinarith [mul_le_of_le_one_right hloss.le hloss1] |
| 462 | obtain ⟨r, hr, hcor⟩ := exists_smooth_pointCorrected_map g h b hloss |
| 463 | refine ⟨loss, hloss, r, hr, fun f hf x₀ hclose hbound => ?_⟩ |
| 464 | obtain ⟨f', hf', hbase, hhom, hdist⟩ := hcor f hf x₀ hclose (L + loss) hbound |
| 465 | refine ⟨f', hf', hbase, hhom, fun x y => (hdist x y).trans ?_⟩ |
| 466 | exact mul_le_mul' (ENNReal.ofReal_le_ofReal hbudget) le_rfl |
| 467 | |
| 468 | end RiemannianCorrection |
| 469 | |
| 470 | |
| 471 | end PoincareMT.SurgeryComparison.Transport |