Hi,
I'm sorry for not having written a piece of code right from the beginning. My problem is associated with defining a covariant derivative which is compatible with the metric tensor ("Gv[a,a1]" below) defined on the vector bundle, as I'm writing below.
I use the following definitions:
DefManifold[M, dimM, {mu,nu,rho,sigma}]
DefMetric[+1, g[-mu,-nu], nabla, {";", "D"},
CurvatureRelations -> True, Torsion -> False]
DefConstantSymbol[dimfields]
(* I define the VBundle together with its metric Gv *)
DefVBundleWithMetric[fields, M, dimfields, {a,a1,a2,a3,a4,a5}, Gv]
(* I define the covariant derivative on the VBundle such that it is extended from the CovD on the base manifold *)
DefCovD[fieldscovd[-mu], fields, {";", "Der"},
ExtendedFrom -> nabla, FromMetric -> Gv, CurvatureRelations -> True]
(* I change the options of CollectTensors otherwise I cannot manipulate the most general expressions containing covariant derivatives of tensors valued in the VBundle "fields" *)
SetOptions[CollectTensors, CollectMethod -> ContractMetric]
(* I declare "Gv" to have vanishing covariant derivative *)
MakeRule[{fieldscovd[-mu]@Gv[a, a1], 0}]
AutomaticRules[Gv, %]
My question is: is it possible to define the covariant derivative on the VBundleWithMetric such that the covariant derivative of the metric defined on the VBundle is always zero? I have circumvented this issue by changing the the options of the command CollectTensors, but in this way I obtain many terms that only differ by the name of the dummy index. I stress the fact that without changing the options of CollectTensors I wasn't able to manipulate expressions involving the covariant derivatives of tensors.
I sincerely thank in advance those who will help me out.
Cheers,
Dario