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.Local.Metric.MetricDifferenceEnergyRate |
| 2 | /- Adapted from Mapher `PoincareMT/Proofs/M03/MetricDifferenceEnergyRate.lean` at |
| 3 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 4 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 5 | |
| 6 | import PoincareLib.Geometry.RicciFlow.Local.Metric.MetricDifferenceEvolution |
| 7 | import PoincareLib.Geometry.RicciFlow.Local.Curvature.Calculus.CurvatureHom |
| 8 | import PoincareLib.Geometry.RicciFlow.Local.Energy.Coordinates.FiniteBundleFamilyEnergy |
| 9 | import PoincareLib.Geometry.RicciFlow.Local.Connection.DifferenceEvolution |
| 10 | |
| 11 | /-! |
| 12 | # Rate of the actual metric difference energy |
| 13 | |
| 14 | The Ricci contraction is fixed in the native tangent coordinates. Its |
| 15 | operator norm bounds the metric rate by metric and curvature energies. |
| 16 | Derivation: proof-work/tasks/M03/reviews/actual-metric-energy-rate-research.json. |
| 17 | -/ |
| 18 | |
| 19 | set_option autoImplicit false |
| 20 | set_option maxHeartbeats 8000000 |
| 21 | set_option synthInstance.maxHeartbeats 200000 |
| 22 | |
| 23 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 24 | open Bundle MeasureTheory Set |
| 25 | |
| 26 | universe u |
| 27 | |
| 28 | namespace PoincareMT.RicciFlow.Local |
| 29 | |
| 30 | section TerminalMetric |
| 31 | |
| 32 | open Manifold Filter |
| 33 | |
| 34 | /-- The bounded flow has a positive smooth endpoint metric, with every spatial chart jet converging. |
| 35 | Derivation and independent reviews: the task's continuation-core-derivation-20260916 note. -/ |
| 36 | theorem exists_ricciFlow_endpoint_metric_of_curvature_bound |
| 37 | {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 38 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 39 | [IsManifold (𝓡 n) ∞ M] |
| 40 | [T2Space M] [SecondCountableTopology M] [CompactSpace M] |
| 41 | {T C : ℝ} (hT : 0 < T) (F : RicciFlow n M (Ico 0 T)) |
| 42 | (hRm : ∀ s ∈ Ico 0 T, ∀ x : M, |
| 43 | (F.connection s).curvatureTensorNorm x ≤ C) : |
| 44 | let A : ℝ := 2 * (n : ℝ) * max C 0 |
| 45 | ∃ gT : RiemannianMetric n M, |
| 46 | (∀ x : M, ∀ v : TangentSpace (𝓡 n) x, |
| 47 | Real.exp (-(A * T)) * (F.metric 0).inner x v v ≤ gT.inner x v v ∧ |
| 48 | gT.inner x v v ≤ Real.exp (A * T) * (F.metric 0).inner x v v) ∧ |
| 49 | (∀ x : M, ∀ u v : TangentSpace (𝓡 n) x, |
| 50 | Tendsto (fun s => (F.metric s).inner x u v) (𝓝[<] T) |
| 51 | (𝓝 (gT.inner x u v)) ∧ |
| 52 | ∀ s ∈ Ico 0 T, |
| 53 | |(F.metric s).inner x u v - gT.inner x u v| ≤ |
| 54 | A * Real.exp (A * T) * (T - s) * |
| 55 | (F.metric 0).tangentNorm x u * |
| 56 | (F.metric 0).tangentNorm x v) ∧ |
| 57 | (∀ a : ℝ, 0 < a → a < T → ∀ x0 : M, |
| 58 | let V := EuclideanSpace ℝ (Fin n) |
| 59 | let c := chartAt V x0 |
| 60 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 61 | let E := e.localFrame (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 62 | let G := fun (s : ℝ) (i j : Fin n) (z : V) => |
| 63 | (F.metric s).inner (c.symm z) (E i (c.symm z)) (E j (c.symm z)) |
| 64 | let GT := fun (i j : Fin n) (z : V) => |
| 65 | gT.inner (c.symm z) (E i (c.symm z)) (E j (c.symm z)) |
| 66 | ∀ q : ℕ, ∀ K : Set V, IsCompact K → K ⊆ c.target → |
| 67 | (∃ L : ℝ, 0 ≤ L ∧ ∀ s ∈ Ico a T, ∀ z ∈ K, |
| 68 | ∀ i j : Fin n, |
| 69 | ‖iteratedFDeriv ℝ q (G s i j) z - |
| 70 | iteratedFDeriv ℝ q (GT i j) z‖ ≤ L * (T - s)) ∧ |
| 71 | (∀ i j : Fin n, |
| 72 | TendstoUniformlyOn (fun s z => iteratedFDeriv ℝ q (G s i j) z) |
| 73 | (iteratedFDeriv ℝ q (GT i j)) (𝓝[<] T) K)) := by |
| 74 | classical |
| 75 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 76 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 77 | let V := EuclideanSpace ℝ (Fin n) |
| 78 | let A : ℝ := 2 * (n : ℝ) * max C 0 |
| 79 | let d := Real.exp (-(A * T)) |
| 80 | have hd : 0 < d := Real.exp_pos _ |
| 81 | have hcontrol := metric_endpoint_control_of_curvature_bound hT F hRm |
| 82 | let ι := fun x : M => Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) |
| 83 | let b := fun x : M => (F.metric 0).orthonormalBasis x |
| 84 | let p := fun (x : M) (i : ι x) => (F.metric 0).inner x (b x i) |
| 85 | have hlim (x : M) (i j : ι x) := (hcontrol.2 x (b x i) (b x j)).2 |
| 86 | choose lam hlam using hlim |
| 87 | let B := fun x : M => ∑ i : ι x, ∑ j : ι x, |
| 88 | lam x i j • (p x i).smulRight (p x j) |
| 89 | have hrepr (x : M) (v : TangentSpace (𝓡 n) x) : |
| 90 | ∑ i : ι x, p x i v • b x i = v := by |
| 91 | exact (b x).sum_repr' v |
| 92 | have hBvalue (x : M) (v w : TangentSpace (𝓡 n) x) : |
| 93 | B x v w = ∑ i : ι x, ∑ j : ι x, lam x i j * (p x i v * p x j w) := by |
| 94 | simp only [B, sum_apply, smul_apply, |
| 95 | ContinuousLinearMap.smulRight_apply, smul_eq_mul] |
| 96 | have hexpand (s : ℝ) (x : M) (v w : TangentSpace (𝓡 n) x) : |
| 97 | (F.metric s).inner x v w = ∑ i : ι x, ∑ j : ι x, |
| 98 | (F.metric s).inner x (b x i) (b x j) * (p x i v * p x j w) := by |
| 99 | calc |
| 100 | _ = (F.metric s).inner x (∑ i : ι x, p x i v • b x i) |
| 101 | (∑ j : ι x, p x j w • b x j) := by rw [hrepr, hrepr] |
| 102 | _ = _ := by |
| 103 | simp only [map_sum, map_smul, sum_apply, smul_apply, smul_eq_mul, Finset.mul_sum] |
| 104 | rw [Finset.sum_comm] |
| 105 | apply Finset.sum_congr rfl |
| 106 | intro i _ |
| 107 | apply Finset.sum_congr rfl |
| 108 | intro j _ |
| 109 | ring |
| 110 | have hBlim (x : M) (v w : TangentSpace (𝓡 n) x) : |
| 111 | Tendsto (fun s => (F.metric s).inner x v w) (𝓝[<] T) (𝓝 (B x v w)) := by |
| 112 | have heq : (fun s => (F.metric s).inner x v w) = |
| 113 | (fun s => ∑ i : ι x, ∑ j : ι x, |
| 114 | (F.metric s).inner x (b x i) (b x j) * (p x i v * p x j w)) := |
| 115 | funext (fun s => hexpand s x v w) |
| 116 | rw [heq, hBvalue] |
| 117 | exact tendsto_finsetSum _ (fun i _ => tendsto_finsetSum _ |
| 118 | (fun j _ => (hlam x i j).1.mul tendsto_const_nhds)) |
| 119 | have hsymm (x : M) (v w : TangentSpace (𝓡 n) x) : B x v w = B x w v := by |
| 120 | have he : (fun s => (F.metric s).inner x v w) = |
| 121 | (fun s => (F.metric s).inner x w v) := funext (fun s => (F.metric s).symm x v w) |
| 122 | have hh := hBlim x v w |
| 123 | rw [he] at hh |
| 124 | exact tendsto_nhds_unique hh (hBlim x w v) |
| 125 | have hdom : ∀ᶠ s in 𝓝[<] T, s ∈ Ico 0 T := Ico_mem_nhdsLT hT |
| 126 | have hdiag (x : M) (v : TangentSpace (𝓡 n) x) : |
| 127 | d * (F.metric 0).inner x v v ≤ B x v v ∧ |
| 128 | B x v v ≤ Real.exp (A * T) * (F.metric 0).inner x v v := by |
| 129 | constructor |
| 130 | · exact le_of_tendsto_of_tendsto tendsto_const_nhds (hBlim x v v) |
| 131 | (hdom.mono (fun s hs => (hcontrol.1 s hs x v).1)) |
| 132 | · exact le_of_tendsto_of_tendsto (hBlim x v v) tendsto_const_nhds |
| 133 | (hdom.mono (fun s hs => (hcontrol.1 s hs x v).2)) |
| 134 | have hpos (x : M) (v : TangentSpace (𝓡 n) x) (hv : v ≠ 0) : 0 < B x v v := |
| 135 | (mul_pos hd ((F.metric 0).pos x v hv)).trans_le (hdiag x v).1 |
| 136 | have hunit (x : M) : Bornology.IsVonNBounded ℝ {v | B x v v < 1} := by |
| 137 | apply (NormedSpace.isVonNBounded_ball ℝ (TangentSpace (𝓡 n) x) |
| 138 | (Real.sqrt d⁻¹)).subset |
| 139 | intro v hv |
| 140 | rw [Metric.mem_ball, dist_zero_right] |
| 141 | have hnorm : (F.metric 0).inner x v v = ‖v‖ ^ 2 := real_inner_self_eq_norm_sq v |
| 142 | have hsq : ‖v‖ ^ 2 < d⁻¹ := by |
| 143 | rw [inv_eq_one_div, lt_div_iff₀ hd] |
| 144 | have hh := (hdiag x v).1.trans_lt hv |
| 145 | rw [hnorm] at hh |
| 146 | nlinarith only [hh] |
| 147 | nlinarith only [hsq, norm_nonneg v, Real.sqrt_nonneg d⁻¹, |
| 148 | Real.sq_sqrt (inv_nonneg.mpr hd.le)] |
| 149 | have hcoeff (a : ℝ) (ha : 0 < a) (haT : a < T) (x0 : M) : |
| 150 | let c := chartAt V x0 |
| 151 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 152 | let E := e.localFrame (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 153 | let G := fun (s : ℝ) (i j : Fin n) (z : V) => |
| 154 | (F.metric s).inner (c.symm z) (E i (c.symm z)) (E j (c.symm z)) |
| 155 | let GT := fun (i j : Fin n) (z : V) => |
| 156 | B (c.symm z) (E i (c.symm z)) (E j (c.symm z)) |
| 157 | ∀ i j : Fin n, ContDiffOn ℝ ∞ (GT i j) c.target ∧ |
| 158 | ∀ q : ℕ, ∀ K : Set V, IsCompact K → K ⊆ c.target → |
| 159 | (∃ L : ℝ, 0 ≤ L ∧ ∀ s ∈ Ico a T, ∀ z ∈ K, |
| 160 | ‖iteratedFDeriv ℝ q (G s i j) z - |
| 161 | iteratedFDeriv ℝ q (GT i j) z‖ ≤ L * (T - s)) ∧ |
| 162 | TendstoUniformlyOn (fun s z => iteratedFDeriv ℝ q (G s i j) z) |
| 163 | (iteratedFDeriv ℝ q (GT i j)) (𝓝[<] T) K := by |
| 164 | let c := chartAt V x0 |
| 165 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 166 | let cb := (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 167 | let E := e.localFrame cb |
| 168 | let G := fun (s : ℝ) (i j : Fin n) (z : V) => |
| 169 | (F.metric s).inner (c.symm z) (E i (c.symm z)) (E j (c.symm z)) |
| 170 | let GT := fun (i j : Fin n) (z : V) => |
| 171 | B (c.symm z) (E i (c.symm z)) (E j (c.symm z)) |
| 172 | dsimp only |
| 173 | intro i j |
| 174 | have hbase {z : V} (hz : z ∈ c.target) : c.symm z ∈ e.baseSet := by |
| 175 | simpa only [e, TangentBundle.trivializationAt_baseSet] using c.map_target hz |
| 176 | have hE (k : Fin n) : ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ |
| 177 | (T% (E k)) e.baseSet := e.contMDiffOn_localFrame_baseSet (I := 𝓡 n) ∞ cb k |
| 178 | have hfamily (s : ℝ) : RiemannianMetric.IsSmoothFamilyOn |
| 179 | (fun _ : ℝ => F.metric s) Set.univ := |
| 180 | ((F.metric s).contMDiff.comp contMDiff_snd).contMDiffOn |
| 181 | have hf (s : ℝ) : ContDiffOn ℝ ∞ (G s i j) c.target := by |
| 182 | have hp := (contMDiffOn_family_metric_pair (hfamily s) |
| 183 | (E i) (E j) (hE i) (hE j)).comp |
| 184 | (show ContMDiffOn (𝓡 n) (𝓘(ℝ, ℝ).prod (𝓡 n)) ∞ |
| 185 | (fun y : M => ((0 : ℝ), y)) e.baseSet from |
| 186 | contMDiffOn_const.prodMk contMDiffOn_id) |
| 187 | (fun y hy => ⟨Set.mem_univ (0 : ℝ), hy⟩) |
| 188 | exact (hp.comp (contMDiffOn_chart_symm (I := 𝓡 n) (n := ∞) (x := x0)) |
| 189 | (fun z hz => hbase hz)).contDiffOn |
| 190 | have hjets (q : ℕ) (K : Set V) (hK : IsCompact K) (hKU : K ⊆ c.target) : |
| 191 | ∃ L : ℝ, 0 ≤ L ∧ ∀ s ∈ Ico a T, ∀ t ∈ Ico a T, ∀ z ∈ K, |
| 192 | ‖iteratedFDeriv ℝ q (G t i j) z - iteratedFDeriv ℝ q (G s i j) z‖ ≤ |
| 193 | L * |t - s| := by |
| 194 | obtain ⟨B0, R, hB0, hR, hb, hr, hlip⟩ := |
| 195 | ricciFlow_metric_coordinate_jets_terminal_control hT F hRm ha haT x0 hK hKU q |
| 196 | exact ⟨R, hR, fun s hs t ht z hz => hlip q le_rfl s hs t ht z hz i j⟩ |
| 197 | obtain ⟨fT, hsm, hrest⟩ := exists_contDiffOn_limit_of_iteratedFDeriv_time_lipschitz |
| 198 | c.open_target haT (fun s => G s i j) (fun s _ => hf s) hjets |
| 199 | have heq (z : V) (hz : z ∈ c.target) : fT z = GT i j z := by |
| 200 | have hzero := ((hrest 0 {z} isCompact_singleton |
| 201 | (singleton_subset_iff.mpr hz)).2).tendsto_at (mem_singleton z) |
| 202 | have hv := ((continuousMultilinearCurryFin0 ℝ V ℝ).continuous.tendsto |
| 203 | (iteratedFDeriv ℝ 0 fT z)).comp hzero |
| 204 | change Tendsto (fun s => (iteratedFDeriv ℝ 0 (G s i j) z) 0) (𝓝[<] T) |
| 205 | (𝓝 ((iteratedFDeriv ℝ 0 fT z) 0)) at hv |
| 206 | simp only [iteratedFDeriv_zero_apply] at hv |
| 207 | exact tendsto_nhds_unique hv (hBlim (c.symm z) (E i (c.symm z)) (E j (c.symm z))) |
| 208 | refine ⟨hsm.congr (fun z hz => (heq z hz).symm), ?_⟩ |
| 209 | intro q K hK hKU |
| 210 | have heqjet (z : V) (hz : z ∈ c.target) : |
| 211 | iteratedFDeriv ℝ q fT z = iteratedFDeriv ℝ q (GT i j) z := by |
| 212 | have hgerm : fT =ᶠ[𝓝 z] GT i j := by |
| 213 | filter_upwards [c.open_target.mem_nhds hz] with y hy |
| 214 | exact heq y hy |
| 215 | exact (hgerm.iteratedFDeriv (𝕜 := ℝ) q).eq_of_nhds |
| 216 | obtain ⟨⟨L, hL, hb⟩, hu⟩ := hrest q K hK hKU |
| 217 | constructor |
| 218 | · refine ⟨L, hL, ?_⟩ |
| 219 | intro s hs z hz |
| 220 | simpa only [heqjet z (hKU hz)] using hb s hs z hz |
| 221 | · exact hu.congr_right (fun z hz => heqjet z (hKU hz)) |
| 222 | have hsmooth : ContMDiff (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V →L[ℝ] V →L[ℝ] ℝ)) ∞ |
| 223 | (fun x => TotalSpace.mk' (V →L[ℝ] V →L[ℝ] ℝ) x (B x)) := by |
| 224 | intro x0 |
| 225 | let c := chartAt V x0 |
| 226 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 227 | let cb := (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 228 | let E := e.localFrame cb |
| 229 | let BC := fun y : M => ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 230 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) x0 y x0 y (B y) |
| 231 | let P : Fin n → Fin n → V →L[ℝ] V →L[ℝ] ℝ := |
| 232 | fun i j => (EuclideanSpace.proj i).smulRight (EuclideanSpace.proj j) |
| 233 | have hx0 : x0 ∈ e.baseSet := mem_baseSet_trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 234 | have hEvalue {y : M} (hy : y ∈ e.baseSet) (i : Fin n) : |
| 235 | E i y = e.symmL ℝ y (cb i) := by |
| 236 | dsimp only [E] |
| 237 | rw [e.localFrame_apply_of_mem_baseSet cb hy] |
| 238 | simp only [Trivialization.basisAt, Module.Basis.map_apply, |
| 239 | Trivialization.linearEquivAt_symm_apply] |
| 240 | exact (Trivialization.symmL_apply (R := ℝ) e hy (cb i)).symm |
| 241 | have hEexpand {y : M} (hy : y ∈ e.baseSet) (v : V) : |
| 242 | e.symmL ℝ y v = ∑ i : Fin n, v i • E i y := by |
| 243 | have hv : v = ∑ i : Fin n, v i • cb i := by |
| 244 | simpa only [cb, EuclideanSpace.basisFun_repr, OrthonormalBasis.coe_toBasis] using |
| 245 | ((EuclideanSpace.basisFun (Fin n) ℝ).sum_repr v).symm |
| 246 | calc |
| 247 | _ = e.symmL ℝ y (∑ i : Fin n, v i • cb i) := congrArg (e.symmL ℝ y) hv |
| 248 | _ = _ := by simp only [map_sum, map_smul, hEvalue hy] |
| 249 | have hBCeq {y : M} (hy : y ∈ e.baseSet) : |
| 250 | BC y = ∑ i : Fin n, ∑ j : Fin n, B y (E i y) (E j y) • P i j := by |
| 251 | ext v w |
| 252 | dsimp only [BC] |
| 253 | rw [inCoordinates_apply_eq₂ (F₁ := V) (F₂ := V) (F₃ := ℝ) |
| 254 | (E₁ := TangentSpace (𝓡 n)) (E₂ := TangentSpace (𝓡 n)) |
| 255 | (E₃ := fun _ : M => ℝ) hy hy (by simp)] |
| 256 | rw [← Trivialization.symmL_apply (R := ℝ) e hy v, |
| 257 | ← Trivialization.symmL_apply (R := ℝ) e hy w] |
| 258 | simp only [Trivial.fiberBundle_trivializationAt', Trivial.linearMapAt_trivialization, |
| 259 | LinearMap.id_coe, id_eq] |
| 260 | rw [hEexpand hy, hEexpand hy] |
| 261 | simp only [map_sum, map_smul, sum_apply, |
| 262 | smul_apply, ContinuousLinearMap.smulRight_apply, |
| 263 | smul_eq_mul, Finset.mul_sum, P] |
| 264 | rw [Finset.sum_comm] |
| 265 | apply Finset.sum_congr rfl |
| 266 | intro i _ |
| 267 | apply Finset.sum_congr rfl |
| 268 | intro j _ |
| 269 | change w j * (v i * B y (E i y) (E j y)) = |
| 270 | B y (E i y) (E j y) * (v i * w j) |
| 271 | ring |
| 272 | have hscalar (i j : Fin n) : ContMDiffOn (𝓡 n) 𝓘(ℝ, ℝ) ∞ |
| 273 | (fun y => B y (E i y) (E j y)) e.baseSet := by |
| 274 | have hh := (hcoeff (T / 2) (by linarith) (by linarith) x0 i j).1 |
| 275 | have hc := hh.contMDiffOn.comp |
| 276 | (contMDiffOn_chart (I := 𝓡 n) (n := ∞) (x := x0)) |
| 277 | (fun y hy => c.map_source hy) |
| 278 | have hc' : ContMDiffOn (𝓡 n) 𝓘(ℝ, ℝ) ∞ |
| 279 | (fun y => B y (E i y) (E j y)) c.source := |
| 280 | hc.congr (fun y hy => by dsimp only [Function.comp_def]; rw [c.left_inv hy]) |
| 281 | simpa only [e, TangentBundle.trivializationAt_baseSet] using hc' |
| 282 | have hsum : ContMDiffOn (𝓡 n) 𝓘(ℝ, V →L[ℝ] V →L[ℝ] ℝ) ∞ |
| 283 | (fun y => ∑ i : Fin n, ∑ j : Fin n, B y (E i y) (E j y) • P i j) e.baseSet := |
| 284 | contMDiffOn_finsetSum (fun i _ => contMDiffOn_finsetSum (fun j _ => |
| 285 | (hscalar i j).smul contMDiffOn_const)) |
| 286 | have hBC : ContMDiffAt (𝓡 n) 𝓘(ℝ, V →L[ℝ] V →L[ℝ] ℝ) ∞ BC x0 := |
| 287 | (hsum.contMDiffAt (e.open_baseSet.mem_nhds hx0)).congr_of_eventuallyEq |
| 288 | (by |
| 289 | filter_upwards [e.open_baseSet.mem_nhds hx0] with y hy |
| 290 | exact hBCeq hy) |
| 291 | exact (contMDiffAt_hom_bundle (fun y => |
| 292 | (TotalSpace.mk' (V →L[ℝ] V →L[ℝ] ℝ) y (B y) : |
| 293 | TotalSpace (V →L[ℝ] V →L[ℝ] ℝ) |
| 294 | (fun x : M => TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x →L[ℝ] ℝ)))).mpr |
| 295 | ⟨contMDiffAt_id, hBC⟩ |
| 296 | let gT : RiemannianMetric n M := |
| 297 | { inner := B, symm := hsymm, pos := hpos, isVonNBounded := hunit, contMDiff := hsmooth } |
| 298 | refine ⟨gT, hdiag, ?_, ?_⟩ |
| 299 | · intro x v w |
| 300 | obtain ⟨L, hL, hbound⟩ := (hcontrol.2 x v w).2 |
| 301 | have heq : L = B x v w := tendsto_nhds_unique hL (hBlim x v w) |
| 302 | exact ⟨hBlim x v w, fun s hs => by simpa only [heq] using hbound s hs⟩ |
| 303 | · intro a ha haT x0 |
| 304 | dsimp only |
| 305 | intro q K hK hKU |
| 306 | have hpair := fun i j : Fin n => (hcoeff a ha haT x0 i j).2 q K hK hKU |
| 307 | choose L hL hb using (fun i j : Fin n => (hpair i j).1) |
| 308 | constructor |
| 309 | · refine ⟨∑ i : Fin n, ∑ j : Fin n, L i j, |
| 310 | Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun j _ => hL i j)), ?_⟩ |
| 311 | intro s hs z hz i j |
| 312 | apply (hb i j s hs z hz).trans |
| 313 | apply mul_le_mul_of_nonneg_right _ (sub_nonneg.mpr hs.2.le) |
| 314 | exact (Finset.single_le_sum (fun k (_ : k ∈ (Finset.univ : Finset (Fin n))) => hL i k) |
| 315 | (Finset.mem_univ j)).trans |
| 316 | (Finset.single_le_sum |
| 317 | (fun k (_ : k ∈ (Finset.univ : Finset (Fin n))) => |
| 318 | Finset.sum_nonneg (fun l _ => hL k l)) (Finset.mem_univ i)) |
| 319 | · exact fun i j => (hpair i j).2 |
| 320 | |
| 321 | end TerminalMetric |
| 322 | |
| 323 | end PoincareMT.RicciFlow.Local |