# Tensor Calculus in Sage

NB: this page is obsolete: tensor calculus is now fully implemented in Sage, see the Manifolds section of the reference manual. Examples of use are here; see also the tutorial.

This page arose out of a thread at sage-devel on the use of differential forms in Sage. Differential forms have been mentioned on the mailing list a few times before, and in the current discussion a number of interesting packages for tensor calculus were mentioned, which are listed here.

This list is by no means complete, so please feel free to edit.

As tensor calculus is a vast subject, at some stage we will want to have a roadmap of which tasks to handle first, benchmarks, and useful applications. See this paper for some real-world applications.

## Packages

### Forms/Tensor packages

• GRTensor is a package for Maple (with a port to Mathematica) for geometry computations in general relativity. From the web page: GRTensor II is a computer algebra package for performing calculations in the general area of differential geometry. Its purpose is the calculation of tensor components on curved spacetimes specified in terms of a metric or set of basis vectors.

• The Ricci package in Mathematica looks terrific, but I don't have Mathematica so I can't experiment with it.

• Cadabra is a tensor package designed for computations in field theory (HEP, GR). It looks very powerful and versatile, but the syntax is very terse.

• xAct is a suite of free packages for tensor computer algebra in Mathematica. xAct implements state-of-the-art algorithms for fast manipulations of indices and has been modelled on the current geometric approach to General Relativity.

• Maxima seems to have a differential forms package.

• FriCAS has support for a De Rham complex, which (among others) apparently allows you to represent differential forms.

• Scmutils has lots of code to deal with forms, Riemannian geometry, etc. plus lots of cool applications.

• Mathematica also has two more packages for doing differential forms: http://library.wolfram.com/infocenter/MathSource/683 and http://library.wolfram.com/infocenter/MathSource/482/ (the last one has a nice Integral command, for example).

• sympy has a small relativity example. See also this announcement.

• JET: Axiom code to deal with jet bundles, geometric ODEs/PDEs, Cartan-Kuranishi prolongations, etc. See the abstract here.

• GluCat: GluCat is a library of template classes which model the universal Clifford algebras over the field of real numbers, with arbitrary dimension and arbitrary signature. GluCat implements a model of each Clifford algebra corresponding to each non-degenerate quadratic form up to a maximum number of dimensions.

### Sage code

There are a few Sage projects in the works that might be interesting in the context of differential forms and tensor calculus. A quick search brings up the following.

Other discussions:

tensorcalc (last edited 2017-12-29 17:41:26 by egourgoulhon)