Tensor algebra made easy with Mathematica

Barry Wardell
School of Mathematical Sciences, University College Dublin
Department of Astronomy, Cornell University

Perimeter Institute, 23 March 2015

Tensor algebra

Tensor algebra is “hard” to do by hand

Long, tedious calculations.

Highly prone to error.

Calculations difficult to reproduce reliably.

Tohru Eguchi, Peter B. Gilkey, Andrew J. Hanson, Phys. Rept. 66, 213 (1980)

Tensor algebra

Tensor algebra

Tensor algebra is “hard” to do by hand

Long, tedious calculations.

Highly prone to error.

Calculations difficult to reproduce reliably.

Tensor algebra is easy on a computer

Typical manipulations are very algorithmic.

Well suited to implementation using computer algebra.

Inherently reproducible.

More than just a more efficient way to do tensor calculations.

Many calculations go from “impossible” to straightforward.

Tensor computer algebra

Many tensor algebra tools have been developed over the years. Packages available for all major computer algebra systems. Categorize by whether they are designed for abstract tensor algebra, or explicit component calculations.

({{ , Abstract, Component}, {Mathematica, xAct,MathTensor,
Tensor, TTC, Ricci,
Atlas, xAct (xCoba),GRTensorM,
MathGR,RGTC,Tensorial,
GREAT, TensoriaCalc
 }, {Maple, Atlas,
DifferentialGeometry, GRTensorII}, {Matlab, -, Tensor Toolbox}, {C, -, FTensor,TL,vmmlib,
FAstMat}, {Standalone, Cadabra (uses xPerm),
Redberry,Maxima, Tela (numeric),Maxima}})

xAct

Free, open source (GPL) add-on package for Mathematica.

Robust, mature codebase. Version 1.0.0 released September 2010

Extensive documentation, tutorials, etc. (Help -> Wolfram Documentation -> Add-ons and Packages -> xAct Packages, xAct website)

Strong community of users

Active mailing list (response usually within ~ 1 day): https://groups.google.com/forum/?#!forum/xact

Friendly, helpful developer community

Core primarily maintained by José-Maria Martin-Garcia (now working at Wolfram, but xAct maintained as independent, open source project)

Non-core components developed by others: Alfonso García-Parrado, Alessandro Stecchina, Barry Wardell, Cyril Pitrou, David Brizuela, David Yllanes, Guillaume Faye, Leo Stein, Renato Portugal, Teake Nutma, Thomas Bäckdahl.

Actively maintained. Latest release 28 September 2014

xAct

Extremely powerful

Very generic, few domain-specific assumptions.

Arbitrary dimension, with and without a metric, torsion.

Somewhat steep learning curve.

Extensively tested and validated

~200 papers listed on xAct website, likely many many more.

No unit tests, but many correctness tests included in package notebooks.

Bugs few and far between, usually fixed very quickly once discovered.

1-step installation: Extract tarball to $UserBaseDirectory/Applications.

Built on a solid foundation of group-theoretic algorithms.

Mostly written in Mathematica, performance critical portion also implemented in C (MathLink) for speed.

Pre-compiled MathLink binary for OSX, Linux and Windows included in release.

xAct

Efficient canonicalization algorithms outperform other tensor packages

Figure credit: Jose M. Martin-Garcia, Comp. Phys. Commun. 179 (2008) 597-603

xAct

Modular system.

Core, canonicalization (xCore, xPerm, xTensor)

Problem-specific components

Component calculations (xCoba)

Perturbation theory (xPert)

Spherical harmonics (Harmonics)

Riemann polynomial canonicalization (Invar)

Spinors (Spinors)

xAct

Figure credit: Alfonso Garcia-Parrado Gomez-Loboa and Jose M. Martin-Garcia,  Comput.Phys.Commun. 183 (2012) 2214-2225

xAct

Many "contributed" packages plug in to the core and add functionality

xAct-contrib project hosted on GitHub. http://contrib.xact.es

xTension interface

Independently maintained

Formatted Input (xPrint)

Symmetrized expressions (SymManipulator)

Exterior calcula with algebra-valued forms (AVF)

xTras

LATEX equation formatting (TexAct)

Cosmology (xPand)

Exterior calculus (xTerior)

xAct Basics

xAct basics

Needs["xAct`xTensor`"](*Load the package*)

xAct basics

Define a 4-dimensional manifold M4 with indices a, b, c, ..., z (except g or h).

DefManifold[M4,4,Complement[IndexRange[a,z],{g,h}]]

xAct is very verbose by default. We can turn these messages off with a global variable:

$DefInfoQ=False;

Now define a metric, g, on our manifold. We have metric signature -1, and CD is the covariant derivative associated with g. The last argument is optional and specifies the prefix and postfix forms for the covariant derivative.

DefMetric[-1,g[-a,-b],CD,{";","∇"}]

Covariant indices are denoted by a minus sign, contravariant without the minus sign

{g[-a,-b],g[a,b],g[-a,b],g[-a,-b]g[a,c],g[-a,-b]g[a,b]}

xAct basics

When we defined our metric, xAct also created definitions for the Riemann, Ricci, Weyl, Einstein tensors, Levi-Civita and Christoffel symbols.

{RiemannCD[-a,b,-c,d],RicciCD[a,-b],RicciScalarCD[],WeylCD[-a,-b,-c,-d],EinsteinCD[-a,-b],epsilong[-a,-b,-c,-d],ChristoffelCD[a,-b,-c]}

Can change how these are displayed:

PrintAs[RiemannCD]^="R";PrintAs[RicciCD]^="R";PrintAs[RicciScalarCD]^="R";PrintAs[WeylCD]^="W";PrintAs[ChristoffelCD]^="Γ";PrintAs[EinsteinCD]^="G";PrintAs[epsilong]^="ϵ";

{RiemannCD[-a,b,-c,d],RicciCD[a,-b],RicciScalarCD[],WeylCD[-a,-b,-c,-d],EinsteinCD[-a,-b],epsilong[-a,-b,-c,-d],ChristoffelCD[a,-b,-c]}

xAct basics

Tensors with symmetries can be written in many different ways

RiemannCD[-a,-b,-c,-d]+RiemannCD[-c,-d,-a,-b]

ToCanonical can be used to simplify them to a canonical form using all monomial (single term) symmetries

ToCanonical[%]

ToCanonical[RiemannCD[-a,-b,-c,-d]+RiemannCD[-b,-a,-c,-d]]

xAct basics

We can do lots of manipulations with just these tensors

RiemannCD[-a,-b,-c,-d]//RiemannToChristoffel

Here, we see that it has introduced new dummy indices. We can replace these with more human friendly versions

%//ScreenDollarIndices

Let’s make this the default for every evaluated expression

$PrePrint=ScreenDollarIndices;

RiemannCD[-a,-b,-c,-d]//RiemannToChristoffel

xAct basics

Expand Einstein tensor in terms of the metric

EinsteinCD[-a,-b]//EinsteinToRicci

RiemannCD[-a,-b,-c,-d]//RiemannToChristoffel

%//ChristoffelToGradMetric

xAct basics

Covariant derivatives

CD[-a]@CD[-b]@RiemannCD[c,-d,e,-f]

CommuteCovDs[%,CD,{-b,-a}]

Define our own tensor fields

DefTensor[F[-a,-b],M4,Antisymmetric[{-a,-b}]];DefTensor[G[-a,-b],M4,Symmetric[{-a,-b}]];

{F[-a,-b]F[b,a],G[-a,-b]G[b,a],F[-a,-b]G[b,a]}//ToCanonical

Lie derivatives

DefTensor[H[-a],M4];
LieD[H[a]][F[-b,-c]]==LieDToCovD[LieD[H[a]][F[-b,-c]],CD]

Lagrangians in xAct

The Einstein equations can be obtained from a variational derivative of the Einstein-Hilbert Lagrangian with respect to the inverse metric.

ℒ=Sqrt[-Detg[]]RicciScalarCD[]//RiemannToChristoffel//ChristoffelToGradMetric//NoScalar;

EE=Simplification[(1/(Sqrt[-Detg[]]))VarD[g[a,b],PD][ℒ],UseMetricOnVBundle->None]

Check this is indeed the Einstein equation:

ToCanonical[EE-EinsteinCD[-a,-b]//EinsteinToRicci//RiemannToChristoffel//ChristoffelToGradMetric//NoScalar,UseMetricOnVBundle->None]

Perturbation theory with xAct

Perturbation theory with xAct

Load the package

Needs["xAct`xPert`"]

Perturbation theory with xAct

Define a metric perturbation h, such that the metric has an expansion (Subscript[g, ab])+ϵ (Subscript[h, ab]^1)+(1/2)(ϵ^2)(Subscript[h, ab]^2)+...

DefMetricPerturbation[g,h,ϵ]

Make it so the index denoting perturbation order is coloured blue

Unprotect[IndexForm];
IndexForm[LI[x_]]:=ColorString[ToString[x],RGBColor[0,0,1]];
Protect[IndexForm];

We can use Perturbed to expand any expression to a given order

Perturbed[g[-a,-b],4]

or just get the perturbation at a specific order

Perturbation[g[-a,-b],1]

Perturbation theory with xAct

Example: linearized Einstein equation

To simulate extreme mass ratio binary black holes, full numerical relativity is not currently feasible and we need to instead work with an approximation based on perturbations to the Einstein equation.

Perturbation theory with xAct

Example: linearized Einstein equation

The linearized Einstein equation at first order is given by

Perturbation[-2EinsteinCD[-a,-b],1]

linearizedEE=%//ExpandPerturbation//ToCanonical//ScreenDollarIndices

It is often convenient to rewrite this in terms of a trace-reversed metric perturbation, (Subscript[(OverBar[h]), ab])=(Subscript[h, ab])-(1/2)h (Subscript[g, ab]). Define this and a rule to convert (Subscript[h, ab]) to (Subscript[(OverBar[h]), ab]).

DefTensor[hbar[-a,-b],M4,Symmetric[{-a,-b}]];
PrintAs[hbar]^="(OverBar[h])";traceReverseRule=IndexRule[h[LI[1],a_,b_],hbar[a,b]-(1/2)hbar[-c,c]g[a,b]];

Perturbation theory with xAct

Example: linearized Einstein equation

Apply trace reversal to the linearized Einstein equation

traceReversedEE=linearizedEE/.traceReverseRule//ContractMetric//ToCanonical//ScreenDollarIndices

Commute covariant derivatives on third and fourth terms

commuteCovDRule=IndexRule[CD[-c_]@CD[-b_]@hbar[-a_,c_],CommuteCovDs[CD[-c]@CD[-b]@hbar[-a,c],CD,{-b,-c}]]

traceReversedEE2=traceReversedEE/.commuteCovDRule//ToCanonical

Perturbation theory with xAct

Example: linearized Einstein equation

If the background is vacuum, then the Ricci tensor vanishes

vacuumTraceReversedEE=traceReversedEE2/.{RicciCD[__]->0,RicciScalarCD[]->0}

This is the familiar wave equation form, with gauge vector (Subscript[Z, a])=0 corresponding to Lorenz gauge

DefTensor[Z[-a],M4]

toGauge={IndexRule[CD[-c_][hbar[c_,a_]],Z[a]],IndexRule[CD[-c_][hbar[a_,c_]],Z[a]]};

ToCanonical[vacuumTraceReversedEE/.toGauge]

Perturbation theory with xAct

Example: linearized Einstein equation

Second order perturbations just as easy:

Perturbation[EinsteinCD[-a,-b],2]//ExpandPerturbation//ToCanonical//ScreenDollarIndices//ContractMetric//ToCanonical

Perturbation theory with xAct

Example: linearized Einstein equation

And third order

Perturbation[EinsteinCD[-a,-b],3]//ExpandPerturbation//ToCanonical//ScreenDollarIndices//ContractMetric//ToCanonical

Perturbation theory with xAct

Example: linearized Einstein equation

Feeling ambitious: (8^th) order

Perturbation[EinsteinCD[-a,-b],8]//ExpandPerturbation//Expand;

Length[%]

%%[[-48;;]]//ContractMetric//ToCanonical

Perturbation theory with xAct

Example 2: Tetrad components of Riemann tensor

DefTensor[e0[a],TangentM4];DefTensor[e1[a],TangentM4];DefTensor[e2[a],TangentM4];DefTensor[e3[b],TangentM4];

DefTensorPerturbation[δe0[LI[_],a],e0[a],M4];
DefTensorPerturbation[δe1[LI[_],a],e1[a],M4];
DefTensorPerturbation[δe2[LI[_],a],e2[a],M4];
DefTensorPerturbation[δe3[LI[_],a],e3[a],M4];

Perturbation[RiemannCD[-a,-b,-c,-d]e0[a]e1[b]e2[c]e3[d],1]

ΔR0123=%//ExpandPerturbation//ContractMetric//Simplification

Perturbation theory with xAct

Example 2: Tetrad components of Riemann tensor

Second order perturbation of tetrad components

Δ2R0101=Perturbation[RiemannCD[-a,-b,-c,-d]e0[a]e1[b]e0[c]e1[d],2]//ExpandPerturbation//ContractMetric//Simplification

Canonicalization with xAct

Canonicalization with xAct

Many problems involve polynomials in Riemann and its dual.

Well known that there are only 14 independent scalar invariants of the Riemann tensor. Many more differential invariants.

Narlikar and Karmarkar basis:

({{I1=R}, {I2=({{R, ({{ , b}, {a,  }})}}) ({{R, ({{ , a}, {b,  }})}})}, {I3=({{R, ({{ , b}, {a,  }})}}) ({{R, ({{ , c}, {b,  }})}}) ({{R, ({{ , a}, {c,  }})}})}, {I4=({{R, ({{ , b}, {a,  }})}}) ({{R, ({{ , c}, {b,  }})}}) ({{R, ({{ , d}, {c,  }})}}) ({{R, ({{ , a}, {d,  }})}})}, {J1=({{W, ({{a, b, c, d}, { ,  ,  ,  }})}}) ({{W, ({{ ,  ,  ,  }, {c, d, a, b}})}})}, {J2=({{W, ({{a, c, e, f}, { ,  ,  ,  }})}}) ({{W, ({{b, d,  ,  }, { ,  , a, c}})}}) ({{W, ({{ ,  ,  ,  }, {e, f, b, d}})}})}, {J3=({{W, ({{ ,  , j, k}, {a, c,  ,  }})}}) ({{W, ({{a, c, d, f}, { ,  ,  ,  }})}}) ({{W, ({{ ,  , m, o}, {d, f,  ,  }})}}) ({{W, ({{ ,  ,  ,  }, {j, k, m, o}})}})-(1/4) ({{W, ({{ ,  ,  ,  }, {a, c, d, f}})}}) ({{W, ({{a, c, d, f}, { ,  ,  ,  }})}}) ({{W, ({{ ,  ,  ,  }, {j, k, m, o}})}}) ({{W, ({{j, k, m, o}, { ,  ,  ,  }})}})}, {J4=(1/12) ({{W, ({{a, b, c, d}, { ,  ,  ,  }})}}) ({{W, ({{ ,  , k, l}, {e, f,  ,  }})}}) (12 ({{W, ({{ ,  , e, f}, {a, b,  ,  }})}}) ({{W, ({{ ,  , i, j}, {c, d,  ,  }})}})-5 ({{W, ({{ ,  ,  ,  }, {a, b, c, d}})}}) ({{W, ({{e, f, i, j}, { ,  ,  ,  }})}})) ({{W, ({{ ,  ,  ,  }, {i, j, k, l}})}})}, {K1=({{R, ({{a, c}, { ,  }})}}) ({{R, ({{b, d}, { ,  }})}}) ({{W, ({{ ,  ,  ,  }, {a, b, c, d}})}})}, {K2=({{R, ({{c, e}, { ,  }})}}) ({{R, ({{d, f}, { ,  }})}}) ({{W, ({{a, b,  ,  }, { ,  , e, f}})}}) ({{W, ({{ ,  ,  ,  }, {c, d, a, b}})}})}, {K3=(1/12) (-(R^2) ({{W, ({{ ,  , e, f}, {a, b,  ,  }})}}) ({{W, ({{a, b, c, d}, { ,  ,  ,  }})}}) ({{W, ({{ ,  ,  ,  }, {c, d, e, f}})}})+({{R, ({{a, b}, { ,  }})}}) ({{W, ({{ ,  ,  ,  }, {e, f, i, j}})}}) (({{R, ({{ ,  }, {a, b}})}}) ({{W, ({{ ,  , i, j}, {c, d,  ,  }})}}) ({{W, ({{c, d, e, f}, { ,  ,  ,  }})}})+3 ({{R, ({{c, d}, { ,  }})}}) (4 ({{W, ({{ ,  , e, f}, {a, c,  ,  }})}}) ({{W, ({{ ,  , i, j}, {b, d,  ,  }})}})-({{W, ({{ ,  ,  ,  }, {a, c, b, d}})}}) ({{W, ({{e, f, i, j}, { ,  ,  ,  }})}}))))}, {K4=({{R, ({{ , c}, {a,  }})}}) ({{R, ({{a, e}, { ,  }})}}) ({{R, ({{ , d}, {b,  }})}}) ({{R, ({{b, f}, { ,  }})}}) ({{W, ({{ ,  ,  ,  }, {c, d, e, f}})}})}, {K5=({{R, ({{ , e}, {c,  }})}}) ({{R, ({{c, h}, { ,  }})}}) ({{R, ({{ , f}, {d,  }})}}) ({{R, ({{d, i}, { ,  }})}}) ({{W, ({{a, b,  ,  }, { ,  , h, i}})}}) ({{W, ({{ ,  ,  ,  }, {e, f, a, b}})}})}, {K6=(1/12) ({{R, ({{a, b}, { ,  }})}}) ({{W, ({{ ,  ,  ,  }, {i, j, k, l}})}}) (-({{R, ({{ ,  }, {a, b}})}}) ({{R, ({{ ,  }, {c, d}})}}) ({{R, ({{c, d}, { ,  }})}}) ({{W, ({{ ,  , k, l}, {e, f,  ,  }})}}) ({{W, ({{e, f, i, j}, { ,  ,  ,  }})}})+({{R, ({{ , c}, {a,  }})}}) (({{R, ({{ , d}, {b,  }})}}) ({{R, ({{ ,  }, {c, d}})}}) ({{W, ({{ ,  , k, l}, {e, f,  ,  }})}}) ({{W, ({{e, f, i, j}, { ,  ,  ,  }})}})+3 ({{R, ({{ , f}, {d,  }})}}) ({{R, ({{d, e}, { ,  }})}}) (4 ({{W, ({{ ,  , i, j}, {b, e,  ,  }})}}) ({{W, ({{ ,  , k, l}, {c, f,  ,  }})}})-({{W, ({{ ,  ,  ,  }, {b, e, c, f}})}}) ({{W, ({{i, j, k, l}, { ,  ,  ,  }})}}))))}})

Canonicalization with xAct

ToCanonical can only handle monomial (single-term) symmetries

ToCanonical[RiemannCD[-a,-b,-c,-d]+RiemannCD[-a,-b,-d,-c]]

Multi-term symmetries are much more difficult

cyclic=RiemannCD[-a,-b,-c,-d]+RiemannCD[-a,-c,-d,-b]+RiemannCD[-a,-d,-b,-c];
ToCanonical[cyclic]

bianchi=Antisymmetrize[CD[-e]@RiemannCD[-a,-b,-c,-d],IndexList[-c,-d,-e]];
ToCanonical[bianchi]

Canonicalization with xAct

We can invent rules for each special case

cyclicRule=IndexRule[RiemannCD[-a,-c,-b,-d],RiemannCD[-a,-b,-c,-d]+RiemannCD[-a,-d,-b,-c]];

ToCanonical[ToCanonical[cyclic]/.cyclicRule]

bianchiRule=IndexRule[CD[-d][RiemannCD[-a,-b,-c,-e]],CD[-c][RiemannCD[-a,-b,-d,-e]]+CD[-e][RiemannCD[-a,-b,-c,-d]]];

ToCanonical[ToCanonical[bianchi]/.bianchiRule]

The Invar package provides all rules for differential scalar invariants up to order 6 as a pre-computed set of rules.

RiemannSimplify function applies rules to an expression, producing a canonical result

Canonicalization with xAct

Load the Invar package

Needs["xAct`Invar`"]

Canonicalization with xAct

Example

expr=CD[-a]@CD[e]@RiemannCD[a,b,c,d]CD[i]@CD[k]@RiemannCD[-b,-e,f,j]CD[-k]@CD[-d]@RiemannCD[-c,-f,-j,-i]-1/8CD[-e]@CD[e]@RiemannCD[a,b,c,d]CD[i]@CD[k]@RiemannCD[-a,-b,f,j]CD[-k]@CD[-i]@RiemannCD[-c,-d,-f,-j]

RiemannSimplify[expr]

Example: DeWitt-Schwinger expansion

Covariant methods for calculating the Green function of the wave operator and the corresponding heat kernel are central to a broad range of problems from radiation reaction to quantum field theory in curved spacetime and quantum gravity.

Reviews by Vassilevich [Phys.Rept., 388, 279 (2003)] and Poisson, Pound & Vega [Living Rev. Relativity 14, (2011), 7]. Avramidi (Financial mathematics).

Methods have evolved from pioneering work by Hadamard on the classical theory
and DeWitt on the quantum theory. Motivation for MathTensor.

Hadamard and DeWitt geometrical (covariant) bi-tensor expansion coefficients, (Subscript[a, n])(x,x'), commonly called DeWitt-Schwinger coefficients in the physics literature.

Closely related to the short proper-time asymptotic expansion of the heat kernel of an elliptic operator in a Riemannian space and so are commonly called heat kernel coefficients in the mathematics literature.

Traditionally most attention has focused on the diagonal value of the heat kernel ((Subscript[K, A])^A)(x,x;s), since the coincidence limits (Subscript[a, n])(x,x) play a central role in the classical theory of spectral invariants and in the quantum theory of the effective action and trace anomalies.

Radiation reaction and self-force for extreme mass ratio binaries requires expansions valid for x and x' as far apart as geometrical methods permit.

Example: DeWitt-Schwinger expansion

CovariantSeries package can be used to compute DeWitt-Schwinger coefficients

Quit[]

<<CovariantSeries`

(Subscript[a, 1])

CovariantSeriesCoefficient[DeWittABitensor[1],0]

(Subscript[a, 2])

CovariantSeriesCoefficient[DeWittABitensor[2],0]

Example: DeWitt-Schwinger expansion

(Subscript[a, 3])

CovariantSeriesCoefficient[DeWittABitensor[3],0]//Short[#,8]&

(Subscript[a, 4])

CovariantSeriesCoefficient[DeWittABitensor[4],0]//Length

(Subscript[a, 5])

CovariantSeriesCoefficient[DeWittABitensor[5],0]//Length

DeWitt-Schwinger: Canonicalization

In order to simplify further, we convert to an xTensor compatible notation with indices

Block[{Print},<<CovariantSeries`AvramidiToXTensor`;<<xAct`Invar`];
NumericQ[ξ]=True;
PotentialRule={IndexRuleDelayed[PotentialP[inds__],Fold[CD[#2][#1]&,ξ Scalar[RiemannCD[a,b,-a,-b]],{inds}]],IndexRule[PotentialP[],ξ Scalar[RiemannCD[a,b,-a,-b]]]};

Zero-th DeWitt-Schwinger coefficient, (Subscript[a, 0])

CovariantSeriesCoefficient[DeWittABitensor[0],0,xTensorNotation->True]

First DeWitt-Schwinger coefficient, (Subscript[a, 1])

DA1=CovariantSeriesCoefficient[DeWittABitensor[1],0,xTensorNotation->True]/.PotentialRule//.CurvatureRelations[CD]

DeWitt-Schwinger: Canonicalization

Second DeWitt-Schwinger coefficient, (Subscript[a, 2])

(DA2=CovariantSeriesCoefficient[DeWittABitensor[2],0,xTensorNotation->True]/.PotentialRule//NoScalar//ScreenDollarIndices)//Short

DA2//RiemannSimplify//NoScalar

ContractMetric[ContractMetric[%//.CurvatureRelations[CD]]//.CurvatureRelations[CD]]

DeWitt-Schwinger: Canonicalization

Third DeWitt-Schwinger coefficient, (Subscript[a, 3])

DA3=CovariantSeriesCoefficient[DeWittABitensor[3],0,xTensorNotation->True]/.PotentialRule//Expand;Length[DA3]

ContractMetric[ContractMetric[NoScalar[RiemannSimplify[DA3]]//.CurvatureRelations[CD]]//.CurvatureRelations[CD]]//ToCanonical//NoScalar

DeWitt-Schwinger: Canonicalization

Up to (Subscript[a, 5]) reasonably easy. Invar only supports canonicalization of scalar invariants up to order 6. Memory constraints (>64GB RAM) start to become a problem for (Subscript[a, 6]).

Many previous efforts: (Subscript[a, 1]) and (Subscript[a, 2]) by DeWitt, (Subscript[a, 3]) by Sakai and by Gilkey, (Subscript[a, 4]) by Amsterdamski, Berkin and O’Connor and by Avramidi and (Subscript[a, 5]) by Van den Ven.

First time that they have been given in a simplified canonical form.

Component calculations with xAct

Component calculations with xAct

Metrics package: convenient wrapper for xCoba.

Provides a database of common metrics (Schwarzschild, Kerr, ...).

Automates repetitive xCoba boilerplate

Define manifold

Define metric

Define coordinate tensors

Define coordinate chart

Set metric components

Longer term goal: provide a simplified, more user friendly interface for most common use cases.

Correctness tests validate database entries.

Component calculations with xAct

Load Metrics package. This loads xCoba (we silence the usual info messages printed on startup).

Quit[]

Block[{Print},Get["Metrics`LoadMetric`"];]
$CVVerbose=False;$DefInfoQ=False;
$Pre=ScreenDollarIndices;

Load definitions for Schwarzschild metric

LoadMetric["Schwarzschild"];

Block[{Print},MetricCompute[g,Schwarzschild,All,CVSimplify->Simplify]];

Example: invariants in Schwarzschild spacetime

J1=RiemannCD[-a,-b,c,d]RiemannCD[-c,-d,a,b];
J2=RiemannCD[-c,-d,a,b]RiemannCD[-a,-b,e,f]RiemannCD[-e,-f,c,d];

TraceBasisDummy[ToBasis[Schwarzschild][J1]]/.TensorValues[RiemannCD]

TraceBasisDummy[ToBasis[Schwarzschild][J2]]/.TensorValues[RiemannCD]

Quit[]

Block[{Print},Get["Metrics`LoadMetric`"];]
$CVVerbose=False;$DefInfoQ=False;
$Pre=ScreenDollarIndices;

Example: invariants in Kerr spacetime

LoadMetric["Kerr"];
Block[{Print},MetricCompute[g,Kerr,All,CVSimplify->Simplify]];

J1=RiemannCD[-i,-b,c,d]RiemannCD[-c,-d,i,b];
J2=RiemannCD[-c,-d,i,b]RiemannCD[-i,-b,e,f]RiemannCD[-e,-f,c,d];

Simplify[TraceBasisDummy[FixedPoint[ToBasis[Kerr],J1]]/.TensorValues[RiemannCD]]

Simplify[TraceBasisDummy[FixedPoint[ToBasis[Kerr],J2]]/.TensorValues[RiemannCD]]

Other applications of xAct

Other applications

These demonstrations only scratch the surface of what is possible using xAct. Many more possibilities including:

Kranc - automated code generation for numerical simulations of PDEs

xAct supported as a tensor backend for Kranc

Activated with KrancTensor`$KrancTensorPackage = “xTensorKranc`”;

Works for example scripts, minor issues with larger codes (e.g. McLachlan).

Weyl scalars, invariants for numerical relativity simulations

WeylScal4 code numerically computes invariants from Weyl scalars.

Invariants derived in terms of Weyl scalars using xAct with Newman-Penrose tetrad formalism.

Formulations for numerical simulations

C. Gundlach, J. M. Martín-García, “Well-posedness of formulations of the Einstein equations with dynamical lapse and shift conditions”. Phys. Rev. D 74 (2006) 024016

Cosmology: S. R. Green, R. M. Wald, “A new framework for analyzing the effects of small scale inhomogeneities in cosmology”, Phys. Rev. D 83 (2011) 084020

Other applications

Many non-GR applications

Chern-Simons

Horava-Lifshitz

Bigravity

M-theory

Quantum gravity

Automated paper writing

TexAct package converts xAct expressions to LATEX.

TexPrint generates a string containing the LATEX form for the equation.

Correct parenthesis, etc.

Supports list of equations using LATEX align environment.

Semi-automated line breaking for long equations: TexBreak.

Interactively preview typeset LATEX equation: TexView

Questions?