# np    	Copyright 1992, 1993 by FJE ENTERPRISES
# DERIVATION OF THE NEWMAN-PENROSE FORM OF THE EINSTEIN EQUATIONS
#                 AND THE BIANCHI IDENTITIES
# ---------------------------------------------------------------
# This program was developed in 1986 for the Grad Student Rational
# Calculator program of F. J. Ernst.  Here we rewrite the program
# for Maple.  Reference: J. Math. Phys. 19, 489 (1978).
# ---------------------------------------------------------------
# Employ the FJE ENTERPRISES revision of difforms package:
# read `fjeforms.m`; with(fjeforms):
with(share): readshare(fjeforms,fjeforms): with(fjeforms);
# Now introduce a null tetrad of 1-forms l, n, m and mbar, where
# mbar denotes the complex conjugate of m.  
defform(l=1,n=1,m=1,mbar=1):
defcomplex(m,mbar):
cc(m) := mbar;
cc(mbar) := m;
# Now introduce the 12 complex spin coefficients, noting
# that one cannot use gamma, which Maple regards as Euler's
# constant.
defcomplex(tau,kappa,rho,sigma,Gamma,epsilon,alpha,beta,nu,pi,lambda,mu):
# and the connection 1-forms:
_V := kappa*n + tau*l - sigma*mbar - rho*m;
_U := 2*(epsilon*n + Gamma*l - beta*mbar - alpha*m);
_W := pi*n + nu*l - mu*mbar - lambda*m;
# Note that W is a Maple reserved name, so use _W instead.
# We also shall need the real and imaginary parts of _U:
P := re(_U);
Q := im(_U);
# The exterior derivatives of l,n,m,mbar are given by:
d(l) := P &^ l - cc(_V) &^ m - _V &^ mbar; 
d(n) := - P &^ n + _W &^ m + cc(_W) &^ mbar;
d(m) := cc(_W) &^ l - _V &^ n + I * Q &^ m;
d(mbar) := cc(d(m));
# Now we shall derive the so-called comutation relations.  We begin
# by introducing complex differential operators.
defcomplex(delta,deltabar):
# These are complex conjugates of one another.
cc(delta) := deltabar; 
cc(deltabar) := delta;
# Note: Because 2nd exterior derivative will be evaluated, we must
# identify _D,Delta,delta,deltabar as differential operators rather
# than ordinary functions.   Note also that D is a Maple reserved name.
defdiffop(_D,Delta,delta,deltabar):
# The differential operators are identified as follows:
dcomps := [l,Delta],[n,_D],[m,- deltabar],[mbar,- delta]; # correct?
# We are now ready to evaluate the exterior derivative of an
# arbitrary scalar field f.
df := d(f,dcomps);
# The commutation relations follow from the requirement that
# d(df) = 0.  The result will be a 2-form, each of the components
# of which must vanish.  Let us assign this 2-form to Zero.
Zero := d(df,dcomps);
# A basis for 2-forms is given by
basis := [l &^ m,l &^ mbar,l &^ n,mbar &^ m,mbar &^ n,m &^ n];
# Let's look at the individual components of the 2-form Zero:
for i from 1 to 6 do
print(i);
print(0 = coef(Zero,basis[i])) od:
# We are now read to evaluate the exterior derivative of an
# arbitrary scalar field f.
df := d(f,dcomps);
# The basic self-dual 2-forms are given by:
B[1] := l &^ m;
B[0] := l &^ n + mbar &^ m;
B[-1] := mbar &^ n;
# The Riemann 2-form can be expressed in terms of null tetrad
# components as follows:
THETA[1] := (Psi[0]*B[-1]-Psi[1]*B[0]+(Psi[2]+2*Lambda)*B[1]
   +Phi[0][0]*cc(B[-1])-Phi[0][1]*cc(B[0])+Phi[0][2]*cc(B[1]));
THETA[0] := (Psi[1]*B[-1]-(Psi[2]-Lambda)*B[0]+Psi[3]*B[1]
   +Phi[1][0]*cc(B[-1])-Phi[1][1]*cc(B[0])+Phi[1][2]*cc(B[1]));
THETA[-1] := ((Psi[2]+2*Lambda)*B[-1]-Psi[3]*B[0]+Psi[4]*B[1]
	   +Phi[2][0]*cc(B[-1])-Phi[2][1]*cc(B[0])+Phi[2][2]*cc(B[1]));
# Alternatively it can be computed from the connection 1-forms:
TH[1] := d(_V,dcomps) - _U &^ _V;
TH[0] := 1/2*d(_U,dcomps) - _W &^ _V;
TH[-1] := d(_W,dcomps) - _W &^ _U;
# The above expressions for the Riemann 2-form should be equated
# and the components of the resulting equations displayed.  I shall
# assume you do not want to see the three equations, but will be
# satisfied to see the components.
for i from 1 by -1 to -1 do Zero[i] := expand(THETA[i] - TH[i]) od:
# Here then are the 18 Newman-Penrose equations:
for i from 1 by -1 to -1 do
for j from 1 to 6 do
print(6*(1-i)+j);
print(0 = coef(Zero[i],basis[j])) od: od:
# Finally, we can work out the Bianchi identities.  A basis for 3-forms
# is given by
Basis := [n &^ mbar &^ m,l &^ mbar &^ m,l &^ n &^ mbar,l &^ n &^ m];
# I shall assume that you don't wish to see the 3-forms 
Zero[1] := d(THETA[1],dcomps) - THETA[1] &^ _U + 2*_V &^ THETA[0]:
Zero[0] := d(THETA[0],dcomps) + THETA[-1] &^ _V -  _W &^ THETA[1]:
Zero[-1] := d(THETA[-1],dcomps) + THETA[-1] &^ _U - 2*_W &^ THETA[0]:
# Here then are the Bianchi identities in Newman-Penrose form.
for i from 1 by -1 to -1 do
for j from 1 to 4 do
print(4*(1-i)+j);
print(0 = coef(Zero[i],Basis[j])) od: od:
quit
