SpinFrames package examples

Introduction

This package uses Newman-Penrose (NP) and Geroch-Held-Penrose (GHP) component formalisms to extract geometric properties of covariant spinorial differential equations in dimension 4 of Lorentzian signature. With highly integrated functions like ToGHP or AllGHPCommutatorsForward large sets of GHP equations can be treated efficiently.

The package is partly based on a notebook for pure NP or GHP calculations using (GHP-weighted) scalars by Alfonso Garcia-Parrado Gomez-Lobo available under http://xact.es/Documentation/English/PublicNPGHP.nb (There derivations of the NP/GHP form of Ricci-identities, Bianchi-identities and commutators can be found, which are hardcoded in this package).
The aim of SpinFrames is different in the sense that general spinorial equations can be expanded into components automatically. Here we focused on spinors, because the irreducible decomposition of equations leads automatically to “a minimal set of required quantities”. Irreducible decompositions of spinors can be done automatically with the SymManipulator package, while  irreducible decompositions of tensors are much more involved and do not lead in such a nice way to the component form.

The package requires at least SymManipulator 0.9.4, TexAct 0.4.0, Spinors 1.0.5, xCoba 0.8.2

Init

<<xAct`SymManipulator`

<<xAct`SpinFrames`

We don't want too many messages:

$DefInfoQ=False;
$CVVerbose=False;
SetOptions[AutomaticRules,Verbose->False];

Define some simple tools to handle equations.

EqToRule[expr_Equal]:=MakeRule[Evaluate[List@@expr],MetricOn->All,ContractMetrics->True]

FlipEquation[LHS_==Times[a_?NumberQ,RHS1_,RHSS2___]]:=Times[RHS1,RHSS2]==(LHS)/a

FlipEquation[LHS_==RHS_]:=RHS==LHS

Follow Penrose Rindler sign conventions ($RiemannSign is opposite to the conventions of Wald)

$RiemannSign=-1;

Declare 4-manifold :

DefManifold[M4,4,{a,b,c,d,f,h,l,m,p,q}]

Declare abstract metric :

DefMetric[{1,3,0},g[-a,-b],CD,PrintAs->"g",DefInfo->False]

Off[ValidateSymbol::"capital"]

We want dagger indices to be displayed with a prime.

SetOptions[DefAbstractIndex,PrintAs->PrimeDagger];

We want dagger spinors to be displayed with a bar.

SetOptions[DefSpinor,PrintDaggerAs->AddBar]

Define a spin structure.

DefSpinStructure[g,Spin,{A,B,C,D,F,H,L,M,P,Q,R,S},ϵ,σ,CDe,{";","▽"},SpinorPrefix->SP,SpinorMark->"S"]

Here, we don't want a reference to the covariant derivatite in the symbols for the curvature.

{PrintAs[PsiCDe]^="Ψ",PrintAs[PhiCDe]^="Φ",PrintAs[LambdaCDe]^="Λ"};

It is convenient to work with the fundamental spinor operators from the SymManipulator package, so we define them.

DefFundSpinOperators[CDe]

The SpinFrames package has the following public names:

?xAct`SpinFrames`*

Define an NP tetrad.

DefNPTetrad[NP,{lNP[a],nNP[a],mNP[a]}]

Define the corresponding spin dyad.

DefSpinDyad[Dyad,{o[A],ι[A]},NP]

Components of spinors

In this section we show how to expand symmetric spinors into NP components using DyadExpansionEq. The command automatically sets the GHP weights of the scalars and formats its Tex output. The components are numbered according to Penrose&Rindler. This can be disabled in the option FormatComponents.

Dyad components of a symmetric (2, 0) - spinor

DefSpinor[phi20[-A,-B],M4,Symmetric[{1,2}],PrintAs->"ϕ"]

DyadExpansionEq[phi20,Dyad]

Formatting can be controlled by the following options

Options[DyadExpansionEq]

Dyad components of a symmetric (2, 2) - spinor, i.e. a symmetric, trace-free 2-tensor

DefSpinor[g22[-A,-B,-A†,-B†],M4,GenSet[Cycles[{1,2}],Cycles[{3,4}]],PrintAs->"g"]

DyadExpansionEq[g22,Dyad]

Expansion of derivatives into NP and GHP formalism

In this section we show how to expand derivatives of symmetric spinors into NP components using ToNP and ToGHP. For higher derivatives it is most convenient to write the operator in terms of fundamental spinor operators and let ToGHP expand automatically.

Dyad components of the gradient of a valence (0, 0)-spinor, i.e. a scalar function

DefSpinor[chi00[],M4,PrintAs->"χ"]

In NP formalism:

CDe[-A,-A†][chi00[]]

%==ToNP[%,Dyad]

In GHP formalism (no difference because the scalar is unweighted):

CDe[-A,-A†][chi00[]]

%==ToGHP[%,Dyad]

Alternatively using the fundamental spinor operator from the SymManipulator package:

TwistCDe[chi00]//GiveIndicesToTensor

%==ToGHP[%,Dyad]

The Dyad components :

DyadComponents[%,Dyad]

The GHP weight of the scalar can be changed manually :

GHPWeightOf[chi00[]]^={1,1}

CDe[-A,-A†][chi00[]]

%==ToGHP[%,Dyad]

Dyad components of the spin-1 field equation, i.e. vacuum Maxwell equations

CurlDgCDe[phi20][-A,-A†]==0

ToGHP[%,Dyad]

DyadComponents[%,Dyad]

GHP form of the scalar wave equation

CDe[A,A†][CDe[-A,-A†][chi00[]]]==0

ToFundSpinOp/@ToFundSpinOp/@%

ToGHP[%,Dyad]

Lower order terms, computed during the calculation are stored :

GHPComponentRules[TwistCDe[chi00],Dyad]

?$GHPExtraRules

GHP form of higher derivatives and commutators

DivCDe[CurlDgCDe[phi20]]//GiveIndicesToTensor

%==ToGHP[%,Dyad]

Expand[%/.GHPCommutatorsForward[Dyad]/.GHPRicciRules[Dyad]]

For comparison, we calculate this directly from the covariant commutators:

DivCDe[CurlDgCDe[phi20]][]

%==ExpandBox[%/.CommuteFundSpinOp[DivCDe,CurlDgCDe]]

Tex output is generated as usual:

TexPrintAlignedEquations[DivCDe[CurlDgCDe[phi20]][]==ToGHP[DivCDe[CurlDgCDe[phi20]][],Dyad]]

Factorization

Sometimes NP/GHP equations become very long and a factorized form improves the presentation. The function InertScalarOp prevents Mathematica from expanding factors. The function does not factor automatically and an Ansatz for a factorization needs to be compared to actual results.

With InertScalarOp one can give operators in factored form that can be printed without expanding it.

InertScalarOp[x,ΘDyad[{1,-NP}][x]+3ρDyad[]*x]@InertScalarOp[x,ΘDyad[{4,-NP}][x]+ τpDyad[]*x][phi20[{0,-Dyad},{0,-Dyad}]]

TexPrint@%

The InertScalarOp can be expanded by replacing it with Function.

%%/.InertScalarOp->Function

Several dyads

The package allows several tetrads and dyads simultaneously. The display form and Tex output for all symbols can be modified with SymbolFormattingFunction and SymbolTexFunction as shown below.

Define a new tetrad (NPt) and Dyad (Dyadt) with a formatting function which adds a tilde on top of all quantities projected wrt. to these frames.

DefNPTetrad[NPt,{lNPt[a],nNPt[a],mNPt[a]},SymbolFormattingFunction->TildeString,SymbolTexFunction->TexTilde]

DefSpinDyad[Dyadt,{ot[A],ιt[A]},NPt,SymbolFormattingFunction->TildeString,SymbolTexFunction->TexTilde]

Define another new tetrad (NPg) and Dyad (Dyadg) with a formatting function which colors quantities projected wrt. to these frames in green.

EnableTexColor[];

DefNPTetrad[NPg,{lNPg[a],nNPg[a],mNPg[a]},SymbolFormattingFunction->(ColorString[#,Green]&),SymbolTexFunction->(TexColor[#,Green]&)]

DefSpinDyad[Dyadg,{og[A],ιg[A]},NPg,SymbolFormattingFunction->(ColorString[#,Green]&),SymbolTexFunction->(TexColor[#,Green]&)]

An expansion of a valence (2,0)-spinor into the new dyads looks like this:

DyadExpansionEq[phi20,Dyadt]

DyadExpansionEq[phi20,Dyadg]

Also full spinorial differential equations can be expanded directly(here the vacuum Maxwell equations):

ToGHP[0==CurlDgCDe[phi20][-A,-A†],Dyadt]

DyadComponents[%,Dyadt]

The GHP form of the Bianchi identities in the dyad Dyadt:

GHPBianchiRules[Dyadt]

It is also possible to expand an equation into on dyad and look at the components in another one (red is the default color for Dyad components and was not set in this notebook- only the green color and the tilde contain the dyad information):

DyadComponents[ToGHP[0==CurlDgCDe[phi20][-A,-A†],Dyadg],Dyadt]

Tex output can be generated in the usual way:

GHPBianchiRules[Dyadt][[1]]/.Rule->Equal

TexPrintAlignedEquations@%

Also colored Tex output works:

GHPBianchiRules[Dyadg][[1]]/.Rule->Equal

TexPrintAlignedEquations@%

As an example, we relate two dyads via a complex function λ. This two dimensional subgroup of the Lorentz group defines the GHP weights and we calculate the transformation behaviour of the spin coefficients.

DefSpinor[lambda00[],M4,PrintAs->"λ"]

DyadToDyadtEqs={o[-A]==lambda00[]ot[-A],ι[-A]==1/lambda00[]ιt[-A],Dagger[o[-A]==lambda00[]ot[-A]],Dagger[ι[-A]==1/lambda00[]ιt[-A]]}

DyadToDyadtRules=Flatten@{EqToRule/@DyadToDyadtEqs}

Flatten[Outer[Times,{o[A],ι[A]},{o[B],ι[B]},{o†[B†],ι†[B†]}]]

Flatten[{#*CDe[-B,-B†][o[-A]],#*CDe[-B,-B†][ι[-A]]}&/@%]

#==(#/.DyadToDyadtRules)&/@%;

ToCanonical[%/.CovDDyadRules[Dyad]/.CovDDyadRules[Dyadt]]

ToNP[%,Dyadt]

Union@%