array(idx,3); idx[0]:t; idx[1]:ar; idx[2]:th; idx[3]:ph; array(g_2,3,3)(t,ar,th,ph); g_2[0,0](t,ar,th,ph):=%e^(2*nu(ar)); g_2[1,1](t,ar,th,ph):=-%e^(2*lam(ar)); g_2[2,2](t,ar,th,ph):=-ar^2; g_2[3,3](t,ar,th,ph):=-ar^2*(sin(th))^2; for i:0 thru 3 do for j:1 thru 3 do ( k:mod(i+j,4), g_2[i,k](t,ar,th,ph):=0); array(g2,3,3)(t,ar,th,ph); g2[0,0](t,ar,th,ph):=%e^(-2*nu(ar)); g2[1,1](t,ar,th,ph):=-%e^(-2*lam(ar)); g2[2,2](t,ar,th,ph):=-ar^(-2); g2[3,3](t,ar,th,ph):=-ar^(-2)*(sin(th))^(-2); for i:0 thru 3 do for j:1 thru 3 do ( k:mod(i+j,4), g2[i,k](t,ar,th,ph):=0); array(g_2d,3,3,3)(t,ar,th,ph); for i:0 thru 3 do for j:0 thru 3 do for k:0 thru 3 do g_2d[i,j,k](t,ar,th,ph):=ratsimp(diff(g_2[i,j](t,ar,th,ph),idx[k],1)); array(gam_3,3,3,3)(t,ar,th,ph); for i:0 thru 3 do for j:0 thru 3 do for k:0 thru 3 do gam_3[i,j,k](t,ar,th,ph):=ratsimp(1/2*(g_2d[i,j,k](t,ar,th,ph)+g_2d[i,k,j](t,ar,th,ph)-g_2d[j,k,i](t,ar,th,ph))); array(gam1_2,3,3,3)(t,ar,th,ph); for i:0 thru 3 do for j:0 thru 3 do for k:0 thru 3 do gam1_2[i,j,k](t,ar,th,ph):=ratsimp(g2[i,0](t,ar,th,ph)*gam_3[0,j,k](t,ar,th,ph)+g2[i,1](t,ar,th,ph)*gam_3[1,j,k](t,ar,th,ph)+g2[i,2](t,ar,th,ph)*gam_3[2,j,k](t,ar,th,ph)+g2[i,3](t,ar,th,ph)*gam_3[3,j,k](t,ar,th,ph)); array(r1_3,3,3,3,3)(t,ar,th,ph); for i:0 thru 3 do for j:0 thru 3 do for k:0 thru 3 do for l:0 thru 3 do r1_3[i,j,k,l](t,ar,th,ph):=ratsimp(diff(gam1_2[i,j,l](t,ar,th,ph),idx[k],1)-diff(gam1_2[i,j,k](t,ar,th,ph),idx[l],1)+gam1_2[0,j,l](t,ar,th,ph)*gam1_2[i,0,k](t,ar,th,ph)+gam1_2[1,j,l](t,ar,th,ph)*gam1_2[i,1,k](t,ar,th,ph)+gam1_2[2,j,l](t,ar,th,ph)*gam1_2[i,2,k](t,ar,th,ph)+gam1_2[3,j,l](t,ar,th,ph)*gam1_2[i,3,k](t,ar,th,ph)-gam1_2[0,j,k](t,ar,th,ph)*gam1_2[i,0,l](t,ar,th,ph)-gam1_2[1,j,k](t,ar,th,ph)*gam1_2[i,1,l](t,ar,th,ph)-gam1_2[2,j,k](t,ar,th,ph)*gam1_2[i,2,l](t,ar,th,ph)-gam1_2[3,j,k](t,ar,th,ph)*gam1_2[i,3,l](t,ar,th,ph)); array(r_4,3,3,3,3)(t,ar,th,ph); for i:0 thru 3 do for j:0 thru 3 do for k:0 thru 3 do for l:0 thru 3 do r_4[i,j,k,l](t,ar,th,ph):=ratsimp(g_2[i,0](t,ar,th,ph)*r1_3[0,j,k,l](t,ar,th,ph)+g_2[i,1](t,ar,th,ph)*r1_3[1,j,k,l](t,ar,th,ph)+g_2[i,2](t,ar,th,ph)*r1_3[2,j,k,l](t,ar,th,ph)+g_2[i,3](t,ar,th,ph)*r1_3[3,j,k,l](t,ar,th,ph)); array(r_2,3,3)(t,ar,th,ph); for i:0 thru 3 do for j:0 thru 3 do r_2[i,j](t,ar,th,ph):=ratsimp(r1_3[0,i,0,j](t,ar,th,ph)+r1_3[1,i,1,j](t,ar,th,ph)+r1_3[2,i,2,j](t,ar,th,ph)+r1_3[3,i,3,j](t,ar,th,ph));