Overview of the tensor Package
List of tensor Package Commands
Important: The tensor package has been deprecated. Use the superseding packages DifferentialGeometry and Physics instead.
The tensor package (tensor) contains commands that deal with tensors, their operations, and their use in General Relativity both in the natural basis and in a moving frame. Some utilities to help manipulate tensors are also provided.
The tensor package uses its own data type, called tensor_type, to represent objects which have possibly both covariant and contravariant indices. Specifically, a tensor_type is a table with two entries: a compts field, to store the components of the object, and an index_char field, which describes the covariant or contravariant nature of the indices of the object.
The components must be stored as an array of size equal to the rank of the object, with all index ranges beginning at one and ending at the dimension of the space (only "square" ranges are allowed). The index character is stored as a list of positive and negative ones (1 or -1). A positive one (1) in the ith position in the index character list specifies that the ith index of the object is contravariant. Similarly, a negative one (-1) in the ith position in the index character list specifies that the ith index of the object is covariant.
For example, [1,-1,-1,1] specifies that indices 1 and 4 are contravariant (written as superscripts) and indices 2 and 3 are covariant (written as subscripts). Note that the size of the index character list must match the size of the components array (the rank of the object). For tensors of rank 0 (that is, scalars, invariants), the index character field is an empty list (), and the components field is an algebraic type.
The tensor_type type is implemented as a procedure (`tensor/tensor_type`) with a Boolean return value. It returns a value of true if its first argument satisfies the properties of a tensor_type object, and false otherwise.
Other than the tensor_type data type, the tensor package uses two other kinds of tables to keep track of related sets of quantities. These are known as the "spin coefficient table" and the "curvature component table".
The spin coefficient table stores the NP spin coefficients as computed by tensor[npspin]. The coefficients are indexed according to their Greek names: epsilon, nu, lambda, pi, mu, tau, rho, sigma, kappa, alpha, beta, and gamma (that is, table entry [mu] contains the spin coefficient 'mu').
The curvature component table contains the NP curvature components as computed by tensor[npcurve]. This table contains three fields: Phi, which is a (0..2,0..2) array that (with Hermitian matrix components) contains the Ricci components, Psi, which is a (0..4) array containing the Weyl components, and R, a scalar field containing the Ricci scalar.
Because computations with tensors usually involve a great number of quantities, it is important to have a lot of flexibility in the way that computations are simplified. For this reason, most of the tensor routines use their own simplifying routines which can be customized for a particular problem. For more information, see tensor/simp.
Several of the tensor routines use specific quantities and tensors that have certain symmetrical properties in their indices (for example, the symmetrical property of the metric tensor components). For this reason, the tensor package provides indexing functions that are not provided by Maple. For more information on tensor indexing functions, see tensor/indexing.
Each command in the tensor package can be accessed by using either the long form or the short form of the command name in the command calling sequence.
The following is a list of available commands.
apply an operation on the elements of a tensor, spin or curvature table
fully antisymmetrize tensor
Christoffel symbols of the first kind
Christoffel symbols of the second kind
commutator of two vectors
compare two tensors, spin or curvature tables
connection coefficients for a rigid frame
convert connection or Riemann tensor to the NP formalism
create a tensor object
first partial derivatives of the metric
second partial derivatives of the metric
display the objects used in General Relativity
display one object used in General Relativity
perform the dual operation on the indices of a tensor
facility for the input of metric tensor components
compute the frame that brings the metric to the diagonal signature metric
Euler-Lagrange equations for geodesic curves
get the character (covariant/contravariant) of an object
get the components of an object
get the rank of an object
invariants of the Riemann curvature tensor (General Relativity)
inverse of a second rank tensor
Jacobian of a coordinate transformation
Killing's equation (related to symmetries of the space)
Lie derivative with respect to a vector
linear combination of tensor objects
Newmann-Penrose curvature component in Debever formalism (G.R.)
Newmann-Penrose spin component in Debever formalism (G.R.)
partial derivative of a tensor
permutation of indices
classification of polynomials of degree 4
inner and outer tensor product
Riemann curvature tensor in a rigid frame
fully symmetrize a tensor
compute the objects used in General Relativity
Change coordinates systems
To display the help page for a particular tensor command, see Getting Help with a Command in a Package.
Define the Schwarzschild covariant metric tensor: In defining the array of metric components, use sparse to cut down on the number of components that must be entered. We always use the symmetric indexing function when defining the metric components.
Now create the metric tensor by assigning the proper values to fields index_char and compts of a table (or use tensor[create]).
Verify that the new object "g" is really a tensor_type.
Create a "rank-0" tensor, that is, a scalar.
Verify that this object is also really a tensor_type.
Download Help Document
What kind of issue would you like to report? (Optional)