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.Local.Riemannian |
| 2 | import Mathlib.Geometry.Manifold.Riemannian.Basic |
| 3 | import Mathlib.Analysis.Calculus.FDeriv.Equiv |
| 4 | |
| 5 | /-! |
| 6 | # Normalizing a fixed smooth chart in the actual tangent norm |
| 7 | |
| 8 | Postcomposition by the inverse center derivative preserves a chart's |
| 9 | affine-coordinate relation to the original chart. The resulting chart and |
| 10 | its inverse have differential norm at most one at the center, and locally |
| 11 | less than every constant greater than one in the Riemannian norms. |
| 12 | |
| 13 | Source: the quantitative smoothing section of the 2026-09-18 SurgeryComparison.Transport full |
| 14 | contract, for Morgan--Tian Claim 18.22, printed p. 433. The semantic |
| 15 | derivation is `proof-work/tasks/SurgeryComparison.Transport/derivations/smooth-chart-normalization.md`. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | noncomputable section |
| 21 | |
| 22 | open Bundle Filter Set |
| 23 | open scoped Topology Manifold ContDiff |
| 24 | |
| 25 | universe uE uH uM uF |
| 26 | |
| 27 | namespace PoincareMT.SurgeryComparison.Transport |
| 28 | |
| 29 | variable {E : Type uE} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 30 | {H : Type uH} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} |
| 31 | {M : Type uM} [TopologicalSpace M] [ChartedSpace H M] |
| 32 | {F : Type uF} [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 33 | |
| 34 | /-- The actual center derivative of a chart, with its vector-space target |
| 35 | identified explicitly with the coordinate space. SurgeryComparison.Transport full contract, |
| 36 | quantitative smoothing for Morgan--Tian Claim 18.22, p. 433. -/ |
| 37 | def chartNormalizationLinearEquiv (e : OpenPartialHomeomorph M F) |
| 38 | (he : e.MDifferentiable I 𝓘(ℝ, F)) {x : M} (hx : x ∈ e.source) : |
| 39 | TangentSpace I x ≃L[ℝ] F := |
| 40 | (he.mfderiv hx).trans (NormedSpace.fromTangentSpace (e x)) |
| 41 | |
| 42 | /-- Normalize a fixed chart by its center derivative, keeping its source |
| 43 | and its affine relation to the original coordinates. SurgeryComparison.Transport full contract, |
| 44 | quantitative smoothing for Morgan--Tian Claim 18.22, p. 433. -/ |
| 45 | def normalizedSmoothChart (e : OpenPartialHomeomorph M F) |
| 46 | (he : e.MDifferentiable I 𝓘(ℝ, F)) {x : M} (hx : x ∈ e.source) : |
| 47 | OpenPartialHomeomorph M (TangentSpace I x) := |
| 48 | e.trans (chartNormalizationLinearEquiv e he hx).symm.toHomeomorph.toOpenPartialHomeomorph |
| 49 | |
| 50 | variable (e : OpenPartialHomeomorph M F) (he : e.MDifferentiable I 𝓘(ℝ, F)) |
| 51 | {x : M} (hx : x ∈ e.source) |
| 52 | |
| 53 | /-- Normalization preserves the original chart source exactly. SurgeryComparison.Transport full |
| 54 | contract, the fixed-chart requirement in quantitative smoothing for |
| 55 | Claim 18.22, p. 433. -/ |
| 56 | theorem normalizedSmoothChart_source : |
| 57 | (normalizedSmoothChart e he hx).source = e.source := by |
| 58 | change e.source ∩ Set.univ = e.source |
| 59 | exact Set.inter_univ _ |
| 60 | |
| 61 | /-- The normalized target is the linear preimage of the original target. |
| 62 | SurgeryComparison.Transport full contract, the fixed-chart requirement in quantitative smoothing |
| 63 | for Claim 18.22, p. 433. -/ |
| 64 | theorem normalizedSmoothChart_target : |
| 65 | (normalizedSmoothChart e he hx).target = |
| 66 | (chartNormalizationLinearEquiv e he hx) ⁻¹' e.target := by |
| 67 | change Set.univ ∩ (chartNormalizationLinearEquiv e he hx) ⁻¹' e.target = _ |
| 68 | exact Set.univ_inter _ |
| 69 | |
| 70 | /-- The exact forward-coordinate formula for the normalized chart. |
| 71 | SurgeryComparison.Transport full contract, quantitative smoothing for Claim 18.22, p. 433. -/ |
| 72 | theorem normalizedSmoothChart_apply (y : M) : |
| 73 | normalizedSmoothChart e he hx y = |
| 74 | (chartNormalizationLinearEquiv e he hx).symm (e y) := rfl |
| 75 | |
| 76 | /-- The exact inverse-coordinate formula for the normalized chart. |
| 77 | SurgeryComparison.Transport full contract, quantitative smoothing for Claim 18.22, p. 433. -/ |
| 78 | theorem normalizedSmoothChart_symm_apply (z : TangentSpace I x) : |
| 79 | (normalizedSmoothChart e he hx).symm z = |
| 80 | e.symm (chartNormalizationLinearEquiv e he hx z) := rfl |
| 81 | |
| 82 | section Riemannian |
| 83 | |
| 84 | variable [RiemannianBundle (TangentSpace I : M → Type uE)] |
| 85 | |
| 86 | /-- The forward normalized chart is smooth on its unchanged source. |
| 87 | SurgeryComparison.Transport full contract, quantitative smoothing for Claim 18.22, p. 433. -/ |
| 88 | theorem normalizedSmoothChart_contMDiffOn |
| 89 | (hs : ContMDiffOn I 𝓘(ℝ, F) ∞ e e.source) : |
| 90 | ContMDiffOn I 𝓘(ℝ, TangentSpace I x) ∞ |
| 91 | (normalizedSmoothChart e he hx) (normalizedSmoothChart e he hx).source := by |
| 92 | rw [normalizedSmoothChart_source] |
| 93 | exact (chartNormalizationLinearEquiv e he hx).symm.toContinuousLinearMap.contMDiff |
| 94 | |>.comp_contMDiffOn hs |
| 95 | |
| 96 | /-- The inverse normalized chart is smooth on its target. SurgeryComparison.Transport full |
| 97 | contract, quantitative smoothing for Claim 18.22, p. 433. -/ |
| 98 | theorem normalizedSmoothChart_symm_contMDiffOn |
| 99 | (hs : ContMDiffOn 𝓘(ℝ, F) I ∞ e.symm e.target) : |
| 100 | ContMDiffOn 𝓘(ℝ, TangentSpace I x) I ∞ |
| 101 | (normalizedSmoothChart e he hx).symm (normalizedSmoothChart e he hx).target := by |
| 102 | rw [normalizedSmoothChart_target] |
| 103 | exact hs.comp (chartNormalizationLinearEquiv e he hx).toContinuousLinearMap.contMDiffOn |
| 104 | (fun _ hz => hz) |
| 105 | |
| 106 | /-- After the canonical tangent-vector identification, the center |
| 107 | differential of the normalized chart is the identity. SurgeryComparison.Transport full contract, |
| 108 | the near-isometry chart step for Claim 18.22, p. 433. -/ |
| 109 | theorem normalizedSmoothChart_mfderiv_apply (v : TangentSpace I x) : |
| 110 | NormedSpace.fromTangentSpace (normalizedSmoothChart e he hx x) |
| 111 | (mfderiv I 𝓘(ℝ, TangentSpace I x) (normalizedSmoothChart e he hx) x v) = v := by |
| 112 | let A := chartNormalizationLinearEquiv e he hx |
| 113 | change NormedSpace.fromTangentSpace (A.symm (e x)) |
| 114 | (mfderiv I 𝓘(ℝ, TangentSpace I x) (A.symm ∘ e) x v) = v |
| 115 | rw [mfderiv_comp x A.symm.differentiableAt.mdifferentiableAt (he.mdifferentiableAt hx)] |
| 116 | simp only [mfderiv_eq_fderiv, ContinuousLinearEquiv.fderiv] |
| 117 | change A.symm (A v) = v |
| 118 | exact A.symm_apply_apply v |
| 119 | |
| 120 | /-- The center differential has operator norm at most one in the actual |
| 121 | Riemannian tangent norm, including dimension zero. SurgeryComparison.Transport full contract, |
| 122 | the near-isometry chart step for Claim 18.22, p. 433. -/ |
| 123 | theorem normalizedSmoothChart_norm_mfderiv_le : |
| 124 | ‖mfderiv I 𝓘(ℝ, TangentSpace I x) (normalizedSmoothChart e he hx) x‖ ≤ 1 := by |
| 125 | apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one |
| 126 | intro v |
| 127 | rw [one_mul, norm_tangentSpace_vectorSpace] |
| 128 | change ‖NormedSpace.fromTangentSpace (normalizedSmoothChart e he hx x) |
| 129 | (mfderiv I 𝓘(ℝ, TangentSpace I x) (normalizedSmoothChart e he hx) x v)‖ ≤ ‖v‖ |
| 130 | exact (congrArg norm (normalizedSmoothChart_mfderiv_apply e he hx v)).le |
| 131 | |
| 132 | /-- The inverse center differential has the same unit operator bound, |
| 133 | using the inverse chart identity to identify the correct metric fiber. |
| 134 | SurgeryComparison.Transport full contract, near-isometry chart step for Claim 18.22, p. 433. -/ |
| 135 | theorem normalizedSmoothChart_symm_norm_mfderiv_le : |
| 136 | ‖mfderiv 𝓘(ℝ, TangentSpace I x) I (normalizedSmoothChart e he hx).symm |
| 137 | (normalizedSmoothChart e he hx x)‖ ≤ 1 := by |
| 138 | let A := chartNormalizationLinearEquiv e he hx |
| 139 | let n := normalizedSmoothChart e he hx |
| 140 | have hnx : x ∈ n.source := by |
| 141 | simpa only [n, normalizedSmoothChart_source] using hx |
| 142 | have hAx : A (n x) = e x := A.apply_symm_apply _ |
| 143 | have hinv : MDifferentiableAt 𝓘(ℝ, F) I e.symm (A (n x)) := by |
| 144 | rw [hAx] |
| 145 | exact he.mdifferentiableAt_symm (e.map_source hx) |
| 146 | have hnorm (w : TangentSpace I x) : |
| 147 | ‖(show TangentSpace I (n.symm (n x)) from w)‖ = ‖w‖ := by |
| 148 | rw [n.left_inv hnx] |
| 149 | apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one |
| 150 | intro v |
| 151 | have hvalue : mfderiv 𝓘(ℝ, TangentSpace I x) I n.symm (n x) v = |
| 152 | NormedSpace.fromTangentSpace (n x) v := by |
| 153 | change mfderiv 𝓘(ℝ, TangentSpace I x) I (e.symm ∘ A) (n x) v = _ |
| 154 | rw [mfderiv_comp (n x) hinv A.differentiableAt.mdifferentiableAt] |
| 155 | simp only [mfderiv_eq_fderiv, ContinuousLinearEquiv.fderiv] |
| 156 | rw [hAx] |
| 157 | change (he.mfderiv hx).symm |
| 158 | ((he.mfderiv hx) (NormedSpace.fromTangentSpace (n x) v)) = _ |
| 159 | exact (he.mfderiv hx).symm_apply_apply _ |
| 160 | change ‖mfderiv 𝓘(ℝ, TangentSpace I x) I n.symm (n x) v‖ ≤ 1 * ‖v‖ |
| 161 | rw [one_mul] |
| 162 | exact ((congrArg norm hvalue).trans |
| 163 | ((hnorm (NormedSpace.fromTangentSpace (n x) v)).trans |
| 164 | (norm_tangentSpace_vectorSpace (v := v)).symm)).le |
| 165 | |
| 166 | variable [IsManifold I ∞ M] |
| 167 | [IsContinuousRiemannianBundle E (TangentSpace I : M → Type uE)] |
| 168 | |
| 169 | /-- A fixed normalized smooth chart and its inverse have operator norm |
| 170 | locally below every `C > 1`. The chart is chosen before `C`; only the |
| 171 | neighborhoods depend on this bound. SurgeryComparison.Transport full contract, quantitative |
| 172 | smoothing for Morgan--Tian Claim 18.22, p. 433. -/ |
| 173 | theorem normalizedSmoothChart_eventually_norm_mfderiv_lt |
| 174 | (hs : ContMDiffOn I 𝓘(ℝ, F) ∞ e e.source) |
| 175 | (hi : ContMDiffOn 𝓘(ℝ, F) I ∞ e.symm e.target) |
| 176 | {C : ℝ} (hC : 1 < C) : |
| 177 | (∀ᶠ y in 𝓝 x, |
| 178 | ‖mfderiv I 𝓘(ℝ, TangentSpace I x) (normalizedSmoothChart e he hx) y‖ < C) ∧ |
| 179 | (∀ᶠ z in 𝓝 (normalizedSmoothChart e he hx x), |
| 180 | ‖mfderiv 𝓘(ℝ, TangentSpace I x) I (normalizedSmoothChart e he hx).symm z‖ < C) := by |
| 181 | letI : IsContinuousRiemannianBundle (TangentSpace I x) |
| 182 | (TangentSpace 𝓘(ℝ, TangentSpace I x)) := |
| 183 | { exists_continuous := |
| 184 | ⟨(riemannianMetricVectorSpace (TangentSpace I x)).inner, |
| 185 | (riemannianMetricVectorSpace (TangentSpace I x)).contMDiff.continuous, |
| 186 | fun _ _ _ => rfl⟩ } |
| 187 | let n := normalizedSmoothChart e he hx |
| 188 | have hnx : x ∈ n.source := by |
| 189 | simpa only [n, normalizedSmoothChart_source] using hx |
| 190 | constructor |
| 191 | · apply eventually_norm_mfderiv_lt |
| 192 | · exact ((normalizedSmoothChart_contMDiffOn e he hx hs).contMDiffAt |
| 193 | (n.open_source.mem_nhds hnx)).of_le (by norm_num) |
| 194 | · exact (normalizedSmoothChart_norm_mfderiv_le e he hx).trans_lt hC |
| 195 | · apply eventually_norm_mfderiv_lt |
| 196 | · exact ((normalizedSmoothChart_symm_contMDiffOn e he hx hi).contMDiffAt |
| 197 | (n.open_target.mem_nhds (n.map_source hnx))).of_le (by norm_num) |
| 198 | · exact (normalizedSmoothChart_symm_norm_mfderiv_le e he hx).trans_lt hC |
| 199 | |
| 200 | end Riemannian |
| 201 | |
| 202 | end PoincareMT.SurgeryComparison.Transport |