import PoincareLib.Geometry.RicciFlow.CurveShortening.Connection.CurvaturePairing import PoincareLib.Geometry.RicciFlow.Spacetime.Product.SpatialConnection import PoincareLib.Geometry.RicciFlow.Curvature.Calculus.Tensors.RicciRegularity /-! # Codazzi identity for the actual spacetime metric The scalar connection-pairing formula, followed by pair exchange, identifies the time/spatial curvature component with the actual spatial covariant derivative of Ricci. This follows MT2015Correction (0.1)-(0.2), p. 2, and Lemma 0.2, pp. 4-6. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Bundle Manifold Set Topology Filter open scoped Manifold ContDiff Bundle noncomputable section namespace PoincareMT.M62.SpacetimeData variable {n : โ„•} {M : Type*} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] {a b : โ„} set_option maxHeartbeats 800000 in -- Normalizing the dependent three-field Ricci derivative tuple needs this budget. /-- The actual mixed spacetime curvature is the difference of spatial Ricci derivatives; MT2015Correction (0.1)-(0.2), p. 2, and Lemma 0.2, pp. 4-6. -/ theorem codazzi {F : RicciFlow n M (Set.Icc a b)} (G : SpacetimeData F) (q : G.charts.Point) (B C D : TangentSpace (๐“ก n) q.1) : G.connection.curvatureTensor q (G.charts.timeVector q) (G.charts.horizontal q B) (G.charts.horizontal q C) (G.charts.horizontal q D) = (F.connection q.2).covariantTensorDerivative (F.connection q.2).ricciEvaluation q.1 ![C, B, D] - (F.connection q.2).covariantTensorDerivative (F.connection q.2).ricciEvaluation q.1 ![D, B, C] := by let := G.charts.chartedSpace let S := G.charts let E := EuclideanSpace โ„ (Fin n) let p := q.1 let Dt := F.connection q.2 let K := Dt.covariantTensorDerivative Dt.ricciEvaluation let X := fun v : E => PoincareMT.ReducedLengthMinimum.Variation.Geometry.chartVectorField p v let H := fun v : E => S.productChartField p v 0 let T := S.timeVector have hp : p โˆˆ (chartAt E p).source := mem_chart_source E p have hO : IsOpen {r : S.Point | r.1 โˆˆ (chartAt E p).source} := (chartAt E p).open_source.preimage S.contMDiff_space.continuous have hX (v : E) : ContMDiffOn (๐“ก n) (๐“ก n).tangent โˆž (T% (X v)) (chartAt E p).source := PoincareMT.ReducedLengthMinimum.Variation.Geometry.chartVectorField_smooth p v have hH (v : E) : ContMDiffOn (๐“ก (n + 1)) (๐“ก (n + 1)).tangent โˆž (T% (H v)) {r : S.Point | r.1 โˆˆ (chartAt E p).source} := S.productChartField_contMDiffOn p v 0 have hT : ContMDiff (๐“ก (n + 1)) (๐“ก (n + 1)).tangent โˆž (T% T) := S.timeVector_smooth have hfield (v : E) : S.liftSpatialField (fun _ : โ„ => X v) = H v := by funext r simp [H, X, SpacetimeCharts.liftSpatialField, SpacetimeCharts.productChartField] have hdir (v : E) (r : S.Point) : H v r = S.horizontal r (X v r.1) := by simp [H, X, SpacetimeCharts.productChartField] have hconn (u v : E) (r : S.Point) (hr : r.1 โˆˆ (chartAt E p).source) : G.charts.split r (G.connection.connection (H v) r (H u r)) = ((F.connection r.2).connection (X v) r.1 (X u r.1), (F.connection r.2).ricci r.1 (X u r.1) (X v r.1)) := by have hreg : ContMDiffAt (๐“ก (n + 1)) (๐“ก (n + 1)).tangent โˆž (T% (S.liftSpatialField (fun _ : โ„ => X v))) r := by rw [hfield] exact (hH v).contMDiffAt (hO.mem_nhds hr) have h := G.spatial_connection_at (fun _ : โ„ => X v) r hreg (X u r.1) rw [hfield] at h simpa only [hdir] using h have hcross (u v w : E) : G.metric.inner q (G.connection.connection (H v) q (H u q)) (G.connection.connection T q (H w q)) = -Dt.ricci p (X w p) (Dt.connection (X v) p (X u p)) := by have he := S.horizontal_time_decomposition q (G.connection.connection (H v) q (H u q)) rw [hconn u v q hp] at he rw [G.metric.symm, โ† he] simp only [S, T, map_add, map_smul, G.inner_time, G.time_covariant_vertical, smul_eq_mul, mul_zero, add_zero] rw [hdir] exact G.spatial_time_pairing q (X w p) (Dt.connection (X v) p (X u p)) have hd (u v w : E) : mvfderiv (๐“ก (n + 1)) (fun r => G.metric.inner r (G.connection.connection (H w) r (H v r)) (T r)) q (H u q) = mvfderiv (๐“ก n) (fun x => Dt.ricci x (X w x) (X v x)) p (X u p) := by have hf := (RicciFlowAnalysis.contMDiffOn_connection_pairing G.connection hO (hH v) (hH w) hT.contMDiffOn).contMDiffAt (hO.mem_nhds hp) have hs := S.mvfderiv_space_slice (fun r => G.metric.inner r (G.connection.connection (H w) r (H v r)) (T r)) q (hf.mdifferentiableAt (by simp)) (X u p) have heq : (fun x : M => G.metric.inner (x, q.2) (G.connection.connection (H w) (x, q.2) (H v (x, q.2))) (T (x, q.2))) =แถ [๐“ p] (fun x => Dt.ricci x (X w x) (X v x)) := by filter_upwards [(chartAt E p).open_source.mem_nhds hp] with x hx change G.metric.inner (x, q.2) (G.connection.connection (H w) (x, q.2) (H v (x, q.2))) (G.charts.timeVector (x, q.2)) = _ rw [G.inner_time, hconn v w (x, q.2) hx] exact RicciFlowAnalysis.ricci_symm Dt x (X v x) (X w x) have heq' := congrArg (fun L => L (X u p)) (heq.mfderiv_eq (I := ๐“ก n) (I' := ๐“˜(โ„, โ„))) rw [hdir] exact hs.trans heq' have hRicDiff (u v w : E) : mvfderiv (๐“ก n) (fun x => Dt.ricci x (X v x) (X w x)) p (X u p) = K p ![X u p, X v p, X w p] + Dt.ricci p (Dt.connection (X v) p (X u p)) (X w p) + Dt.ricci p (X v p) (Dt.connection (X w) p (X u p)) := by have he := RicciFlowAnalysis.covariantTensorDerivativeOnFields_eq Dt (RicciFlowAnalysis.isSmoothCovariantTensor_ricciEvaluation Dt) (chartAt E p).open_source (X := ![X u, X v, X w]) (by intro i fin_cases i ยท exact hX u ยท exact hX v ยท exact hX w) hp simp only [RicciFlowAnalysis.covariantTensorDerivativeOnFields, Fin.sum_univ_succ] at he change mvfderiv (๐“ก n) (fun x => Dt.ricci x (X v x) (X w x)) p (X u p) - (Dt.ricci p (Dt.connection (X v) p (X u p)) (X w p) + (Dt.ricci p (X v p) (Dt.connection (X w) p (X u p)) + 0)) = K p ![X u p, X v p, X w p] at he linarith only [he] have hformula (u v w : E) : G.connection.curvatureTensor q (H u q) (H v q) (T q) (H w q) = K p ![X u p, X w p, X v p] - K p ![X v p, X w p, X u p] := by have hh := curvatureTensor_pairing_of_commuting G.connection hO (hH u) (hH v) hT.contMDiffOn (hH w) hp (S.productChartField_bracket p u v 0 0 q hp) rw [hd, hcross, hd, hcross, hRicDiff, hRicDiff] at hh have hc := RicciFlowAnalysis.connection_commutator Dt (((hX u).contMDiffAt ((chartAt E p).open_source.mem_nhds hp)).mdifferentiableAt (by simp)) (((hX v).contMDiffAt ((chartAt E p).open_source.mem_nhds hp)).mdifferentiableAt (by simp)) have hc' : Dt.connection (X v) p (X u p) = Dt.connection (X u) p (X v p) := by apply sub_eq_zero.mp exact hc.trans (PoincareMT.ReducedLengthMinimum.Variation.Geometry.chartVectorField_bracket p u v p hp) rw [RicciFlowAnalysis.ricci_symm Dt p (Dt.connection (X w) p (X u p)) (X v p), RicciFlowAnalysis.ricci_symm Dt p (Dt.connection (X w) p (X v p)) (X u p), hc'] at hh linarith only [hh] let L := (mdifferentiable_chart (I := ๐“ก n) p).mfderiv hp have hvalue (V : TangentSpace (๐“ก n) p) : X (L V) p = V := by have hi : (mfderiv (๐“ก n) (๐“ก n) (chartAt E p) p).IsInvertible := โŸจL, rflโŸฉ exact hi.inverse_apply_self V have hpoint (V : TangentSpace (๐“ก n) p) : H (L V) q = S.horizontal q V := by rw [hdir, hvalue] rw [RicciFlowAnalysis.curvatureTensor_pair_exchange] simpa only [hpoint, hvalue] using hformula (L C) (L D) (L B) end PoincareMT.M62.SpacetimeData