Calling Sequences

Parameters

NT      - a null tetrad for the spacetime metric $g$

PT      -  the Petrov type of $g$

W       - (optional) the Weyl tensor of $g$

NP      - (optional) the Newman-Penrose Weyl scalars

options - one or more of the keyword arguments method and output

Description

 • The Newman-Penrose Weyl scalars are a set of 5 complex scalars, labeled ${\mathrm{Ψ}}_{0}$, , and defined by certain components of the Weyl tensor with respect to a given null tetrad in a four dimensional spacetime of signature [1, -1, -1, -1]. Under local Lorentz transformations, the Newman-Penrose Weyl scalars transform among themselves in a natural way. Depending upon the Petrov type of the spacetime it is possible to transform the Newman-Penrose Weyl scalars to one of following normal forms. Below, and are complex scalars.See NPCurvatureScalars, NullTetradTransformation.

Type I.

Type II. ${\mathrm{Ψ}}_{0}$

Type III.

Type D.

Type N.

Type O.

See Penrose and Rindle Vol. 2, Section 8.3.

 • Null tetrads for which the Newman-Penrose Weyl scalars are in the above normal form are called adapted null tetrads. Calculations are often simplified by using an adapted null tetrad.
 • The command AdaptedNullTetrad returns a null tetrad which will put the Newman-Penrose Weyl scalars in the above normal form.
 • The command AdaptedNullTetrad is part of the DifferentialGeometry:-Tensor package. It can be used in the form AdaptedNullTetrad(...) only after executing the commands with(DifferentialGeometry) and with(Tensor), but can always be used by executing DifferentialGeometry:-Tensor:-AdaptedNullTetrad(...).

Examples

 > $\mathrm{with}\left(\mathrm{DifferentialGeometry}\right):$$\mathrm{with}\left(\mathrm{Tensor}\right):$

Set the global environment variable _EnvExplicit to true to insure that the adapted null tetrads are free of expressions.

 > $\mathrm{_EnvExplicit}≔\mathrm{true}:$

Example 1. Type I

We calculate an adapted null tetrad for a type spacetime. First define the coordinates to be used and then define the metric.

 > $\mathrm{DGsetup}\left(\left[t,x,y,z\right],M\right)$
 ${\mathrm{frame name: M}}$ (2.1)
 M > $\mathrm{g1}≔\mathrm{evalDG}\left(\mathrm{dt}&t\mathrm{dt}-{t}^{2}\mathrm{dx}&t\mathrm{dx}-{x}^{2}\mathrm{dy}&t\mathrm{dy}-\mathrm{dz}&t\mathrm{dz}\right)$
 ${\mathrm{g1}}{:=}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}\right]{,}{1}\right]{,}\left[\left[{2}{,}{2}\right]{,}{-}{{t}}^{{2}}\right]{,}\left[\left[{3}{,}{3}\right]{,}{-}{{x}}^{{2}}\right]{,}\left[\left[{4}{,}{4}\right]{,}{-1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}\right]{,}{1}\right]{,}\left[\left[{2}{,}{2}\right]{,}{-}{{t}}^{{2}}\right]{,}\left[\left[{3}{,}{3}\right]{,}{-}{{x}}^{{2}}\right]{,}\left[\left[{4}{,}{4}\right]{,}{-1}\right]\right]\right]\right)$ (2.2)

Here is an initial null tetrad.

 > $\mathrm{NT1}≔\mathrm{evalDG}\left(\left[\mathrm{D_t}+\mathrm{D_z},\frac{1\left(\mathrm{D_t}-\mathrm{D_z}\right)}{2},\frac{1\sqrt{2}\mathrm{D_x}}{2t}+\frac{1I\sqrt{2}\mathrm{D_y}}{2x},\frac{1\sqrt{2}\mathrm{D_x}}{2t}-\frac{1I\sqrt{2}\mathrm{D_y}}{2x}\right]\right)$
 ${\mathrm{NT1}}{:=}\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]{,}\left[\left[{4}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]{,}\left[\left[{4}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{1}}{{2}}\right]{,}\left[\left[{4}\right]{,}{-}\frac{{1}}{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{1}}{{2}}\right]{,}\left[\left[{4}\right]{,}{-}\frac{{1}}{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{2}\right]{,}\frac{\sqrt{{2}}}{{2}{}{t}}\right]{,}\left[\left[{3}\right]{,}\frac{\frac{{I}}{{2}}{}\sqrt{{2}}}{{x}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{2}\right]{,}\frac{\sqrt{{2}}}{{2}{}{t}}\right]{,}\left[\left[{3}\right]{,}\frac{\frac{{I}}{{2}}{}\sqrt{{2}}}{{x}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{2}\right]{,}\frac{\sqrt{{2}}}{{2}{}{t}}\right]{,}\left[\left[{3}\right]{,}\frac{{-}\frac{{I}}{{2}}{}\sqrt{{2}}}{{x}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{2}\right]{,}\frac{\sqrt{{2}}}{{2}{}{t}}\right]{,}\left[\left[{3}\right]{,}\frac{{-}\frac{{I}}{{2}}{}\sqrt{{2}}}{{x}}\right]\right]\right]\right)\right]$ (2.3)

We check that this is indeed a null tetrad for the given metric using GRQuery.

 M > $\mathrm{GRQuery}\left(\mathrm{NT1},\mathrm{g1},"NullTetrad"\right)$
 ${\mathrm{true}}$ (2.4)

Compute the Newman-Penrose coefficients and check that the Petrov type is I. The coefficients are not in normal form for type I (for example, ), so is not an adapted null tetrad.

 M > $\mathrm{NP1}≔\mathrm{NPCurvatureScalars}\left(\mathrm{NT1},\mathrm{output}=\left["WeylScalars"\right]\right)$
 ${\mathrm{NP1}}{:=}{\mathrm{table}}\left(\left[{"Psi1"}{=}{-}\frac{{1}}{{4}}{}\frac{\sqrt{{2}}}{{x}{}{{t}}^{{2}}}{,}{"Psi0"}{=}{0}{,}{"Psi2"}{=}{0}{,}{"Psi4"}{=}{0}{,}{"Psi3"}{=}{-}\frac{{1}}{{8}}{}\frac{\sqrt{{2}}}{{x}{}{{t}}^{{2}}}\right]\right)$ (2.5)
 M > $\mathrm{PetrovType}\left(\mathrm{NP1}\right)$
 ${"I"}$ (2.6)

 > $\mathrm{newNT1}≔\mathrm{combine}\left(\mathrm{AdaptedNullTetrad}\left(\mathrm{NT1},"I"\right),\mathrm{symbolic}\right)$
 ${\mathrm{newNT1}}{:=}\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{\sqrt{{2}}}{{2}}\right]{,}\left[\left[{2}\right]{,}{-}\frac{\sqrt{{2}}}{{2}{}{t}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{\sqrt{{2}}}{{2}}\right]{,}\left[\left[{2}\right]{,}{-}\frac{\sqrt{{2}}}{{2}{}{t}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{\sqrt{{2}}}{{2}}\right]{,}\left[\left[{2}\right]{,}\frac{\sqrt{{2}}}{{2}{}{t}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{\sqrt{{2}}}{{2}}\right]{,}\left[\left[{2}\right]{,}\frac{\sqrt{{2}}}{{2}{}{t}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{3}\right]{,}\frac{\frac{{1}}{{2}}{+}\frac{{I}}{{2}}}{{x}}\right]{,}\left[\left[{4}\right]{,}\frac{{1}}{{2}}{-}\frac{{I}}{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{3}\right]{,}\frac{\frac{{1}}{{2}}{+}\frac{{I}}{{2}}}{{x}}\right]{,}\left[\left[{4}\right]{,}\frac{{1}}{{2}}{-}\frac{{I}}{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{3}\right]{,}\frac{\frac{{1}}{{2}}{-}\frac{{I}}{{2}}}{{x}}\right]{,}\left[\left[{4}\right]{,}\frac{{1}}{{2}}{+}\frac{{I}}{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{3}\right]{,}\frac{\frac{{1}}{{2}}{-}\frac{{I}}{{2}}}{{x}}\right]{,}\left[\left[{4}\right]{,}\frac{{1}}{{2}}{+}\frac{{I}}{{2}}\right]\right]\right]\right)\right]$ (2.7)

Calculate the Newman-Penrose coefficients for the new null tetrad. We obtain the correct normal form (with since  and .

 M > $\mathrm{newNP1}≔\mathrm{NPCurvatureScalars}\left(\mathrm{newNT1},\mathrm{output}=\left["WeylScalars"\right]\right)$
 ${\mathrm{newNP1}}{:=}{\mathrm{table}}\left(\left[{"Psi1"}{=}{0}{,}{"Psi0"}{=}{-}\frac{\frac{{1}}{{2}}{}{I}}{{{t}}^{{2}}{}{x}}{,}{"Psi2"}{=}{0}{,}{"Psi4"}{=}{-}\frac{\frac{{1}}{{2}}{}{I}}{{{t}}^{{2}}{}{x}}{,}{"Psi3"}{=}{0}\right]\right)$ (2.8)

Example 2. Type II

We calculate an adapted null tetrad for a type spacetime. First define the coordinates to be used and then define the metric.

 > $\mathrm{DGsetup}\left(\left[r,u,x,y\right],M\right)$
 ${\mathrm{frame name: M}}$ (2.9)
 M > $\mathrm{g2}≔\mathrm{evalDG}\left(-\frac{2{r}^{2}\left(\mathrm{dx}&t\mathrm{dx}+\mathrm{dy}&t\mathrm{dy}\right)}{{\left(2x\right)}^{3}}+2\mathrm{du}&s\mathrm{dr}-\left(3\cdot 2x+\frac{2m}{r}\right)\mathrm{du}&t\mathrm{du}\right)$
 ${\mathrm{g2}}{:=}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}{1}\right]{,}\left[\left[{2}{,}{1}\right]{,}{1}\right]{,}\left[\left[{2}{,}{2}\right]{,}{-}\frac{{2}{}\left({3}{}{x}{}{r}{+}{m}\right)}{{r}}\right]{,}\left[\left[{3}{,}{3}\right]{,}{-}\frac{{{r}}^{{2}}}{{4}{}{{x}}^{{3}}}\right]{,}\left[\left[{4}{,}{4}\right]{,}{-}\frac{{{r}}^{{2}}}{{4}{}{{x}}^{{3}}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}{1}\right]{,}\left[\left[{2}{,}{1}\right]{,}{1}\right]{,}\left[\left[{2}{,}{2}\right]{,}{-}\frac{{2}{}\left({3}{}{x}{}{r}{+}{m}\right)}{{r}}\right]{,}\left[\left[{3}{,}{3}\right]{,}{-}\frac{{{r}}^{{2}}}{{4}{}{{x}}^{{3}}}\right]{,}\left[\left[{4}{,}{4}\right]{,}{-}\frac{{{r}}^{{2}}}{{4}{}{{x}}^{{3}}}\right]\right]\right]\right)$ (2.10)

Here is an initial null tetrad.

 M > $\mathrm{NT2}≔\mathrm{evalDG}\left(\left[\mathrm{D_r},\frac{\left(3xr+m\right)\mathrm{D_r}}{r}+\mathrm{D_u},\frac{I\sqrt{2}{x}^{\frac{3}{2}}\mathrm{D_x}}{r}+\frac{\sqrt{2}{x}^{\frac{3}{2}}\mathrm{D_y}}{r},-\frac{I\sqrt{2}{x}^{\frac{3}{2}}\mathrm{D_x}}{r}+\frac{\sqrt{2}{x}^{\frac{3}{2}}\mathrm{D_y}}{r}\right]\right)$
 ${\mathrm{NT2}}{:=}\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{3}{}{x}{}{r}{+}{m}}{{r}}\right]{,}\left[\left[{2}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{3}{}{x}{}{r}{+}{m}}{{r}}\right]{,}\left[\left[{2}\right]{,}{1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{3}\right]{,}\frac{{I}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]{,}\left[\left[{4}\right]{,}\frac{\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{3}\right]{,}\frac{{I}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]{,}\left[\left[{4}\right]{,}\frac{\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{3}\right]{,}\frac{{-I}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]{,}\left[\left[{4}\right]{,}\frac{\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{3}\right]{,}\frac{{-I}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]{,}\left[\left[{4}\right]{,}\frac{\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]\right]\right]\right)\right]$ (2.11)

We check that this is indeed a null tetrad for the given metric.

 M > $\mathrm{GRQuery}\left(\mathrm{NT2},\mathrm{g2},"NullTetrad"\right)$
 ${\mathrm{true}}$ (2.12)

Compute the Newman-Penrose coefficients and check that the Petrov type is II. The coefficients are not in normal form for type II (for example, ), so is not an adapted null tetrad.

 M > $\mathrm{NP2}≔\mathrm{NPCurvatureScalars}\left(\mathrm{NT2},\mathrm{output}=\left["WeylScalars"\right]\right)$
 ${\mathrm{NP2}}{:=}{\mathrm{table}}\left(\left[{"Psi1"}{=}{0}{,}{"Psi0"}{=}{0}{,}{"Psi2"}{=}{-}\frac{{m}}{{{r}}^{{3}}}{,}{"Psi4"}{=}\frac{{18}{}{{x}}^{{2}}}{{{r}}^{{2}}}{,}{"Psi3"}{=}{-}\frac{{3}{}{I}{}\sqrt{{2}}{}{{x}}^{{3}{/}{2}}}{{{r}}^{{2}}}\right]\right)$ (2.13)
 M > $\mathrm{PetrovType}\left(\mathrm{NP2}\right)$
 ${"II"}$ (2.14)

Calculate an adapted null tetrad. We use the third calling sequence so that the Weyl tensor, or equivalently, the Newman-Penrose Weyl scalars need not be computed. Moreover, all computations are then algebraic and we can use Maple's assuming feature to simplify all intermediate calculations.

 > $\mathrm{newNT2}≔\mathrm{AdaptedNullTetrad}\left(\mathrm{NT2},"II",\mathrm{NP2}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}assuming\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}0
 ${\mathrm{newNT2}}{:=}\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}\frac{\sqrt{{r}}{}\sqrt{{2}{}{x}{}{r}{-}{3}{}{m}}{}{x}}{{m}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}\frac{\sqrt{{r}}{}\sqrt{{2}{}{x}{}{r}{-}{3}{}{m}}{}{x}}{{m}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}\frac{{2}{}{{r}}^{{3}}{}{{x}}^{{3}}{+}{3}{}{{m}}^{{2}}{}{r}{}{x}{+}{{m}}^{{3}}}{{{r}}^{{3}}{{2}}}{}\sqrt{{2}{}{x}{}{r}{-}{3}{}{m}}{}{x}{}{m}}\right]{,}\left[\left[{2}\right]{,}{-}\frac{{m}}{\sqrt{{r}}{}\sqrt{{2}{}{x}{}{r}{-}{3}{}{m}}{}{x}}\right]{,}\left[\left[{3}\right]{,}{-}\frac{{4}{}{{x}}^{{2}}}{\sqrt{{r}}{}\sqrt{{2}{}{x}{}{r}{-}{3}{}{m}}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}\frac{{2}{}{{r}}^{{3}}{}{{x}}^{{3}}{+}{3}{}{{m}}^{{2}}{}{r}{}{x}{+}{{m}}^{{3}}}{{{r}}^{{3}}{{2}}}{}\sqrt{{2}{}{x}{}{r}{-}{3}{}{m}}{}{x}{}{m}}\right]{,}\left[\left[{2}\right]{,}{-}\frac{{m}}{\sqrt{{r}}{}\sqrt{{2}{}{x}{}{r}{-}{3}{}{m}}{}{x}}\right]{,}\left[\left[{3}\right]{,}{-}\frac{{4}{}{{x}}^{{2}}}{\sqrt{{r}}{}\sqrt{{2}{}{x}{}{r}{-}{3}{}{m}}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{-I}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}{}{r}}{{m}}\right]{,}\left[\left[{3}\right]{,}\frac{{-I}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]{,}\left[\left[{4}\right]{,}{-}\frac{\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{-I}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}{}{r}}{{m}}\right]{,}\left[\left[{3}\right]{,}\frac{{-I}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]{,}\left[\left[{4}\right]{,}{-}\frac{\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{I}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}{}{r}}{{m}}\right]{,}\left[\left[{3}\right]{,}\frac{{I}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]{,}\left[\left[{4}\right]{,}{-}\frac{\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{I}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}{}{r}}{{m}}\right]{,}\left[\left[{3}\right]{,}\frac{{I}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]{,}\left[\left[{4}\right]{,}{-}\frac{\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]\right]\right]\right)\right]$ (2.15)

Calculate the Newman-Penrose coefficients for the new null tetrad. We obtain the correct normal form (with ) since  and.

 M > $\mathrm{newNP2}≔\mathrm{NPCurvatureScalars}\left(\mathrm{newNT2},\mathrm{output}=\left["WeylScalars"\right]\right)$
 ${\mathrm{newNP2}}{:=}{\mathrm{table}}\left(\left[{"Psi1"}{=}{0}{,}{"Psi0"}{=}{0}{,}{"Psi2"}{=}{-}\frac{{m}}{{{r}}^{{3}}}{,}{"Psi4"}{=}{-}\frac{{6}{}{m}}{{{r}}^{{3}}}{,}{"Psi3"}{=}{0}\right]\right)$ (2.16)

Example 3. Type III

We calculate an adapted null tetrad for a type spacetime. First define the coordinates to be used and then define the metric.

 > $\mathrm{DGsetup}\left(\left[r,u,x,y\right],M\right)$
 ${\mathrm{frame name: M}}$ (2.17)
 M > $\mathrm{g3}≔\mathrm{evalDG}\left(-\frac{{r}^{2}\left(\mathrm{dx}&t\mathrm{dx}+\mathrm{dy}&t\mathrm{dy}\right)}{{x}^{3}}+2\mathrm{du}&s\mathrm{dr}-\frac{3x\mathrm{du}&t\mathrm{du}}{2}\right)$
 ${\mathrm{g3}}{:=}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}{1}\right]{,}\left[\left[{2}{,}{1}\right]{,}{1}\right]{,}\left[\left[{2}{,}{2}\right]{,}{-}\frac{{3}{}{x}}{{2}}\right]{,}\left[\left[{3}{,}{3}\right]{,}{-}\frac{{{r}}^{{2}}}{{{x}}^{{3}}}\right]{,}\left[\left[{4}{,}{4}\right]{,}{-}\frac{{{r}}^{{2}}}{{{x}}^{{3}}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}{1}\right]{,}\left[\left[{2}{,}{1}\right]{,}{1}\right]{,}\left[\left[{2}{,}{2}\right]{,}{-}\frac{{3}{}{x}}{{2}}\right]{,}\left[\left[{3}{,}{3}\right]{,}{-}\frac{{{r}}^{{2}}}{{{x}}^{{3}}}\right]{,}\left[\left[{4}{,}{4}\right]{,}{-}\frac{{{r}}^{{2}}}{{{x}}^{{3}}}\right]\right]\right]\right)$ (2.18)

Here is an initial null tetrad.

 > $\mathrm{NT3}≔\mathrm{evalDG}\left(\left[\left(\frac{3x}{8}+\frac{1}{2}\right)\mathrm{D_r}+\frac{1\mathrm{D_u}}{2}+\frac{1\sqrt{2}{x}^{\frac{3}{2}}\mathrm{D_y}}{2r},\left(\frac{3x}{8}+\frac{1}{2}\right)\mathrm{D_r}+\frac{1\mathrm{D_u}}{2}-\frac{1\sqrt{2}{x}^{\frac{3}{2}}\mathrm{D_y}}{2r},\left(-\frac{3x}{8}+\frac{1}{2}\right)\mathrm{D_r}-\frac{1\mathrm{D_u}}{2}+\frac{1I\sqrt{2}{x}^{\frac{3}{2}}\mathrm{D_x}}{2r},\left(-\frac{3x}{8}+\frac{1}{2}\right)\mathrm{D_r}-\frac{1\mathrm{D_u}}{2}-\frac{1I\sqrt{2}{x}^{\frac{3}{2}}\mathrm{D_x}}{2r}\right]\right)$
 ${\mathrm{NT3}}{:=}\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{3}{}{x}}{{8}}{+}\frac{{1}}{{2}}\right]{,}\left[\left[{2}\right]{,}\frac{{1}}{{2}}\right]{,}\left[\left[{4}\right]{,}\frac{\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{2}{}{r}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{3}{}{x}}{{8}}{+}\frac{{1}}{{2}}\right]{,}\left[\left[{2}\right]{,}\frac{{1}}{{2}}\right]{,}\left[\left[{4}\right]{,}\frac{\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{2}{}{r}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{3}{}{x}}{{8}}{+}\frac{{1}}{{2}}\right]{,}\left[\left[{2}\right]{,}\frac{{1}}{{2}}\right]{,}\left[\left[{4}\right]{,}{-}\frac{\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{2}{}{r}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{3}{}{x}}{{8}}{+}\frac{{1}}{{2}}\right]{,}\left[\left[{2}\right]{,}\frac{{1}}{{2}}\right]{,}\left[\left[{4}\right]{,}{-}\frac{\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{2}{}{r}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}\frac{{3}{}{x}}{{8}}{+}\frac{{1}}{{2}}\right]{,}\left[\left[{2}\right]{,}{-}\frac{{1}}{{2}}\right]{,}\left[\left[{3}\right]{,}\frac{\frac{{I}}{{2}}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}\frac{{3}{}{x}}{{8}}{+}\frac{{1}}{{2}}\right]{,}\left[\left[{2}\right]{,}{-}\frac{{1}}{{2}}\right]{,}\left[\left[{3}\right]{,}\frac{\frac{{I}}{{2}}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}\frac{{3}{}{x}}{{8}}{+}\frac{{1}}{{2}}\right]{,}\left[\left[{2}\right]{,}{-}\frac{{1}}{{2}}\right]{,}\left[\left[{3}\right]{,}\frac{{-}\frac{{I}}{{2}}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}\frac{{3}{}{x}}{{8}}{+}\frac{{1}}{{2}}\right]{,}\left[\left[{2}\right]{,}{-}\frac{{1}}{{2}}\right]{,}\left[\left[{3}\right]{,}\frac{{-}\frac{{I}}{{2}}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]\right]\right]\right)\right]$ (2.19)

We check that this is indeed a null tetrad for the given metric.

 M > $\mathrm{GRQuery}\left(\mathrm{NT3},\mathrm{g3},"NullTetrad"\right)$
 ${\mathrm{true}}$ (2.20)

Compute the Newman-Penrose coefficients and check that the Petrov type is III. The coefficients are not in normal form for type III (for example, ), so is not an adapted null tetrad.

 M > $\mathrm{NP3}≔\mathrm{NPCurvatureScalars}\left(\mathrm{NT3},\mathrm{output}=\left["WeylScalars"\right]\right)$
 ${\mathrm{NP3}}{:=}{\mathrm{table}}\left(\left[{"Psi1"}{=}{-}\frac{{3}}{{32}}{}\frac{\left({2}{}{I}{}\sqrt{{2}}{+}{3}{}\sqrt{{x}}\right){}{{x}}^{{3}{/}{2}}}{{{r}}^{{2}}}{,}{"Psi0"}{=}\frac{{3}}{{32}}{}\frac{{x}{}\left({4}{}{I}{}\sqrt{{2}}{}\sqrt{{x}}{+}{3}{}{x}\right)}{{{r}}^{{2}}}{,}{"Psi2"}{=}\frac{{9}}{{32}}{}\frac{{{x}}^{{2}}}{{{r}}^{{2}}}{,}{"Psi4"}{=}{-}\frac{{3}}{{32}}{}\frac{{x}{}\left({4}{}{I}{}\sqrt{{2}}{}\sqrt{{x}}{-}{3}{}{x}\right)}{{{r}}^{{2}}}{,}{"Psi3"}{=}\frac{{3}}{{32}}{}\frac{\left({2}{}{I}{}\sqrt{{2}}{-}{3}{}\sqrt{{x}}\right){}{{x}}^{{3}{/}{2}}}{{{r}}^{{2}}}\right]\right)$ (2.21)
 > $\mathrm{PetrovType}\left(\mathrm{NP3}\right)$
 ${"III"}$ (2.22)

 > $\mathrm{newNT3}≔\mathrm{AdaptedNullTetrad}\left(\mathrm{NT3},"III",\mathrm{NP3}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}assuming\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}0
 ${\mathrm{newNT3}}{:=}\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{3}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{8}{}{{r}}^{{2}}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{3}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{8}{}{{r}}^{{2}}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{11}{}\sqrt{{2}}{}{{r}}^{{2}}}{{8}{}\sqrt{{x}}}\right]{,}\left[\left[{2}\right]{,}\frac{{4}{}\sqrt{{2}}{}{{r}}^{{2}}}{{3}{}{{x}}^{{3}}{{2}}}}\right]{,}\left[\left[{3}\right]{,}{r}{}\sqrt{{x}}{}\sqrt{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{11}{}\sqrt{{2}}{}{{r}}^{{2}}}{{8}{}\sqrt{{x}}}\right]{,}\left[\left[{2}\right]{,}\frac{{4}{}\sqrt{{2}}{}{{r}}^{{2}}}{{3}{}{{x}}^{{3}}{{2}}}}\right]{,}\left[\left[{3}\right]{,}{r}{}\sqrt{{x}}{}\sqrt{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{3}{}\sqrt{{2}}{}\sqrt{{x}}}{{8}}\right]{,}\left[\left[{3}\right]{,}\frac{\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{2}{}{r}}\right]{,}\left[\left[{4}\right]{,}\frac{\frac{{I}}{{2}}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{3}{}\sqrt{{2}}{}\sqrt{{x}}}{{8}}\right]{,}\left[\left[{3}\right]{,}\frac{\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{2}{}{r}}\right]{,}\left[\left[{4}\right]{,}\frac{\frac{{I}}{{2}}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{3}{}\sqrt{{2}}{}\sqrt{{x}}}{{8}}\right]{,}\left[\left[{3}\right]{,}\frac{\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{2}{}{r}}\right]{,}\left[\left[{4}\right]{,}\frac{{-}\frac{{I}}{{2}}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{3}{}\sqrt{{2}}{}\sqrt{{x}}}{{8}}\right]{,}\left[\left[{3}\right]{,}\frac{\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{2}{}{r}}\right]{,}\left[\left[{4}\right]{,}\frac{{-}\frac{{I}}{{2}}{}\sqrt{{2}}{}{{x}}^{{3}}{{2}}}}{{r}}\right]\right]\right]\right)\right]$ (2.23)

Calculate the Newman-Penrose coefficients for the new null tetrad. We obtain the correct normal form since  and .

 M > $\mathrm{NPCurvatureScalars}\left(\mathrm{newNT3},\mathrm{output}=\left["WeylScalars"\right]\right)$
 ${\mathrm{table}}\left(\left[{"Psi1"}{=}{0}{,}{"Psi0"}{=}{0}{,}{"Psi2"}{=}{0}{,}{"Psi4"}{=}{0}{,}{"Psi3"}{=}{1}\right]\right)$ (2.24)

Example 4. Type D

We calculate an adapted null tetrad for a type spacetime. First define the coordinates to be used and then define the metric.

 > $\mathrm{DGsetup}\left(\left[t,x,y,z\right],M\right)$
 ${\mathrm{frame name: M}}$ (2.25)
 M > $\mathrm{g4}≔\mathrm{evalDG}\left(-\mathrm{dx}&t\mathrm{dx}-\mathrm{dy}&t\mathrm{dy}-\frac{1{ⅇ}^{2x}\mathrm{dz}&t\mathrm{dz}}{2}+\left(\mathrm{dt}+{ⅇ}^{x}\mathrm{dz}\right)&s\left(\mathrm{dt}+{ⅇ}^{x}\mathrm{dz}\right)\right)$
 ${\mathrm{g4}}{:=}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}\right]{,}{1}\right]{,}\left[\left[{1}{,}{4}\right]{,}{{ⅇ}}^{{x}}\right]{,}\left[\left[{2}{,}{2}\right]{,}{-1}\right]{,}\left[\left[{3}{,}{3}\right]{,}{-1}\right]{,}\left[\left[{4}{,}{1}\right]{,}{{ⅇ}}^{{x}}\right]{,}\left[\left[{4}{,}{4}\right]{,}\frac{{{ⅇ}}^{{2}{}{x}}}{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{1}\right]{,}{1}\right]{,}\left[\left[{1}{,}{4}\right]{,}{{ⅇ}}^{{x}}\right]{,}\left[\left[{2}{,}{2}\right]{,}{-1}\right]{,}\left[\left[{3}{,}{3}\right]{,}{-1}\right]{,}\left[\left[{4}{,}{1}\right]{,}{{ⅇ}}^{{x}}\right]{,}\left[\left[{4}{,}{4}\right]{,}\frac{{{ⅇ}}^{{2}{}{x}}}{{2}}\right]\right]\right]\right)$ (2.26)

Here is an initial null tetrad.

 > $\mathrm{NT4}≔\mathrm{evalDG}\left(\left[-\frac{1\sqrt{2}\left(\sqrt{2}-1\right)\mathrm{D_t}}{2}+{ⅇ}^{-x}\mathrm{D_z},\frac{1\sqrt{2}\left(1+\sqrt{2}\right)\mathrm{D_t}}{2}-{ⅇ}^{-x}\mathrm{D_z},\frac{1\sqrt{2}\mathrm{D_x}}{2}+\frac{1I\sqrt{2}\mathrm{D_y}}{2},\frac{1\sqrt{2}\mathrm{D_x}}{2}-\frac{1I\sqrt{2}\mathrm{D_y}}{2}\right]\right)$
 ${\mathrm{NT4}}{:=}\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}\frac{\sqrt{{2}}{}\left(\sqrt{{2}}{-}{1}\right)}{{2}}\right]{,}\left[\left[{4}\right]{,}{{ⅇ}}^{{-}{x}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}\frac{\sqrt{{2}}{}\left(\sqrt{{2}}{-}{1}\right)}{{2}}\right]{,}\left[\left[{4}\right]{,}{{ⅇ}}^{{-}{x}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{\sqrt{{2}}{}\left(\sqrt{{2}}{+}{1}\right)}{{2}}\right]{,}\left[\left[{4}\right]{,}{-}{{ⅇ}}^{{-}{x}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{\sqrt{{2}}{}\left(\sqrt{{2}}{+}{1}\right)}{{2}}\right]{,}\left[\left[{4}\right]{,}{-}{{ⅇ}}^{{-}{x}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{2}\right]{,}\frac{\sqrt{{2}}}{{2}}\right]{,}\left[\left[{3}\right]{,}\frac{{I}}{{2}}{}\sqrt{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{2}\right]{,}\frac{\sqrt{{2}}}{{2}}\right]{,}\left[\left[{3}\right]{,}\frac{{I}}{{2}}{}\sqrt{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{2}\right]{,}\frac{\sqrt{{2}}}{{2}}\right]{,}\left[\left[{3}\right]{,}{-}\frac{{I}}{{2}}{}\sqrt{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{2}\right]{,}\frac{\sqrt{{2}}}{{2}}\right]{,}\left[\left[{3}\right]{,}{-}\frac{{I}}{{2}}{}\sqrt{{2}}\right]\right]\right]\right)\right]$ (2.27)

We check that this is indeed a null tetrad for the given metric.

 M > $\mathrm{GRQuery}\left(\mathrm{NT4},\mathrm{g4},"NullTetrad"\right)$
 ${\mathrm{true}}$ (2.28)

Compute the Newman-Penrose coefficients and check that the Petrov type is D. The coefficients are not in normal form for type D (for example, ), so is not an adapted null tetrad.

 M > $\mathrm{NP4}≔\mathrm{NPCurvatureScalars}\left(\mathrm{NT4},\mathrm{output}=\left["WeylScalars"\right]\right)$
 ${\mathrm{NP4}}{:=}{\mathrm{table}}\left(\left[{"Psi1"}{=}{0}{,}{"Psi0"}{=}\frac{{1}}{{4}}{,}{"Psi2"}{=}\frac{{1}}{{12}}{,}{"Psi4"}{=}\frac{{1}}{{4}}{,}{"Psi3"}{=}{0}\right]\right)$ (2.29)
 M > $\mathrm{PetrovType}\left(\mathrm{NP4}\right)$
 ${"D"}$ (2.30)

 > $\mathrm{newNT4}≔\mathrm{AdaptedNullTetrad}\left(\mathrm{NT4},"D"\right)$
 ${\mathrm{newNT4}}{:=}\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\sqrt{{2}}\right]{,}\left[\left[{3}\right]{,}{-}\sqrt{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\sqrt{{2}}\right]{,}\left[\left[{3}\right]{,}{-}\sqrt{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{\sqrt{{2}}}{{4}}\right]{,}\left[\left[{3}\right]{,}\frac{\sqrt{{2}}}{{4}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{\sqrt{{2}}}{{4}}\right]{,}\left[\left[{3}\right]{,}\frac{\sqrt{{2}}}{{4}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-I}\right]{,}\left[\left[{2}\right]{,}\frac{\sqrt{{2}}}{{2}}\right]{,}\left[\left[{4}\right]{,}{I}{}{{ⅇ}}^{{-}{x}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-I}\right]{,}\left[\left[{2}\right]{,}\frac{\sqrt{{2}}}{{2}}\right]{,}\left[\left[{4}\right]{,}{I}{}{{ⅇ}}^{{-}{x}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{I}\right]{,}\left[\left[{2}\right]{,}\frac{\sqrt{{2}}}{{2}}\right]{,}\left[\left[{4}\right]{,}{-I}{}{{ⅇ}}^{{-}{x}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{I}\right]{,}\left[\left[{2}\right]{,}\frac{\sqrt{{2}}}{{2}}\right]{,}\left[\left[{4}\right]{,}{-I}{}{{ⅇ}}^{{-}{x}}\right]\right]\right]\right)\right]$ (2.31)

Calculate the Newman-Penrose coefficients for the new null tetrad. We obtain the correct normal form since  = 0.

 M > $\mathrm{newNP}≔\mathrm{NPCurvatureScalars}\left(\mathrm{newNT4},\mathrm{output}=\left["WeylScalars"\right]\right)$
 ${\mathrm{newNP}}{:=}{\mathrm{table}}\left(\left[{"Psi1"}{=}{0}{,}{"Psi0"}{=}{0}{,}{"Psi2"}{=}{-}\frac{{1}}{{6}}{,}{"Psi4"}{=}{0}{,}{"Psi3"}{=}{0}\right]\right)$ (2.32)

Example 5. Type N

We calculate an adapted null tetrad for a type spacetime. First define the coordinates to be used and then define the metric.

 > $\mathrm{DGsetup}\left(\left[u,x,y,z\right],M\right)$
 ${\mathrm{frame name: M}}$ (2.33)
 M > $\mathrm{g5}≔\mathrm{evalDG}\left({ⅇ}^{-2z}\mathrm{du}&t\mathrm{dx}+{ⅇ}^{-2z}\mathrm{dx}&t\mathrm{du}+{ⅇ}^{z}\mathrm{dx}&t\mathrm{dx}-{ⅇ}^{-2z}\mathrm{dy}&t\mathrm{dy}-\mathrm{dz}&t\mathrm{dz}\right)$
 ${\mathrm{g5}}{:=}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}{{ⅇ}}^{{-}{2}{}{z}}\right]{,}\left[\left[{2}{,}{1}\right]{,}{{ⅇ}}^{{-}{2}{}{z}}\right]{,}\left[\left[{2}{,}{2}\right]{,}{{ⅇ}}^{{z}}\right]{,}\left[\left[{3}{,}{3}\right]{,}{-}{{ⅇ}}^{{-}{2}{}{z}}\right]{,}\left[\left[{4}{,}{4}\right]{,}{-1}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"tensor"}{,}{M}{,}\left[\left[{"cov_bas"}{,}{"cov_bas"}\right]{,}\left[\right]\right]\right]{,}\left[\left[\left[{1}{,}{2}\right]{,}{{ⅇ}}^{{-}{2}{}{z}}\right]{,}\left[\left[{2}{,}{1}\right]{,}{{ⅇ}}^{{-}{2}{}{z}}\right]{,}\left[\left[{2}{,}{2}\right]{,}{{ⅇ}}^{{z}}\right]{,}\left[\left[{3}{,}{3}\right]{,}{-}{{ⅇ}}^{{-}{2}{}{z}}\right]{,}\left[\left[{4}{,}{4}\right]{,}{-1}\right]\right]\right]\right)$ (2.34)

Here is the initial null tetrad.

 > $\mathrm{NT5}≔\mathrm{evalDG}\left(\left[-\frac{1\left({ⅇ}^{3z}-2\right){ⅇ}^{z}\mathrm{D_u}}{4}+\frac{1{ⅇ}^{z}\mathrm{D_x}}{2}+\frac{1\sqrt{2}\mathrm{D_z}}{2},-\frac{1\left({ⅇ}^{3z}-2\right){ⅇ}^{z}\mathrm{D_u}}{4}+\frac{1{ⅇ}^{z}\mathrm{D_x}}{2}-\frac{1\sqrt{2}\mathrm{D_z}}{2},\frac{1\left({ⅇ}^{3z}+2\right){ⅇ}^{z}\mathrm{D_u}}{4}-\frac{1{ⅇ}^{z}\mathrm{D_x}}{2}+\frac{1I\sqrt{2}{ⅇ}^{z}\mathrm{D_y}}{2},\frac{1\left({ⅇ}^{3z}+2\right){ⅇ}^{z}\mathrm{D_u}}{4}-\frac{1{ⅇ}^{z}\mathrm{D_x}}{2}-\frac{1I\sqrt{2}{ⅇ}^{z}\mathrm{D_y}}{2}\right]\right)$
 ${\mathrm{NT5}}{:=}\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}\frac{\left({{ⅇ}}^{{3}{}{z}}{-}{2}\right){}{{ⅇ}}^{{z}}}{{4}}\right]{,}\left[\left[{2}\right]{,}\frac{{{ⅇ}}^{{z}}}{{2}}\right]{,}\left[\left[{4}\right]{,}\frac{\sqrt{{2}}}{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}\frac{\left({{ⅇ}}^{{3}{}{z}}{-}{2}\right){}{{ⅇ}}^{{z}}}{{4}}\right]{,}\left[\left[{2}\right]{,}\frac{{{ⅇ}}^{{z}}}{{2}}\right]{,}\left[\left[{4}\right]{,}\frac{\sqrt{{2}}}{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}\frac{\left({{ⅇ}}^{{3}{}{z}}{-}{2}\right){}{{ⅇ}}^{{z}}}{{4}}\right]{,}\left[\left[{2}\right]{,}\frac{{{ⅇ}}^{{z}}}{{2}}\right]{,}\left[\left[{4}\right]{,}{-}\frac{\sqrt{{2}}}{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}\frac{\left({{ⅇ}}^{{3}{}{z}}{-}{2}\right){}{{ⅇ}}^{{z}}}{{4}}\right]{,}\left[\left[{2}\right]{,}\frac{{{ⅇ}}^{{z}}}{{2}}\right]{,}\left[\left[{4}\right]{,}{-}\frac{\sqrt{{2}}}{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{\left({{ⅇ}}^{{3}{}{z}}{+}{2}\right){}{{ⅇ}}^{{z}}}{{4}}\right]{,}\left[\left[{2}\right]{,}{-}\frac{{{ⅇ}}^{{z}}}{{2}}\right]{,}\left[\left[{3}\right]{,}\frac{{I}}{{2}}{}\sqrt{{2}}{}{{ⅇ}}^{{z}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{\left({{ⅇ}}^{{3}{}{z}}{+}{2}\right){}{{ⅇ}}^{{z}}}{{4}}\right]{,}\left[\left[{2}\right]{,}{-}\frac{{{ⅇ}}^{{z}}}{{2}}\right]{,}\left[\left[{3}\right]{,}\frac{{I}}{{2}}{}\sqrt{{2}}{}{{ⅇ}}^{{z}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{\left({{ⅇ}}^{{3}{}{z}}{+}{2}\right){}{{ⅇ}}^{{z}}}{{4}}\right]{,}\left[\left[{2}\right]{,}{-}\frac{{{ⅇ}}^{{z}}}{{2}}\right]{,}\left[\left[{3}\right]{,}{-}\frac{{I}}{{2}}{}\sqrt{{2}}{}{{ⅇ}}^{{z}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{\left({{ⅇ}}^{{3}{}{z}}{+}{2}\right){}{{ⅇ}}^{{z}}}{{4}}\right]{,}\left[\left[{2}\right]{,}{-}\frac{{{ⅇ}}^{{z}}}{{2}}\right]{,}\left[\left[{3}\right]{,}{-}\frac{{I}}{{2}}{}\sqrt{{2}}{}{{ⅇ}}^{{z}}\right]\right]\right]\right)\right]$ (2.35)

We check that this is indeed a null tetrad for the given metric.

 M > $\mathrm{GRQuery}\left(\mathrm{NT5},\mathrm{g5},"NullTetrad"\right)$
 ${\mathrm{true}}$ (2.36)

Compute the Newman-Penrose coefficients and check that the Petrov type is N. The coefficients are not in normal form for type N (for example, ), so is not an adapted null tetrad.

 M > $\mathrm{NP5}≔\mathrm{NPCurvatureScalars}\left(\mathrm{NT5},\mathrm{output}=\left["WeylScalars"\right]\right)$
 ${\mathrm{NP5}}{:=}{\mathrm{table}}\left(\left[{"Psi1"}{=}{-}\frac{{3}}{{8}}{}{{ⅇ}}^{{3}{}{z}}{,}{"Psi0"}{=}\frac{{3}}{{8}}{}{{ⅇ}}^{{3}{}{z}}{,}{"Psi2"}{=}\frac{{3}}{{8}}{}{{ⅇ}}^{{3}{}{z}}{,}{"Psi4"}{=}\frac{{3}}{{8}}{}{{ⅇ}}^{{3}{}{z}}{,}{"Psi3"}{=}{-}\frac{{3}}{{8}}{}{{ⅇ}}^{{3}{}{z}}\right]\right)$ (2.37)
 M > $\mathrm{PetrovType}\left(\mathrm{NP5}\right)$
 ${"N"}$ (2.38)

 > $\mathrm{newNT5}≔\mathrm{AdaptedNullTetrad}\left(\mathrm{NT5},"N",\mathrm{NP5}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}assuming\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}0
 ${\mathrm{newNT5}}{:=}\left[{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{{ⅇ}}^{\frac{{5}{}{z}}{{2}}}{}\sqrt{{6}}}{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}\frac{{{ⅇ}}^{\frac{{5}{}{z}}{{2}}}{}\sqrt{{6}}}{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}\frac{\sqrt{{6}}{}\left({{ⅇ}}^{{3}{}{z}}{-}{2}\right){}{{ⅇ}}^{{-}\frac{{z}}{{2}}}}{{6}}\right]{,}\left[\left[{2}\right]{,}\frac{{{ⅇ}}^{{-}\frac{{z}}{{2}}}{}\sqrt{{6}}}{{3}}\right]{,}\left[\left[{4}\right]{,}\frac{{2}{}\sqrt{{3}}{}{{ⅇ}}^{{-}\frac{{3}{}{z}}{{2}}}}{{3}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}\frac{\sqrt{{6}}{}\left({{ⅇ}}^{{3}{}{z}}{-}{2}\right){}{{ⅇ}}^{{-}\frac{{z}}{{2}}}}{{6}}\right]{,}\left[\left[{2}\right]{,}\frac{{{ⅇ}}^{{-}\frac{{z}}{{2}}}{}\sqrt{{6}}}{{3}}\right]{,}\left[\left[{4}\right]{,}\frac{{2}{}\sqrt{{3}}{}{{ⅇ}}^{{-}\frac{{3}{}{z}}{{2}}}}{{3}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}{{ⅇ}}^{{z}}\right]{,}\left[\left[{3}\right]{,}\frac{{I}}{{2}}{}\sqrt{{2}}{}{{ⅇ}}^{{z}}\right]{,}\left[\left[{4}\right]{,}{-}\frac{\sqrt{{2}}}{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}{{ⅇ}}^{{z}}\right]{,}\left[\left[{3}\right]{,}\frac{{I}}{{2}}{}\sqrt{{2}}{}{{ⅇ}}^{{z}}\right]{,}\left[\left[{4}\right]{,}{-}\frac{\sqrt{{2}}}{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}{{ⅇ}}^{{z}}\right]{,}\left[\left[{3}\right]{,}{-}\frac{{I}}{{2}}{}\sqrt{{2}}{}{{ⅇ}}^{{z}}\right]{,}\left[\left[{4}\right]{,}{-}\frac{\sqrt{{2}}}{{2}}\right]\right]\right]\right){,}{\mathrm{_DG}}{}\left(\left[\left[{"vector"}{,}{M}{,}\left[\right]\right]{,}\left[\left[\left[{1}\right]{,}{-}{{ⅇ}}^{{z}}\right]{,}\left[\left[{3}\right]{,}{-}\frac{{I}}{{2}}{}\sqrt{{2}}{}{{ⅇ}}^{{z}}\right]{,}\left[\left[{4}\right]{,}{-}\frac{\sqrt{{2}}}{{2}}\right]\right]\right]\right)\right]$ (2.39)

Calculate the Newman-Penrose coefficients for the new null tetrad. We obtain the correct normal form since  = 0 and

 M > $\mathrm{newNP5}≔\mathrm{NPCurvatureScalars}\left(\mathrm{newNT5},\mathrm{output}=\left["WeylScalars"\right]\right)$
 ${\mathrm{newNP5}}{:=}{\mathrm{table}}\left(\left[{"Psi1"}{=}{0}{,}{"Psi0"}{=}{0}{,}{"Psi2"}{=}{0}{,}{"Psi4"}{=}{1}{,}{"Psi3"}{=}{0}\right]\right)$ (2.40)