Are indices conventionally raised inside or outside of partial derivatives in general relativity?

There isn't one, because partial derivatives are not meaningful in GR.

Partial derivatives can appear in two places:

  • Exterior derivatives
  • Lie derivatives.

Obviously they can also appear if you expand a covariant derivative but you really shouldn't raise or lower individual incides then.

For covariant derivatives, it doesn't matter, because $\nabla g=0$, so you can freely move $g$ in or out of the derivative and then we have $\nabla_\mu A^\mu=\nabla^\mu A_\mu$.

For Lie-derivatives, you can express them with covariant derivatives. However it does matter, because Lie-derivatives do not commute with $g$, unless your vector field is a Killing-field, so we have $\mathcal L_X A^\mu\neq(\mathcal L_X A_\nu)g^{\mu\nu}$, in this case, you need to specify whether you raise/lower before or after the Lie-derivative. However I need to say that the index notation meshes really badly with the Lie-derivative notation anyways.

For exterior derivatives, you can express that with covariant derivatives, and also, the exterior derivative is meaningful if and only if, you calculate it on a differential form, which are, by definition, lower-indexed.

As AccidentialFourierTransform said in the comments, the issue is more interesting if you have multiple connections and/or multiple metrics and/or a non-compatible connection. Every time I have seen such situations in the physics literature, the raisings/lowerings were written out explicitly, or a convention was declared beforehand, but because these occurrences are rather specific, one cannot really make a definitive convention en general.


Most of the doubts in your questions can be solved if you avoid calling a vector (or a form) their coordinates.

$A_{\mu}$ is not a one-form: $A = A_{\mu}dx^{\mu}$ is.

$g^{\mu\nu}$ is not a tensor: $g= g^{\mu\nu}e_{\mu}\otimes e_{\nu}$ is.

As such one thing is just taking partial derivatives of some functions with respect to their variables, namely $$ \sum_{\mu}\frac{\partial}{\partial x^{\mu}} A_{\mu}(x) $$ one other thing is the contraction of a tensor, namely making the tensor act on some dual basis, that is $$ \sum_{\mu\nu\sigma}(g^{\mu\nu}e_{\mu}\otimes e_{\nu})(A_{\sigma}dx^{\sigma}) = \sum_{\mu\nu\sigma}(g^{\mu\nu}A_{\sigma})\, e_{\mu}\, e_{\nu}(dx^{\sigma}) $$ The convention is that you just have to carry the bases things act upon and that is it.


Comments to the post (v4):

  1. If $A^{\mu}$ is supposed to be (components of) a vector field, i.e. a (1,0) contravariant tensor field, then the expression (1) is not a divergence. A divergence of a vector field in a pseudo-Riemannian manifold is a scalar field, i.e. a (0,0) tensor field, and has the local form $${\rm div} A~=~ \frac{1}{\sqrt{|g|}}\partial_{\mu} (\sqrt{|g|} A^{\mu}) \tag{A}$$

  2. Similarly, if $A_{\nu}$ is supposed to be (components of) a co-vector field, i.e. a (0,1) covariant tensor field, then the expression (3) is not a (0,0) tensor field.

  3. Apart from the important objection about not working with non-covariant quantities, if OP is merely asking about conventions for a notational short-hand for working with a partial derivative $$\partial^{\mu}\tag{B}$$ with raised index, say, in a general relativistic context, it seems most convenient to let the metric be outside, i.e. $$\partial^{\mu}~:=~g^{\mu\nu}\partial_{\nu}.\tag{C}$$ E.g. the Laplace-Beltrami operator would then become $$\Delta~=~\frac{1}{\sqrt{|g|}}\partial_{\mu}\sqrt{|g|}\partial^{\mu}.\tag{D}$$ But we cannot really recommend the notation (B) outside a special relativistic context in order not to create unnecessary confusion.