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 | /- Adapted from Mapher `PoincareMT/Proofs/M03/MetricCompactBounds.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import PoincareLib.Geometry.RicciFlow.Local.Connection.Family |
| 6 | import PoincareLib.Geometry.RicciFlow.Local.Curvature.Calculus.CurvatureTrilinear |
| 7 | import Mathlib.Analysis.SpecialFunctions.Log.Deriv |
| 8 | import Mathlib.Analysis.Calculus.MeanValue |
| 9 | import Mathlib.Topology.MetricSpace.Lipschitz |
| 10 | |
| 11 | /-! |
| 12 | # Uniform metric bounds on compact sets in a local frame |
| 13 | |
| 14 | Compact unit-sphere extrema give uniform diagonal bounds for positive |
| 15 | bilinear families. Smooth metric pairings supply the actual local metric |
| 16 | family, as needed for the compact uniqueness coefficients in Kotschwar, |
| 17 | arXiv:1206.3225v1, printed pp. 4-6. |
| 18 | -/ |
| 19 | |
| 20 | set_option autoImplicit false |
| 21 | set_option maxHeartbeats 5000000 |
| 22 | |
| 23 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 24 | open Bundle Manifold Set Filter |
| 25 | |
| 26 | universe u |
| 27 | |
| 28 | namespace PoincareMT.RicciFlow.Local |
| 29 | |
| 30 | theorem exists_pos_uniform_bilinear_bounds |
| 31 | {X E : Type*} [TopologicalSpace X] |
| 32 | [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] |
| 33 | {B : X → E →L[ℝ] E →L[ℝ] ℝ} {K : Set X} |
| 34 | (hK : IsCompact K) (hB : ContinuousOn B K) |
| 35 | (hpos : ∀ x ∈ K, ∀ v : E, v ≠ 0 → 0 < B x v v) : |
| 36 | ∃ c C : ℝ, 0 < c ∧ 0 < C ∧ ∀ x ∈ K, ∀ v : E, |
| 37 | c * ‖v‖ ^ 2 ≤ B x v v ∧ B x v v ≤ C * ‖v‖ ^ 2 := by |
| 38 | let S := K ×ˢ Metric.sphere (0 : E) 1 |
| 39 | let f : X × E → ℝ := fun p => B p.1 p.2 p.2 |
| 40 | have hS : IsCompact S := hK.prod (isCompact_sphere _ _) |
| 41 | have hf : ContinuousOn f S := |
| 42 | ((hB.comp continuousOn_fst (fun _ hp => hp.1)).clm_apply |
| 43 | continuousOn_snd).clm_apply continuousOn_snd |
| 44 | have hposS (p : X × E) (hp : p ∈ S) : 0 < f p := by |
| 45 | apply hpos p.1 hp.1 p.2 |
| 46 | intro hz |
| 47 | have hn := Metric.mem_sphere.mp hp.2 |
| 48 | simp [hz] at hn |
| 49 | obtain ⟨c, hc, hcl⟩ := hS.exists_forall_le' hf hposS |
| 50 | obtain ⟨C₀, hC₀⟩ := hS.bddAbove_image hf |
| 51 | refine ⟨c, max C₀ 1, hc, lt_of_lt_of_le zero_lt_one (le_max_right _ _), ?_⟩ |
| 52 | intro x hx v |
| 53 | by_cases hv : v = 0 |
| 54 | · simp [hv] |
| 55 | have hn : ‖v‖ ≠ 0 := norm_ne_zero_iff.mpr hv |
| 56 | let w := ‖v‖⁻¹ • v |
| 57 | have hw : w ∈ Metric.sphere (0 : E) 1 := by |
| 58 | rw [Metric.mem_sphere, dist_zero_right] |
| 59 | dsimp [w] |
| 60 | rw [norm_smul, Real.norm_eq_abs, |
| 61 | abs_of_nonneg (inv_nonneg.mpr (norm_nonneg v)), inv_mul_cancel₀ hn] |
| 62 | have hvw : ‖v‖ • w = v := by |
| 63 | dsimp [w] |
| 64 | rw [smul_smul, mul_inv_cancel₀ hn, one_smul] |
| 65 | have hscale : B x v v = ‖v‖ ^ 2 * f (x, w) := by |
| 66 | calc |
| 67 | B x v v = B x (‖v‖ • w) (‖v‖ • w) := by rw [hvw] |
| 68 | _ = ‖v‖ ^ 2 * f (x, w) := by |
| 69 | simp only [map_smul, smul_apply, smul_eq_mul] |
| 70 | dsimp [f] |
| 71 | ring |
| 72 | constructor |
| 73 | · calc |
| 74 | c * ‖v‖ ^ 2 = ‖v‖ ^ 2 * c := mul_comm _ _ |
| 75 | _ ≤ ‖v‖ ^ 2 * f (x, w) := |
| 76 | mul_le_mul_of_nonneg_left (hcl (x, w) ⟨hx, hw⟩) (sq_nonneg _) |
| 77 | _ = B x v v := hscale.symm |
| 78 | · calc |
| 79 | B x v v = ‖v‖ ^ 2 * f (x, w) := hscale |
| 80 | _ ≤ ‖v‖ ^ 2 * C₀ := mul_le_mul_of_nonneg_left |
| 81 | (hC₀ (Set.mem_image_of_mem f ⟨hx, hw⟩)) (sq_nonneg _) |
| 82 | _ ≤ ‖v‖ ^ 2 * max C₀ 1 := |
| 83 | mul_le_mul_of_nonneg_left (le_max_left _ _) (sq_nonneg _) |
| 84 | _ = max C₀ 1 * ‖v‖ ^ 2 := mul_comm _ _ |
| 85 | |
| 86 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 87 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 88 | |
| 89 | theorem exists_pos_uniform_metric_frame_bounds |
| 90 | {g : ℝ → RiemannianMetric n M} {J : Set ℝ} |
| 91 | (hg : RiemannianMetric.IsSmoothFamilyOn g J) (hJ : IsCompact J) |
| 92 | (x₀ : M) {K : Set M} (hK : IsCompact K) |
| 93 | (hKchart : K ⊆ (trivializationAt |
| 94 | (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) x₀).baseSet) : |
| 95 | let e := trivializationAt |
| 96 | (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) x₀ |
| 97 | ∃ c C : ℝ, 0 < c ∧ 0 < C ∧ ∀ t ∈ J, ∀ x ∈ K, |
| 98 | ∀ v : EuclideanSpace ℝ (Fin n), |
| 99 | c * ‖v‖ ^ 2 ≤ (g t).inner x (e.symmL ℝ x v) (e.symmL ℝ x v) ∧ |
| 100 | (g t).inner x (e.symmL ℝ x v) (e.symmL ℝ x v) ≤ C * ‖v‖ ^ 2 := by |
| 101 | let e := trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) x₀ |
| 102 | let frame (a : EuclideanSpace ℝ (Fin n)) (x : M) : TangentSpace (𝓡 n) x := |
| 103 | e.symmL ℝ x a |
| 104 | have hframe (a : EuclideanSpace ℝ (Fin n)) : ContMDiffOn (𝓡 n) |
| 105 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% (frame a)) e.baseSet := by |
| 106 | rw [e.contMDiffOn_section_baseSet_iff (IB := (𝓡 n)) (n := ∞)] |
| 107 | refine (contMDiffOn_const (c := a)).congr ?_ |
| 108 | intro x hx |
| 109 | simpa [frame, Trivialization.symmL_apply _ hx] using |
| 110 | congrArg Prod.snd (e.apply_mk_symm hx a) |
| 111 | let G (q : ℝ × M) : EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 112 | EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ := |
| 113 | ContinuousLinearMap.inCoordinates (EuclideanSpace ℝ (Fin n)) |
| 114 | (TangentSpace (𝓡 n)) (EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 115 | (fun x => TangentSpace (𝓡 n) x →L[ℝ] ℝ) x₀ q.2 x₀ q.2 ((g q.1).inner q.2) |
| 116 | have heval (q : ℝ × M) (hq : q.2 ∈ e.baseSet) |
| 117 | (a b : EuclideanSpace ℝ (Fin n)) : |
| 118 | G q a b = (g q.1).inner q.2 (frame a q.2) (frame b q.2) := by |
| 119 | dsimp [G] |
| 120 | rw [inCoordinates_apply_eq₂ |
| 121 | (F₁ := EuclideanSpace ℝ (Fin n)) (F₂ := EuclideanSpace ℝ (Fin n)) (F₃ := ℝ) |
| 122 | (E₁ := TangentSpace (𝓡 n)) (E₂ := TangentSpace (𝓡 n)) |
| 123 | (E₃ := fun _ : M => ℝ) hq hq (by simp)] |
| 124 | rw [← Trivialization.symmL_apply (R := ℝ) e hq a, |
| 125 | ← Trivialization.symmL_apply (R := ℝ) e hq b] |
| 126 | simp [frame] |
| 127 | have hG : ContinuousOn G (J ×ˢ e.baseSet) := by |
| 128 | apply continuousOn_clm_apply.mpr |
| 129 | intro a |
| 130 | apply continuousOn_clm_apply.mpr |
| 131 | intro b |
| 132 | apply (contMDiffOn_family_metric_pair hg (frame a) (frame b) |
| 133 | (hframe a) (hframe b)).continuousOn.congr |
| 134 | intro q hq |
| 135 | exact heval q hq.2 a b |
| 136 | have hG' : ContinuousOn G (J ×ˢ K) := |
| 137 | hG.mono (Set.prod_mono subset_rfl hKchart) |
| 138 | have hposG (q : ℝ × M) (hq : q ∈ J ×ˢ K) |
| 139 | (a : EuclideanSpace ℝ (Fin n)) (ha : a ≠ 0) : 0 < G q a a := by |
| 140 | rw [heval q (hKchart hq.2) a a] |
| 141 | apply (g q.1).pos q.2 |
| 142 | intro hz |
| 143 | have heq := congrArg (e.continuousLinearMapAt ℝ q.2) hz |
| 144 | change e.continuousLinearMapAt ℝ q.2 (e.symmL ℝ q.2 a) = |
| 145 | e.continuousLinearMapAt ℝ q.2 0 at heq |
| 146 | rw [Trivialization.continuousLinearMapAt_symmL _ (hKchart hq.2), map_zero] at heq |
| 147 | exact ha heq |
| 148 | obtain ⟨c, C, hc, hC, hbounds⟩ := |
| 149 | exists_pos_uniform_bilinear_bounds (hJ.prod hK) hG' hposG |
| 150 | refine ⟨c, C, hc, hC, ?_⟩ |
| 151 | intro t ht x hx v |
| 152 | change c * ‖v‖ ^ 2 ≤ (g t).inner x (frame v x) (frame v x) ∧ |
| 153 | (g t).inner x (frame v x) (frame v x) ≤ C * ‖v‖ ^ 2 |
| 154 | rw [← heval (t, x) (hKchart hx) v v] |
| 155 | exact hbounds (t, x) ⟨ht, hx⟩ v |
| 156 | |
| 157 | theorem abs_ricci_le_curvatureTensorNorm {g : RiemannianMetric n M} |
| 158 | (D : LeviCivitaData g) (x : M) (u v : TangentSpace (𝓡 n) x) : |
| 159 | |D.ricci x u v| ≤ (n : ℝ) * D.curvatureTensorNorm x * |
| 160 | g.tangentNorm x u * g.tangentNorm x v := by |
| 161 | classical |
| 162 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 163 | ⟨g.toRiemannianMetric⟩ |
| 164 | let ι := Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) |
| 165 | let b := g.orthonormalBasis x |
| 166 | obtain ⟨R, hR⟩ := exists_curvature_trilinearMap D x |
| 167 | let r (p i q j : ι) := D.curvatureTensor x (b p) (b i) (b q) (b j) |
| 168 | let N := ∑ p : ι, ∑ i : ι, ∑ q : ι, ∑ j : ι, r p i q j ^ 2 |
| 169 | have hN : 0 ≤ N := by dsimp only [N]; positivity |
| 170 | have hNnorm : D.curvatureTensorNorm x ^ 2 = N := Real.sq_sqrt hN |
| 171 | have hnorm0 : 0 ≤ D.curvatureTensorNorm x := Real.sqrt_nonneg _ |
| 172 | have hpair (w : TangentSpace (𝓡 n) x) : g.inner x w w = ‖w‖ ^ 2 := |
| 173 | real_inner_self_eq_norm_sq w |
| 174 | have hnorm (w : TangentSpace (𝓡 n) x) : g.tangentNorm x w = ‖w‖ := by |
| 175 | rw [RiemannianMetric.tangentNorm, hpair, Real.sqrt_sq (norm_nonneg _)] |
| 176 | have hrepr (w : TangentSpace (𝓡 n) x) : |
| 177 | ∑ p : ι, (b.repr w p) ^ 2 = ‖w‖ ^ 2 := by |
| 178 | simpa only [OrthonormalBasis.repr_apply_apply] using b.sum_sq_inner_right w |
| 179 | have hexpand (i : ι) : D.curvatureTensor x u (b i) v (b i) = |
| 180 | ∑ p : ι, ∑ q : ι, (b.repr u p * b.repr v q) * r p i q i := by |
| 181 | change g.inner x (D.curvature x u (b i) (b i)) v = _ |
| 182 | rw [← hR] |
| 183 | nth_rw 1 [← b.sum_repr u, ← b.sum_repr v] |
| 184 | simp only [map_sum, map_smul, LinearMap.sum_apply, LinearMap.smul_apply, |
| 185 | sum_apply, smul_apply, smul_eq_mul, Finset.mul_sum] |
| 186 | rw [Finset.sum_comm] |
| 187 | apply Finset.sum_congr rfl |
| 188 | intro p _ |
| 189 | apply Finset.sum_congr rfl |
| 190 | intro q _ |
| 191 | dsimp only [r, LeviCivitaData.curvatureTensor] |
| 192 | rw [hR] |
| 193 | ring |
| 194 | have hslice (i : ι) : (∑ pq : ι × ι, r pq.1 i pq.2 i ^ 2) ≤ N := by |
| 195 | rw [Fintype.sum_prod_type] |
| 196 | apply Finset.sum_le_sum |
| 197 | intro p _ |
| 198 | have hi := Finset.single_le_sum |
| 199 | (fun j (_ : j ∈ (Finset.univ : Finset ι)) => |
| 200 | show 0 ≤ ∑ q : ι, ∑ k : ι, r p j q k ^ 2 by positivity) |
| 201 | (Finset.mem_univ i) |
| 202 | apply le_trans _ hi |
| 203 | apply Finset.sum_le_sum |
| 204 | intro q _ |
| 205 | exact Finset.single_le_sum (fun k _ => sq_nonneg (r p i q k)) (Finset.mem_univ i) |
| 206 | have hweight : (∑ pq : ι × ι, (b.repr u pq.1 * b.repr v pq.2) ^ 2) = |
| 207 | ‖u‖ ^ 2 * ‖v‖ ^ 2 := by |
| 208 | rw [Fintype.sum_prod_type] |
| 209 | simp_rw [mul_pow, ← Finset.mul_sum, ← Finset.sum_mul] |
| 210 | rw [hrepr, hrepr] |
| 211 | have hterm (i : ι) : |D.curvatureTensor x u (b i) v (b i)| ≤ |
| 212 | D.curvatureTensorNorm x * ‖u‖ * ‖v‖ := by |
| 213 | have hcs := Finset.sum_mul_sq_le_sq_mul_sq (Finset.univ : Finset (ι × ι)) |
| 214 | (fun pq => b.repr u pq.1 * b.repr v pq.2) (fun pq => r pq.1 i pq.2 i) |
| 215 | rw [hweight] at hcs |
| 216 | have hle := mul_le_mul_of_nonneg_left (hslice i) (by positivity : 0 ≤ ‖u‖ ^ 2 * ‖v‖ ^ 2) |
| 217 | have hsquare : D.curvatureTensor x u (b i) v (b i) ^ 2 ≤ |
| 218 | (D.curvatureTensorNorm x * ‖u‖ * ‖v‖) ^ 2 := by |
| 219 | rw [hexpand] |
| 220 | rw [Fintype.sum_prod_type] at hcs |
| 221 | calc |
| 222 | _ ≤ (‖u‖ ^ 2 * ‖v‖ ^ 2) * N := hcs.trans hle |
| 223 | _ = _ := by rw [mul_pow, mul_pow, hNnorm]; ring |
| 224 | have hright : 0 ≤ D.curvatureTensorNorm x * ‖u‖ * ‖v‖ := by positivity |
| 225 | nlinarith only [hsquare, sq_abs (D.curvatureTensor x u (b i) v (b i)), |
| 226 | abs_nonneg (D.curvatureTensor x u (b i) v (b i)), hright] |
| 227 | have hdim : Fintype.card ι = n := by |
| 228 | simp only [ι, Fintype.card_fin] |
| 229 | rw [VectorBundle.finrank_eq ℝ (EuclideanSpace ℝ (Fin n)) |
| 230 | (TangentSpace (𝓡 n)) x, finrank_euclideanSpace_fin] |
| 231 | calc |
| 232 | |D.ricci x u v| = |∑ i : ι, D.curvatureTensor x u (b i) v (b i)| := rfl |
| 233 | _ ≤ ∑ i : ι, |D.curvatureTensor x u (b i) v (b i)| := Finset.abs_sum_le_sum_abs _ _ |
| 234 | _ ≤ ∑ i : ι, D.curvatureTensorNorm x * ‖u‖ * ‖v‖ := |
| 235 | Finset.sum_le_sum (fun i _ => hterm i) |
| 236 | _ = _ := by simp only [Finset.sum_const, Finset.card_univ, hdim, nsmul_eq_mul, hnorm]; ring |
| 237 | |
| 238 | theorem metric_endpoint_control_of_curvature_bound |
| 239 | {T C : ℝ} (hT : 0 < T) (F : RicciFlow n M (Set.Ico 0 T)) |
| 240 | (hRm : ∀ t ∈ Set.Ico 0 T, ∀ x : M, |
| 241 | (F.connection t).curvatureTensorNorm x ≤ C) : |
| 242 | let a : ℝ := 2 * (n : ℝ) * max C 0 |
| 243 | (∀ t ∈ Set.Ico 0 T, ∀ x : M, ∀ v : TangentSpace (𝓡 n) x, |
| 244 | Real.exp (-(a * T)) * (F.metric 0).inner x v v ≤ (F.metric t).inner x v v ∧ |
| 245 | (F.metric t).inner x v v ≤ Real.exp (a * T) * (F.metric 0).inner x v v) ∧ |
| 246 | ∀ x : M, ∀ u v : TangentSpace (𝓡 n) x, |
| 247 | (∀ s ∈ Set.Ico 0 T, ∀ t ∈ Set.Ico 0 T, |
| 248 | |(F.metric t).inner x u v - (F.metric s).inner x u v| ≤ |
| 249 | a * Real.exp (a * T) * |t - s| * |
| 250 | (F.metric 0).tangentNorm x u * (F.metric 0).tangentNorm x v) ∧ |
| 251 | ∃ L : ℝ, |
| 252 | Filter.Tendsto (fun t => (F.metric t).inner x u v) (𝓝[Set.Iio T] T) (𝓝 L) ∧ |
| 253 | ∀ t ∈ Set.Ico 0 T, |
| 254 | |(F.metric t).inner x u v - L| ≤ |
| 255 | a * Real.exp (a * T) * (T - t) * |
| 256 | (F.metric 0).tangentNorm x u * (F.metric 0).tangentNorm x v := by |
| 257 | let a : ℝ := 2 * (n : ℝ) * max C 0 |
| 258 | have ha : 0 ≤ a := by dsimp [a]; positivity |
| 259 | have h0 : (0 : ℝ) ∈ Set.Ico 0 T := ⟨le_rfl, hT⟩ |
| 260 | have hnonneg (g : RiemannianMetric n M) (x : M) |
| 261 | (w : TangentSpace (𝓡 n) x) : 0 ≤ g.inner x w w := by |
| 262 | by_cases hw : w = 0 |
| 263 | · simp [hw] |
| 264 | · exact le_of_lt (g.pos x w hw) |
| 265 | have hnorm_nonneg (g : RiemannianMetric n M) (x : M) |
| 266 | (w : TangentSpace (𝓡 n) x) : 0 ≤ g.tangentNorm x w := Real.sqrt_nonneg _ |
| 267 | have hrate (t : ℝ) (ht : t ∈ Set.Ico 0 T) (x : M) |
| 268 | (u v : TangentSpace (𝓡 n) x) : |
| 269 | |-2 * (F.connection t).ricci x u v| ≤ |
| 270 | a * (F.metric t).tangentNorm x u * (F.metric t).tangentNorm x v := by |
| 271 | have hu := hnorm_nonneg (F.metric t) x u |
| 272 | have hv := hnorm_nonneg (F.metric t) x v |
| 273 | calc |
| 274 | _ = 2 * |(F.connection t).ricci x u v| := by rw [abs_mul]; norm_num |
| 275 | _ ≤ 2 * ((n : ℝ) * (F.connection t).curvatureTensorNorm x * |
| 276 | (F.metric t).tangentNorm x u * (F.metric t).tangentNorm x v) := |
| 277 | mul_le_mul_of_nonneg_left (abs_ricci_le_curvatureTensorNorm _ x u v) (by norm_num) |
| 278 | _ = (2 * (n : ℝ) * (F.connection t).curvatureTensorNorm x) * |
| 279 | (F.metric t).tangentNorm x u * (F.metric t).tangentNorm x v := by ring |
| 280 | _ ≤ _ := by |
| 281 | dsimp only [a] |
| 282 | gcongr |
| 283 | exact (hRm t ht x).trans (le_max_left _ _) |
| 284 | have hdiag (t : ℝ) (ht : t ∈ Set.Ico 0 T) (x : M) |
| 285 | (w : TangentSpace (𝓡 n) x) : |
| 286 | Real.exp (-(a * T)) * (F.metric 0).inner x w w ≤ (F.metric t).inner x w w ∧ |
| 287 | (F.metric t).inner x w w ≤ Real.exp (a * T) * (F.metric 0).inner x w w := by |
| 288 | by_cases hw : w = 0 |
| 289 | · simp [hw] |
| 290 | have hp (s : ℝ) : 0 < (F.metric s).inner x w w := (F.metric s).pos x w hw |
| 291 | have hlrate (s : ℝ) (hs : s ∈ Set.Ico 0 T) : |
| 292 | ‖(-2 * (F.connection s).ricci x w w) / (F.metric s).inner x w w‖ ≤ a := by |
| 293 | rw [Real.norm_eq_abs, abs_div, abs_of_pos (hp s)] |
| 294 | apply (div_le_iff₀ (hp s)).2 |
| 295 | calc |
| 296 | _ ≤ a * (F.metric s).tangentNorm x w * (F.metric s).tangentNorm x w := hrate s hs x w w |
| 297 | _ = a * ((F.metric s).tangentNorm x w) ^ 2 := by ring |
| 298 | _ = _ := by rw [RiemannianMetric.tangentNorm, Real.sq_sqrt (hp s).le] |
| 299 | have hl := Convex.norm_image_sub_le_of_norm_hasDerivWithin_le |
| 300 | (fun s hs => (F.equation s hs x w w).log (ne_of_gt (hp s))) hlrate |
| 301 | (convex_Ico 0 T) h0 ht |
| 302 | rw [Real.norm_eq_abs, Real.norm_eq_abs, sub_zero, abs_of_nonneg ht.1] at hl |
| 303 | have hlog := abs_le.mp hl |
| 304 | have hat : a * t ≤ a * T := mul_le_mul_of_nonneg_left ht.2.le ha |
| 305 | constructor |
| 306 | · have hh : -(a * T) + Real.log ((F.metric 0).inner x w w) ≤ |
| 307 | Real.log ((F.metric t).inner x w w) := by linarith [hlog.1, hat] |
| 308 | simpa only [Real.exp_add, Real.exp_log (hp 0), Real.exp_log (hp t)] using Real.exp_le_exp.mpr hh |
| 309 | · have hh : Real.log ((F.metric t).inner x w w) ≤ |
| 310 | a * T + Real.log ((F.metric 0).inner x w w) := by linarith [hlog.2, hat] |
| 311 | simpa only [Real.exp_add, Real.exp_log (hp 0), Real.exp_log (hp t)] using Real.exp_le_exp.mpr hh |
| 312 | refine ⟨hdiag, ?_⟩ |
| 313 | intro x u v |
| 314 | let A := Real.exp (a * T) |
| 315 | have hA : 0 ≤ A := (Real.exp_pos _).le |
| 316 | have hnorm_bound (t : ℝ) (ht : t ∈ Set.Ico 0 T) (w : TangentSpace (𝓡 n) x) : |
| 317 | (F.metric t).tangentNorm x w ≤ Real.sqrt A * (F.metric 0).tangentNorm x w := by |
| 318 | dsimp only [RiemannianMetric.tangentNorm] |
| 319 | have hs := Real.sqrt_le_sqrt (hdiag t ht x w).2 |
| 320 | rw [Real.sqrt_mul hA] at hs |
| 321 | exact hs |
| 322 | have hprod (t : ℝ) (ht : t ∈ Set.Ico 0 T) : |
| 323 | (F.metric t).tangentNorm x u * (F.metric t).tangentNorm x v ≤ |
| 324 | A * (F.metric 0).tangentNorm x u * (F.metric 0).tangentNorm x v := by |
| 325 | calc |
| 326 | _ ≤ (Real.sqrt A * (F.metric 0).tangentNorm x u) * |
| 327 | (Real.sqrt A * (F.metric 0).tangentNorm x v) := |
| 328 | mul_le_mul (hnorm_bound t ht u) (hnorm_bound t ht v) |
| 329 | (hnorm_nonneg _ _ _) (mul_nonneg (Real.sqrt_nonneg _) (hnorm_nonneg _ _ _)) |
| 330 | _ = (Real.sqrt A) ^ 2 * (F.metric 0).tangentNorm x u * |
| 331 | (F.metric 0).tangentNorm x v := by ring |
| 332 | _ = _ := by rw [Real.sq_sqrt hA] |
| 333 | let K : ℝ := a * A * (F.metric 0).tangentNorm x u * (F.metric 0).tangentNorm x v |
| 334 | have hK : 0 ≤ K := mul_nonneg (mul_nonneg (mul_nonneg ha hA) |
| 335 | (hnorm_nonneg _ _ _)) (hnorm_nonneg _ _ _) |
| 336 | have hbound (t : ℝ) (ht : t ∈ Set.Ico 0 T) : |
| 337 | ‖-2 * (F.connection t).ricci x u v‖ ≤ K := by |
| 338 | rw [Real.norm_eq_abs] |
| 339 | calc |
| 340 | _ ≤ a * (F.metric t).tangentNorm x u * (F.metric t).tangentNorm x v := hrate t ht x u v |
| 341 | _ ≤ K := by |
| 342 | dsimp only [K] |
| 343 | nlinarith only [mul_le_mul_of_nonneg_left (hprod t ht) ha] |
| 344 | have hLip : LipschitzOnWith ⟨K, hK⟩ (fun t => (F.metric t).inner x u v) (Set.Ico 0 T) := |
| 345 | (convex_Ico 0 T).lipschitzOnWith_of_nnnorm_hasDerivWithin_le |
| 346 | (fun t ht => F.equation t ht x u v) (fun t ht => hbound t ht) |
| 347 | constructor |
| 348 | · intro s hs t ht |
| 349 | have hh := hLip.dist_le_mul s hs t ht |
| 350 | change |(F.metric s).inner x u v - (F.metric t).inner x u v| ≤ K * dist s t at hh |
| 351 | rw [Real.dist_eq, abs_sub_comm] at hh |
| 352 | have htime : |s - t| = |t - s| := abs_sub_comm _ _ |
| 353 | rw [htime] at hh |
| 354 | calc |
| 355 | _ ≤ K * |t - s| := hh |
| 356 | _ = a * A * |t - s| * (F.metric 0).tangentNorm x u * |
| 357 | (F.metric 0).tangentNorm x v := by dsimp only [K]; ring |
| 358 | · obtain ⟨f, hf, heq⟩ := hLip.extend_real |
| 359 | refine ⟨f T, ?_, ?_⟩ |
| 360 | · have hevent : ∀ᶠ t in 𝓝[Set.Iio T] T, t ∈ Set.Ico 0 T := by |
| 361 | filter_upwards [self_mem_nhdsWithin, |
| 362 | (eventually_gt_nhds hT).filter_mono nhdsWithin_le_nhds] with t ht hpos |
| 363 | exact ⟨hpos.le, ht⟩ |
| 364 | apply (hf.continuous.continuousAt.tendsto.mono_left nhdsWithin_le_nhds).congr' |
| 365 | filter_upwards [hevent] with t ht |
| 366 | exact (heq ht).symm |
| 367 | · intro t ht |
| 368 | have hh := hf.dist_le_mul t T |
| 369 | rw [← heq ht] at hh |
| 370 | change |(F.metric t).inner x u v - f T| ≤ K * dist t T at hh |
| 371 | rw [Real.dist_eq, abs_of_nonpos (sub_nonpos.mpr ht.2.le), neg_sub] at hh |
| 372 | calc |
| 373 | _ ≤ K * (T - t) := hh |
| 374 | _ = a * A * (T - t) * (F.metric 0).tangentNorm x u * |
| 375 | (F.metric 0).tangentNorm x v := by dsimp only [K]; ring |
| 376 | |
| 377 | set_option maxHeartbeats 2400000 in |
| 378 | set_option synthInstance.maxHeartbeats 200000 in |
| 379 | /-- The frozen Hilbert-Schmidt curvature norm bounds the native vector-valued curvature. -/ |
| 380 | theorem curvature_tangentNorm_le_curvatureTensorNorm |
| 381 | {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 382 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 383 | {g : RiemannianMetric n M} (D : LeviCivitaData g) |
| 384 | (x : M) (u v w : TangentSpace (𝓡 n) x) : |
| 385 | g.tangentNorm x (D.curvature x u v w) ≤ |
| 386 | D.curvatureTensorNorm x * g.tangentNorm x u * |
| 387 | g.tangentNorm x v * g.tangentNorm x w := by |
| 388 | classical |
| 389 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 390 | ⟨g.toRiemannianMetric⟩ |
| 391 | let ι := Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) |
| 392 | let b := g.orthonormalBasis x |
| 393 | obtain ⟨R, hR⟩ := exists_curvature_trilinearMap D x |
| 394 | let rb := fun γ : ι × ι × ι => R (b γ.1) (b γ.2.1) (b γ.2.2) |
| 395 | let c := fun γ : ι × ι × ι => |
| 396 | b.repr u γ.1 * b.repr v γ.2.1 * b.repr w γ.2.2 |
| 397 | let N := ∑ i : ι, ∑ j : ι, ∑ k : ι, ∑ l : ι, |
| 398 | D.curvatureTensor x (b i) (b j) (b k) (b l) ^ 2 |
| 399 | have hN : 0 ≤ N := by dsimp only [N]; positivity |
| 400 | have hNnorm : D.curvatureTensorNorm x ^ 2 = N := Real.sq_sqrt hN |
| 401 | have hnorm0 : 0 ≤ D.curvatureTensorNorm x := Real.sqrt_nonneg _ |
| 402 | have hnorm (z : TangentSpace (𝓡 n) x) : g.tangentNorm x z = ‖z‖ := by |
| 403 | rw [RiemannianMetric.tangentNorm, show g.inner x z z = ‖z‖ ^ 2 from |
| 404 | real_inner_self_eq_norm_sq z, Real.sqrt_sq (norm_nonneg _)] |
| 405 | have hrepr (z : TangentSpace (𝓡 n) x) : |
| 406 | ∑ i : ι, b.repr z i ^ 2 = ‖z‖ ^ 2 := by |
| 407 | simpa only [OrthonormalBasis.repr_apply_apply] using b.sum_sq_inner_right z |
| 408 | have houtput (i j k : ι) : ‖R (b i) (b j) (b k)‖ ^ 2 = |
| 409 | ∑ l : ι, D.curvatureTensor x (b i) (b j) (b l) (b k) ^ 2 := by |
| 410 | have hh := (b.sum_sq_inner_left (R (b i) (b j) (b k))).symm |
| 411 | change ‖R (b i) (b j) (b k)‖ ^ 2 = |
| 412 | ∑ l : ι, g.inner x (R (b i) (b j) (b k)) (b l) ^ 2 at hh |
| 413 | simpa only [LeviCivitaData.curvatureTensor, ← hR] using hh |
| 414 | have hEnergy : (∑ γ : ι × ι × ι, ‖rb γ‖ ^ 2) = |
| 415 | D.curvatureTensorNorm x ^ 2 := by |
| 416 | rw [hNnorm] |
| 417 | simp only [Fintype.sum_prod_type, rb] |
| 418 | dsimp only [N] |
| 419 | apply Finset.sum_congr rfl |
| 420 | intro i _ |
| 421 | apply Finset.sum_congr rfl |
| 422 | intro j _ |
| 423 | simp_rw [houtput] |
| 424 | exact Finset.sum_comm |
| 425 | have hExpand : R u v w = ∑ γ : ι × ι × ι, c γ • rb γ := by |
| 426 | dsimp only [c, rb] |
| 427 | simp only [Fintype.sum_prod_type] |
| 428 | nth_rw 1 [← b.sum_repr u] |
| 429 | nth_rw 1 [← b.sum_repr v] |
| 430 | nth_rw 1 [← b.sum_repr w] |
| 431 | simp only [map_sum, map_smul, LinearMap.sum_apply, LinearMap.smul_apply, |
| 432 | Finset.smul_sum, smul_smul, mul_assoc] |
| 433 | rw [Finset.sum_comm] |
| 434 | conv_rhs => rw [Finset.sum_comm] |
| 435 | apply Finset.sum_congr rfl |
| 436 | intro j _ |
| 437 | rw [Finset.sum_comm] |
| 438 | apply Finset.sum_congr rfl |
| 439 | intro i _ |
| 440 | apply Finset.sum_congr rfl |
| 441 | intro k _ |
| 442 | congr 1 |
| 443 | ring |
| 444 | let H := ‖u‖ * ‖v‖ * ‖w‖ |
| 445 | have hweight : (∑ γ : ι × ι × ι, |c γ| ^ 2) = H ^ 2 := by |
| 446 | calc |
| 447 | _ = ∑ i : ι, ∑ j : ι, ∑ k : ι, |
| 448 | b.repr u i ^ 2 * b.repr v j ^ 2 * b.repr w k ^ 2 := by |
| 449 | simp only [c, sq_abs, Fintype.sum_prod_type, mul_pow] |
| 450 | _ = (∑ i : ι, b.repr u i ^ 2) * (∑ j : ι, b.repr v j ^ 2) * |
| 451 | (∑ k : ι, b.repr w k ^ 2) := by |
| 452 | simp_rw [← Finset.mul_sum, ← Finset.sum_mul] |
| 453 | simp_rw [← Finset.mul_sum, ← Finset.sum_mul] |
| 454 | _ = H ^ 2 := by rw [hrepr, hrepr, hrepr]; dsimp only [H]; ring |
| 455 | let S := ∑ γ : ι × ι × ι, |c γ| * ‖rb γ‖ |
| 456 | have hcs := Finset.sum_mul_sq_le_sq_mul_sq (Finset.univ : Finset (ι × ι × ι)) |
| 457 | (fun γ => |c γ|) (fun γ => ‖rb γ‖) |
| 458 | change S ^ 2 ≤ _ at hcs |
| 459 | rw [hweight, hEnergy] at hcs |
| 460 | have hbound : S ≤ D.curvatureTensorNorm x * H := by |
| 461 | have hS0 : 0 ≤ S := by dsimp only [S]; positivity |
| 462 | have hright : 0 ≤ D.curvatureTensorNorm x * H := by |
| 463 | dsimp only [H] |
| 464 | positivity |
| 465 | have hsquare : S ^ 2 ≤ (D.curvatureTensorNorm x * H) ^ 2 := by |
| 466 | calc |
| 467 | _ ≤ H ^ 2 * D.curvatureTensorNorm x ^ 2 := hcs |
| 468 | _ = _ := by ring |
| 469 | exact (sq_le_sq₀ hS0 hright).mp hsquare |
| 470 | simp only [hnorm] |
| 471 | calc |
| 472 | ‖D.curvature x u v w‖ = ‖R u v w‖ := congrArg norm (hR u v w).symm |
| 473 | _ = ‖∑ γ : ι × ι × ι, c γ • rb γ‖ := congrArg norm hExpand |
| 474 | _ ≤ ∑ γ : ι × ι × ι, ‖c γ • rb γ‖ := norm_sum_le _ _ |
| 475 | _ = S := by simp only [S, norm_smul, Real.norm_eq_abs] |
| 476 | _ ≤ D.curvatureTensorNorm x * H := hbound |
| 477 | _ = _ := by dsimp only [H]; ring |
| 478 | |
| 479 | end PoincareMT.RicciFlow.Local |