       Re: Covariant derivatives of tensors?

• To: mathgroup at smc.vnet.net
• Subject: [mg107253] Re: Covariant derivatives of tensors?
• From: magma <maderri2 at gmail.com>
• Date: Sun, 7 Feb 2010 06:11:01 -0500 (EST)
• References: <hkeard\$t22\$1@smc.vnet.net>

```On Feb 4, 12:25 pm, Erik Max Francis <m... at alcyone.com> wrote:
> Working on my tensor library, I'm trying to implement the covariant
> derivative for an arbitrary-rank tensor.  I'm keeping track of which
> indices are contravariant/upper and covariant/lower, so the problem
> isn't managing what each term would be, but rather I'm having difficulty
> seeing how to take an arbitrary tensor and "add" a new index to it.
> This in effect requires running Table with an arbitrary number of
> indices, and then adding one.  Given the arbitrariness of the
> multidimensional array, I'm not seeing how to do it.  The naive approac=
h
> would be something like:
>
>         Table[
>             <complex function involving many terms of a[[i1]]=
[[i2]]...>
>         {j, n}, {i1, n}, {i2, n}, ... {ir, n}]
>
> where the variable si1 .. ir (r of them) range over the value 1 through
> n for each of the indices of the tensor (of rank r), j is the additional
> index added by the covariant derivative, and n is the dimensionality of
> the space.
>
> I'm not seeing how to do this dynamically, since I don't know in advance
> what the rank of the tensor is, and I'm still relatively new to
> Mathematica.  Any ideas?
>
> --
> Erik Max Francis && m... at alcyone.com &&http://www.alcyone.com/max/
>   San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
>    All the people in my neighborhood turn around and get mad and sing
>     -- Public Enemy

There are excellent tensor packages for Mathematica, which can do this and
much much more.
Tensorial by David Park is low cost.
xAct is free