I am doing variation of the Lagrangian, while it seems like the perturbation of the metric can not be identified as a tensor, such that MakeRule is invalid to apply towards the perturbation. the specific code is like

    dim, {\[Alpha], \[Beta], \[Gamma], \[Mu], \[Nu], \[Rho], \
\[Sigma], \[Tau], \[Kappa], \[Xi], \[Zeta], \[Delta]}]
DefMetric[-1, Met[-\[Mu], -\[Nu]], 
    CD, {";", "\[Del]"}, 
    PrintAs -> "g"];
DefMetricPerturbation[Met, \[Delta]Met, \[Epsilon], PrintAs -> "h"];

I want to change the object that taking derivative with respect to,

LL = CD[-\[Alpha]][Perturbation[Met[-\[Gamma], -\[Mu]]]] CD[-\[Beta]][
   Perturbation[Met[-\[Rho], -\[Delta]]]]

enter image description here expect to becomes enter image description here

rule1 = MakeRule[{CD[-\[Alpha]][
     Perturbation[Met[-\[Beta], -\[Gamma]]]] CD[-\[Rho]][
     Perturbation[Met[-\[Mu], -\[Sigma]]]], -Perturbation[
      Met[-\[Beta], -\[Gamma]]] CD[-\[Alpha]][
     CD[-\[Rho]][Perturbation[Met[-\[Mu], -\[Sigma]]]]]}, 
  MetricOn -> All, ContractMetrics -> None]

but the rule1 can not be identified since the perturbation of the metric is not same to the tensor that yield by DefTensor

Is there any method to do such replacement? Thanks


1 Answer 1


I find a way to do it is by DefTensor[h1[-a,-b],M4,Symmetric[{-a,-b}]], define the perturbation as a tensor enable applying MakeRule towards the expression.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.