Source-linked AI summary

xTras: a field-theory inspired xAct package for Mathematica

Teake Nutma

arXiv:1308.3493v1cs.SCcs.MSgr-qchep-th

TL;DR

Field-theory calculations require systematic tensor manipulations such as contractions, Ansätze, and equation solving. xTras adds these functions to xAct and demonstrates them on linearized gravity and the Gauss–Bonnet term, while its coverage of multi-term symmetries remains incomplete.

  • Problem

    Field theory needs functions for contractions, general Ansätze, and solving tensorial equations that were not present in other xAct packages.

  • Method

    xTras extends the xAct tensor computer algebra system with field-theory functions for contractions, Ansätze, and tensorial equation solving.

  • Results

    xTras demonstrates that its tools recover the linearized Einstein equations and show that the four-dimensional Gauss–Bonnet equations of motion vanish identically.

  • Takeaways & Limitations

    xTras supplies practical field-theory methods, including complete contraction bases and solutions expressing equations in terms of dimensionally dependent identities.

  • Takeaways & Limitations

    xTras only partly addresses Young tableaux and multi-term symmetries, and AllContractions may return a complete but non-irreducible contraction basis.

Abstract

from arXiv · show

We present the tensor computer algebra package xTras, which provides functions and methods frequently needed when doing (classical) field theory. Amongst others, it can compute contractions, make Ansätze, and solve tensorial equations. It is built upon the tensor computer algebra system xAct, a collection of packages for Mathematica.

1 Introduction

xTras is an xAct application that adds field-theory functions for computing contractions, making Ansätze, and solving equations. It builds on xAct’s fast tensor-index canonicalization and broad tensor-computer-algebra ecosystem.

  • xAct is a free collection of Mathematica packages for tensor computer algebra, with applications ranging from tensor harmonics to cosmological perturbations.
  • xAct can canonicalize tensor indices under permutation symmetries extremely fast using the Butler-Portugal algorithm.
  • xTras provides field-theory functions for computing contractions, making Ansätze, and solving equations.
  • xTras grew from a need for functions that were not present in other xAct packages, although some functionality already existed in Cadabra.
  • The paper covers installation, xAct basics, xTras examples, and function documentation, supplemented by built-in and online documentation.

2 Installation

The section explains how to load xTras in Mathematica and access its documentation. Loading xTras also loads the xAct packages on which it depends.

  • xTras is installed by downloading it from the xAct website, unzipping it, and following the supplied instructions.
  • Loading xTras also loads its dependencies: xPerm, xTensor, xPert, Invar, xCoba, and SymManipulator.
  • The package’s built-in documentation can be opened after xTras is loaded.
  • Users can alternatively search for xTras in Mathematica’s Documentation Center by pressing F1.
  • Typing ? functionname displays information about xTras functions, and the >> link opens more detailed documentation.

3 xTensor basics

xTensor supplies the foundational manifold, metric, tensor, curvature, contraction, and canonicalization operations used by xTras. Its defaults automate some curvature handling but require explicit metric contraction and canonicalization, while ToCanonical handles only mono-term symmetries.

  • xTensor is the cornerstone of xAct because it implements manifolds, tensors, and Riemannian geometry.
  • DefManifold defines a manifold, its dimension, and the index range available to tensors.
  • DefMetric defines a metric and associated curvature tensors, including the Riemann and Ricci tensors.
  • By default, DefMetric uses a torsionless, metric-compatible connection and automatically converts Riemann contractions into Ricci tensors.
  • xTensor does not automatically contract explicit metrics; ContractMetric performs those contractions and can produce the Ricci tensor.
  • ToCanonical sorts indices using tensor symmetries, but currently simplifies only mono-term symmetries and not multi-term identities such as the Bianchi identity.

4 Examples

The examples demonstrate xTras for constructing gauge-invariant spin-2 theories and showing that the four-dimensional Gauss–Bonnet term has identically vanishing equations of motion.

  • Spin 2 on a flat background: xTras constructs all relevant spin-2 action terms, forms an Ansatz, and solves tensorial equations for gauge invariance.The workflow includes generating terms of the form h · ∂· ∂· h, constructing the action, deriving equations of motion, and solving for unknown constants.
  • Spin 2 on a flat background: The resulting equations of motion are precisely the linearized Einstein equations.
  • Spin 2 on a flat background: C2 controls overall normalization, while C1 multiplies a total derivative and therefore does not appear in the final equations of motion.
  • Gauss-Bonnet term: The Gauss–Bonnet term is treated as a four-dimensional topological term whose equations of motion should vanish identically.
  • Gauss-Bonnet term: xTras constructs dimensionally dependent identities for Riemann-tensor expressions and uses them to show that the Gauss–Bonnet equations of motion are zero.Four identities are constructed, but only two are independent without accounting for Bianchi identities; SolveTensors can express tensor structures in terms of others.
  • Gauss-Bonnet term: The Gauss–Bonnet equations of motion are a particular linear combination of dimensionally dependent identities and hence vanish.

5 xTras functions

Section 5 documents the most important xTras functions, but its list and descriptions are not exhaustive. It also refers readers to built-in and online documentation for complete function and option details.

  • Section 5 documents the most important functions in xTras, while explicitly noting that the list is not exhaustive.
  • The function descriptions do not cover all details, including most options.
  • The complete function list and option details are available in xTras’s built-in or online documentation.
  • The documented tensor setting assumes a manifold M, a metric, a covariant derivative CD, and associated curvature tensors.
  • The predefined constant symbol dim is used when defining this geometric setting.

5.1 Combinatorics

xTras provides combinatorial tools for generating tensor contractions, traceless expressions, dimensional identities, and independent index configurations. These functions automate otherwise tedious or rapidly growing tensor-algebra tasks, while retaining documented limitations around multi-term symmetries and computational complexity.

  • AllContractions: AllContractions generates a complete basis of possible contractions, optionally with specified free indices and their symmetry.It uses iterative contraction, canonicalization, and duplicate removal; the method is generally exponential in the number of contracted indices.
  • AllContractions: For a single Riemann tensor, AllContractions finds the Ricci scalar as its only independent full contraction.With multiple Riemann tensors, it can return contractions related by identities such as Bianchi, so the basis need not be irreducible.
  • AllContractions: AllContractions also handles derivative expressions and can enumerate contractions with prescribed free indices.The derivative example produces six listed contractions, while the free-index option introduces an auxiliary tensor and varies contractions with respect to it.
  • MakeTraceless: MakeTraceless projects tensor expressions onto traceless components, yielding the traceless Ricci tensor from Ricci and the Weyl tensor from Riemann.SymManipulator can impose Riemann symmetries implicitly, after which ExpandSym expands the result into the usual Weyl expression.
  • ConstructDDIs: ConstructDDIs builds dimensional dependent identities by contracting a basic over-antisymmetrization identity with the input expression.Examples recover the vanishing Einstein tensor in two dimensions and Weyl tensor in three dimensions; Bianchi identities are not included.

5.2 Tensor algebra

xTras supplies tensor-algebra functions for collecting tensorial or constant terms and solving tensorial equations. Its solving tools translate tensor equations into prefactor equations, but SolveTensors generally returns only a subset of solutions and is best used for replacement rules.

  • Rewriting expressions: CollectTensors groups tensorial terms in an expression without requiring a collection variable.It can also handle non-scalar tensors, canonicalizing them before collection by default.
  • Rewriting expressions: CollectTensors combines repeated tensor terms, rewriting C1T1 + C2T1 as (C1 + C2)T1 and applying the same grouping to other terms.The demonstrated output groups coefficients for T1, T2, T1T2, and T3.
  • Rewriting expressions: CollectConstants collects constant symbols rather than tensorial terms, rewriting the example as C1(T1 + T2) + C2(T1 + T3) + C3(T1 T2 + T3).It is described as the sibling of CollectTensors.
  • Solving equations: SolveConstants solves for constant symbols by collecting tensorial terms, reading off prefactor equations, and solving them simultaneously with Mathematica’s Solve.The procedure ensures that tensors do not appear on the right-hand side of the solutions.
  • Solving equations: ToConstantSymbolEquations converts tensorial expressions into equations for their constant prefactors before SolveConstants completes the solution.For the example, it derives C1 + C2 == 0, C3 + C4 == 0, C5 + C6 == 0, and C7 + C8 == 0.
  • Solving equations: SolveTensors attempts to solve tensorial equations for specified tensors, including tensors selected through patterns.It handles uncontracted tensor structures but does not address dummy-index, tensor-form, or contraction-related difficulties, so it may return only a subset of the general solution.
  • Solving equations: SolveTensors is recommended primarily for obtaining proper xAct tensor replacement rules rather than solving generic tensorial equations.The paper notes that general solutions occur in some simple cases but not in general.

5.3 Young tableaux

xTras adds partial support for Young tableaux and multi-term tensor symmetries absent from core xAct, including projections that make identities such as Bianchi manifest. It also provides generalized symmetry definitions that can substantially reduce projected expressions.

  • xTras partly fills xAct’s gap in Young tableaux and multi-term symmetries, while explicitly not providing a complete treatment.
  • Young projectors expose multi-term identities such as the Riemann Bianchi identity by sequentially symmetrizing rows and antisymmetrizing columns.ToCanonical handles only mono-term symmetries, so projection is used to make these identities explicit.
  • YoungProject supports manifestly antisymmetric projections by default and can switch to manifestly symmetric projections with ManifestSymmetry -> Symmetric.The selected projection determines whether the output visibly carries antisymmetry or symmetry in the relevant indices.
  • RiemannYoungProject: RiemannYoungProject projects every Riemann tensor and first derivative in an expression onto its Young tableau, enabling proofs such as the second Bianchi identity.
  • TableauSymmetric: TableauSymmetric generalizes xAct’s symmetry functions to arbitrary Young tableaux for tensors with more complicated symmetry structures.
  • 57 terms replace 144 when appropriate Young-tableau symmetry is defined before projection rather than imposed afterward.

5.4 Miscellaneous

The miscellaneous xTras functions automate metric variations, curvature simplification, and Euler-density construction for classical field-theory calculations. They combine perturbation, integration by parts, Bianchi identities, derivative sorting, and dimension-specific formulas.

  • VarL: xTras automates metric variations by computing the total variation and then integrating by parts to isolate the metric variation.This addresses the cumbersome nonlinear metric dependence of curvature tensors.
  • VarL: For metric variations, xTras overwrites VarD to perform the two-step variation procedure, while variations of other tensors use xTensor’s VarD.
  • FullSimplification: FullSimplification extends Invar by simplifying contracted second Bianchi identities in arbitrary expressions, not only scalar monomials.It also simplifies scalar monomials, applies contracted identities, and sorts covariant derivatives.
  • FullSimplification: FullSimplification commutes covariant derivatives to divergences so contracted Bianchi identities can be applied before sorting the derivatives.
  • EulerDensity: EulerDensity constructs the Euler density associated with a covariant derivative in specified dimensions, with examples for dimensions two, four, six, and eight.For generic-dimensional manifolds, the dimension must be supplied explicitly.
Loading 1308.3493v1…