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.Existence.Construction.Metric.TerminalPullbackBounds |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Metric.CutoffMetric |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Coordinates.TranslatedEndCharts |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Curvature.PullbackCurvatureJetBound |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Analysis.Coordinates.SmoothTransitionJetBounds |
| 6 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Analysis.Coordinates.LocalJetProductBounds |
| 7 | |
| 8 | /-! |
| 9 | # Uniform curvature bounds for the terminal cutoff metrics |
| 10 | |
| 11 | The terminal flow controls both interpolated metric fields in every |
| 12 | initial local isometry. Translated cutoff weights have uniform jets, |
| 13 | and the convex combination retains positive ellipticity. A compact core |
| 14 | and the fixed end reference sphere then control every point, uniformly |
| 15 | in the cutoff radius. This is the restart approximation estimate for |
| 16 | Morgan-Tian Theorem 12.5, pp. 296-297. |
| 17 | -/ |
| 18 | |
| 19 | set_option autoImplicit false |
| 20 | set_option backward.isDefEq.respectTransparency false |
| 21 | -- Interpolation jets take values in nested bilinear and multilinear maps. |
| 22 | set_option maxSynthPendingDepth 8 |
| 23 | |
| 24 | open Set Filter |
| 25 | open scoped Manifold ContDiff Topology BigOperators |
| 26 | |
| 27 | namespace PoincareMT.M34.PartialFlowTerminalJets |
| 28 | |
| 29 | variable {g0 : StandardInitialMetric} {F : PartialStandardCapFlow g0} {S : ℝ} |
| 30 | (L : PartialFlowTerminalJets F S) (P : RicciFlowCurvatureTheory.{0}) |
| 31 | (E0 : StandardCapEstimate g0) {B : ℝ} (hS : 0 < S) (hSF : S ≤ F.lifetime) (hB : 0 < B) |
| 32 | (hfull : ∀ t ∈ Ico 0 S, ∀ x : StandardCapSpace, |
| 33 | (F.flow.connection t).curvatureTensorNorm x ≤ B) |
| 34 | |
| 35 | /-- Cutoff interpolation retains one positive lower ellipticity bound |
| 36 | over every initially isometric chart at a compact reference point |
| 37 | (Theorem 12.5, pp. 296-297). -/ |
| 38 | theorem cutoffMetric_compactPullback_ellipticity |
| 39 | {K : Set StandardCapSpace} (hK : IsCompact K) : |
| 40 | ∃ a : ℝ, 0 < a ∧ ∀ R : ℝ, ∀ x ∈ K, |
| 41 | ∀ f : StandardCapSpace → StandardCapSpace, |
| 42 | (∀ u v : TangentSpace (𝓡 3) x, g0.metric.inner x u v = |
| 43 | g0.metric.inner (f x) (mfderiv (𝓡 3) (𝓡 3) f x u) |
| 44 | (mfderiv (𝓡 3) (𝓡 3) f x v)) → |
| 45 | ∀ v : StandardCapSpace, a * ‖v‖ ^ 2 ≤ |
| 46 | (cutoffMetric g0.cylindrical_end (L.metric P E0 hS hSF hB hfull) R).pullbackCoefficients |
| 47 | f x v v := by |
| 48 | obtain ⟨a, _b, ha, _hb, hterminal⟩ := |
| 49 | L.metric_compactPullback_ellipticity P E0 hS hSF hB hfull hK |
| 50 | obtain ⟨a0, ha0, hinitial⟩ := exists_uniform_bilinear_family_lower_bound hK |
| 51 | (fun x _ => (g0.metric.contDiffAt_euclideanCoefficients x).continuousAt.continuousWithinAt) |
| 52 | (fun x _ v hv => g0.metric.pos x v hv) |
| 53 | refine ⟨min a a0, lt_min ha ha0, fun R x hx f hf v => ?_⟩ |
| 54 | have hleft := (mul_le_mul_of_nonneg_right (min_le_left a a0) (sq_nonneg ‖v‖)).trans |
| 55 | (hterminal x hx f hf v).1 |
| 56 | have hright : min a a0 * ‖v‖ ^ 2 ≤ g0.metric.pullbackCoefficients f x v v := by |
| 57 | change min a a0 * ‖v‖ ^ 2 ≤ g0.metric.inner (f x) |
| 58 | (mfderiv (𝓡 3) (𝓡 3) f x v) (mfderiv (𝓡 3) (𝓡 3) f x v) |
| 59 | rw [← hf v v] |
| 60 | exact (mul_le_mul_of_nonneg_right (min_le_right a a0) (sq_nonneg ‖v‖)).trans |
| 61 | (hinitial x hx v) |
| 62 | let r := endCutoffWeight g0.cylindrical_end R (f x) |
| 63 | have hr := endCutoffWeight_mem_Icc g0.cylindrical_end R (f x) |
| 64 | have hsum := add_le_add |
| 65 | (mul_le_mul_of_nonneg_left hleft (sub_nonneg.mpr hr.2)) |
| 66 | (mul_le_mul_of_nonneg_left hright hr.1) |
| 67 | change min a a0 * ‖v‖ ^ 2 ≤ |
| 68 | (1 - r) * (L.metric P E0 hS hSF hB hfull).pullbackCoefficients f x v v + |
| 69 | r * g0.metric.pullbackCoefficients f x v v |
| 70 | nlinarith only [hsum] |
| 71 | |
| 72 | set_option synthInstance.maxHeartbeats 100000 in |
| 73 | -- Both endpoint metric fields share the dependent jet bounds of the closed flow. |
| 74 | /-- The cutoff metrics have uniform coefficient jets in every initial |
| 75 | local isometry that translates the exhaustion by a constant |
| 76 | (Theorem 12.5, pp. 296-297). -/ |
| 77 | theorem cutoffMetric_compactPullback_spatialJet_bounds |
| 78 | {K : Set StandardCapSpace} (hK : IsCompact K) (m : ℕ) : |
| 79 | ∃ G : ℝ, 1 ≤ G ∧ ∀ j ≤ m, ∀ R : ℝ, |
| 80 | ∀ {U : Set StandardCapSpace}, IsOpen U → |
| 81 | ∀ {f : StandardCapSpace → StandardCapSpace}, ContMDiffOn (𝓡 3) (𝓡 3) ∞ f U → |
| 82 | (∀ x ∈ U, (mfderiv (𝓡 3) (𝓡 3) f x).IsInvertible) → |
| 83 | (∀ x ∈ U, ∀ u v : TangentSpace (𝓡 3) x, g0.metric.inner x u v = |
| 84 | g0.metric.inner (f x) (mfderiv (𝓡 3) (𝓡 3) f x u) |
| 85 | (mfderiv (𝓡 3) (𝓡 3) f x v)) → |
| 86 | ∀ q : ℝ, (∀ x ∈ U, endExhaustion g0.cylindrical_end (f x) = |
| 87 | endExhaustion g0.cylindrical_end x + q) → |
| 88 | ∀ x ∈ K, x ∈ U → ‖iteratedFDeriv ℝ j |
| 89 | ((cutoffMetric g0.cylindrical_end (L.metric P E0 hS hSF hB hfull) R).pullbackCoefficients |
| 90 | f) x‖ ≤ G := by |
| 91 | obtain ⟨G, hG, hmetric⟩ := |
| 92 | L.closedFlow_compactPullback_spatialJet_bounds P E0 hS hSF hB hfull hK m |
| 93 | have hρ : ContDiff ℝ ∞ (endExhaustion g0.cylindrical_end) := |
| 94 | contMDiff_iff_contDiff.mp (endExhaustion_contMDiff g0.cylindrical_end) |
| 95 | obtain ⟨A, hA, hweights⟩ := Real.smoothTransition.uniform_spatial_weight_jets hρ hK m |
| 96 | let C (j : ℕ) := 2 * ∑ i ∈ Finset.range (j + 1), (j.choose i : ℝ) * A * G |
| 97 | have hC (j : ℕ) : 0 ≤ C j := by |
| 98 | dsimp [C] |
| 99 | exact mul_nonneg (by norm_num) (Finset.sum_nonneg fun i _ => |
| 100 | mul_nonneg (mul_nonneg (Nat.cast_nonneg _) (zero_le_one.trans hA)) |
| 101 | (zero_le_one.trans hG)) |
| 102 | let H := max 1 (∑ j ∈ Finset.range (m + 1), C j) |
| 103 | have hH (j : ℕ) (hj : j ≤ m) : C j ≤ H := |
| 104 | (Finset.single_le_sum (fun i _ => hC i) (by simpa using hj)).trans (le_max_right _ _) |
| 105 | refine ⟨H, le_max_left _ _, ?_⟩ |
| 106 | intro j hj R U hU f hf hinv hisom q hheight x hx hxU |
| 107 | let h := L.metric P E0 hS hSF hB hfull |
| 108 | let θ := fun y => endCutoffWeight g0.cylindrical_end R (f y) |
| 109 | have hθ : ContDiffOn ℝ ∞ θ U := |
| 110 | (endCutoffWeight_contDiff g0.cylindrical_end R).comp_contDiffOn |
| 111 | (contMDiffOn_iff_contDiffOn.mp hf) |
| 112 | have hcf : ContDiffOn ℝ ∞ (h.pullbackCoefficients f) U := fun y hy => |
| 113 | (h.contDiffAt_pullbackCoefficients (hf.contMDiffAt (hU.mem_nhds hy))).contDiffWithinAt |
| 114 | have hcg : ContDiffOn ℝ ∞ (g0.metric.pullbackCoefficients f) U := fun y hy => |
| 115 | (g0.metric.contDiffAt_pullbackCoefficients (hf.contMDiffAt (hU.mem_nhds hy))).contDiffWithinAt |
| 116 | have hθeq : θ =ᶠ[𝓝 x] fun y => |
| 117 | Real.smoothTransition (endExhaustion g0.cylindrical_end y + (q - R)) := by |
| 118 | filter_upwards [hU.mem_nhds hxU] with y hy |
| 119 | dsimp [θ, endCutoffWeight] |
| 120 | rw [hheight y hy] |
| 121 | congr 1 |
| 122 | ring |
| 123 | have hcompeq : (fun y => 1 - θ y) =ᶠ[𝓝 x] fun y => |
| 124 | 1 - Real.smoothTransition (endExhaustion g0.cylindrical_end y + (q - R)) := |
| 125 | hθeq.fun_comp (fun r : ℝ => 1 - r) |
| 126 | have hzero : (L.closedFlow P E0 hS hSF hB hfull).metric 0 = g0.metric := by |
| 127 | change L.closedMetric P E0 hS hSF hB hfull 0 = _ |
| 128 | rw [L.closedMetric_of_lt P E0 hS hSF hB hfull hS, F.initial_metric] |
| 129 | have hterminal : (L.closedFlow P E0 hS hSF hB hfull).metric S = h := |
| 130 | L.closedMetric_terminal P E0 hS hSF hB hfull |
| 131 | have hfg (k : ℕ) (hk : k ≤ j) : ‖iteratedFDeriv ℝ k (h.pullbackCoefficients f) x‖ ≤ G := by |
| 132 | rw [← hterminal] |
| 133 | exact hmetric k (hk.trans hj) hU hf hinv hisom S ⟨hS.le, le_rfl⟩ x hx hxU |
| 134 | have hgg (k : ℕ) (hk : k ≤ j) : |
| 135 | ‖iteratedFDeriv ℝ k (g0.metric.pullbackCoefficients f) x‖ ≤ G := by |
| 136 | rw [← hzero] |
| 137 | exact hmetric k (hk.trans hj) hU hf hinv hisom 0 ⟨le_rfl, hS.le⟩ x hx hxU |
| 138 | have hbound := norm_iteratedFDeriv_blend_le_of_local_bounds hU hθ hcf hcg hxU j |
| 139 | (zero_le_one.trans hA) |
| 140 | (fun k hk => by |
| 141 | rw [(hθeq.iteratedFDeriv (𝕜 := ℝ) k).eq_of_nhds] |
| 142 | exact (hweights k (hk.trans hj) (q - R) x hx).1) |
| 143 | (fun k hk => by |
| 144 | rw [(hcompeq.iteratedFDeriv (𝕜 := ℝ) k).eq_of_nhds] |
| 145 | exact (hweights k (hk.trans hj) (q - R) x hx).2) hfg hgg |
| 146 | have heq : (cutoffMetric g0.cylindrical_end h R).pullbackCoefficients f = |
| 147 | fun y => (1 - θ y) • h.pullbackCoefficients f y + |
| 148 | θ y • g0.metric.pullbackCoefficients f y := |
| 149 | funext (cutoffMetric_pullbackCoefficients g0.cylindrical_end h R f) |
| 150 | rw [heq] |
| 151 | exact hbound.trans (hH j hj) |
| 152 | |
| 153 | /-- Every cutoff metric has globally bounded covariant curvature jets, |
| 154 | with one constant before cutoff radius, compatible connection, and point |
| 155 | (Theorem 12.5, pp. 296-297). -/ |
| 156 | theorem cutoffMetric_curvatureDerivative_bound (m : ℕ) : |
| 157 | ∃ C : ℝ, 0 ≤ C ∧ ∀ R : ℝ, |
| 158 | ∀ D : LeviCivitaData (cutoffMetric g0.cylindrical_end |
| 159 | (L.metric P E0 hS hSF hB hfull) R), |
| 160 | ∀ x : StandardCapSpace, D.curvatureDerivativeNorm m x ≤ C := by |
| 161 | let e := g0.cylindrical_end |
| 162 | let K := endTruncatedCore e 3 ∪ endReferenceSection e |
| 163 | have hK : IsCompact K := |
| 164 | (endTruncatedCore_isCompact e (by norm_num : (0 : ℝ) ≤ 3)).union |
| 165 | (endReferenceSection_isCompact e) |
| 166 | obtain ⟨a, ha, hell⟩ := L.cutoffMetric_compactPullback_ellipticity P E0 hS hSF hB hfull hK |
| 167 | obtain ⟨G, _hG, hjets⟩ := |
| 168 | L.cutoffMetric_compactPullback_spatialJet_bounds P E0 hS hSF hB hfull hK (2 + m) |
| 169 | obtain ⟨C, hC, hbound⟩ := curvatureDerivativeNorm_bound_of_pullback_jets 3 m ha G |
| 170 | refine ⟨C, hC, fun R D x => ?_⟩ |
| 171 | by_cases hx : x ∈ endTruncatedCore e 3 |
| 172 | · have he : ContMDiffOn (𝓡 3) (𝓡 3) ∞ (id : StandardCapSpace → StandardCapSpace) univ := |
| 173 | contMDiff_id.contMDiffOn |
| 174 | have hi (y : StandardCapSpace) (_hy : y ∈ (univ : Set StandardCapSpace)) : |
| 175 | (mfderiv (𝓡 3) (𝓡 3) (id : StandardCapSpace → StandardCapSpace) y).IsInvertible := by |
| 176 | rw [mfderiv_id] |
| 177 | exact ⟨ContinuousLinearEquiv.refl ℝ _, rfl⟩ |
| 178 | have hm (y : StandardCapSpace) (_hy : y ∈ (univ : Set StandardCapSpace)) |
| 179 | (u v : TangentSpace (𝓡 3) y) : g0.metric.inner y u v = |
| 180 | g0.metric.inner (id y) (mfderiv (𝓡 3) (𝓡 3) id y u) |
| 181 | (mfderiv (𝓡 3) (𝓡 3) id y v) := by |
| 182 | rw [mfderiv_id] |
| 183 | rfl |
| 184 | apply hbound D isOpen_univ he hi (mem_univ x) |
| 185 | · intro j hj |
| 186 | exact hjets j hj R isOpen_univ he hi hm 0 (fun y _ => by simp) |
| 187 | x (Or.inl hx) (mem_univ x) |
| 188 | · exact hell R x (Or.inl hx) id (hm x (mem_univ x)) |
| 189 | · have htail : x ∈ e.coordinate '' (univ ×ˢ Ioi (3 : ℝ)) := not_not.mp hx |
| 190 | obtain ⟨z, hz, rfl⟩ := htail |
| 191 | obtain ⟨y, hy, hyeq⟩ := endTranslation_covers_tail e z |
| 192 | have hyU := endReferenceSection_subset_region e hy |
| 193 | have he := endTranslation_contMDiffOn e hz.2.le |
| 194 | have hi := fun y hy => endTranslation_mfderiv_isInvertible e hz.2.le (x := y) hy |
| 195 | have hm := fun y hy u v => endTranslation_metric e hz.2.le (x := y) hy u v |
| 196 | have hh (y : StandardCapSpace) (hy : y ∈ endReferenceRegion e) : |
| 197 | endExhaustion e (endAxialTranslation e (z.2 - 4) y) = |
| 198 | endExhaustion e y + (z.2 - 4) := by |
| 199 | linarith [endExhaustion_translation_eq e hz.2.le hy] |
| 200 | rw [← hyeq] |
| 201 | apply hbound D (endReferenceRegion_isOpen e) he hi hyU |
| 202 | · intro j hj |
| 203 | exact hjets j hj R (endReferenceRegion_isOpen e) he hi hm (z.2 - 4) hh |
| 204 | y (Or.inr hy) hyU |
| 205 | · exact hell R y (Or.inr hy) _ (hm y hyU) |
| 206 | |
| 207 | end PoincareMT.M34.PartialFlowTerminalJets |