Some help on using the GREAT package

Use the GREAT package which can be found at:
http: //library.wolfram.com/infocenter/MathSource/4781/
Simply download it, then open it up and evaluate it, then start working on your on own notebook.

Example

First define an n-coordinate vector:

x={x1,x2,x3};

And metric:

(metric={{x1,0,0},{0,x1*x2,0},{0,0,x1*x2*x3} })//MatrixForm

With these inputs, the GREAT package will calculate everything else.

(a)

The Christoffel connection coefficients are:

Christoffel[metric,x]

You should read this output as: {{{G111,G112,G113},{G121,G122,G123},{G131,G132,G133}} , {{G211,G212,G213},{G221,G222,G223},{G231,G232,G233}} , {{G311,G312,G313},{G321,G322,G323},{G331,G332,G333}} 
where these are Gijk where i is upper and  j,k are lower.  For example G122 = 1/2x1.  Also note that every component is displayed even though many of them are related through the symmetry under exchange of the last two indices, e.g. G212=G221.   This way of expressing the components can get cumbersome, but usually we don’t use these directly.

(b)

The Riemann tensor, Ricci tensor, and the Ricci scalar are:

Riemann[metric,x]

Again you read this output as {{{{R1111,R1112,R1113},{R1121,R1122,R1123},{R1131,R1132,R1133},etc.}}}   This can get really confusing, but again we usually don’t use these directly.   Again note that many components are related through the expected index symmetries if the Riemann tensor.  
 Note that since the first index is upper, we do not have the explicit antisymmetry under exchange of the first two indices, e.g. R2323 is not equal to R3223.
 
 
The next command calculates the components of the Riemann tensor with all of the indices lowered.  This expression will be useful for seeing the full index symmetry of the Riemann tensor and of course will be needed for the last part of this  homework.  This is NOT part of the GREAT package, so I had to define the operation explicitly.

Riemannlower[metric_,x_]:=
  Block[ {Dim, Riem, Riemannlower, a, b, i, k, j},
          Dim = Length[x];
          Riem = Riemann[metric,x];
          Riemannlower = Table[ Sum[metric[[b,a]]*Riem[[a,i,j,k]], {a,Dim}],
                         {b,Dim},{i,Dim}, {j,Dim} , {k,Dim}];
          (* Return the Riemann tensor (four lower indices b,i,j,k): *)
          Simplify[Riemannlower] ]

Riemannlower[metric, x]

We can now see the full index symmetry including the first index.

Ricci[metric,x]

These components can be usefully represented by a matric since this is a two-index tensor.  To do this we can use:

Ricci[metric,x]//MatrixForm

Note the expected index symmetry of the Ricci tensor.

SCurvature[metric,x]

Note that in this case the Ricci scalar is a constant, though this need not be true for a general space.