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/CurvatureHom.lean` at |
| 2 | f927d9e1f0810042766d3b5f64d3f4da02ee93cc. See |
| 3 | `references/ricci-flow/mapher/local-theory/port.json`. -/ |
| 4 | |
| 5 | import PoincareLib.Geometry.RicciFlow.Local.Curvature.Calculus.CurvatureTrilinear |
| 6 | import PoincareLib.Geometry.RicciFlow.Local.Curvature.Calculus.CurvatureJoint |
| 7 | import PoincareLib.Geometry.RicciFlow.Local.Energy.Coordinates.FamilyTangentTimeDerivative |
| 8 | import PoincareLib.Geometry.RicciFlow.Local.Metric.MetricInverse |
| 9 | import Mathlib.Analysis.Calculus.FDeriv.Analytic |
| 10 | import Mathlib.LinearAlgebra.Multilinear.Curry |
| 11 | |
| 12 | /-! |
| 13 | # The actual curvature as a smooth hom-bundle section |
| 14 | |
| 15 | Finite-dimensional linear maps give the continuous trilinear curvature |
| 16 | map. Testing three fixed local-frame vectors recovers its joint smoothness. |
| 17 | All evaluations retain the frozen Morgan-Tian convention, printed pp. 5-7. |
| 18 | -/ |
| 19 | |
| 20 | set_option autoImplicit false |
| 21 | set_option maxHeartbeats 1800000 |
| 22 | set_option synthInstance.maxHeartbeats 200000 |
| 23 | |
| 24 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 25 | open Bundle Manifold Set |
| 26 | |
| 27 | universe u v |
| 28 | |
| 29 | namespace PoincareMT.RicciFlow.Local |
| 30 | |
| 31 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 32 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 33 | |
| 34 | theorem exists_curvature_continuousTrilinearMap {g : RiemannianMetric n M} |
| 35 | (D : LeviCivitaData g) (x : M) : |
| 36 | ∃ R : TangentSpace (𝓡 n) x →L[ℝ] |
| 37 | TangentSpace (𝓡 n) x →L[ℝ] |
| 38 | TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x, |
| 39 | ∀ u v w, R u v w = D.curvature x u v w := by |
| 40 | have : T2Space (TangentSpace (𝓡 n) x) := |
| 41 | FiberBundle.t2Space (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) x |
| 42 | let : FiniteDimensional ℝ (TangentSpace (𝓡 n) x) := |
| 43 | VectorBundle.finiteDimensional ℝ (EuclideanSpace ℝ (Fin n)) |
| 44 | (TangentSpace (𝓡 n) : M → Type _) x |
| 45 | obtain ⟨L, hL⟩ := exists_curvature_trilinearMap D x |
| 46 | let e₁ : (TangentSpace (𝓡 n) x →ₗ[ℝ] TangentSpace (𝓡 n) x) ≃ₗ[ℝ] |
| 47 | (TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x) := |
| 48 | LinearMap.toContinuousLinearMap |
| 49 | let e₂ : (TangentSpace (𝓡 n) x →ₗ[ℝ] |
| 50 | TangentSpace (𝓡 n) x →ₗ[ℝ] TangentSpace (𝓡 n) x) ≃ₗ[ℝ] |
| 51 | (TangentSpace (𝓡 n) x →L[ℝ] |
| 52 | TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x) := |
| 53 | ((LinearEquiv.refl ℝ (TangentSpace (𝓡 n) x)).arrowCongr e₁).trans |
| 54 | LinearMap.toContinuousLinearMap |
| 55 | refine ⟨(e₂.toLinearMap.comp L).toContinuousLinearMap, ?_⟩ |
| 56 | intro u v w |
| 57 | exact hL u v w |
| 58 | |
| 59 | theorem exists_contMDiffOn_curvature_family_trilinearMap |
| 60 | {g : ℝ → RiemannianMetric n M} {J : Set ℝ} |
| 61 | (hg : RiemannianMetric.IsSmoothFamilyOn g J) |
| 62 | (D : (t : ℝ) → LeviCivitaData (g t)) : |
| 63 | letI : NormedAddCommGroup |
| 64 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) := inferInstance |
| 65 | letI : NormedSpace ℝ |
| 66 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) := inferInstance |
| 67 | letI : NormedAddCommGroup (EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 68 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) := inferInstance |
| 69 | letI : NormedSpace ℝ (EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 70 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) := inferInstance |
| 71 | ∃ R : (t : ℝ) → (x : M) → TangentSpace (𝓡 n) x →L[ℝ] |
| 72 | TangentSpace (𝓡 n) x →L[ℝ] |
| 73 | TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x, |
| 74 | (∀ t x u v w, R t x u v w = (D t).curvature x u v w) ∧ |
| 75 | ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 n)) |
| 76 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 77 | EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 78 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n))) ∞ |
| 79 | (fun p : ℝ × M => Bundle.TotalSpace.mk' |
| 80 | (EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 81 | EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 82 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) |
| 83 | (E := fun x : M => TangentSpace (𝓡 n) x →L[ℝ] |
| 84 | TangentSpace (𝓡 n) x →L[ℝ] |
| 85 | TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x) |
| 86 | p.2 (R p.1 p.2)) (J ×ˢ Set.univ) := by |
| 87 | classical |
| 88 | let : NormedAddCommGroup |
| 89 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) := inferInstance |
| 90 | let : NormedSpace ℝ |
| 91 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) := inferInstance |
| 92 | let : NormedAddCommGroup (EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 93 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) := inferInstance |
| 94 | let : NormedSpace ℝ (EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 95 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) := inferInstance |
| 96 | choose R hR using fun t x => exists_curvature_continuousTrilinearMap (D t) x |
| 97 | refine ⟨R, hR, ?_⟩ |
| 98 | intro p hp |
| 99 | let e := trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) p.2 |
| 100 | have hep : p.2 ∈ e.baseSet := FiberBundle.mem_baseSet_trivializationAt' p.2 |
| 101 | let frame (a : EuclideanSpace ℝ (Fin n)) (x : M) : TangentSpace (𝓡 n) x := |
| 102 | e.symmL ℝ x a |
| 103 | have hframe (a : EuclideanSpace ℝ (Fin n)) : ContMDiffOn (𝓡 n) |
| 104 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% (frame a)) e.baseSet := by |
| 105 | rw [e.contMDiffOn_section_baseSet_iff (IB := (𝓡 n)) (n := ∞)] |
| 106 | refine (contMDiffOn_const (c := a)).congr ?_ |
| 107 | intro x hx |
| 108 | simpa [frame, Trivialization.symmL_apply _ hx] using |
| 109 | congrArg Prod.snd (e.apply_mk_symm hx a) |
| 110 | let C (q : ℝ × M) : EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 111 | EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 112 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) := |
| 113 | ContinuousLinearMap.inCoordinates (EuclideanSpace ℝ (Fin n)) |
| 114 | (TangentSpace (𝓡 n)) |
| 115 | (EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 116 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) |
| 117 | (fun x => TangentSpace (𝓡 n) x →L[ℝ] |
| 118 | TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x) |
| 119 | p.2 q.2 p.2 q.2 (R q.1 q.2) |
| 120 | have hbase : ∀ᶠ q in 𝓝[J ×ˢ (Set.univ : Set M)] p, q.2 ∈ e.baseSet := |
| 121 | Filter.Eventually.filter_mono nhdsWithin_le_nhds |
| 122 | (continuous_snd.continuousAt.preimage_mem_nhds (e.open_baseSet.mem_nhds hep)) |
| 123 | have hsmall : J ×ˢ e.baseSet ∈ 𝓝[J ×ˢ (Set.univ : Set M)] p := by |
| 124 | filter_upwards [self_mem_nhdsWithin, hbase] with q hq hqe |
| 125 | exact ⟨hq.1, hqe⟩ |
| 126 | have hC : ContMDiffWithinAt (𝓘(ℝ, ℝ).prod (𝓡 n)) |
| 127 | 𝓘(ℝ, EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 128 | EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 129 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) ∞ |
| 130 | C (J ×ˢ Set.univ) p := by |
| 131 | apply contMDiffWithinAt_clm_apply_iff.mpr |
| 132 | intro a |
| 133 | apply contMDiffWithinAt_clm_apply_iff.mpr |
| 134 | intro b |
| 135 | apply contMDiffWithinAt_clm_apply_iff.mpr |
| 136 | intro c |
| 137 | have hs := contMDiffOn_family_curvature hg D e.open_baseSet |
| 138 | (frame a) (frame b) (frame c) (hframe a) (hframe b) (hframe c) |
| 139 | have hc := (Bundle.contMDiffWithinAt_totalSpace.mp |
| 140 | ((hs p ⟨hp.1, hep⟩).mono_of_mem_nhdsWithin hsmall)).2 |
| 141 | apply hc.congr_of_eventuallyEq_of_mem _ hp |
| 142 | filter_upwards [hbase] with q hq |
| 143 | have hqh : q.2 ∈ (trivializationAt |
| 144 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) |
| 145 | (fun x => TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x) p.2).baseSet := by |
| 146 | rw [hom_trivializationAt_baseSet] |
| 147 | exact ⟨hq, hq⟩ |
| 148 | dsimp [C] |
| 149 | rw [inCoordinates_apply_eq₂ |
| 150 | (F₁ := EuclideanSpace ℝ (Fin n)) (F₂ := EuclideanSpace ℝ (Fin n)) |
| 151 | (F₃ := EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) |
| 152 | (E₁ := TangentSpace (𝓡 n)) (E₂ := TangentSpace (𝓡 n)) |
| 153 | (E₃ := fun x => TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x) |
| 154 | hq hq hqh] |
| 155 | rw [← Trivialization.symmL_apply (R := ℝ) e hq a, |
| 156 | ← Trivialization.symmL_apply (R := ℝ) e hq b] |
| 157 | rw [Trivialization.linearMapAt_apply, if_pos hqh, hom_trivializationAt_apply] |
| 158 | change e.linearMapAt ℝ q.2 |
| 159 | (R q.1 q.2 (frame a q.2) (frame b q.2) (frame c q.2)) = _ |
| 160 | rw [hR, Trivialization.linearMapAt_apply, if_pos hq] |
| 161 | let F : ℝ × M → TotalSpace (EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 162 | EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 163 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) |
| 164 | (fun x => TangentSpace (𝓡 n) x →L[ℝ] |
| 165 | TangentSpace (𝓡 n) x →L[ℝ] |
| 166 | TangentSpace (𝓡 n) x →L[ℝ] TangentSpace (𝓡 n) x) := |
| 167 | fun q => TotalSpace.mk' (EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 168 | EuclideanSpace ℝ (Fin n) →L[ℝ] |
| 169 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)) q.2 (R q.1 q.2) |
| 170 | exact (contMDiffWithinAt_hom_bundle F (s := J ×ˢ Set.univ) (x₀ := p)).mpr |
| 171 | ⟨contMDiffWithinAt_snd, hC⟩ |
| 172 | |
| 173 | theorem hasDerivAt_ricciFlow_iteratedCurvature_moving_inputs |
| 174 | {J : Set ℝ} (F : RicciFlow n M J) |
| 175 | {t : ℝ} (ht : t ∈ interior J) {U : Set M} (hU : IsOpen U) (k : ℕ) |
| 176 | (X : Fin (k + 3) → ℝ → (y : M) → TangentSpace (𝓡 n) y) |
| 177 | (hX : ∀ j, ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 n)) |
| 178 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ |
| 179 | (fun p : ℝ × M => Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin n)) p.2 |
| 180 | (X j p.1 p.2)) (J ×ˢ U)) |
| 181 | {x : M} (hx : x ∈ U) : |
| 182 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 183 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 184 | HasDerivAt |
| 185 | (fun s => curvatureOnFields_iteratedCovariantDerivative (F.connection s) k (fun j => X j s) x) |
| 186 | (deriv (fun s => curvatureOnFields_iteratedCovariantDerivative (F.connection s) k |
| 187 | (fun j => X j t) x) t + |
| 188 | ∑ j : Fin (k + 3), curvatureOnFields_iteratedCovariantDerivative (F.connection t) k |
| 189 | (Function.update (fun i => X i t) j (fun y => deriv (fun s => X j s y) t)) x) t := by |
| 190 | classical |
| 191 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 192 | ⟨(F.metric 0).toRiemannianMetric⟩ |
| 193 | let : IsManifold (𝓡 n) (∞ + 1) M := by |
| 194 | simpa using (inferInstance : IsManifold (𝓡 n) ∞ M) |
| 195 | let : FiniteDimensional ℝ (TangentSpace (𝓡 n) x) := |
| 196 | VectorBundle.finiteDimensional ℝ (EuclideanSpace ℝ (Fin n)) |
| 197 | (TangentSpace (𝓡 n) : M → Type _) x |
| 198 | let : NormedAddCommGroup (ContinuousMultilinearMap ℝ |
| 199 | (fun _ : Fin (k + 3) => TangentSpace (𝓡 n) x) ℝ) := inferInstance |
| 200 | let : NormedSpace ℝ (ContinuousMultilinearMap ℝ |
| 201 | (fun _ : Fin (k + 3) => TangentSpace (𝓡 n) x) ℝ) := inferInstance |
| 202 | let : NormedAddCommGroup (ContinuousMultilinearMap ℝ |
| 203 | (fun _ : Fin (k + 3) => TangentSpace (𝓡 n) x) (TangentSpace (𝓡 n) x)) := inferInstance |
| 204 | let : NormedSpace ℝ (ContinuousMultilinearMap ℝ |
| 205 | (fun _ : Fin (k + 3) => TangentSpace (𝓡 n) x) (TangentSpace (𝓡 n) x)) := inferInstance |
| 206 | let K := fun s => curvatureOnFields_iteratedCovariantDerivative (F.connection s) k |
| 207 | let dotX := fun (j : Fin (k + 3)) (y : M) => deriv (fun s => X j s y) t |
| 208 | let S := fun V : (y : M) → TangentSpace (𝓡 n) y => |
| 209 | ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% V) U |
| 210 | have htJ : J ∈ 𝓝 t := mem_interior_iff_mem_nhds.mp ht |
| 211 | have hXs (j : Fin (k + 3)) (s : ℝ) (hs : s ∈ J) : S (X j s) := |
| 212 | (hX j).comp (contMDiffOn_const.prodMk contMDiffOn_id) (fun _ hy => ⟨hs, hy⟩) |
| 213 | have hdot (j : Fin (k + 3)) : |
| 214 | (∀ y ∈ U, HasDerivAt (fun s => X j s y) (dotX j y) t) ∧ S (dotX j) := |
| 215 | family_tangent_time_derivative (F.metric 0) hU (X j) (hX j) ht |
| 216 | let e := trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) x |
| 217 | have he : x ∈ e.baseSet := FiberBundle.mem_baseSet_trivializationAt' x |
| 218 | let b0 := (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 219 | let b := e.basisAt b0 he |
| 220 | let E := e.localFrame b0 |
| 221 | have hE (i : Fin n) : ContMDiffOn (𝓡 n) |
| 222 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% (E i)) e.baseSet := |
| 223 | e.contMDiffOn_localFrame_baseSet (I := 𝓡 n) ∞ b0 i |
| 224 | have hEx (i : Fin n) : E i x = b i := e.localFrame_apply_of_mem_baseSet b0 he |
| 225 | let c (a : Fin (k + 3) → Fin n) : |
| 226 | ContinuousMultilinearMap ℝ (fun _ : Fin (k + 3) => TangentSpace (𝓡 n) x) ℝ := |
| 227 | (ContinuousMultilinearMap.mkPiAlgebra ℝ (Fin (k + 3)) ℝ).compContinuousLinearMap |
| 228 | (fun j => (b.coord (a j)).toContinuousLinearMap) |
| 229 | have hc (a : Fin (k + 3) → Fin n) (v : Fin (k + 3) → TangentSpace (𝓡 n) x) : |
| 230 | c a v = ∏ j, b.repr (v j) (a j) := by |
| 231 | simp only [c, ContinuousMultilinearMap.compContinuousLinearMap_apply, |
| 232 | ContinuousMultilinearMap.mkPiAlgebra_apply, LinearMap.coe_toContinuousLinearMap', |
| 233 | Module.Basis.coord_apply] |
| 234 | let T : ℝ → ContinuousMultilinearMap ℝ |
| 235 | (fun _ : Fin (k + 3) => TangentSpace (𝓡 n) x) (TangentSpace (𝓡 n) x) := fun s => |
| 236 | ∑ a : Fin (k + 3) → Fin n, (c a).smulRight (K s (fun j => E (a j)) x) |
| 237 | have heval (s : ℝ) (V : Fin (k + 3) → (y : M) → TangentSpace (𝓡 n) y) |
| 238 | (hV : ∀ j, S (V j)) : T s (fun j => V j x) = K s V x := by |
| 239 | obtain ⟨L, hL⟩ := exists_curvatureOnFields_iteratedCovariantDerivative_multilinearMap |
| 240 | (F.connection s) k x |
| 241 | have hcoeff (a : Fin (k + 3) → Fin n) : |
| 242 | L (fun j => b (a j)) = K s (fun j => E (a j)) x := by |
| 243 | simpa only [hEx] using hL e.open_baseSet (fun j => E (a j)) (fun j => hE (a j)) he |
| 244 | calc |
| 245 | T s (fun j => V j x) = ∑ a : Fin (k + 3) → Fin n, |
| 246 | (∏ j, b.repr (V j x) (a j)) • L (fun j => b (a j)) := by |
| 247 | simp only [T, sum_apply, ContinuousMultilinearMap.smulRight_apply, hc, hcoeff] |
| 248 | _ = L (fun j => V j x) := by |
| 249 | have hh := L.map_sum (fun (j : Fin (k + 3)) (i : Fin n) => b.repr (V j x) i • b i) |
| 250 | simp only [L.map_smul_univ] at hh |
| 251 | have hrec : (fun j => ∑ i : Fin n, b.repr (V j x) i • b i) = (fun j => V j x) := |
| 252 | funext (fun j => b.sum_repr (V j x)) |
| 253 | rw [hrec] at hh |
| 254 | exact hh.symm |
| 255 | _ = K s V x := hL hU V hV hx |
| 256 | have hcoef (a : Fin (k + 3) → Fin n) : |
| 257 | HasDerivAt (fun s => K s (fun j => E (a j)) x) |
| 258 | (deriv (fun s => K s (fun j => E (a j)) x) t) t := by |
| 259 | have hfamily := contMDiffOn_family_curvatureOnFields_iteratedCovariantDerivative |
| 260 | F.smooth F.connection e.open_baseSet k (fun j _ => E (a j)) |
| 261 | (fun j => (hE (a j)).comp (I := 𝓘(ℝ, ℝ).prod (𝓡 n)) contMDiffOn_snd |
| 262 | (fun _ hp => hp.2)) |
| 263 | exact (family_tangent_time_derivative (F.metric 0) e.open_baseSet |
| 264 | (fun s => K s (fun j => E (a j))) hfamily ht).1 x he |
| 265 | let Tdot : ContinuousMultilinearMap ℝ |
| 266 | (fun _ : Fin (k + 3) => TangentSpace (𝓡 n) x) (TangentSpace (𝓡 n) x) := |
| 267 | ∑ a : Fin (k + 3) → Fin n, (c a).smulRight |
| 268 | (deriv (fun s => K s (fun j => E (a j)) x) t) |
| 269 | have hTd : HasDerivAt T Tdot t := by |
| 270 | apply HasDerivAt.fun_sum |
| 271 | intro a _ |
| 272 | exact ((ContinuousMultilinearMap.smulRightL ℝ |
| 273 | (fun _ : Fin (k + 3) => TangentSpace (𝓡 n) x) (TangentSpace (𝓡 n) x) (c a)).hasFDerivAt).comp_hasDerivAt |
| 274 | t (hcoef a) |
| 275 | have hfrozen : HasDerivAt (fun s => K s (fun j => X j t) x) |
| 276 | (Tdot (fun j => X j t x)) t := by |
| 277 | have hh := (ContinuousMultilinearMap.apply ℝ |
| 278 | (fun _ : Fin (k + 3) => TangentSpace (𝓡 n) x) (TangentSpace (𝓡 n) x) |
| 279 | (fun j => X j t x)).hasFDerivAt.comp_hasDerivAt t hTd |
| 280 | apply hh.congr_of_eventuallyEq |
| 281 | exact Filter.Eventually.of_forall (fun s => |
| 282 | (heval s (fun j => X j t) (fun j => hXs j t (interior_subset ht))).symm) |
| 283 | have hmoving : HasDerivAt (fun s => T s (fun j => X j s x)) |
| 284 | (Tdot (fun j => X j t x) + |
| 285 | ∑ j, T t (Function.update (fun i => X i t x) j (dotX j x))) t := by |
| 286 | have hh := (hTd.hasFDerivAt.continuousMultilinearMap_apply |
| 287 | (fun j => ((hdot j).1 x hx).hasFDerivAt)).hasDerivAt |
| 288 | simpa using hh |
| 289 | have hslot (j : Fin (k + 3)) : |
| 290 | T t (Function.update (fun i => X i t x) j (dotX j x)) = |
| 291 | K t (Function.update (fun i => X i t) j (dotX j)) x := by |
| 292 | have hV : ∀ i, S (Function.update (fun i => X i t) j (dotX j) i) := by |
| 293 | intro i |
| 294 | by_cases hij : i = j |
| 295 | · subst i |
| 296 | simpa only [Function.update_self] using (hdot j).2 |
| 297 | · simpa only [Function.update_of_ne hij] using hXs i t (interior_subset ht) |
| 298 | have hh := heval t (Function.update (fun i => X i t) j (dotX j)) hV |
| 299 | convert hh using 1 |
| 300 | congr 1 |
| 301 | funext i |
| 302 | by_cases hij : i = j |
| 303 | · subst i |
| 304 | simp only [Function.update_self] |
| 305 | · simp only [Function.update_of_ne hij] |
| 306 | have hcurve : (fun s => K s (fun j => X j s) x) =ᶠ[𝓝 t] |
| 307 | (fun s => T s (fun j => X j s x)) := by |
| 308 | filter_upwards [htJ] with s hs |
| 309 | exact (heval s (fun j => X j s) (fun j => hXs j s hs)).symm |
| 310 | have hh := hmoving.congr_of_eventuallyEq hcurve |
| 311 | rw [← hfrozen.deriv] at hh |
| 312 | simpa only [hslot] using hh |
| 313 | |
| 314 | set_option maxHeartbeats 2400000 in |
| 315 | /-- The full fixed-frame iterated-curvature contraction equals its orthonormal energy. -/ |
| 316 | theorem curvature_iterated_squared_norm_frame_eq_orthonormal |
| 317 | {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 318 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 319 | {g : RiemannianMetric n M} (D : LeviCivitaData g) (k : ℕ) (x0 : M) {x : M} |
| 320 | (hx : x ∈ (trivializationAt (EuclideanSpace ℝ (Fin n)) |
| 321 | (TangentSpace (𝓡 n)) x0).baseSet) : |
| 322 | let V := EuclideanSpace ℝ (Fin n) |
| 323 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 324 | let E := e.localFrame (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 325 | let G := ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 326 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) |
| 327 | x0 x x0 x (g.inner x) |
| 328 | let a := fun i j : Fin n => (G.inverse (EuclideanSpace.proj j)) i |
| 329 | let K := curvatureOnFields_iteratedCovariantDerivative D k |
| 330 | let b := g.orthonormalBasis x |
| 331 | let ext := fun i => FiberBundle.extend V (b i) |
| 332 | let kf := fun α : Fin (k + 3) → Fin n => K (fun r => E (α r)) x |
| 333 | let kb := fun γ : Fin (k + 3) → Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) => |
| 334 | K (fun r => ext (γ r)) x |
| 335 | (∑ α, ∑ β, (∏ r, a (α r) (β r)) * g.inner x (kf α) (kf β)) = |
| 336 | ∑ γ, g.inner x (kb γ) (kb γ) := by |
| 337 | classical |
| 338 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 339 | ⟨g.toRiemannianMetric⟩ |
| 340 | let V := EuclideanSpace ℝ (Fin n) |
| 341 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 342 | let cb := (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 343 | let E := e.localFrame cb |
| 344 | let theta := e.localFrameCoeff (𝓡 n) cb |
| 345 | let G := ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 346 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) |
| 347 | x0 x x0 x (g.inner x) |
| 348 | let a := fun i j : Fin n => (G.inverse (EuclideanSpace.proj j)) i |
| 349 | let K := curvatureOnFields_iteratedCovariantDerivative D k |
| 350 | let b := g.orthonormalBasis x |
| 351 | let ι := Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) |
| 352 | let ext := fun i : ι => FiberBundle.extend V (b i) |
| 353 | let kf := fun α : Fin (k + 3) → Fin n => K (fun r => E (α r)) x |
| 354 | let kb := fun γ : Fin (k + 3) → ι => K (fun r => ext (γ r)) x |
| 355 | change (∑ α, ∑ β, (∏ r, a (α r) (β r)) * g.inner x (kf α) (kf β)) = |
| 356 | ∑ γ, g.inner x (kb γ) (kb γ) |
| 357 | obtain ⟨T, hT⟩ := exists_curvatureOnFields_iteratedCovariantDerivative_multilinearMap D k x |
| 358 | have hE (i : Fin n) : ContMDiffOn (𝓡 n) |
| 359 | ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (E i)) e.baseSet := |
| 360 | e.contMDiffOn_localFrame_baseSet (I := 𝓡 n) ∞ cb i |
| 361 | have hET (α : Fin (k + 3) → Fin n) : T (fun r => E (α r) x) = kf α := |
| 362 | hT e.open_baseSet (fun r => E (α r)) (fun r => hE (α r)) hx |
| 363 | let e0 := trivializationAt V (TangentSpace (𝓡 n)) x |
| 364 | have hx0 : x ∈ e0.baseSet := FiberBundle.mem_baseSet_trivializationAt' x |
| 365 | have hExt (i : ι) : ContMDiffOn (𝓡 n) |
| 366 | ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (ext i)) e0.baseSet := by |
| 367 | have hc : ContMDiffOn (𝓡 n) 𝓘(ℝ, V) ∞ |
| 368 | (fun _y : M => (e0 ⟨x, b i⟩).2) e0.baseSet := contMDiffOn_const |
| 369 | have hec : ContMDiffOn (𝓡 n) 𝓘(ℝ, V) ∞ |
| 370 | (fun y => (e0 ⟨y, ext i y⟩).2) e0.baseSet := by |
| 371 | apply hc.congr |
| 372 | intro y hy |
| 373 | change (e0 ⟨y, e0.symm y (e0 ⟨x, b i⟩).2⟩).2 = (e0 ⟨x, b i⟩).2 |
| 374 | simpa only using congrArg Prod.snd (e0.apply_mk_symm hy (e0 ⟨x, b i⟩).2) |
| 375 | intro y hy |
| 376 | rw [e0.contMDiffWithinAt_section _ hy] |
| 377 | exact hec y hy |
| 378 | have hBT (γ : Fin (k + 3) → ι) : T (fun r => b (γ r)) = kb γ := by |
| 379 | simpa only [ext, FiberBundle.extend_apply_self] using |
| 380 | hT e0.open_baseSet (fun r => ext (γ r)) (fun r => hExt (γ r)) hx0 |
| 381 | have hrec (z : TangentSpace (𝓡 n) x) : |
| 382 | z = ∑ i : Fin n, theta i x z • E i x := by |
| 383 | simpa only [FiberBundle.extend_apply_self] using |
| 384 | e.eq_sum_localFrameCoeff_smul (I := 𝓡 n) (b := cb) |
| 385 | (s := FiberBundle.extend V z) hx |
| 386 | have hExpand (γ : Fin (k + 3) → ι) : kb γ = |
| 387 | ∑ α : Fin (k + 3) → Fin n, (∏ r, theta (α r) x (b (γ r))) • kf α := by |
| 388 | calc |
| 389 | _ = T (fun r => b (γ r)) := (hBT γ).symm |
| 390 | _ = T (fun r => ∑ i : Fin n, theta i x (b (γ r)) • E i x) := |
| 391 | congrArg T (funext fun r => hrec (b (γ r))) |
| 392 | _ = ∑ α : Fin (k + 3) → Fin n, |
| 393 | T (fun r => theta (α r) x (b (γ r)) • E (α r) x) := |
| 394 | T.map_sum (fun r i => theta i x (b (γ r)) • E i x) |
| 395 | _ = _ := by simp only [MultilinearMap.map_smul_univ, hET] |
| 396 | have htrace (i j : Fin n) : a i j = |
| 397 | ∑ r, theta i x (b r) * theta j x (b r) := |
| 398 | metric_inverse_eq_sum_orthonormal_coordinates g x0 x hx i j |
| 399 | calc |
| 400 | _ = ∑ γ : Fin (k + 3) → ι, |
| 401 | g.inner x (∑ α, (∏ r, theta (α r) x (b (γ r))) • kf α) |
| 402 | (∑ β, (∏ r, theta (β r) x (b (γ r))) • kf β) := |
| 403 | curvature_all_rank_gram_contraction (g.inner x) a (fun p i => theta i x (b p)) |
| 404 | htrace kf kf |
| 405 | _ = _ := by simp only [← hExpand] |
| 406 | |
| 407 | set_option maxHeartbeats 2400000 in |
| 408 | /-- The actual iterated curvature energy bounds every native smooth-field evaluation. -/ |
| 409 | theorem curvature_iterated_tangentNorm_le_orthonormal_energy |
| 410 | {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 411 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 412 | {g : RiemannianMetric n M} (D : LeviCivitaData g) (k : ℕ) |
| 413 | {U : Set M} (hU : IsOpen U) |
| 414 | (X : Fin (k + 3) → (y : M) → TangentSpace (𝓡 n) y) |
| 415 | (hX : ∀ r, ContMDiffOn (𝓡 n) |
| 416 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% (X r)) U) |
| 417 | {x : M} (hx : x ∈ U) : |
| 418 | let K := curvatureOnFields_iteratedCovariantDerivative D k |
| 419 | let b := g.orthonormalBasis x |
| 420 | let ext := fun i => FiberBundle.extend (EuclideanSpace ℝ (Fin n)) (b i) |
| 421 | let kb := fun γ : Fin (k + 3) → Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) => |
| 422 | K (fun r => ext (γ r)) x |
| 423 | g.tangentNorm x (K X x) ≤ Real.sqrt (∑ γ, g.inner x (kb γ) (kb γ)) * |
| 424 | ∏ r, g.tangentNorm x (X r x) := by |
| 425 | classical |
| 426 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 427 | ⟨g.toRiemannianMetric⟩ |
| 428 | let V := EuclideanSpace ℝ (Fin n) |
| 429 | let K := curvatureOnFields_iteratedCovariantDerivative D k |
| 430 | let b := g.orthonormalBasis x |
| 431 | let ι := Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) |
| 432 | let ext := fun i : ι => FiberBundle.extend V (b i) |
| 433 | let kb := fun γ : Fin (k + 3) → ι => K (fun r => ext (γ r)) x |
| 434 | let q := ∑ γ : Fin (k + 3) → ι, g.inner x (kb γ) (kb γ) |
| 435 | have hpair (z : TangentSpace (𝓡 n) x) : g.inner x z z = ‖z‖ ^ 2 := |
| 436 | real_inner_self_eq_norm_sq z |
| 437 | have hnorm (z : TangentSpace (𝓡 n) x) : g.tangentNorm x z = ‖z‖ := by |
| 438 | rw [RiemannianMetric.tangentNorm, hpair, Real.sqrt_sq (norm_nonneg _)] |
| 439 | change g.tangentNorm x (K X x) ≤ Real.sqrt q * ∏ r, g.tangentNorm x (X r x) |
| 440 | simp only [hnorm] |
| 441 | obtain ⟨T, hT⟩ := exists_curvatureOnFields_iteratedCovariantDerivative_multilinearMap D k x |
| 442 | let v : Fin (k + 3) → TangentSpace (𝓡 n) x := fun r => X r x |
| 443 | have hTv : T v = K X x := hT hU X hX hx |
| 444 | let e := trivializationAt V (TangentSpace (𝓡 n)) x |
| 445 | have hxe : x ∈ e.baseSet := FiberBundle.mem_baseSet_trivializationAt' x |
| 446 | have hExt (i : ι) : ContMDiffOn (𝓡 n) |
| 447 | ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (ext i)) e.baseSet := by |
| 448 | have hc : ContMDiffOn (𝓡 n) 𝓘(ℝ, V) ∞ |
| 449 | (fun _y : M => (e ⟨x, b i⟩).2) e.baseSet := contMDiffOn_const |
| 450 | have hec : ContMDiffOn (𝓡 n) 𝓘(ℝ, V) ∞ |
| 451 | (fun y => (e ⟨y, ext i y⟩).2) e.baseSet := by |
| 452 | apply hc.congr |
| 453 | intro y hy |
| 454 | change (e ⟨y, e.symm y (e ⟨x, b i⟩).2⟩).2 = (e ⟨x, b i⟩).2 |
| 455 | simpa only using congrArg Prod.snd (e.apply_mk_symm hy (e ⟨x, b i⟩).2) |
| 456 | intro y hy |
| 457 | rw [e.contMDiffWithinAt_section _ hy] |
| 458 | exact hec y hy |
| 459 | let tb := fun γ : Fin (k + 3) → ι => T (fun r => b (γ r)) |
| 460 | have htb (γ : Fin (k + 3) → ι) : tb γ = kb γ := by |
| 461 | simpa only [ext, FiberBundle.extend_apply_self] using |
| 462 | hT e.open_baseSet (fun r => ext (γ r)) (fun r => hExt (γ r)) hxe |
| 463 | let c := fun γ : Fin (k + 3) → ι => ∏ r, b.repr (v r) (γ r) |
| 464 | have hExpand : T v = ∑ γ : Fin (k + 3) → ι, c γ • tb γ := by |
| 465 | calc |
| 466 | _ = T (fun r => ∑ i : ι, b.repr (v r) i • b i) := |
| 467 | congrArg T (funext fun r => (b.sum_repr (v r)).symm) |
| 468 | _ = ∑ γ : Fin (k + 3) → ι, T (fun r => b.repr (v r) (γ r) • b (γ r)) := |
| 469 | T.map_sum (fun r i => b.repr (v r) i • b i) |
| 470 | _ = _ := by simp only [MultilinearMap.map_smul_univ, c, tb] |
| 471 | let H := ∏ r : Fin (k + 3), ‖v r‖ |
| 472 | have hrepr (z : TangentSpace (𝓡 n) x) : |
| 473 | ∑ i : ι, b.repr z i ^ 2 = ‖z‖ ^ 2 := by |
| 474 | simpa only [OrthonormalBasis.repr_apply_apply] using b.sum_sq_inner_right z |
| 475 | have hweight : (∑ γ : Fin (k + 3) → ι, |c γ| ^ 2) = H ^ 2 := by |
| 476 | calc |
| 477 | _ = ∑ γ : Fin (k + 3) → ι, ∏ r, b.repr (v r) (γ r) ^ 2 := by |
| 478 | simp only [c, sq_abs, Finset.prod_pow] |
| 479 | _ = ∏ r : Fin (k + 3), ∑ i : ι, b.repr (v r) i ^ 2 := |
| 480 | (Fintype.prod_sum (fun r i => b.repr (v r) i ^ 2)).symm |
| 481 | _ = ∏ r : Fin (k + 3), ‖v r‖ ^ 2 := by simp only [hrepr] |
| 482 | _ = H ^ 2 := by dsimp only [H]; rw [Finset.prod_pow] |
| 483 | have hq : q = ∑ γ : Fin (k + 3) → ι, ‖tb γ‖ ^ 2 := by |
| 484 | simp only [q, htb, hpair] |
| 485 | have hq0 : 0 ≤ q := by rw [hq]; positivity |
| 486 | let S := ∑ γ : Fin (k + 3) → ι, |c γ| * ‖tb γ‖ |
| 487 | have hcs := Finset.sum_mul_sq_le_sq_mul_sq (Finset.univ : Finset (Fin (k + 3) → ι)) |
| 488 | (fun γ => |c γ|) (fun γ => ‖tb γ‖) |
| 489 | change S ^ 2 ≤ _ at hcs |
| 490 | rw [hweight, ← hq] at hcs |
| 491 | have hbound : S ≤ Real.sqrt q * H := by |
| 492 | have hS0 : 0 ≤ S := by dsimp only [S]; positivity |
| 493 | have hright : 0 ≤ Real.sqrt q * H := by dsimp only [H]; positivity |
| 494 | have hsquare : S ^ 2 ≤ (Real.sqrt q * H) ^ 2 := by |
| 495 | calc |
| 496 | _ ≤ H ^ 2 * q := hcs |
| 497 | _ = _ := by rw [mul_pow (Real.sqrt q) H 2, Real.sq_sqrt hq0]; ring |
| 498 | exact (sq_le_sq₀ hS0 hright).mp hsquare |
| 499 | calc |
| 500 | ‖K X x‖ = ‖T v‖ := congrArg norm hTv.symm |
| 501 | _ = ‖∑ γ : Fin (k + 3) → ι, c γ • tb γ‖ := congrArg norm hExpand |
| 502 | _ ≤ ∑ γ : Fin (k + 3) → ι, ‖c γ • tb γ‖ := norm_sum_le _ _ |
| 503 | _ = S := by simp only [S, norm_smul, Real.norm_eq_abs] |
| 504 | _ ≤ Real.sqrt q * H := hbound |
| 505 | |
| 506 | /-- Pair an actual iterated curvature evaluation against any tangent vector. -/ |
| 507 | theorem abs_curvature_iterated_pairing_le_orthonormal_energy |
| 508 | {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 509 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 510 | {g : RiemannianMetric n M} (D : LeviCivitaData g) (k : ℕ) |
| 511 | {U : Set M} (hU : IsOpen U) |
| 512 | (X : Fin (k + 3) → (y : M) → TangentSpace (𝓡 n) y) |
| 513 | (hX : ∀ r, ContMDiffOn (𝓡 n) |
| 514 | ((𝓡 n).prod 𝓘(ℝ, EuclideanSpace ℝ (Fin n))) ∞ (T% (X r)) U) |
| 515 | {x : M} (hx : x ∈ U) (w : TangentSpace (𝓡 n) x) : |
| 516 | let K := curvatureOnFields_iteratedCovariantDerivative D k |
| 517 | let b := g.orthonormalBasis x |
| 518 | let ext := fun i => FiberBundle.extend (EuclideanSpace ℝ (Fin n)) (b i) |
| 519 | let kb := fun γ : Fin (k + 3) → Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) => |
| 520 | K (fun r => ext (γ r)) x |
| 521 | |g.inner x (K X x) w| ≤ Real.sqrt (∑ γ, g.inner x (kb γ) (kb γ)) * |
| 522 | (∏ r, g.tangentNorm x (X r x)) * g.tangentNorm x w := by |
| 523 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 524 | ⟨g.toRiemannianMetric⟩ |
| 525 | have hnorm (z : TangentSpace (𝓡 n) x) : g.tangentNorm x z = ‖z‖ := by |
| 526 | rw [RiemannianMetric.tangentNorm, show g.inner x z z = ‖z‖ ^ 2 from |
| 527 | real_inner_self_eq_norm_sq z, Real.sqrt_sq (norm_nonneg _)] |
| 528 | have hpair (z : TangentSpace (𝓡 n) x) : |
| 529 | |g.inner x z w| ≤ g.tangentNorm x z * g.tangentNorm x w := by |
| 530 | rw [hnorm, hnorm] |
| 531 | exact abs_real_inner_le_norm z w |
| 532 | have hvec := curvature_iterated_tangentNorm_le_orthonormal_energy D k hU X hX hx |
| 533 | dsimp only at hvec ⊢ |
| 534 | exact (hpair _).trans (mul_le_mul_of_nonneg_right hvec (Real.sqrt_nonneg _)) |
| 535 | |
| 536 | /-- Transfer two inverse-frame traces to the metric's orthonormal basis. -/ |
| 537 | theorem multilinear_two_trace_frame_eq_orthonormal |
| 538 | {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 539 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 540 | (g : RiemannianMetric n M) (x0 x : M) |
| 541 | (hx : x ∈ (trivializationAt (EuclideanSpace ℝ (Fin n)) |
| 542 | (TangentSpace (𝓡 n)) x0).baseSet) |
| 543 | (T : MultilinearMap ℝ (fun _ : Fin 4 => TangentSpace (𝓡 n) x) ℝ) : |
| 544 | let V := EuclideanSpace ℝ (Fin n) |
| 545 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 546 | let E := e.localFrame (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 547 | let G := ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 548 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) x0 x x0 x (g.inner x) |
| 549 | let a := fun i j : Fin n => (G.inverse (EuclideanSpace.proj j)) i |
| 550 | let b := g.orthonormalBasis x |
| 551 | (∑ γ : Fin 4 → Fin n, |
| 552 | a (γ 0) (γ 1) * a (γ 2) (γ 3) * T (fun r => E (γ r) x)) = |
| 553 | ∑ p, ∑ q, T ![b p, b p, b q, b q] := by |
| 554 | classical |
| 555 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 556 | ⟨g.toRiemannianMetric⟩ |
| 557 | let V := EuclideanSpace ℝ (Fin n) |
| 558 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 559 | let cb := (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 560 | let E := e.localFrame cb |
| 561 | let theta := e.localFrameCoeff (𝓡 n) cb |
| 562 | let G := ContinuousLinearMap.inCoordinates V (TangentSpace (𝓡 n)) |
| 563 | (V →L[ℝ] ℝ) (fun y => TangentSpace (𝓡 n) y →L[ℝ] ℝ) x0 x x0 x (g.inner x) |
| 564 | let a := fun i j : Fin n => (G.inverse (EuclideanSpace.proj j)) i |
| 565 | let ι := Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) |
| 566 | let b := g.orthonormalBasis x |
| 567 | let c := fun (p : ι) (i : Fin n) => theta i x (b p) |
| 568 | let f := fun γ : Fin 4 → Fin n => T (fun r => E (γ r) x) |
| 569 | change (∑ γ : Fin 4 → Fin n, a (γ 0) (γ 1) * a (γ 2) (γ 3) * f γ) = |
| 570 | ∑ p : ι, ∑ q : ι, T ![b p, b p, b q, b q] |
| 571 | have hrec (z : TangentSpace (𝓡 n) x) : |
| 572 | z = ∑ i : Fin n, theta i x z • E i x := by |
| 573 | simpa only [FiberBundle.extend_apply_self] using |
| 574 | e.eq_sum_localFrameCoeff_smul (I := 𝓡 n) (b := cb) |
| 575 | (s := FiberBundle.extend V z) hx |
| 576 | have htrace (i j : Fin n) : a i j = ∑ p : ι, c p i * c p j := |
| 577 | metric_inverse_eq_sum_orthonormal_coordinates g x0 x hx i j |
| 578 | have hexpand (p q : ι) : T ![b p, b p, b q, b q] = |
| 579 | ∑ γ : Fin 4 → Fin n, |
| 580 | (c p (γ 0) * c p (γ 1) * c q (γ 2) * c q (γ 3)) * f γ := by |
| 581 | let Z : Fin 4 → TangentSpace (𝓡 n) x := ![b p, b p, b q, b q] |
| 582 | change T Z = _ |
| 583 | calc |
| 584 | T Z = T (fun r => ∑ i : Fin n, theta i x (Z r) • E i x) := |
| 585 | congrArg T (funext fun r => hrec (Z r)) |
| 586 | _ = ∑ γ : Fin 4 → Fin n, |
| 587 | T (fun r => theta (γ r) x (Z r) • E (γ r) x) := |
| 588 | T.map_sum (fun (r : Fin 4) (i : Fin n) => theta i x (Z r) • E i x) |
| 589 | _ = _ := by |
| 590 | apply Finset.sum_congr rfl |
| 591 | intro γ _ |
| 592 | rw [MultilinearMap.map_smul_univ, Fin.prod_univ_four] |
| 593 | rfl |
| 594 | symm |
| 595 | calc |
| 596 | _ = ∑ p : ι, ∑ q : ι, ∑ γ : Fin 4 → Fin n, |
| 597 | (c p (γ 0) * c p (γ 1) * c q (γ 2) * c q (γ 3)) * f γ := by |
| 598 | simp_rw [hexpand] |
| 599 | _ = ∑ p : ι, ∑ γ : Fin 4 → Fin n, ∑ q : ι, |
| 600 | (c p (γ 0) * c p (γ 1) * c q (γ 2) * c q (γ 3)) * f γ := by |
| 601 | apply Finset.sum_congr rfl |
| 602 | intro p _ |
| 603 | exact Finset.sum_comm |
| 604 | _ = ∑ γ : Fin 4 → Fin n, ∑ p : ι, ∑ q : ι, |
| 605 | (c p (γ 0) * c p (γ 1) * c q (γ 2) * c q (γ 3)) * f γ := |
| 606 | Finset.sum_comm |
| 607 | _ = _ := by |
| 608 | apply Finset.sum_congr rfl |
| 609 | intro γ _ |
| 610 | rw [htrace, htrace] |
| 611 | simp only [Finset.sum_mul, Finset.mul_sum] |
| 612 | conv_rhs => rw [Finset.sum_comm] |
| 613 | apply Finset.sum_congr rfl |
| 614 | intro p _ |
| 615 | apply Finset.sum_congr rfl |
| 616 | intro q _ |
| 617 | ring |
| 618 | |
| 619 | set_option maxHeartbeats 5000000 in |
| 620 | set_option synthInstance.maxHeartbeats 200000 in |
| 621 | /-- Bound one actual two-factor contraction by the two intrinsic curvature energies. -/ |
| 622 | theorem abs_curvature_two_factor_contraction_le_orthonormal_energy |
| 623 | {g : RiemannianMetric n M} (D : LeviCivitaData g) (p q : ℕ) |
| 624 | {σ : Type v} [Fintype σ] |
| 625 | (slots : (Fin (p + 4) ⊕ Fin (q + 4)) ≃ (σ ⊕ Fin 4)) (x0 : M) : |
| 626 | let V := EuclideanSpace ℝ (Fin n) |
| 627 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 628 | let E := e.localFrame (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 629 | let G := fun y : M => ContinuousLinearMap.inCoordinates V |
| 630 | (TangentSpace (𝓡 n)) (V →L[ℝ] ℝ) |
| 631 | (fun z => TangentSpace (𝓡 n) z →L[ℝ] ℝ) x0 y x0 y (g.inner y) |
| 632 | let a := fun (y : M) (i j : Fin n) => (G y).inverse (EuclideanSpace.proj j) i |
| 633 | let K := curvatureOnFields_iteratedCovariantDerivative D |
| 634 | let low := fun r (Z : Fin (r + 4) → (y : M) → TangentSpace (𝓡 n) y) y => |
| 635 | g.inner y (K r (Fin.init Z) y) (Z (Fin.last (r + 3)) y) |
| 636 | let fill := fun (X : σ → (y : M) → TangentSpace (𝓡 n) y) |
| 637 | (γ : Fin 4 → Fin n) s => Sum.elim X (fun j => E (γ j)) (slots s) |
| 638 | let Q := fun (X : σ → (y : M) → TangentSpace (𝓡 n) y) y => |
| 639 | ∑ γ : Fin 4 → Fin n, (a y (γ 0) (γ 1) * a y (γ 2) (γ 3)) * |
| 640 | (low p (fun j => fill X γ (Sum.inl j)) y * |
| 641 | low q (fun j => fill X γ (Sum.inr j)) y) |
| 642 | ∀ (X : σ → (y : M) → TangentSpace (𝓡 n) y), |
| 643 | (∀ s, ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (X s)) e.baseSet) → |
| 644 | ∀ {x : M}, x ∈ e.baseSet → |
| 645 | (∀ s, g.tangentNorm x (X s x) ≤ 1) → |
| 646 | let b := g.orthonormalBasis x |
| 647 | let ext := fun i => FiberBundle.extend V (b i) |
| 648 | let ell := fun r => |
| 649 | Real.sqrt (∑ γ : Fin (r + 3) → Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)), |
| 650 | g.inner x (K r (fun j => ext (γ j)) x) (K r (fun j => ext (γ j)) x)) |
| 651 | |Q X x| ≤ (n : ℝ) ^ 2 * ell p * ell q := by |
| 652 | classical |
| 653 | dsimp only |
| 654 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 655 | ⟨g.toRiemannianMetric⟩ |
| 656 | let V := EuclideanSpace ℝ (Fin n) |
| 657 | let e := trivializationAt V (TangentSpace (𝓡 n)) x0 |
| 658 | let cb := (EuclideanSpace.basisFun (Fin n) ℝ).toBasis |
| 659 | let E := e.localFrame cb |
| 660 | let G := fun y : M => ContinuousLinearMap.inCoordinates V |
| 661 | (TangentSpace (𝓡 n)) (V →L[ℝ] ℝ) |
| 662 | (fun z => TangentSpace (𝓡 n) z →L[ℝ] ℝ) x0 y x0 y (g.inner y) |
| 663 | let a := fun (y : M) (i j : Fin n) => (G y).inverse (EuclideanSpace.proj j) i |
| 664 | let K := curvatureOnFields_iteratedCovariantDerivative D |
| 665 | let low := fun r (Z : Fin (r + 4) → (y : M) → TangentSpace (𝓡 n) y) y => |
| 666 | g.inner y (K r (Fin.init Z) y) (Z (Fin.last (r + 3)) y) |
| 667 | let fill := fun (X : σ → (y : M) → TangentSpace (𝓡 n) y) |
| 668 | (γ : Fin 4 → Fin n) s => Sum.elim X (fun j => E (γ j)) (slots s) |
| 669 | let Q := fun (X : σ → (y : M) → TangentSpace (𝓡 n) y) y => |
| 670 | ∑ γ : Fin 4 → Fin n, (a y (γ 0) (γ 1) * a y (γ 2) (γ 3)) * |
| 671 | (low p (fun j => fill X γ (Sum.inl j)) y * |
| 672 | low q (fun j => fill X γ (Sum.inr j)) y) |
| 673 | intro X hX x hx hunit |
| 674 | let ι := Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) |
| 675 | let b := g.orthonormalBasis x |
| 676 | let ext := fun i : ι => FiberBundle.extend V (b i) |
| 677 | let ell := fun r => |
| 678 | Real.sqrt (∑ γ : Fin (r + 3) → ι, |
| 679 | g.inner x (K r (fun j => ext (γ j)) x) (K r (fun j => ext (γ j)) x)) |
| 680 | change |Q X x| ≤ (n : ℝ) ^ 2 * ell p * ell q |
| 681 | let T := fun r => Classical.choose |
| 682 | (exists_curvatureOnFields_iteratedCovariantDerivative_multilinearMap D r x) |
| 683 | have hT (r : ℕ) {U : Set M} (hU : IsOpen U) |
| 684 | (Z : Fin (r + 3) → (y : M) → TangentSpace (𝓡 n) y) |
| 685 | (hZ : ∀ j, ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (Z j)) U) |
| 686 | (hxU : x ∈ U) : T r (fun j => Z j x) = K r Z x := |
| 687 | Classical.choose_spec |
| 688 | (exists_curvatureOnFields_iteratedCovariantDerivative_multilinearMap D r x) hU Z hZ hxU |
| 689 | let L : (r : ℕ) → MultilinearMap ℝ |
| 690 | (fun _ : Fin (r + 4) => TangentSpace (𝓡 n) x) ℝ := fun r => MultilinearMap.mk' |
| 691 | (fun z : Fin (r + 4) → TangentSpace (𝓡 n) x => |
| 692 | g.inner x (T r (Fin.init z)) (z (Fin.last (r + 3)))) |
| 693 | (by |
| 694 | intro z j u v |
| 695 | refine Fin.lastCases ?_ (fun i => ?_) j |
| 696 | · simp only [Fin.init_update_last, Function.update_self, map_add] |
| 697 | · simp only [Fin.init_update_castSucc, |
| 698 | Function.update_of_ne (Fin.castSucc_ne_last i).symm, |
| 699 | (T r).map_update_add, map_add, add_apply]) |
| 700 | (by |
| 701 | intro z j c u |
| 702 | refine Fin.lastCases ?_ (fun i => ?_) j |
| 703 | · simp only [Fin.init_update_last, Function.update_self, map_smul] |
| 704 | · simp only [Fin.init_update_castSucc, |
| 705 | Function.update_of_ne (Fin.castSucc_ne_last i).symm, |
| 706 | (T r).map_update_smul, map_smul, smul_apply]) |
| 707 | have hL (r : ℕ) {U : Set M} (hU : IsOpen U) |
| 708 | (Z : Fin (r + 4) → (y : M) → TangentSpace (𝓡 n) y) |
| 709 | (hZ : ∀ j, ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (Z j)) U) |
| 710 | (hxU : x ∈ U) : L r (fun j => Z j x) = low r Z x := by |
| 711 | change g.inner x (T r (fun j => Fin.init Z j x)) (Z (Fin.last (r + 3)) x) = _ |
| 712 | rw [hT r hU (Fin.init Z) (fun j => hZ j.castSucc) hxU] |
| 713 | let A : MultilinearMap ℝ |
| 714 | (fun _ : Fin (p + 4) ⊕ Fin (q + 4) => TangentSpace (𝓡 n) x) ℝ := |
| 715 | ((L p).smulRight (L q)).uncurrySum |
| 716 | let W : MultilinearMap ℝ (fun _ : Fin 4 => TangentSpace (𝓡 n) x) ℝ := |
| 717 | (A.domDomCongr slots).currySum (fun s => X s x) |
| 718 | have hW (z : Fin 4 → TangentSpace (𝓡 n) x) : |
| 719 | W z = |
| 720 | L p (fun j => Sum.elim (fun s => X s x) z (slots (Sum.inl j))) * |
| 721 | L q (fun j => Sum.elim (fun s => X s x) z (slots (Sum.inr j))) := rfl |
| 722 | have hWfields {U : Set M} (hU : IsOpen U) |
| 723 | (Y : Fin 4 → (y : M) → TangentSpace (𝓡 n) y) |
| 724 | (hXU : ∀ s, ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (X s)) U) |
| 725 | (hY : ∀ j, ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (Y j)) U) |
| 726 | (hxU : x ∈ U) : |
| 727 | W (fun j => Y j x) = |
| 728 | low p (fun j => Sum.elim X Y (slots (Sum.inl j))) x * |
| 729 | low q (fun j => Sum.elim X Y (slots (Sum.inr j))) x := by |
| 730 | have hval (s : σ ⊕ Fin 4) : |
| 731 | Sum.elim (fun s => X s x) (fun j => Y j x) s = Sum.elim X Y s x := by |
| 732 | cases s <;> rfl |
| 733 | have hXY (s : σ ⊕ Fin 4) : |
| 734 | ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (Sum.elim X Y s)) U := by |
| 735 | cases s with |
| 736 | | inl s => exact hXU s |
| 737 | | inr j => exact hY j |
| 738 | rw [hW] |
| 739 | simp only [hval] |
| 740 | rw [hL p hU _ (fun j => hXY _) hxU, hL q hU _ (fun j => hXY _) hxU] |
| 741 | have hE (i : Fin n) : |
| 742 | ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (E i)) e.baseSet := |
| 743 | e.contMDiffOn_localFrame_baseSet (I := 𝓡 n) ∞ cb i |
| 744 | have hQ : Q X x = ∑ γ : Fin 4 → Fin n, |
| 745 | (a x (γ 0) (γ 1) * a x (γ 2) (γ 3)) * W (fun r => E (γ r) x) := by |
| 746 | apply Finset.sum_congr rfl |
| 747 | intro γ _ |
| 748 | rw [hWfields e.open_baseSet (fun r => E (γ r)) hX (fun r => hE _) hx] |
| 749 | have htrace := multilinear_two_trace_frame_eq_orthonormal g x0 x hx W |
| 750 | change (∑ γ : Fin 4 → Fin n, |
| 751 | (a x (γ 0) (γ 1) * a x (γ 2) (γ 3)) * W (fun r => E (γ r) x)) = |
| 752 | ∑ i : ι, ∑ j : ι, W ![b i, b i, b j, b j] at htrace |
| 753 | have hnonneg (z : TangentSpace (𝓡 n) x) : 0 ≤ g.tangentNorm x z := |
| 754 | Real.sqrt_nonneg _ |
| 755 | have hnorm (z : TangentSpace (𝓡 n) x) : g.tangentNorm x z = ‖z‖ := by |
| 756 | rw [RiemannianMetric.tangentNorm, |
| 757 | show g.inner x z z = ‖z‖ ^ 2 from real_inner_self_eq_norm_sq z, |
| 758 | Real.sqrt_sq (norm_nonneg _)] |
| 759 | have hlowUnit (r : ℕ) {U : Set M} (hU : IsOpen U) |
| 760 | (Z : Fin (r + 4) → (y : M) → TangentSpace (𝓡 n) y) |
| 761 | (hZ : ∀ j, ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (Z j)) U) |
| 762 | (hxU : x ∈ U) (hZunit : ∀ j, g.tangentNorm x (Z j x) ≤ 1) : |
| 763 | |low r Z x| ≤ ell r := by |
| 764 | have hh := abs_curvature_iterated_pairing_le_orthonormal_energy D r hU |
| 765 | (Fin.init Z) (fun j => hZ j.castSucc) hxU (Z (Fin.last (r + 3)) x) |
| 766 | change |low r Z x| ≤ ell r * (∏ j : Fin (r + 3), |
| 767 | g.tangentNorm x (Z j.castSucc x)) * g.tangentNorm x (Z (Fin.last (r + 3)) x) at hh |
| 768 | have hp : (∏ j : Fin (r + 3), g.tangentNorm x (Z j.castSucc x)) ≤ 1 := |
| 769 | Finset.prod_le_one (fun j _ => hnonneg _) (fun j _ => hZunit j.castSucc) |
| 770 | have hall : (∏ j : Fin (r + 3), g.tangentNorm x (Z j.castSucc x)) * |
| 771 | g.tangentNorm x (Z (Fin.last (r + 3)) x) ≤ 1 := by |
| 772 | simpa only [one_mul] using |
| 773 | mul_le_mul hp (hZunit (Fin.last (r + 3))) (hnonneg _) (zero_le_one : (0 : ℝ) ≤ 1) |
| 774 | calc |
| 775 | _ ≤ ell r * (∏ j : Fin (r + 3), g.tangentNorm x (Z j.castSucc x)) * |
| 776 | g.tangentNorm x (Z (Fin.last (r + 3)) x) := hh |
| 777 | _ = ell r * ((∏ j : Fin (r + 3), g.tangentNorm x (Z j.castSucc x)) * |
| 778 | g.tangentNorm x (Z (Fin.last (r + 3)) x)) := mul_assoc _ _ _ |
| 779 | _ ≤ ell r * 1 := mul_le_mul_of_nonneg_left hall (Real.sqrt_nonneg _) |
| 780 | _ = ell r := mul_one _ |
| 781 | let ex := trivializationAt V (TangentSpace (𝓡 n)) x |
| 782 | have hxx : x ∈ ex.baseSet := FiberBundle.mem_baseSet_trivializationAt' x |
| 783 | have hExt (i : ι) : |
| 784 | ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (ext i)) ex.baseSet := by |
| 785 | have hc : ContMDiffOn (𝓡 n) 𝓘(ℝ, V) ∞ |
| 786 | (fun _y : M => (ex ⟨x, b i⟩).2) ex.baseSet := contMDiffOn_const |
| 787 | have hec : ContMDiffOn (𝓡 n) 𝓘(ℝ, V) ∞ |
| 788 | (fun y => (ex ⟨y, ext i y⟩).2) ex.baseSet := by |
| 789 | apply hc.congr |
| 790 | intro y hy |
| 791 | change (ex ⟨y, ex.symm y (ex ⟨x, b i⟩).2⟩).2 = (ex ⟨x, b i⟩).2 |
| 792 | simpa only using congrArg Prod.snd (ex.apply_mk_symm hy (ex ⟨x, b i⟩).2) |
| 793 | intro y hy |
| 794 | rw [ex.contMDiffWithinAt_section _ hy] |
| 795 | exact hec y hy |
| 796 | let U := e.baseSet ∩ ex.baseSet |
| 797 | have hU : IsOpen U := e.open_baseSet.inter ex.open_baseSet |
| 798 | have hxU : x ∈ U := ⟨hx, hxx⟩ |
| 799 | have hterm (i j : ι) : |W ![b i, b i, b j, b j]| ≤ ell p * ell q := by |
| 800 | let Y := fun r : Fin 4 => ext (![i, i, j, j] r) |
| 801 | have hY : ∀ r, ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (Y r)) U := |
| 802 | fun r => (hExt _).mono inter_subset_right |
| 803 | have hXY (s : σ ⊕ Fin 4) : |
| 804 | ContMDiffOn (𝓡 n) ((𝓡 n).prod 𝓘(ℝ, V)) ∞ (T% (Sum.elim X Y s)) U := by |
| 805 | cases s with |
| 806 | | inl s => exact (hX s).mono inter_subset_left |
| 807 | | inr r => exact hY r |
| 808 | have hXYunit (s : σ ⊕ Fin 4) : g.tangentNorm x (Sum.elim X Y s x) ≤ 1 := by |
| 809 | cases s with |
| 810 | | inl s => exact hunit s |
| 811 | | inr r => |
| 812 | simp only [Sum.elim_inr, Y, ext, FiberBundle.extend_apply_self, hnorm] |
| 813 | exact (b.norm_eq_one _).le |
| 814 | have hYx : (fun r => Y r x) = ![b i, b i, b j, b j] := by |
| 815 | funext r |
| 816 | fin_cases r <;> simp [Y, ext] |
| 817 | rw [← hYx, hWfields hU Y (fun s => (hX s).mono inter_subset_left) hY hxU, abs_mul] |
| 818 | exact mul_le_mul |
| 819 | (hlowUnit p hU _ (fun r => hXY _) hxU (fun r => hXYunit _)) |
| 820 | (hlowUnit q hU _ (fun r => hXY _) hxU (fun r => hXYunit _)) |
| 821 | (abs_nonneg _) (Real.sqrt_nonneg _) |
| 822 | have hdim : Fintype.card ι = n := by |
| 823 | dsimp only [ι] |
| 824 | rw [Fintype.card_fin, VectorBundle.finrank_eq ℝ V (TangentSpace (𝓡 n)) x, |
| 825 | finrank_euclideanSpace_fin] |
| 826 | rw [hQ, htrace] |
| 827 | calc |
| 828 | _ ≤ ∑ i : ι, |∑ j : ι, W ![b i, b i, b j, b j]| := |
| 829 | Finset.abs_sum_le_sum_abs _ _ |
| 830 | _ ≤ ∑ i : ι, ∑ j : ι, |W ![b i, b i, b j, b j]| := |
| 831 | Finset.sum_le_sum (fun i _ => Finset.abs_sum_le_sum_abs _ _) |
| 832 | _ ≤ ∑ _i : ι, ∑ _j : ι, ell p * ell q := |
| 833 | Finset.sum_le_sum (fun i _ => Finset.sum_le_sum (fun j _ => hterm i j)) |
| 834 | _ = (n : ℝ) ^ 2 * ell p * ell q := by |
| 835 | simp only [Finset.sum_const, Finset.card_univ, hdim, nsmul_eq_mul] |
| 836 | ring |
| 837 | |
| 838 | /-- The native iterated-curvature energy is the square of its nonnegative square root. -/ |
| 839 | theorem curvature_iterated_orthonormal_energy_nonneg_and_eq_sq_sqrt |
| 840 | {g : RiemannianMetric n M} (D : LeviCivitaData g) (k : ℕ) (x : M) : |
| 841 | let K := curvatureOnFields_iteratedCovariantDerivative D k |
| 842 | let b := g.orthonormalBasis x |
| 843 | let ext := fun i => FiberBundle.extend (EuclideanSpace ℝ (Fin n)) (b i) |
| 844 | let kb := fun γ : Fin (k + 3) → |
| 845 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) => |
| 846 | K (fun r => ext (γ r)) x |
| 847 | let Q := ∑ γ, g.inner x (kb γ) (kb γ) |
| 848 | 0 ≤ Q ∧ Q = (Real.sqrt Q) ^ 2 := by |
| 849 | classical |
| 850 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 851 | ⟨g.toRiemannianMetric⟩ |
| 852 | let K := curvatureOnFields_iteratedCovariantDerivative D k |
| 853 | let b := g.orthonormalBasis x |
| 854 | let ext := fun i => FiberBundle.extend (EuclideanSpace ℝ (Fin n)) (b i) |
| 855 | let kb := fun γ : Fin (k + 3) → |
| 856 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) => |
| 857 | K (fun r => ext (γ r)) x |
| 858 | let Q := ∑ γ, g.inner x (kb γ) (kb γ) |
| 859 | change 0 ≤ Q ∧ Q = (Real.sqrt Q) ^ 2 |
| 860 | have hQ : 0 ≤ Q := by |
| 861 | apply Finset.sum_nonneg |
| 862 | intro γ _ |
| 863 | rw [show g.inner x (kb γ) (kb γ) = ‖kb γ‖ ^ 2 from |
| 864 | real_inner_self_eq_norm_sq (kb γ)] |
| 865 | exact sq_nonneg _ |
| 866 | exact ⟨hQ, (Real.sq_sqrt hQ).symm⟩ |
| 867 | |
| 868 | /-- The order-zero native energy gives the frozen four-covariant curvature norm. -/ |
| 869 | theorem curvature_iterated_zero_orthonormal_energy_sqrt |
| 870 | {g : RiemannianMetric n M} (D : LeviCivitaData g) (x : M) : |
| 871 | let K := curvatureOnFields_iteratedCovariantDerivative D 0 |
| 872 | let b := g.orthonormalBasis x |
| 873 | let ext := fun i => FiberBundle.extend (EuclideanSpace ℝ (Fin n)) (b i) |
| 874 | let kb := fun γ : Fin (0 + 3) → |
| 875 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) => |
| 876 | K (fun r => ext (γ r)) x |
| 877 | Real.sqrt (∑ γ, g.inner x (kb γ) (kb γ)) = |
| 878 | D.curvatureTensorNorm x := by |
| 879 | classical |
| 880 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 881 | ⟨g.toRiemannianMetric⟩ |
| 882 | let ι := Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) |
| 883 | let b := g.orthonormalBasis x |
| 884 | let R := fun i j k : ι => D.curvature x (b i) (b j) (b k) |
| 885 | change Real.sqrt (∑ γ : Fin 3 → ι, g.inner x (R (γ 0) (γ 1) (γ 2)) |
| 886 | (R (γ 0) (γ 1) (γ 2))) = |
| 887 | Real.sqrt (∑ i : ι, ∑ j : ι, ∑ k : ι, ∑ l : ι, |
| 888 | D.curvatureTensor x (b i) (b j) (b k) (b l) ^ 2) |
| 889 | apply congrArg Real.sqrt |
| 890 | let e : (ι × ι × ι) ≃ (Fin 3 → ι) := |
| 891 | Equiv.ofBijective (fun p => ![p.1, p.2.1, p.2.2]) (by |
| 892 | constructor |
| 893 | · intro p q h |
| 894 | apply Prod.ext |
| 895 | · exact congrFun h 0 |
| 896 | · apply Prod.ext |
| 897 | · exact congrFun h 1 |
| 898 | · exact congrFun h 2 |
| 899 | · intro f |
| 900 | exact ⟨(f 0, f 1, f 2), by funext i; fin_cases i <;> rfl⟩) |
| 901 | have hsum : (∑ p : ι × ι × ι, g.inner x (R p.1 p.2.1 p.2.2) |
| 902 | (R p.1 p.2.1 p.2.2)) = |
| 903 | ∑ γ : Fin 3 → ι, g.inner x (R (γ 0) (γ 1) (γ 2)) |
| 904 | (R (γ 0) (γ 1) (γ 2)) := |
| 905 | Fintype.sum_equiv e _ _ (fun _ => rfl) |
| 906 | rw [← hsum] |
| 907 | simp only [Fintype.sum_prod_type] |
| 908 | apply Finset.sum_congr rfl |
| 909 | intro i _ |
| 910 | apply Finset.sum_congr rfl |
| 911 | intro j _ |
| 912 | have houtput (k : ι) : g.inner x (R i j k) (R i j k) = |
| 913 | ∑ l : ι, D.curvatureTensor x (b i) (b j) (b l) (b k) ^ 2 := by |
| 914 | rw [show g.inner x (R i j k) (R i j k) = ‖R i j k‖ ^ 2 from |
| 915 | real_inner_self_eq_norm_sq (R i j k)] |
| 916 | have hh := (b.sum_sq_inner_left (R i j k)).symm |
| 917 | change ‖R i j k‖ ^ 2 = ∑ l : ι, g.inner x (R i j k) (b l) ^ 2 at hh |
| 918 | simpa only [R, LeviCivitaData.curvatureTensor] using hh |
| 919 | simp_rw [houtput] |
| 920 | exact Finset.sum_comm |
| 921 | |
| 922 | end PoincareMT.RicciFlow.Local |