#COPYRIGHT NOTICE: Copyright (c) 1995 by Sasha Cyganowski. Permission is #granted to anyone to use, modify, or redistribute this software freely, #subject to the following restrictions: 1. The author accepts no #responsibility for any consequences of this software and makes no guarantee #that this software is free of defects. 2. The origin of this software must #not be misrepresented, either by explicit claim or by omission. #3. This notice and the copyright must be included with all copies or #modified versions of this software. 4. This software may not be included #or redistributed as part of any package to be sold for profit unlesss the #author has given explicit written permission to do so. # Sasha Cyganowski, School of Computing and Mathematics, Deakin University, # Waurn Ponds, VIC, Australia. Internet: sash@deakin.edu.au # Telephone: 61 52 271382. # John Carminati, School of Computing and Mathematics, Deakin University, # Waurn Ponds, VIC, Australia. Internet: jcarm@deakin.edu.au # The file contains the function definitions and help files for the package #"nullrot", developed by Sasha Cyganowski and John Carminati. The package # contains routines useful for determining designated 2-parameter subgroups #of the 6-parameter Lorentz group transformations of the complex null tetrad. # Other routines are available that allow manipulation of the output. # The routine "inv" tests for invariance under the above transformations. # The transformation lists from which the code for the nullrot package was #based can be found in the paper, Chandrasekhar, S: An introduction to the #theory of the Kerr metric and its perturbations, which appears in the book #"General Relativity. An Einstein Centenary Survey", pgs. 370-453, #(Cambridge University Press, 1979). # Note: This software is known to work for MapleV version 3 (for Windows) #and MapleV version 3 (for Unix). `help/text/nullrot`:=TEXT( `HELP FOR: Introduction to the nullrot package.`, ` `, `CALLING SEQUENCE: `, ` `, ` (args)`, ` nullrot[](args)`, ` `, `SYNOPSIS: `, ` `, `- The nullrot package contains routines useful for`, ` generating 2-parameter subgroups of the 6-parameter`, ` Lorentz group transformations of the complex null`, ` tetrad. Other routines are available that allow`, ` manipulation of the output. The routine "inv" tests for`, ` invariance under the above transformations. For more`, ` information on a particular function type the command`, ` ?.`, ` `, `- The nullrot package is designed to be used in`, ` conjunction with the np package.`, ` `, `- The authors of the nullrot package are Sasha`, ` Cyganowski and John Carminati, both from Deakin`, ` University, Waurn Ponds, Australia, 3217. `, ` Comments are welcomed via e-mail, which can`, ` be sent to the following addresses: `, ` sash@deakin.edu.au or jcarm@deakin.edu.au.`, ` `, `- The transformation lists from which the nullrot`, ` package was based can be found in the paper`, ` Chandrasekhar, S: An introduction to the theory`, ` of the Kerr metric and its perturbations, which`, ` appears in the book "Relativity. An Einstein Centenary`, ` Survey", pages 370-453, (Cambridge University Press, 1979).`, ` `, `- To use a nullrot function, either define that`, ` function alone using the command`, ` with(nullrot,), or define all nullrot`, ` functions using the command with(nullrot).`, ` Alternatively, invoke the function using the long`, ` form nullrot[]. This long form`, ` notation is necessary whenever there is a`, ` conflict between a package function name`, ` and another function used in the same session.`, ` `, `- The functions available are:`, ` `, ` ftran rtran addt remt mconj msubs inv`, ` `, `- The output of these functions is consistent with the quantities`, ` from the np package. Note that a subscript T denotes transformation`, ` of the np quantities, except for the basis vectors. In the case of the`, ` basis vectors, transformation is denoted by TX, TY, TD, and TV.`, ` `, `- As an example consider eq1 from the np`, ` package. Below we use the nullrot routine`, ` "inv" to show that eq1 is invariant under the `, ` designated 2-parameter subgroup of the`, ` 6-parameter Lorentz group transformations.`, ` `, `EXAMPLES: `, ` `, `>with(nullrot);`, ` `, ` [addt, ftran, inv, mconj, msubs, remt, rtran]`, ` `, `>with(np);`, ` `, `Warning: new definition for D`, ` [D, V, V_D, X, X_D, X_V, Y, Y_D, Y_V, Y_X, conj, eqns, suball]`, ` `, `>eqns();`, ` `, `>eq1;`, ` `, ` 2`, ` D(r) - Y(k) = r + s sc + (e + ec) r - kc t - (3 a + bc - p) k + R00`, ` `, `>inv(",A,f);`, ` `, ` true`, ` `, `SEE ALSO: with, np, nullrot[ftran], nullrot[rtran], nullrot[addt]`, ` nullrot[remt], nullrot[mconj], nullrot[msubs], nullrot[inv]` ): macro(main = `nullrot/main`); macro(main2 = `nullrot/main2`); `nullrot/main`:=proc(x:string,y,z)\ local counter,arots,brots,crots,j,i,temp,temp1,flag,theta;\ arots := [W0[T] = W0,W1[T] = W1+Rc*W0,W2[T] = W2+2*Rc*W1+Rc^2*W0, W3[T] = W3+3*Rc*W2+3*Rc^2*W1+Rc^3*W0,\ W4[T] = W4+4*Rc*W3+6*Rc^2*W2+4*Rc^3*W1+Rc^4*W0,R00[T] = R00, R01[T] = R01+R*R00,R02[T] = R02+2*R*R01+R^2*R00,\ R11[T] = R11+R*R10+Rc*R01+R*Rc*R00, R12[T] = R12+2*R*R11+Rc*R02+R^2*R10+2*R*Rc*R01+R^2*Rc*R00,\ R22[T] = R22+2*R*R21+2*Rc*R12+R^2*R20+4*R*Rc*R11+Rc^2*R02+2*R^2*Rc*R10+ 2*R*Rc^2*R01+R^2*Rc^2*R00,D[T] = D,\ V[T] = V+R*Y+Rc*X+R*Rc*D,X[T] = X+R*D,Y[T] = Y+Rc*D,k[T] = k, r[T] = r+Rc*k,s[T] = s+R*k,e[T] = e+Rc*k,\ t[T] = t+R*r+Rc*s+R*Rc*k,a[T] = a+Rc*(r+e)+Rc^2*k, b[T] = b+R*e+Rc*s+R*Rc*k,p[T] = p+2*Rc*e+Rc^2*k+D(Rc),\ g[T] = g+R*a+Rc*(b+t)+R*Rc*(r+e)+Rc^2*s+R*Rc^2*k, l[T] = l+Rc*(p+2*a)+Rc^2*(r+2*e)+Rc^2*k+Y(Rc)+Rc*D(Rc),\ m[T] = m+R*p+2*Rc*b+2*R*Rc*e+Rc^2*s+R*Rc^2*k+X(Rc)+R*D(Rc),\ n[T] = n+R*l+Rc*(m+2*g)+R*Rc*(p+2*a)+Rc^2*(t+2*b)+R*Rc^2*(r+2*e)+ Rc^3*s+R*Rc^3*k+V(Rc)+R*Y(Rc)+Rc*X(Rc)+R*Rc*D(Rc)];\ brots := [W0[T] = W0+4*R*W1+6*R^2*W2+4*R^3*W3+R^4*W4, W1[T] = W1+3*R*W2+3*R^2*W3+R^3*W4,W2[T] = W2+2*R*W3+R^2*W4,\ W3[T] = W3+R*W4,W4[T] = W4,\ R00[T] = R00+2*R*R10+2*Rc*R01+R^2*R20+Rc^2*R02+4*R*Rc*R11+ 2*R*Rc^2*R12+2*R^2*Rc*R21+R^2*Rc^2*R22,\ R01[T] = R01+2*R*R11+Rc*R01+2*R*Rc*R12+R^2*R21+R^2*Rc*R22, R02[T] = R02+2*R*R12+R^2*R22,R12[T] = R12+R*R22,\ R11[T] = R11+R*R12+Rc*R21+R*Rc*R22,R22[T] = R22, D[T] = D+R*Y+Rc*X+R*Rc*V,V[T] = V,X[T] = X+R*V,Y[T] = Y+Rc*V,\ k[T] = k+R*(r+2*e)+Rc*s+R^2*(p+2*a)+R*Rc*(t+2*b)+R^2*Rc*(m+2*g)+ R^3*l+R^3*Rc*n-D(R)-Rc*X(R)-R*Y(R)-R*Rc*V(R),\ r[T] = r+2*R*a+Rc*t+2*R*Rc*g+R^2*l+R^2*Rc*n-Y(R)-Rc*V(R), s[T] = s+R*(t+2*b)+R^2*(m+2*g)+R^3*n-X(R)-R*V(R),\ e[T] = e+R*(a+p)+Rc*b+R*Rc*(m+g)+R^2*l+R^2*Rc*n, t[T] = t+2*R*g+R^2*n-V(R),a[T] = a+R*l+Rc*g+R*Rc*n, b[T] = b+R*(m+g)+R^2*n,\ p[T] = p+R*l+Rc*m+R*Rc*n,g[T] = g+R*n,l[T] = l+Rc*n, m[T] = m+R*n,n[T] = n];\ crots := [W0[T] = 1/R^2*exp(2*I*theta)*W0, W1[T] = 1/R*exp(I*theta)*W1,W2[T] = W2,W3[T] = R*exp(-I*theta)*W3,\ W4[T] = R^2*exp(-2*I*theta)*W4,R00[T] = 1/R^2*R00, R01[T] = 1/R*exp(I*theta)*R01,R02[T] = exp(2*I*theta)*R02,R11[T] = R11,\ R12[T] = R*exp(I*theta)*R12,R22[T] = R^2*R22,D[T] = 1/R*D, V[T] = R*V,X[T] = exp(I*theta)*X,Y[T] = exp(-I*theta)*Y,\ k[T] = 1/R^2*exp(I*theta)*k,r[T] = 1/R*r, s[T] = 1/R*exp(2*I*theta)*s, e[T] = 1/R*e-1/2*1/R^2*D(R)+1/2*I/R*D(theta),\ t[T] = exp(I*theta)*t, a[T] = exp(-I*theta)*(a-1/2*1/R*Y(R)+1/2*I*Y(theta)),\ b[T] = exp(I*theta)*(b-1/2*1/R*X(R)+1/2*I*X(theta)), p[T] = exp(-I*theta)*p,g[T] = R*g-1/2*V(R)+1/2*I*R*V(theta),\ l[T] = R*exp(-2*I*theta)*l,m[T] = R*m,n[T] = R^2*exp(-I*theta)*n];\ counter := 0;\ if type(y,list) = false and type(y,string) = false then ERROR(`2nd argument must be either a list or a string`)\ elif type(z,list) = false and type(z,algebraic) = false then ERROR(`3rd argument must be either a list or a string`)\ else\ if x = A then\ if op(1,y) = tot then temp1 := subs({R = z,Rc = conj(z)},arots); map(simplify,[seq(temp1[j],j = 1 .. nops(temp1))])\ else\ for j to nops(y) do\ for i to nops(arots) do\ op(j,y) = op(0,lhs(op(i,arots)));\ temp := lhs(")-rhs(");\ if temp = 0 then\ flag := i; counter := counter+1; temp1[counter] := subs({R = z,Rc = conj(z)}, op(flag,arots))\ fi\ od\ od;\ map(simplify,[seq(temp1[j],j = 1 .. counter)])\ fi\ elif x = B then\ if op(1,y) = tot then temp1 := subs({R = z,Rc = conj(z)},brots); map(simplify,[seq(temp1[j],j = 1 .. nops(temp1))])\ else\ for j to nops(y) do\ for i to nops(brots) do\ op(j,y) = op(0,lhs(op(i,brots)));\ temp := lhs(")-rhs(");\ if temp = 0 then\ flag := i; counter := counter+1; temp1[counter] := subs({R = z,Rc = conj(z)}, op(flag,brots))\ fi\ od\ od;\ map(simplify,[seq(temp1[j],j = 1 .. counter)])\ fi\ elif x = C then\ if op(1,y) = tot then\ temp1 := subs({R = op(1,z),theta = op(2,z)},crots); map(simplify,[seq(temp1[j],j = 1 .. nops(temp1))])\ else\ for j to nops(y) do\ for i to nops(crots) do\ op(j,y) = op(0,lhs(op(i,crots)));\ temp := lhs(")-rhs(");\ if temp = 0 then\ flag := i; counter := counter+1; temp1[counter] := subs({R = op(1,z), theta = op(2,z)},op(flag,crots))\ fi\ od\ od;\ map(simplify,[seq(temp1[j],j = 1 .. counter)])\ fi\ else ERROR(`first argument must be one of A, B, or C`)\ fi\ fi;\ end:\ nullrot[ftran]:=proc(x:string,y,z)\ if type(y,list) = false and type(y,string) = false then ERROR(`2nd argument must be either a list or a string`)\ elif type(z,list) = false and type(z,algebraic) = false then ERROR(`3rd argument must be either a list or a string`)\ else\ if args[2] = basis then `nullrot/main`(x,[D,V,X,Y],z); subs({D[T] = TD,V[T] = TV,X[T] = TX,Y[T] = TY},")\ elif args[2] = Weyl then `nullrot/main`(x,[W0,W1,W2,W3,W4],z)\ elif args[2] = Ricci then `nullrot/main`(x,[R00,R01,R02,R11,R12,R22],z)\ elif args[2] = spin then `nullrot/main`(x,[k,r,s,e,t,a,b,p,g,l,m,n],z)\ else `nullrot/main`(x,y,z); subs({D[T] = TD,V[T] = TV,X[T] = TX, Y[T] = TY},")\ fi\ fi;\ end:\ `help/text/ftran`:=TEXT( `FUNCTION: nullrot[ftran] - returns the designated 2-parameter`, `subgroup of the 6-parameter Lorentz group transformations.`, ` `, `CALLING SEQUENCE: ftran(x,y,z);`, ` `, `PARAMETERS: x - string: either A,B, or C`, ` y - list or string: either a list of symbols consistent with`, ` the np package, or a string of one of "basis", "Weyl",`, ` "Ricci", "spin", or "tot".`, ` z - string, or list if x has the value C`, ` `, `SYNOPSIS: `, `- The call ftran(x,y,z); returns the designated 2-parameter subgroup of`, ` the 6-parameter Lorentz group transformations. The input variable x`, ` represents the choice of null rotation. An x value of A represents a null`, ` rotation leaving l fixed. An x value of B represents a null rotation`, ` leaving n fixed, whilst an x value of C represents a boost in the l-n`, ` plane with a spatial rotation in the m-mc plane.`, ` The input variable y represents which Newman-Penrose quantities`, ` are to be transformed. The user may supply particular np quantities, or `, ` alternatively, the user may supply one of "basis", "Weyl", "Ricci",`, ` "spin", or "tot" for the y variable. If "basis" is supplied the basis`, ` vectors (D,V,X,Y in np notation) will be transformed. If "Weyl" is`, ` supplied the Weyl components will be transformed. If "Ricci" is supplied`, ` the Ricci components will be transformed. If "spin" is supplied the spin`, ` coefficients will be transformed. If "tot" is supplied all np quantities`, ` will be transformed.`, ` The input variable z represents the transformation parameter.`, ` z is complex unless the variable x has value C, in which case`, ` the variable z must be supplied in the form of a list containing`, ` the 2-parameters (real) necessary for the transformation.`, ` `, `- The output of these functions is consistent with the quantities`, ` from the np package. Note that a subscript T denotes transformation`, ` of the np quantities, except for the basis vectors. In the case of the`, ` basis vectors, transformation is denoted by TX, TY, TD, and TV.`, ` `, `- This routine is part of the nullrot package and is usually loaded via`, ` the call with(nullrot). It can also be invoked via the call`, ` nullrot[ftran].`, ` `, `EXAMPLES: `, ` `, `>with(np):`, ` `, `>ftran(A,Weyl,f);`, ` `, ` 2`, ` [W0[T] = W0, W1[T] = W1 + fc W0, W2[T] = W2 + 2 fc W1 + fc W0,`, ` 2 3`, ` W3[T] = W3 + 3 fc W2 + 3 fc W1 + fc W0,`, ` 2 3 4`, ` W4[T] = W4 + 4 fc W3 + 6 fc W2 + 4 fc W1 + fc W0]`, ` `, `>ftran(B,basis,f);`, ` `, `[TD = D + f Y + fc X + f fc V, TV = V, TX = X + f V, TY = Y + fc V]`, ` `, `>ftran(C,[a,b],[f,h]);`, ` `, ` exp(- I h) a f - 1/2 exp(- I h) Y(f) + 1/2 I exp(- I h) Y(h) f`, ` [a[T] = --------------------------------------------------------------,`, ` f`, ` exp(I h) b f - 1/2 exp(I h) X(f) + 1/2 I exp(I h) X(h) f`, ` b[T] = --------------------------------------------------------]`, ` f`, ` `, `SEE ALSO: nullrot, nullrot[rtran], np` ): nullrot[rtran]:=proc(x,y,z)\ if type(y,list) = false and type(y,string) = false then ERROR(`2nd argument must be either a list or a string`)\ elif type(z,list) = false and type(z,string) = false then ERROR(`3rd argument must be either a list or a string`)\ else\ if args[2] = basis then\ if x = A then ftran(A,basis,-z)\ elif x = B then ftran(B,basis,-z)\ elif x = C then ftran(C,basis,[1/op(1,z),-op(2,z)])\ else ERROR(`first argument must be one of A, B, or C`)\ fi\ elif args[2] = Weyl then\ if x = A then ftran(A,Weyl,-z)\ elif x = B then ftran(B,Weyl,-z)\ elif x = C then ftran(C,Weyl,[1/op(1,z),-op(2,z)])\ else ERROR(`first argument must be one of A, B, or C`)\ fi\ elif args[2] = Ricci then\ if x = A then ftran(A,Ricci,-z)\ elif x = B then ftran(B,Ricci,-z)\ elif x = C then ftran(C,Ricci,[1/op(1,z),-op(2,z)])\ else ERROR(`first argument must be one of A, B, or C`)\ fi\ elif args[2] = spin then\ if x = A then ftran(A,spin,-z)\ elif x = B then ftran(B,spin,-z)\ elif x = C then ftran(C,spin,[1/op(1,z),-op(2,z)])\ else ERROR(`first argument must be one of A, B, or C`)\ fi\ else\ if x = A then ftran(A,y,-z)\ elif x = B then ftran(B,y,-z)\ elif x = C then ftran(C,y,[1/op(1,z),-op(2,z)])\ else ERROR(`first argument must be one of A, B, or C`)\ fi\ fi\ fi;\ end:\ `help/text/rtran`:=TEXT( `FUNCTION: nullrot[rtran] - returns the designated inverse`, `2-parameter subgroup of the 6-parameter Lorentz group transformations.`, ` `, `CALLING SEQUENCE: rtran(x,y,z);`, ` `, `PARAMETERS: x - string: either A,B, or C`, ` y - list or string: either a list of symbols consistent with the`, ` np package, or a string of one of "basis", "Weyl", "Ricci",`, ` "spin", or "tot".`, ` z - string, or list if x has the value C`, ` `, `SYNOPSIS: `, `- The call rtran(x,y,z); returns the designated inverse 2-parameter`, ` subgroup of the 6-parameter Lorentz group transformations. The input`, ` variable x represents the choice of null rotation. An x value of A`, ` represents a null rotation leaving l fixed. An x value of B represents a`, ` null rotation leaving n fixed, whilst an x value of C represents a boost`, ` in the l-n plane with a spatial rotation in the m-mc plane.`, ` The input variable y represents which Newman-Penrose`, ` quantities are to be inversely transformed. The user may supply`, ` particular np quantities, or alternatively, the user may supply one of`, ` "basis", "Weyl", "Ricci", "spin", or "tot" for the y variable. If "basis"`, ` is supplied the basis vectors (D,V,X,Y in np notation) will be inversely`, ` transformed. If "Weyl" is supplied the Weyl components will be inversely`, ` transformed. If "Ricci" is supplied the Ricci components will be`, ` inversely transformed. If "spin" is supplied the spin coefficients will`, ` be inversely transformed. If "tot" is supplied all np quantities will be`, ` inversely transformed. The input variable z represents the transformation`, ` parameter. z is complex unless the variable x has value C, in which case`, ` the variable z must be supplied in the form of a list containing`, ` the 2-parameters (real) necessary for the inverse transformation.`, ` `, `- The output of these functions is consistent with the quantities`, ` from the np package. Note that a subscript T denotes transformation`, ` of the np quantities, except for the basis vectors. In the case of the`, ` basis vectors, transformation is denoted by TX, TY, TD, and TV.`, ` `, `- This routine is part of the nullrot package and is usually loaded via`, ` the call with(nullrot). It can also be invoked via the call`, ` nullrot[rtran].`, ` `, `EXAMPLES: `, ` `, `>with(np):`, ` `, `>rtran(A,Ricci,f);`, ` `, ` 2`, ` [R00[T] = R00, R01[T] = R01 - f R00, R02[T] = R02 - 2 f R01 + f R00,`, ` R11[T] = R11 - f R10 - fc R01 + f fc R00,`, ` 2 2`, ` R12[T] = R12 - 2 f R11 - fc R02 + f R10 + 2 f fc R01 - f fc R00,`, ` 2 2`, ` R22[T] = R22 - 2 f R21 - 2 fc R12 + f R20 + 4 f fc R11 + fc R02`, ` 2 2 2 2`, ` - 2 f fc R10 - 2 f fc R01 + f fc R00 ]`, ` `, `>rtran(B,basis,f);`, ` `, ` [TD = D - f Y - fc X + f fc V, TV = V, TX = X - f V, TY = Y - fc V]`, ` `, `>rtran(C,[e,k],[f,h]);`, ` `, ` 2`, ` [e[T] = f e + 1/2 D(f) - 1/2 I f D(h), k[T] = f exp(- I h) k]`, ` `, `SEE ALSO: nullrot, nullrot[ftran], np` ): nullrot[remt]:=proc(x)\ local dlist,tmplst1,tmplst2,tmplst3,tmplst4,tmplst5,temp,i,temp1,nplist;\ if type(x,`=`) = false and type(x,algebraic) = false then ERROR(`Argument must be either an equation or an algebraic`)\ else\ nplist := {mc[T],nc[T],D,gc[T],lc[T],W0[T],W1[T],W2[T],W3[T],W4[T], R00[T],R01[T],R02[T],R11[T],R12[T],R22[T],V,Y,X,k[T],\ r[T],s[T],e[T],t[T],a[T],b[T],p[T],g[T],l[T],m[T],n[T],W0c[T], W1c[T],W2c[T],W3c[T],W4c[T],R10[T],R20[T],R21[T],kc[T],\ rc[T],sc[T],ec[T],tc[T],ac[T],bc[T],pc[T]};\ dlist := [TD,TV,TX,TY,X,Y,D,V];\ temp := x;\ temp1 := indets(x);\ for i to nops(temp1) do\ if member(op(0,op(i,temp1)),dlist) then\ if op(0,op(i,temp1)) = TD then temp := subs(op(i,temp1) = D(op(1,op(i,temp1))),temp)\ elif op(0,op(i,temp1)) = TV then temp := subs(op(i,temp1) = V(op(1,op(i,temp1))),temp)\ elif op(0,op(i,temp1)) = TX then temp := subs(op(i,temp1) = X(op(1,op(i,temp1))),temp)\ elif op(0,op(i,temp1)) = TY then temp := subs(op(i,temp1) = Y(op(1,op(i,temp1))),temp)\ fi\ fi\ od;\ for i to nops(temp1) do\ if member(op(i,temp1),nplist) = true then temp := subs(op(i,temp1) = op(0,op(i,temp1)),temp) fi; temp\ od\ fi;\ end:\ `help/text/remt`:=TEXT( `FUNCTION: nullrot[remt] - removes T's from the Newman-Penrose`, `(np) quantities in an expression. Here T denotes transformation of np`, `quantities.`, ` `, `CALLING SEQUENCE: remt(x);`, ` `, `PARAMETERS: x - equation or algebraic containing T's`, ` `, `SYNOPSIS: `, `- The call remt(x); removes any T's from an expression`, ` that has had the T's added to it via the routine nullrot[addt], or`, ` normally.`, ` The T's denote transformation of np quantities. Note that all transformed`, ` np quantites are denoted by a subscript T except the basis vectors`, ` which are denoted by TD,TV,TX, and TY.`, ` The output will be identical to the input except for the omission`, ` of the T's.`, ` `, `- This routine is part of the nullrot package and is usually loaded via`, ` the call with(nullrot). It can also be invoked via the call`, ` nullrot[remt].`, ` `, `EXAMPLES: `, ` `, `>with(np);`, ` `, ` [D, V, V_D, X, X_D, X_V, Y, Y_D, Y_V, Y_X, conj, eqns, suball]`, ` `, `>eqns();`, ` `, `>eq1;`, ` `, ` 2`, ` D(r) - Y(k) = r + s sc + (e + ec) r - kc t - (3 a + bc - p) k + R00`, ` `, `>addt(");`, ` `, ` 2`, `TD(r[T]) - TY(k[T]) = r[T] + s[T] sc[T] + (e[T] + ec[T]) r[T] - kc[T] t[T]`, ` - (3 a[T] + bc[T] - p[T]) k[T] + R00[T]`, ` `, `>remt(");`, ` `, ` 2`, ` D(r) - Y(k) = r + s sc + (e + ec) r - kc t - (3 a + bc - p) k + R00`, ` `, `SEE ALSO: nullrot, nullrot[addt], np` ): nullrot[addt]:=\ proc(x)\ local dlist,tmplst1,tmplst2,tmplst3,tmplst4,tmplst5,temp,temp1,i,nplist;\ if type(x,`=`) = false and type(x,algebraic) = false then ERROR(`Argument must be either an equation or an algebraic`)\ else\ nplist := {gc,mc,nc,D,lc,W0,W1,W2,W3,W4,R00,R01,R02,R11,R10, R12,R22,R21,R20,V,Y,X,k,r,s,e,t,a,b,p,g,l,m,n,W0c,W1c,W2c,W3c,\ W4c,kc,rc,sc,ec,tc,ac,bc,pc};\ dlist := [D,V,X,Y,TD,TV,TX,TY];\ temp := x;\ temp1 := indets(temp);\ for i to nops(temp1) do\ if member(op(0,op(i,temp1)),dlist) then\ if op(0,op(i,temp1)) = D then temp := subs(op(i,temp1) = TD(op(1,op(i,temp1))),temp)\ elif op(0,op(i,temp1)) = V then temp := subs(op(i,temp1) = TV(op(1,op(i,temp1))),temp)\ elif op(0,op(i,temp1)) = X then temp := subs(op(i,temp1) = TX(op(1,op(i,temp1))),temp)\ elif op(0,op(i,temp1)) = Y then temp := subs(op(i,temp1) = TY(op(1,op(i,temp1))),temp)\ fi\ fi\ od;\ for i to nops(temp1) do\ if member(op(i,temp1),nplist) = true then temp := subs(op(i,temp1) = op(i,temp1)[T],temp) fi; temp\ od\ fi;\ end:\ `help/text/addt`:=TEXT( `FUNCTION: nullrot[addt] - adds T's to all Newman-Penrose (np)`, `quantities in an expression. T denotes transformation of the np`, `quantities.`, ` `, `CALLING SEQUENCE: addt(x);`, ` `, `PARAMETERS: x - equation or algebraic`, ` `, `SYNOPSIS: `, `- The call addt(x); adds T's to an expression given`, ` in np quantities. T denotes transformation of np quantities.`, ` The output will be identical to the input except for the addition`, ` of T's.`, ` Note that all transformed np quantities are denoted by a `, ` subscript T except the basis vectors which are denoted by`, ` TD,TV,TX, and TY.`, ` `, `- This routine is part of the nullrot package and is usually loaded via`, ` the call with(nullrot). It can also be invoked via the call`, ` nullrot[addt].`, ` `, `EXAMPLES: `, ` `, `>with(np);`, ` `, ` [D, V, V_D, X, X_D, X_V, Y, Y_D, Y_V, Y_X, conj, eqns, suball]`, ` `, `>eqns();`, ` `, `>eq1;`, ` `, ` 2`, ` D(r) - Y(k) = r + s sc + (e + ec) r - kc t - (3 a + bc - p) k + R00`, ` `, `>addt(");`, ` `, ` 2`, `TD(r[T]) - TY(k[T]) = r[T] + s[T] sc[T] + (e[T] + ec[T]) r[T] - kc[T] t[T]`, ` - (3 a[T] + bc[T] - p[T]) k[T] + R00[T]`, ` `, `>remt(");`, ` `, ` 2`, ` D(r) - Y(k) = r + s sc + (e + ec) r - kc t - (3 a + bc - p) k + R00`, ` `, `SEE ALSO: nullrot, nullrot[remt], np` ): `nullrot/main2`:=proc(x)\ local flag1,flag2,Tlist,flag,temp,temp1,temp2,temp3,temp4,temp5,temp6,i;\ if type(x,`=`) = false and type(x,algebraic) = false then ERROR(`Argument must be either an equation or an algebraic`)\ else\ Tlist := [TX,TY,TD,TV];\ temp := indets(x);\ for i to nops(temp) do if member(op(i,temp),Tlist) then flag1 := 3 fi; flag1 od;\ for i to nops(temp) do if type(op(i,temp),indexed) then flag2 := 4 fi; flag2 od;\ if flag1 <> 3 and flag2 <> 4 then\ if nargs = 2 then\ temp1 := conj(x);\ for i to nops(args[2]) do temp1 := subs({expc = exp,conj(op(i,args[2])) = op(i,args[2])}, temp1) od\ else subs(expc = exp,conj(x))\ fi\ else\ if nargs = 2 then\ temp1 := x;\ temp2 := remt(temp1);\ temp3 := conj(temp2);\ temp4 := addt(temp3);\ for i to nops(args[2]) do\ temp4 := subs({expc = exp,conj(op(i,args[2])) = op(i,args[2]),TDc = TD,TVc = TV,TXc = TY,TYc = TX},temp4)\ od;\ temp4\ else\ temp1 := x;\ remt(temp1);\ temp3 := conj(");\ temp4 := addt(temp3);\ subs({expc = exp,TDc = TD,TVc = TV,TXc = TY,TYc = TX},temp4)\ fi\ fi\ fi;\ end:\ nullrot[mconj]:=proc(x)\ if type(x,`=`) then\ if nargs = 2 then `nullrot/main2`(lhs(x),args[2]) = `nullrot/main2`(rhs(x),args[2])\ else `nullrot/main2`(lhs(x)) = `nullrot/main2`(rhs(x))\ fi\ elif type(x,algebraic) then if nargs = 2 then `nullrot/main2`(x,args[2]) else `nullrot/main2`(x) fi\ else ERROR(`argument must be of type "=" or "algebraic"`)\ fi;\ end:\ `help/text/mconj`:=TEXT( `FUNCTION: nullrot[mconj] - mconj is a modified form of the`, `Newman-Penrose (np) complex conjugation operator. mconj`, `is able to operate on expressions containing the transformation`, `symbol T.`, ` `, `CALLING SEQUENCE: mconj(x,real);`, ` `, `PARAMETERS: x - equation or algebraic`, ` real - (optional) list`, ` `, `SYNOPSIS: `, `- The routine mconj computes the complex conjugate of an`, ` expression, given in the np formalism, according to the ususal`, ` rules. It will also handle transformation relations which have`, ` been generated via nullrot[ftran] and nullrot[rtran].`, ` `, `- The user is able to call the routine with an optional parameter`, ` in the form of a list which should contain those quantities`, ` that are real. Note, quantities which the np package already`, ` consider to be real need not be included in the list.`, ` `, `- This routine is part of the nullrot package and is usually loaded via`, ` the call with(nullrot). It can also be invoked via the call`, ` nullrot[mconj].`, ` `, `EXAMPLES: `, ` `, `>with(np);`, ` `, ` [D, V, V_D, X, X_D, X_V, Y, Y_D, Y_V, Y_X, conj, eqns, suball]`, ` `, `>a[T]+b[T];`, ` `, ` a[T] + b[T]`, ` `, `>mconj(");`, ` `, ` ac[T] + bc[T]`, ` `, `>eqns();`, ` `, `>eq1;`, ` `, ` 2`, ` D(r) - Y(k) = r + s sc + (e + ec) r - kc t - (3 a + bc - p) k + R00`, ` `, `>addt(");`, ` `, ` 2`, `TD(r[T]) - TY(k[T]) = r[T] + s[T] sc[T] + (e[T] + ec[T]) r[T] - kc[T] t[T]`, ` - (3 a[T] + bc[T] - p[T]) k[T] + R00[T]`, ` `, `>mconj(");`, ` `, ` 2`, ` TD(rc[T]) - TX(kc[T]) = rc[T] + s[T] sc[T] + (e[T] + ec[T]) rc[T]`, ` - k[T] tc[T] - (3 ac[T] + b[T] - pc[T]) kc[T] + R00[T]`, ` `, `>ftran(C,[a],[f,h]);`, ` `, ` exp(- I h) a f - 1/2 exp(- I h) Y(f) + 1/2 I exp(- I h) Y(h) f`, ` [a[T] = --------------------------------------------------------------]`, ` f`, ` `, `>mconj(op(1,"),[f,h]);`, ` `, ` exp(I h) ac f - 1/2 exp(I h) X(f) - 1/2 I exp(I h) X(h) f`, ` ac[T] = ---------------------------------------------------------`, ` f`, ` `, `SEE ALSO: nullrot, nullrot[addt], nullrot[remt], np[conj]` ): nullrot[msubs]:=\ proc()\ local basislist,temp1,temp2,temp3,temp4,i;\ basislist := [exp,expc,TX,TY,TD,TV,X,Y,D,V];\ temp1 := args[nargs];\ for i to nargs-1 do temp1 := subs(args[i],temp1); temp2 := " od;\ temp2;\ temp3 := indets(");\ for i to nops(temp3) do\ if member(op(0,op(i,temp3)),basislist) = false then\ if type(op(i,temp3),function) = true then temp4 := op(i,temp3) = op(0,op(i,temp3)); temp2 := subs(temp4,temp2) fi\ fi;\ temp2\ od;\ temp2;\ end:\ `help/text/msubs`:=TEXT( `FUNCTION: nullrot[msubs] - msubs is a modified form of the`, `subs command. msubs is able to substitute subexpressions`, `which contain the transformation symbol T.`, ` `, `CALLING SEQUENCE: msubs(s1,s2,...,sN,expr);`, ` `, `PARAMETERS: s1,s2,...,sN - equations or sets or lists of`, ` equations.`, ` expr - any expression.`, ` `, `SYNOPSIS: `, ` `, `- The routine msubs returns an unevaluated expression`, ` resulting from applying the substitutions specified by the`, ` first arguments to the last argument expr.`, ` `, `- It differs from the normal subs routine in that it is able to`, ` substitute the transformed basis vectors TX, TD, TV, TY`, ` in a manner such that their functionality is preserved.`, ` `, `- This routine is part of the nullrot package and is usually loaded via`, ` the call with(nullrot). It can also be invoked via the call`, ` nullrot[msubs].`, ` `, `EXAMPLES: `, ` `, `>temp1:=a[T]+b[T];`, ` `, ` temp1 := a[T] + b[T]`, ` `, `>msubs(a[T]=a,b[T]=b,temp1);`, ` `, ` a + b`, ` `, `>with(np);`, ` `, ` [D, V, V_D, X, X_D, X_V, Y, Y_D, Y_V, Y_X, conj, eqns, suball]`, ` `, `>eqns();`, ` `, `>eq2;`, ` `, ` D(s) - X(k) = (r + rc) s + (3 e - ec) s - (t - pc + ac + 3 b) k + W0`, ` `, `>temp1:=addt(");`, ` `, ` temp1 := TD(s[T]) - TX(k[T]) = (r[T] + rc[T]) s[T] + (3 e[T] - ec[T]) s[T]`, ` - (t[T] - pc[T] + ac[T] + 3 b[T]) k[T] + W0[T]`, ` `, `>temp2:=ftran(A,[D,X,s,k,r,e,t,p,a,b,W0],f);`, ` `, `temp2 := [TD = D, TX = X + f D, s[T] = s + f k, k[T] = k, r[T] = r + fc k,`, ` e[T] = e + fc k, t[T] = t + f r + fc s + f fc k,`, ` 2 2`, ` p[T] = p + 2 fc e + fc k + D(fc), a[T] = a + fc r + fc e + fc k,`, ` b[T] = b + f e + fc s + f fc k, W0[T] = W0]`, ` `, `>temp3:=map(mconj,");`, ` `, ` temp3 := [TD = D, TY = Y + fc D, sc[T] = sc + fc kc, kc[T] = kc,`, ` rc[T] = rc + f kc, ec[T] = ec + f kc,`, ` tc[T] = tc + fc rc + f sc + fc f kc,`, ` 2 2`, ` pc[T] = pc + 2 f ec + f kc + D(f), ac[T] = ac + f rc + f ec + f kc,`, ` bc[T] = bc + fc ec + f sc + fc f kc, W0c[T] = W0c]`, ` `, `>msubs(temp2,temp3,temp1);`, ` `, `D(s) + k D(f) - X(k) = (r + fc k + rc + f kc) (s + f k)`, ` + (3 e + 3 fc k - ec - f kc) (s + f k) -`, ` (t + f r + 4 fc s + 4 f fc k - pc - f ec - D(f) + ac + f rc + 3 b + 3 f e)`, ` k + W0`, ` `, `SEE ALSO: nullrot, nullrot[addt], nullrot[remt], np, subs` ): nullrot[inv]:=proc(x,y:string,z)\ local temp,temp1,temp2,temp3,temp4,temp5,temp6,temp7,temp8,temp9,temp10, temp11,temp5a,temp5b,nplist,i,mark,Dlist,Vlist,Xlist,\ Ylist,basislist;\ Dlist := map(D,{gc,mc,nc,lc,W0,W1,W2,W3,W4,R00,R01,R02,R11,R10,R12,R22, R21,R20,k,r,s,e,t,a,b,p,g,l,m,n,W0c,W1c,W2c,W3c,\ W4c,kc,rc,sc,ec,tc,ac,bc,pc});\ Vlist := map(V,{gc,mc,nc,lc,W0,W1,W2,W3,W4,R00,R01,R02,R11,R10,R12,R22, R21,R20,k,r,s,e,t,a,b,p,g,l,m,n,W0c,W1c,W2c,W3c,\ W4c,kc,rc,sc,ec,tc,ac,bc,pc});\ Xlist := map(X,{gc,mc,nc,lc,W0,W1,W2,W3,W4,R00,R01,R02,R11,R10,R12,R22, R21,R20,k,r,s,e,t,a,b,p,g,l,m,n,W0c,W1c,W2c,W3c,\ W4c,kc,rc,sc,ec,tc,ac,bc,pc});\ Ylist := map(Y,{gc,mc,nc,lc,W0,W1,W2,W3,W4,R00,R01,R02,R11,R10,R12,R22, R21,R20,k,r,s,e,t,a,b,p,g,l,m,n,W0c,W1c,W2c,W3c,\ W4c,kc,rc,sc,ec,tc,ac,bc,pc});\ basislist := ((Dlist union Vlist) union Xlist) union Ylist;\ nplist := {gc,mc,nc,D,lc,W0,W1,W2,W3,W4,R00,R01,R02,R11,R10,R12,R22,R21, R20,V,Y,X,k,r,s,e,t,a,b,p,g,l,m,n,W0c,W1c,W2c,W3c,\ W4c,kc,rc,sc,ec,tc,ac,bc,pc};\ if type(z,list) = false and type(z,string) = false then ERROR(`3rd argument must be either a list or a string`)\ else\ if type(x,`=`) then\ if y = A then\ temp1 := addt(x);\ temp2 := ftran(A,tot,z);\ temp3 := map(mconj,");\ temp4 := msubs(temp3,temp2,temp1);\ temp5 := factor(lhs(")-rhs("));\ temp5a := factor(lhs(x)-rhs(x));\ temp5b := simplify(factor(temp5a-temp5));\ if temp5b = 0 then RETURN(true)\ else\ temp6 := indets(temp5a);\ mark := 0;\ for i to nops(temp6) do if member(op(i,temp6),basislist) = true then mark := op(i,temp6) fi od;\ if mark <> 0 then\ temp7 := degree(temp5a,mark);\ temp8 := mark^temp7 = solve(temp5a,mark^temp7);\ temp10 := msubs(temp8,temp5);\ temp11 := simplify(factor("));\ if temp11 = 0 then RETURN(true) else RETURN(false) fi\ else\ for i to nops(temp6) do if member(op(i,temp6),nplist) = true then mark := op(i,temp6) fi od;\ temp7 := degree(temp5a,mark);\ temp8 := mark^temp7 = solve(temp5a,mark^temp7);\ temp10 := msubs(temp8,temp5);\ temp11 := simplify(factor("));\ if temp11 = 0 then RETURN(true) else RETURN(false) fi\ fi\ fi\ elif y = B then\ temp1 := addt(x);\ temp2 := ftran(B,tot,z);\ temp3 := map(mconj,");\ temp4 := msubs(temp3,temp2,temp1);\ temp5 := factor(lhs(")-rhs("));\ temp5a := factor(lhs(x)-rhs(x));\ temp5b := simplify(factor(temp5a-temp5));\ if temp5b = 0 then RETURN(true)\ else\ temp6 := indets(temp5a);\ mark := 0;\ for i to nops(temp6) do if member(op(i,temp6),basislist) = true then mark := op(i,temp6) fi od;\ if mark <> 0 then\ temp7 := degree(temp5a,mark);\ temp8 := mark^temp7 = solve(temp5a,mark^temp7);\ temp10 := msubs(temp8,temp5);\ temp11 := simplify(factor("));\ if temp11 = 0 then RETURN(true) else RETURN(false) fi\ else\ for i to nops(temp6) do if member(op(i,temp6),nplist) = true then mark := op(i,temp6) fi od;\ temp7 := degree(temp5a,mark);\ temp8 := mark^temp7 = solve(temp5a,mark^temp7);\ temp10 := msubs(temp8,temp5);\ temp11 := simplify(factor("));\ if temp11 = 0 then RETURN(true) else RETURN(false) fi\ fi\ fi\ elif y = C then\ temp := [D(exp(I*op(1,z))) = I*exp(I*op(1,z))*D(op(1,z)), D(exp(I*op(2,z))) = I*exp(I*op(2,z))*D(op(2,z)),\ V(exp(I*op(1,z))) = I*exp(I*op(1,z))*V(op(1,z)), V(exp(I*op(2,z))) = I*exp(I*op(2,z))*V(op(2,z)),\ X(exp(I*op(1,z))) = I*exp(I*op(1,z))*X(op(1,z)), X(exp(I*op(2,z))) = I*exp(I*op(2,z))*X(op(2,z)),\ Y(exp(I*op(1,z))) = I*exp(I*op(1,z))*Y(op(1,z)), Y(exp(I*op(2,z))) = I*exp(I*op(2,z))*Y(op(2,z)),\ D(exp(-I*op(1,z))) = -I*exp(-I*op(1,z))*D(op(1,z)), D(exp(-I*op(2,z))) = -I*exp(-I*op(2,z))*D(op(2,z)),\ V(exp(-I*op(1,z))) = -I*exp(-I*op(1,z))*V(op(1,z)), V(exp(-I*op(2,z))) = -I*exp(-I*op(2,z))*V(op(2,z)),\ X(exp(-I*op(1,z))) = -I*exp(-I*op(1,z))*X(op(1,z)), X(exp(-I*op(2,z))) = -I*exp(-I*op(2,z))*X(op(2,z)),\ Y(exp(-I*op(1,z))) = -I*exp(-I*op(1,z))*Y(op(1,z)), Y(exp(-I*op(2,z))) = -I*exp(-I*op(2,z))*Y(op(2,z))];\ temp1 := addt(x);\ temp2 := ftran(C,tot,z);\ temp3 := map(mconj,",z);\ temp4 := msubs(temp3,temp2,temp1);\ temp5 := factor(lhs(")-rhs("));\ temp5 := simplify(factor(msubs(temp,temp5)));\ temp5a := factor(lhs(x)-rhs(x));\ temp5b := simplify(factor(temp5a-temp5));\ if temp5b = 0 then RETURN(true)\ else\ temp6 := indets(temp5a);\ mark := 0;\ for i to nops(temp6) do if member(op(i,temp6),basislist) = true then mark := op(i,temp6) fi od;\ if mark <> 0 then\ temp7 := degree(temp5a,mark);\ temp8 := mark^temp7 = solve(temp5a,mark^temp7);\ temp10 := msubs(temp8,temp5);\ temp11 := simplify(factor("));\ if temp11 = 0 then RETURN(true) else RETURN(false) fi\ else\ for i to nops(temp6) do if member(op(i,temp6),nplist) = true then mark := op(i,temp6) fi od;\ temp7 := degree(temp5a,mark);\ temp8 := mark^temp7 = solve(temp5a,mark^temp7);\ temp10 := msubs(temp8,temp5);\ temp11 := simplify(factor("));\ if temp11 = 0 then RETURN(true) else RETURN(false) fi\ fi\ fi\ else ERROR(`second argument must be one of "A", "B", or "C"`)\ fi\ elif type(x,algebraic) then\ if y = A then\ temp1 := addt(x);\ temp2 := ftran(A,tot,z);\ temp3 := map(mconj,");\ temp4 := msubs(temp3,temp2,temp1);\ temp5 := factor(temp4);\ temp5a := factor(x);\ temp5b := simplify(factor(temp5a-temp5));\ if temp5b = 0 then RETURN(true)\ else\ temp6 := indets(temp5a);\ mark := 0;\ for i to nops(temp6) do if member(op(i,temp6),basislist) = true then mark := op(i,temp6) fi od;\ if mark <> 0 then\ temp7 := degree(temp5a,mark);\ temp8 := mark^temp7 = solve(temp5a,mark^temp7);\ temp10 := msubs(temp8,temp5);\ temp11 := simplify(factor("));\ if temp11 = 0 then RETURN(true) else RETURN(false) fi\ else\ for i to nops(temp6) do if member(op(i,temp6),nplist) = true then mark := op(i,temp6) fi od;\ temp7 := degree(temp5a,mark);\ temp8 := mark^temp7 = solve(temp5a,mark^temp7);\ temp10 := msubs(temp8,temp5);\ temp11 := simplify(factor("));\ if temp11 = 0 then RETURN(true) else RETURN(false) fi\ fi\ fi\ elif y = B then\ temp1 := addt(x);\ temp2 := ftran(B,tot,z);\ temp3 := map(mconj,");\ temp4 := msubs(temp3,temp2,temp1);\ temp5 := factor(temp4);\ temp5a := factor(x);\ temp5b := simplify(factor(temp5a-temp5));\ if temp5b = 0 then RETURN(true)\ else\ temp6 := indets(temp5a);\ mark := 0;\ for i to nops(temp6) do if member(op(i,temp6),basislist) = true then mark := op(i,temp6) fi od;\ if mark <> 0 then\ temp7 := degree(temp5a,mark);\ temp8 := mark^temp7 = solve(temp5a,mark^temp7);\ temp10 := msubs(temp8,temp5);\ temp11 := simplify(factor("));\ if temp11 = 0 then RETURN(true) else RETURN(false) fi\ else\ for i to nops(temp6) do if member(op(i,temp6),nplist) = true then mark := op(i,temp6) fi od;\ temp7 := degree(temp5a,mark);\ temp8 := mark^temp7 = solve(temp5a,mark^temp7);\ temp10 := msubs(temp8,temp5);\ temp11 := simplify(factor("));\ if temp11 = 0 then RETURN(true) else RETURN(false) fi\ fi\ fi\ elif y = C then\ temp := [D(exp(I*op(1,z))) = I*exp(I*op(1,z))*D(op(1,z)), D(exp(I*op(2,z))) = I*exp(I*op(2,z))*D(op(2,z)),\ V(exp(I*op(1,z))) = I*exp(I*op(1,z))*V(op(1,z)), V(exp(I*op(2,z))) = I*exp(I*op(2,z))*V(op(2,z)),\ X(exp(I*op(1,z))) = I*exp(I*op(1,z))*X(op(1,z)), X(exp(I*op(2,z))) = I*exp(I*op(2,z))*X(op(2,z)),\ Y(exp(I*op(1,z))) = I*exp(I*op(1,z))*Y(op(1,z)), Y(exp(I*op(2,z))) = I*exp(I*op(2,z))*Y(op(2,z)),\ D(exp(-I*op(1,z))) = -I*exp(-I*op(1,z))*D(op(1,z)), D(exp(-I*op(2,z))) = -I*exp(-I*op(2,z))*D(op(2,z)),\ V(exp(-I*op(1,z))) = -I*exp(-I*op(1,z))*V(op(1,z)), V(exp(-I*op(2,z))) = -I*exp(-I*op(2,z))*V(op(2,z)),\ X(exp(-I*op(1,z))) = -I*exp(-I*op(1,z))*X(op(1,z)), X(exp(-I*op(2,z))) = -I*exp(-I*op(2,z))*X(op(2,z)),\ Y(exp(-I*op(1,z))) = -I*exp(-I*op(1,z))*Y(op(1,z)), Y(exp(-I*op(2,z))) = -I*exp(-I*op(2,z))*Y(op(2,z))];\ temp1 := addt(x);\ temp2 := ftran(C,tot,z);\ temp3 := map(mconj,",z);\ temp4 := msubs(temp3,temp2,temp1);\ temp5 := factor(temp4);\ temp5 := simplify(factor(msubs(temp,temp5)));\ temp5a := factor(x);\ temp5b := simplify(factor(temp5a-temp5));\ if temp5b = 0 then RETURN(true)\ else\ temp6 := indets(temp5a);\ mark := 0;\ for i to nops(temp6) do if member(op(i,temp6),basislist) = true then mark := op(i,temp6) fi od;\ if mark <> 0 then\ temp7 := degree(temp5a,mark);\ temp8 := mark^temp7 = solve(temp5a,mark^temp7);\ temp10 := msubs(temp8,temp5);\ temp11 := simplify(factor("));\ if temp11 = 0 then RETURN(true) else RETURN(false) fi\ else\ for i to nops(temp6) do if member(op(i,temp6),nplist) = true then mark := op(i,temp6) fi od;\ temp7 := degree(temp5a,mark);\ temp8 := mark^temp7 = solve(temp5a,mark^temp7);\ temp10 := msubs(temp8,temp5);\ temp11 := simplify(factor("));\ if temp11 = 0 then RETURN(true) else RETURN(false) fi\ fi\ fi\ else ERROR(`second argument must be one of "A", "B", or "C"`)\ fi\ else ERROR(`first argument must be of type "=" or "algebraic"`)\ fi\ fi;\ end:\ \ `help/text/inv`:=TEXT( `FUNCTION: nullrot[inv] - tests expressions for invariance under a`, `designated 2-parameter subgroup of the 6-parameter Lorentz group`, `transformations. `, ` `, `CALLING SEQUENCE: inv(x,y,z);`, ` `, `PARAMETERS: x - equation or algebraic, given in np quantities`, ` y - string: either A, B, or C`, ` z - string, or list if y has the value C`, ` `, `SYNOPSIS: `, ` `, `- The routine inv returns "true" if the equation or algebraic supplied`, ` for x, given in Newman-Penrose (np) quantities, is invariant under`, ` a designated 2-parameter subgroup of the 6-parameter Lorentz`, ` group transformations. If it is not invariant "false" will be returned.`, ` `, `- The input variable y represents the choice of null rotation. `, ` A y value of A represents a null`, ` rotation leaving l fixed. A y value of B represents a null rotation`, ` leaving n fixed, whilst a y value of C represents a boost in the l-n plane`, ` with a spatial rotation in the m-mc plane.`, ` The input variable z represents the transformation parameter.`, ` z is complex unless the variable y has value C, in which case`, ` the variable z must be supplied in the form of a list containing`, ` the 2-parameters (real) necessary for the transformation.`, ` `, `- This routine is part of the nullrot package and is usually loaded via`, ` the call with(nullrot). It can also be invoked via the call nullrot[inv].`, ` `, `EXAMPLES: `, ` `, `>with(np):`, ` `, `>inv(n+W4,B,f);`, ` `, ` true`, ` `, `>eqns():`, ` `, `>eq1;`, ` `, ` 2`, ` D(r) - Y(k) = r + s sc + (e + ec) r - kc t - (3 a + bc - p) k + R00`, ` `, `>inv(",A,f);`, ` `, ` true`, ` `, `>inv(eq1,C,[p1,p2]);`, ` `, ` true`, ` `, `SEE ALSO: nullrot, nullrot[ftran], np` ):