computing christoffel symbols



On 9/5/07, Thomas Widlar <twidlar at yahoo.com> wrote:

> My colleague computed the Christoffel symbols to verify the calculations
> given in Sean Carroll's book by using Maxima matrices.  His session is
> in the attachment.

Looks like a nice bit of work, but there is something odd about some
of the constructs, e.g.,

for mu:0 thru 3 do {
for nu:0 thru 3 do {
    g     [mu,nu]: g1     [mu+1, nu+1],
    gContr[mu,nu]: gContr1[mu+1, nu+1]
}}$

where the loop body is a set object { ... } instead of a sequence
of expressions  ( ... ) . As it turns out, it happens to work OK with
the set, but only because it doesn't appear to make difference what
order the expressions within are evaluated. But it could lead to
surprises, e.g.
{ print (2), print (3), print (1) };
prints
1
2
3
not
2
3
1

I can't be sure, but I suspect the loops want to be written as

for mu:0 thru 3 do
  (for nu:0 thru 3 do
    (g     [mu,nu]: g1     [mu+1, nu+1],
    gContr[mu,nu]: gContr1[mu+1, nu+1]))$

or, since the parentheses aren't necessary if enclosing a single expression,

for mu:0 thru 3 do
  for nu:0 thru 3 do
    (g     [mu,nu]: g1     [mu+1, nu+1],
    gContr[mu,nu]: gContr1[mu+1, nu+1])$

HTH

Robert Dodier