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.Charts.Distance |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Comparison.Distance.LocalSmoothLipschitz |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Comparison.Smoothing.Local.FiniteControls |
| 4 | import Mathlib.Topology.Compactness.LocallyCompact |
| 5 | |
| 6 | /-! |
| 7 | # Estimating neighborhoods for one fixed chart convolution |
| 8 | |
| 9 | Normalize the fixed source and target charts at each point of the compact |
| 10 | smoothing support. Small compact neighborhoods then carry near-unit |
| 11 | forward and inverse chart estimates and a finite cutoff Lipschitz bound. |
| 12 | The charts being convolved do not change when these estimating |
| 13 | neighborhoods are shrunk. This implements the local metric step of the |
| 14 | SurgeryComparison.Transport full contract, Morgan--Tian Claim 18.22, printed p. 433. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | |
| 19 | open Bundle Set Filter Metric |
| 20 | open scoped Topology Manifold ContDiff NNReal |
| 21 | |
| 22 | namespace PoincareMT.SurgeryComparison.Transport |
| 23 | |
| 24 | variable {E F M N : Type*} |
| 25 | [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] |
| 26 | [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] |
| 27 | [MetricSpace M] [ChartedSpace E M] [IsManifold 𝓘(ℝ, E) ∞ M] |
| 28 | [LocallyCompactSpace M] |
| 29 | [RiemannianBundle (TangentSpace 𝓘(ℝ, E) : M → Type _)] |
| 30 | [IsContinuousRiemannianBundle E (TangentSpace 𝓘(ℝ, E) : M → Type _)] |
| 31 | [IsRiemannianManifold 𝓘(ℝ, E) M] |
| 32 | [MetricSpace N] [ChartedSpace F N] [IsManifold 𝓘(ℝ, F) ∞ N] |
| 33 | [RiemannianBundle (TangentSpace 𝓘(ℝ, F) : N → Type _)] |
| 34 | [IsContinuousRiemannianBundle F (TangentSpace 𝓘(ℝ, F) : N → Type _)] |
| 35 | [IsRiemannianManifold 𝓘(ℝ, F) N] |
| 36 | |
| 37 | /-- Around a point in a fixed chart patch, choose a compact estimating |
| 38 | neighborhood and affine normalizations of those same charts. Both chart |
| 39 | directions cost at most the prescribed `C > 1`; the cutoff has a finite |
| 40 | local bound. SurgeryComparison.Transport quantitative smoothing, Claim 18.22, p. 433. -/ |
| 41 | theorem exists_chart_smoothing_estimate_neighborhood |
| 42 | (e : OpenPartialHomeomorph M E) (h : OpenPartialHomeomorph N F) |
| 43 | (he : e.MDifferentiable 𝓘(ℝ, E) 𝓘(ℝ, E)) |
| 44 | (hh : h.MDifferentiable 𝓘(ℝ, F) 𝓘(ℝ, F)) |
| 45 | (hes : ContMDiffOn 𝓘(ℝ, E) 𝓘(ℝ, E) ∞ e e.source) |
| 46 | (hei : ContMDiffOn 𝓘(ℝ, E) 𝓘(ℝ, E) ∞ e.symm e.target) |
| 47 | (hhs : ContMDiffOn 𝓘(ℝ, F) 𝓘(ℝ, F) ∞ h h.source) |
| 48 | (hhi : ContMDiffOn 𝓘(ℝ, F) 𝓘(ℝ, F) ∞ h.symm h.target) |
| 49 | {f : M → N} (hf : Continuous f) |
| 50 | {ρ : M → ℝ} (hρ : ContMDiff 𝓘(ℝ, E) 𝓘(ℝ) ∞ ρ) |
| 51 | {U : Set M} (hU : IsOpen U) (hUe : U ⊆ e.source) |
| 52 | (hfU : MapsTo f U h.source) {x : M} (hx : x ∈ U) |
| 53 | {C : ℝ≥0} (hC : 1 < C) : |
| 54 | ∃ (A : E ≃L[ℝ] TangentSpace 𝓘(ℝ, E) x) |
| 55 | (B : F ≃L[ℝ] TangentSpace 𝓘(ℝ, F) (f x)) |
| 56 | (V : Set (TangentSpace 𝓘(ℝ, E) x)) |
| 57 | (W : Set (TangentSpace 𝓘(ℝ, F) (f x))) |
| 58 | (O K : Set M) (D : ℝ≥0), |
| 59 | IsOpen V ∧ IsOpen W ∧ IsOpen O ∧ IsCompact K ∧ |
| 60 | x ∈ interior K ∧ K ⊆ O ∧ O ⊆ U ∧ 0 < D ∧ |
| 61 | MapsTo A.symm V e.target ∧ MapsTo B.symm W h.target ∧ |
| 62 | MapsTo (fun y => A (e y)) O V ∧ |
| 63 | LipschitzOnWith C (fun y => A (e y)) O ∧ |
| 64 | LipschitzOnWith C (fun v => e.symm (A.symm v)) V ∧ |
| 65 | MapsTo (fun y => B (h (f y))) O W ∧ |
| 66 | LipschitzOnWith C (fun z => B (h z)) (f '' O) ∧ |
| 67 | LipschitzOnWith C (fun v => h.symm (B.symm v)) W ∧ |
| 68 | LipschitzOnWith D ρ O := by |
| 69 | let ns := normalizedSmoothChart e he (hUe hx) |
| 70 | let nt := normalizedSmoothChart h hh (hfU hx) |
| 71 | let A := (chartNormalizationLinearEquiv e he (hUe hx)).symm |
| 72 | let B := (chartNormalizationLinearEquiv h hh (hfU hx)).symm |
| 73 | have hxs : x ∈ ns.source := by |
| 74 | simpa only [ns, normalizedSmoothChart_source] using hUe hx |
| 75 | have hxt : f x ∈ nt.source := by |
| 76 | simpa only [nt, normalizedSmoothChart_source] using hfU hx |
| 77 | obtain ⟨r, hr, hrs, hsInv, hsFwd⟩ := |
| 78 | normalizedSmoothChart_exists_lipschitz_ball e he (hUe hx) hes hei C hC |
| 79 | obtain ⟨s, hs, hst, htInv, htFwd⟩ := |
| 80 | normalizedSmoothChart_exists_lipschitz_ball h hh (hfU hx) hhs hhi C hC |
| 81 | let V := ball (ns x) r |
| 82 | let W := ball (nt (f x)) s |
| 83 | have hVtarget : V ⊆ ns.target := hrs |
| 84 | have hWtarget : W ⊆ nt.target := hst |
| 85 | have hsourceOpen : IsOpen (ns.symm '' V) := |
| 86 | ns.isOpen_image_symm_of_subset_target isOpen_ball hVtarget |
| 87 | have htargetOpen : IsOpen (nt.symm '' W) := |
| 88 | nt.isOpen_image_symm_of_subset_target isOpen_ball hWtarget |
| 89 | have hxSource : x ∈ ns.symm '' V := |
| 90 | ⟨ns x, mem_ball_self hr, ns.left_inv hxs⟩ |
| 91 | have hxTarget : f x ∈ nt.symm '' W := |
| 92 | ⟨nt (f x), mem_ball_self hs, nt.left_inv hxt⟩ |
| 93 | obtain ⟨D, hD, Z, hZ, hρZ⟩ := |
| 94 | exists_lipschitzOn_nhds_of_contMDiffAt ((hρ x).of_le (by norm_num)) |
| 95 | obtain ⟨Z', hZ'sub, hZ'open, hxZ'⟩ := _root_.mem_nhds_iff.mp hZ |
| 96 | let O := U ∩ ((ns.symm '' V) ∩ (f ⁻¹' (nt.symm '' W) ∩ Z')) |
| 97 | have hO : IsOpen O := |
| 98 | hU.inter (hsourceOpen.inter ((htargetOpen.preimage hf).inter hZ'open)) |
| 99 | have hxO : x ∈ O := ⟨hx, hxSource, hxTarget, hxZ'⟩ |
| 100 | obtain ⟨K, hK, hxK, hKO⟩ := exists_compact_subset hO hxO |
| 101 | refine ⟨A, B, V, W, O, K, D, isOpen_ball, isOpen_ball, hO, hK, |
| 102 | hxK, hKO, fun _ hy => hy.1, hD, ?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_⟩ |
| 103 | · intro v hv |
| 104 | simpa only [ns, normalizedSmoothChart_target, mem_preimage, A, |
| 105 | ContinuousLinearEquiv.symm_symm] using hVtarget hv |
| 106 | · intro v hv |
| 107 | simpa only [nt, normalizedSmoothChart_target, mem_preimage, B, |
| 108 | ContinuousLinearEquiv.symm_symm] using hWtarget hv |
| 109 | · rintro y ⟨_, ⟨z, hz, rfl⟩, _⟩ |
| 110 | change ns (ns.symm z) ∈ V |
| 111 | simpa only [ns.right_inv (hVtarget hz)] using hz |
| 112 | · exact hsFwd.mono (fun _ hy => hy.2.1) |
| 113 | · exact hsInv |
| 114 | · intro y hy |
| 115 | rcases hy.2.2.1 with ⟨z, hz, hfyz⟩ |
| 116 | change nt (f y) ∈ W |
| 117 | rw [← hfyz, nt.right_inv (hWtarget hz)] |
| 118 | exact hz |
| 119 | · apply htFwd.mono |
| 120 | rintro z ⟨y, hy, rfl⟩ |
| 121 | exact hy.2.2.1 |
| 122 | · exact htInv |
| 123 | · exact hρZ.mono (fun _ hy => hZ'sub hy.2.2.2) |
| 124 | |
| 125 | /-- Finitely many compact estimating neighborhoods of a compact support |
| 126 | admit one translation radius. Every translated coordinate copy of the |
| 127 | original map has the same normalized bound `C * L * (C * C)` on its |
| 128 | estimating set. The family only selects a common radius; its size does |
| 129 | not multiply the distortion. SurgeryComparison.Transport quantitative smoothing, |
| 130 | Morgan--Tian Claim 18.22, p. 433. -/ |
| 131 | theorem exists_finite_chart_smoothing_estimates |
| 132 | (e : OpenPartialHomeomorph M E) (h : OpenPartialHomeomorph N F) |
| 133 | (he : e.MDifferentiable 𝓘(ℝ, E) 𝓘(ℝ, E)) |
| 134 | (hh : h.MDifferentiable 𝓘(ℝ, F) 𝓘(ℝ, F)) |
| 135 | (hes : ContMDiffOn 𝓘(ℝ, E) 𝓘(ℝ, E) ∞ e e.source) |
| 136 | (hei : ContMDiffOn 𝓘(ℝ, E) 𝓘(ℝ, E) ∞ e.symm e.target) |
| 137 | (hhs : ContMDiffOn 𝓘(ℝ, F) 𝓘(ℝ, F) ∞ h h.source) |
| 138 | (hhi : ContMDiffOn 𝓘(ℝ, F) 𝓘(ℝ, F) ∞ h.symm h.target) |
| 139 | {f : M → N} {L : ℝ≥0} (hf : LipschitzWith L f) |
| 140 | {ρ : M → ℝ} (hρ : ContMDiff 𝓘(ℝ, E) 𝓘(ℝ) ∞ ρ) |
| 141 | {U S : Set M} (hU : IsOpen U) (hUe : U ⊆ e.source) |
| 142 | (hfU : MapsTo f U h.source) (hS : IsCompact S) (hSU : S ⊆ U) |
| 143 | {fext : E → F} (hext : ∀ y ∈ U, fext (e y) = h (f y)) |
| 144 | {C : ℝ≥0} (hC : 1 < C) : |
| 145 | ∃ s : Finset S, |
| 146 | ∃ (B : ∀ i : s, F ≃L[ℝ] TangentSpace 𝓘(ℝ, F) (f i.1.1)) |
| 147 | (K : s → Set M) |
| 148 | (W : ∀ i : s, Set (TangentSpace 𝓘(ℝ, F) (f i.1.1))) |
| 149 | (D : s → ℝ≥0) (R : ℝ), |
| 150 | 0 < R ∧ (∀ i, IsCompact (K i)) ∧ (∀ i, K i ⊆ U) ∧ |
| 151 | (∀ x ∈ S, ∃ i, x ∈ interior (K i)) ∧ |
| 152 | (∀ i, IsOpen (W i)) ∧ (∀ i, 0 < D i) ∧ |
| 153 | (∀ i, MapsTo (B i).symm (W i) h.target) ∧ |
| 154 | (∀ i, MapsTo (fun x => B i (fext (e x))) (K i) (W i)) ∧ |
| 155 | (∀ i, LipschitzOnWith C (fun v => h.symm ((B i).symm v)) (W i)) ∧ |
| 156 | (∀ i, LipschitzOnWith (D i) ρ (K i)) ∧ |
| 157 | (∀ i, ∀ x ∈ K i, ∀ y ∈ K i, ∀ t ∈ ball (0 : E) R, |
| 158 | dist (B i (fext (e x - t))) (B i (fext (e y - t))) ≤ |
| 159 | (C * L * (C * C) : ℝ≥0) * dist x y) := by |
| 160 | classical |
| 161 | have hlocal (p : S) := exists_chart_smoothing_estimate_neighborhood e h he hh |
| 162 | hes hei hhs hhi hf.continuous hρ hU hUe hfU (hSU p.2) hC |
| 163 | choose A B V W O K D hV hW hO hK hpK hKO hOU hD |
| 164 | hA hB hsourceMap hsourceFwd hsourceInv htargetMap htargetFwd htargetInv hρLip |
| 165 | using hlocal |
| 166 | obtain ⟨s, hs⟩ := hS.elim_finite_subcover (fun p : S => interior (K p)) |
| 167 | (fun _ => isOpen_interior) (fun x hx => mem_iUnion.mpr ⟨⟨x, hx⟩, hpK ⟨x, hx⟩⟩) |
| 168 | obtain ⟨R, hR, hshift⟩ := exists_finite_chart_translation_radius e |
| 169 | (fun i : s => K i.1) (fun i : s => O i.1) (fun i => hK i.1) |
| 170 | (fun i => hO i.1) (fun i => hKO i.1) (fun i => (hOU i.1).trans hUe) |
| 171 | refine ⟨s, (fun i => B i.1), (fun i => K i.1), (fun i => W i.1), |
| 172 | (fun i => D i.1), R, hR, (fun i => hK i.1), |
| 173 | (fun i => (hKO i.1).trans (hOU i.1)), ?_, (fun i => hW i.1), |
| 174 | (fun i => hD i.1), (fun i => hB i.1), ?_, (fun i => htargetInv i.1), |
| 175 | (fun i => (hρLip i.1).mono (hKO i.1)), ?_⟩ |
| 176 | · intro x hx |
| 177 | obtain ⟨p, hps, hxp⟩ := mem_iUnion₂.mp (hs hx) |
| 178 | exact ⟨⟨p, hps⟩, hxp⟩ |
| 179 | · intro i x hx |
| 180 | change B i.1 (fext (e x)) ∈ W i.1 |
| 181 | rw [hext x (hOU i.1 (hKO i.1 hx))] |
| 182 | exact htargetMap i.1 (hKO i.1 hx) |
| 183 | · intro i |
| 184 | apply chartCoordinates_translated_dist_le e h (B i.1).toContinuousLinearMap |
| 185 | hf (htargetFwd i.1) |
| 186 | · intro t ht |
| 187 | apply chartTranslation_lipschitzOn e (A i.1) t |
| 188 | ((hsourceFwd i.1).mono (hKO i.1)) (hsourceInv i.1) |
| 189 | intro x hx |
| 190 | have hxt := hshift i x hx t ht |
| 191 | simpa only [e.right_inv hxt.1] using hsourceMap i.1 hxt.2 |
| 192 | · intro x hx t ht |
| 193 | exact mem_image_of_mem f (hshift i x hx t ht).2 |
| 194 | · intro x hx t ht |
| 195 | have hxt := hshift i x hx t ht |
| 196 | simpa only [e.right_inv hxt.1] using hext (e.symm (e x - t)) (hOU i.1 hxt.2) |
| 197 | |
| 198 | end PoincareMT.SurgeryComparison.Transport |