I did not find a way to do exactly what you want. But here is an alternative. Define \nabla
as a Derivative
or PartialDerivative
.
{\mu, \nu}::Indices(position=independent).
\partial{#}::PartialDerivative.
g_{\mu \nu}::Metric.
g^{\mu \nu}::InverseMetric.
g_{\mu}^{\nu}::KroneckerDelta.
g^{\mu}_{\nu}::KroneckerDelta.
g_{\mu \nu}::Depends(\partial{#}).
g^{\mu \nu}::Depends(\partial{#}).
\nabla{#}::PartialDerivative.
\nabla{#}::Depends(\partial{#}).
expr:=g^{\mu \nu}\nabla_{\nu}{A_{\mu}};
eliminate_metric(_);
The crucial point is that the covariant derivative of the metric is 0, so you do not need to add
g_{\mu \nu}::Depends(\nabla{#}).
g^{\mu \nu}::Depends(\nabla{#}).
As a result the metric "passes through" the \nabla
derivative operator. I hope this helps.
GPN