# Riemannian Geometry & Tensor Calculus @ Mathematica

## Description

This package introduces definitions for tensor calculations in Riemannian Geometry. To begin a calculation the user must specify a Riemannian space by giving:

(1) a list of symbols (= coordinates),
(2) a symmetric matrix of functions of these coordinates (= metric tensor) and
(3) a list of simplification rules (optional).

The main routine in the package — RGtensors[metric_, coordinates_] — then computes explicit expressions for all common Riemannian Geometry tensors (Riemann, Ricci, Einstein, Weyl) and tests if the space belongs to any of the following categories: Flat, Conformally Flat, Ricci Flat, Einstein Space or Space of Constant Curvature. Each tensor is stored as a nested list (of its components) under an appropriate global name.

The following functions for operating on these tensors are defined: Raise/Lower indices, Contract (multiple) indices, Covariant and Lie Differentiation and Covariant Divergence. These functions, together with the Mathematica functions Outer (giving tensor products) and Transpose (index rearrangement), provide the necessary tools for performing all common tensor operations on the computer. In addition, routines are included for computing the Plebanski tensor and for Classifying the (4-dimensional) Weyl and Ricci tensors, as well as several auxiliary functions for examining / transforming tensor components.

Tensor components can be calculated in any frame (default=coordinate frame). In a 4-dimensional null frame, in addition to the standard tensors, the main routine (RGtensors) computes all quantities appearing in the Newman-Penrose formalism (spin coefficients, Weyl and Ricci scalars, directional derivative operators). Approximate calculations (series expansions) are also possible.

The notebook RGTC.nb contains detailed Definitions of all new functions, Examples, mainly from General Relativity theory, and Usage Tips. Some more complicated examples are given here. The package includes two palettes for entering the new functions and the NP symbols / operators.

The initialization code (EDCRGTCcode.m) comes combined with the EDC code (Exterior Differential Calculus) to allow calculations in arbitrary frames as well as operations with differential forms.

The package is compatible with all Mathematica versions 3.0 or later.

Note: RGTC cannot be used for calculations with abstract tensors (manipulation of tensor expressions with abstract indices). It only operates on explicit tensors (nested lists of components which are functions of the coordinates). For abstract calculations try the package xTensor.