xAct`SymSpin`

This is the doc file SymSpinDoc.nb of version 0.1.0 of SymSpin`. Last update on 14 September 2021.

© 2021, under the GNU General Public License (GPL)
Steffen Aksteiner
steffen.aksteiner@aei.mpg.de
Thomas Bäckdahl
thomas.backdahl@chalmers.se

SymSpin` is the xAct` package for computations with symmetric spinors. Due to the symmetry computations without indices is possible.

This loads the package from the default directory, for example $Home/.Mathematica/Applications/xAct/ for a single-user installation under Linux.

membefore=MemoryInUse[];

<<xAct`SymSpin`

Comparing, we see what the packages take in Mathematica 12.3:

(MemoryInUse[]-membefore)/2^20//N

Remove[membefore];

There are several contexts: xAct`SymSpin`, xAct`SymManipulator` etc, contain the respective reserved words. System` contains Mathematica's reserved words.  The current context Global` will contain your definitions and right now is empty.

$ContextPath

Context[]

?Global`*

All parts of the package, except the spinor tools works for all dimensions. At the moment only abstract indices can be used.

To avoid long messages we turn off all messages about definitions.

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

Definition of a four dimensional  manifold M4:

DefManifold[M4,4,{a,b,c,d,f,p,q,r,m,l,h,j,n,t,s}]

Definition of a Lorentzian metric on the manifold:

DefMetric[{1,3,0},g[-a,-b],CD]

Pretty printing options for the spinor indices and complex conjugates;

SetOptions[DefAbstractIndex,PrintAs->PrimeDagger];

SetOptions[DefSpinor,PrintDaggerAs->AddBar];

Define the spin structure

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

Pretty printing options for the spinor indices and some predefined spinors.

{PrintAs[ϵ†]^="(OverBar[ϵ])",PrintAs[PsiCDe]^="Ψ",PrintAs[PsiCDe†]^="(OverBar[Ψ])",PrintAs[PhiCDe]^="Φ",PrintAs[LambdaCDe]^="Λ"};

We can initialize SymSpin with the following. This just sets the variable $DefaultSpinBundle so some commands can be called without specifying the spin bundle every time.

InitSymSpin[σ];

We can define symmetric spinors in the old way

DefSpinor[Ω4[-A,-B,-C,-D],M4,Symmetric[{-A,-B,-C,-D}],PrintAs->"Ω"]

DefSpinor[ψ32[-A,-B,-C,-A†,-B†],M4,CompatibleSymmetric[IndexList[-A,-B,-C,-A†,-B†]],PrintAs->"ψ"]

One can check if a spinor is symmetric with respect to a spin bundle (or $DefaultSpinBundle), and its complex conjugate with SymmetricSpinorOfArbitraryValenceQ.

SymmetricSpinorOfArbitraryValenceQ[Spin][Ω4]

SymmetricSpinorOfArbitraryValenceQ[][ψ32]

An alternative is to use the new function DefSymmetricSpinor.
The following defines a symmetric valence (3,2) spinor

DefSymmetricSpinor[φ32,3,2,Spin,"(Subscript[φ, 32])"]

SymmetricSpinorOfArbitraryValenceQ[][φ32]

SlotsOfTensor@φ32

As we are dealing with symmetric spinors, it is not so important to display the indices of the spinors. Hence, it makes sense to work with the spinors without giving indices to them. Therefore the display form of the tensors are changed so that it is displayed according to PrintAs even if no indices are given.

Ω4

φ32

We can add indices again by the function GiveIndicesToTensor.

GiveIndicesToTensor[ψ32]

We can form linear combinations of tensors or spinors with TensorPlus and MultScal as long as valences are the same.

TensorPlus[ψ32,MultScal[2,φ32]]

TensorPlus is automatically transformed into Plus and MultScal will be turned into Times when supplied with indices.

GiveIndicesToTensor@%

Observe that for equations with TensorPlus, one should use ZeroTensor instead of 0 because it retains the valence information.
One can easily construct a ZeroTensor object with the same valence numbers as any given tensor with ZeroTensorOfTensor.

ZeroTensorOfTensor@ψ32

InputForm@%

We can manipulate equations, for instance with IsolateTensorPlusPattern

ZeroTensorOfTensor@ψ32==TensorPlus[ψ32,MultScal[2,φ32]]

IsolateTensorPlusPattern[%,φ32]

InputForm@%

In many cases one can even handle expressions with symbolic valence numbers.

DefConstantSymbol[kkk,PrintAs->"k"]
DefConstantSymbol[lll,PrintAs->"l"]

DefSymmetricSpinor[φkl,kkk,lll,Spin,"φ"]

ValenceNumbersOfSpinor[φkl,Spin]

SymmetricSpinorOfArbitraryValenceQ[Spin][φkl]

Instead of defining a symmetric spinor using DefSpinor or DefSymmetricSpinor, the function SymSpinor allows to use generic symmetric spinors as follows.

SymSpinor[5,9,α]

As an example, we do an expansion of a scalar field in terms of symmetric spinor coefficients

PrintAs[Subscript[ϕ_,n_]]^:=SubscriptBox[PrintAs@ϕ,PrintAs@n];
MakeDaggerSymbol[Subscript[ϕ_,n_]]^:=Subscript[MakeDaggerSymbol@ϕ,n];
Tex[Subscript[ϕ_,n_]]^:=StringJoin[Tex[ϕ],"_{",ToString[n],"}"];

phiseries=SymSpinor[0,0,ϕ]==Sum[SymMult[SymSpinor[n,n,Subscript[ϕ,n]],n,n][SymSpinor[n,n,Subscript[p,n]]],{n,0,3}]/.Plus->TensorPlus

Dagger/@%

Dagger/@%

The product of two spinors can be spit into irreducible parts uniquely specified by the number of contractions between the spinors.

DefSymmetricSpinor[A30,3,0,Spin,"A"]
DefSymmetricSpinor[B20,2,0,Spin,"B"]

IrrDecomposeSymMult[A30,B20,{0,0},Spin]

ToCanonical@ExpandSym@%

The given objects are SymMult objects.  The numbers indicated the number of contracted indices. This is displayed as a superscript, while the valence number of the argument is displayed as a subscript.

{SymMult[A30,0,0,Spin][B20][-A,-B,-C,-D,-F],SymMult[A30,1,0,Spin][B20][-A,-B,-C],SymMult[A30,2,0,Spin][B20][-A]}

(#==(#/.SymMultRule))&/@%

Due to the symmetry, we can work with the SymMult objects without indices. They can also be sorted with respect to a given sorting function. The default sorting is mainly according to total valence.

SymMult[B20,1,0,Spin][A30]

%/.SortSymMult[Identity]

%/.SortSymMult[]

Nested SymMult objects can be commuted with CommuteSymMultRuleOut or CommuteSymMultRuleIn.

SymMult[φ32,2,0]@SymMult[B20,1,0]@A30

%==(%/.CommuteSymMultRuleOut[B20])

%/.CommuteSymMultRuleIn[B20]

At this point we do not have a way to canonicalize expressions with respect to these commutation rules.

If we do irreducible decompositions of all spinors, and split the equations into irreducible parts, we can form any algebraic spinor equation with SymMult, MultScal, TensorPlus and ZeroTensor. Covariant derivatives can be handled with fundamental spinor operators.

Any covariant spinor derivative acting on a symmetric spinor can be split into at most 4 different irreducible parts. We call these irreducible parts of the derivative fundamental spinor operators. The fundamental spinor operators corresponding to a spinor covariant derivative is defined by the function DefFundSpinOperators. This also defines a set of tools to handle them. All names that are defined will end with the name of the covariant derivative. This way it is possible to handle fundamental spinor operators for several covariant derivatives at the same time.

?DefFundSpinOperators

To see what is defined, we can check the name global name space.

oldnames=Names["Global`*"];

DefFundSpinOperators[CDe]

Select[Names["Global`*"],FreeQ[oldnames,#]&]

We can split any covariant derivative into the fundamental spinor operators.

CDe[-A,-A†]@ψ32[-B,-C,-D,-B†,-C†]

%==ToFundSpinOp[%]

We can work without indices and do commutators.

DivCDe@CurlDgCDe@ψ32

%==(%/.CommuteOp[DivCDe,CurlDgCDe])

If the valence numbers are assumed to be large enough we can even do commutator calculations on expressions with symbolic valence numbers.

$Assumptions=And[kkk≥0,lll≥1]

TwistCDe@CurlCDe@φkl

TwistCurlφklEquation=%==(%/.CommuteOp[TwistCDe,CurlCDe])

It is also possible to turn off the display of the valence numbers. Both the display and Tex code generation is controlled by the option ShowValenceInfo of DefFundSpinOperators.

SetOptions[DefFundSpinOperators,ShowValenceInfo->False];

TwistCurlφklEquation

TexPrintAlignedEquations@TwistCurlφklEquation

SetOptions[DefFundSpinOperators,ShowValenceInfo->True];

TexPrintAlignedEquations@TwistCurlφklEquation

The Leibniz rules for SymMult and MultScal are also implemented.

CurlDgCDe@SymMult[B20,1,0]@A30

%==(%/.SymMultLeibnizRules[CDe])

DefSpinor[scal[],M4,PrintAs->"s"]

TwistCDe@MultScal[scal[],A30]

%==(%/.MultScalLeibnizRules[CDe])

They are implemented in a way that even allows symbolic valence numbers.

DivCDe/@TwistCurlφklEquation

%/.SymMultLeibnizRules[CDe]

To the SymSpinor example above, we can apply differential operators:

TwistCDe/@phiseries

Twistphi00Eq1=%/.SymMultLeibnizRules[]

DefSpinor[HH[-A,-B,-C],M4,Symmetric[{1,2}],PrintAs->"H"]

If have an indexed spinor expression, we can transform it into a list of index free expressions if we follow the following procedure.

OriginalSpinorEq=B20[-D,-A] (CDe[-C,-A†][HH[D,-B,C]])==0

The spinor B20 is already symmetric, so we don’t need to decompose it. HH is not, so we need to make an irreducible decomposition of it.

SymmetricSpinorOfArbitraryValenceQ[Spin]/@{B20,HH}

HHIrrDecEq1=IndepIrrDecompose[HH[-A,-B,-C],ResultType->"Equation"]

FindSpinorsInIrrDec[HHIrrDecEq1[[2]],{ϵ,ϵ†}]

HHIrrDecPartsDefs=DefIrreducibleSpinors[%,"HH","H",Spin]

HHIrrDecEq2=HHIrrDecEq1/.Flatten[EqToRule/@Reverse/@HHIrrDecPartsDefs]

Now, we can use this decomposition and the decomposition of the covariant derivative, to get an expression only involving symmetric spinors.

ToCanonical@ContractMetric[OriginalSpinorEq/.EqToRule@HHIrrDecEq2]

DecomposedStep1=ToCanonical@ContractMetric@ToFundSpinOp@%

Unfortunately, the expression itself is not symmetric.

SymmetryOfExpression@DecomposedStep1[[1]]

CompatibleSymQ[VBundleOfIndex/@List@@%[[2]],%[[1]]]

Therefore, we define a new spinor TT that will correspond to the right hand side of our equation. The irreducible components of that can be used to construct the irreducible components of our original equation.

DefSpinor[TT[-A,-B,-A†],M4,PrintAs->"T"]

TTDef=TT[-A,-B,-A†]==DecomposedStep1[[1]]

IndepIrrDecompose[TT[-A,-B,-A†]]

FindSpinorsInIrrDec[%,{ϵ,ϵ†}]

ToCanonicalSym[ImposeSym/@(RemoveSym[%]/.EqToRule@TTDef)]

We need to turn the products into SymMult objects and reconstruct the trivial right hand sides

%/.SymHToSymMultRule

#==0&/@%

Now we have completely symmetric equations without any index contractions, so we can use ToIndexFree to turn them into index free equations.

ToIndexFree@%

InputForm@%

We can add indices again with

ToIndexed/@%%

To expand spinors into a spinor dyad, we need to define a Newman-Penrose tetrad and a dyad:

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

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

Then ToGHPComponents yields the spinor components:

ToGHPComponents[A30,Dyad]

For example the GHP form of the valence (2,0) Killing spinor equation is given by

ToGHPComponents[TwistCDe[SymSpinor[2,0,κ]]==0,Dyad]

For example the spin-2 equation (or, equivalently, the vacuum Bianchi identities)

ToGHPComponents[CurlDgCDe[SymSpinor[4,0,ψ]]==0,Dyad]

MaxMemoryUsed[]

TimeUsed[]

Note: For further information about SymSpin`, and to be kept informed about new releases, you may contact the authors electronically at steffen.aksteiner@aei.mpg.de or thomas.backdahl@chalmers.se. This is SymSpinDoc.nb, the docfile of SymSpin`, currently in version 0.1.0.

?xAct`SymSpin`*