Hi everyone!
Please take a look at the first term of the result of the second @eliminate_metric and the first term of the @prodsort, in the following code. They must be equal but due an automatic "integral by part" in @prodsort all of the derivatives were moved to just one of the fields without any minus sign.
{\alpha, \beta, \rho, \sigma, \mu, \nu, \gamma, \lambda}::Indices.
\eta^{\mu \nu}::Metric.
\eta_{\mu \nu}::Symmetric.
\eta^\mu_\nu::KroneckerDelta.
h^{\mu \nu}::Symmetric.
\partial_{#}::PartialDerivative.
\Gamma^{\mu}_{\nu \rho}::Depends(\partial).
\Gamma^{\mu}_{\nu \rho}::TableauSymmetry(shape={2}, indices={1,2}).
\phi::Depends(\partial).
h^{\mu \nu}::Depends(\partial).
h::Depends(\partial).
term:=(\eta^{\mu \nu} \eta^{\alpha \beta}\partial_{\mu}\phi
-k h^{\mu \nu} \eta^{\alpha \beta}\partial_{\mu}\phi )
(\partial_{\alpha}\partial_{\beta}\partial_{\nu}\phi
- \partial_{\alpha}(\Gamma^{\rho}_{\beta \nu}\partial_{\rho}\phi));
@prodrule!(%);
@distribute!(%);
@distribute!(%);
@eliminate_metric!(%);
@eliminate_metric!(%);
@prodsort!(%);
As another question, in the above code I used @eliminate_metric and @distribute twice sequentially to get the desired effect. Is there any way to use just once with the same effect?