Further Examples

Load xTensor`:

In[1]:=

Needs["xAct`xTensor`"]

--------------------------------------------------------------------------------

Package xAct`xCore`  version 0.4.0,  {2007, 11, 6}

CopyRight (C) 2007, Jose M. Martin-Garcia, under the General Public License.

--------------------------------------------------------------------------------

Package ExpressionManipulation`

CopyRight (C) 1999-2007, David J. M. Park and Ted Ersek

--------------------------------------------------------------------------------

Package xAct`xPerm`  version 0.7.0,  {2007, 11, 6}

CopyRight (C) 2003-2007, Jose M. Martin-Garcia, under the General Public License.

Connecting to external linux executable...

Connection established.

--------------------------------------------------------------------------------

Package xAct`xTensor`  version 0.9.3,  {2007, 11, 6}

CopyRight (C) 2002-2007, Jose M. Martin-Garcia, under the General Public License.

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

Define a manifold (and its associated tangent bundle) and a tensor:

In[2]:=

DefManifold[M, 4, IndexRange[a, p], z]

** DefManifold: Defining manifold M.

** DefVBundle: Defining vbundle TangentM.

In[3]:=

DefTensor[T[a, b, c], M]

** DefTensor: Defining tensor T[a, b, c] .

The basic operation of splitting is as follows, replacing an index by different possibilities, and returning a list:

In[4]:=

SplitIndex[T[a, b, c], a→IndexList[d, e, f]]

Out[4]=

{T_   ^dbc, T_   ^ebc, T_   ^fbc}

Several indices can be splitted at the same time, producing a matrix of objects:

In[5]:=

SplitIndex[T[a, b, c], {a→IndexList[d, e, f], b→IndexList[g, h], c→IndexList[Dir[T[z]], i]}]

Out[5]=

{{{T_ (  T)^dg , T_   ^dgi}, {T_ (  T)^dh , T_   ^dhi}}, {{T_ (  T)^eg , T_   ^egi}, {T_ (  T)^eh , T_   ^ehi}}, {{T_ (  T)^fg , T_   ^fgi}, {T_ (  T)^fh , T_   ^fhi}}}

In[6]:=

MatrixForm[%]

Out[6]//MatrixForm=

Splitting is performed even if the index is not present, giving multiple copies of the input:

In[7]:=

SplitIndex[T[a, b, c], d→IndexList[g, h]]

Out[7]=

{T_   ^abc, T_   ^abc}

Tidy up:

In[8]:=

UndefTensor[T]

** Undefined tensor T

In[9]:=

UndefManifold[M]

** Undefined vector bundle TangentM

** Undefined manifold M


Created by Mathematica  (May 16, 2008) Valid XHTML 1.1!