2.3. Get (new) indices

Sometimes we need to use many indices. There are two ways to do it. We can register more symbols using AddIndices or we can ask xTensor` to generate new indices for a vbundle using NewIndexIn (it uses a combination of the last registered symbol and integer numbers). User-defined indices and computer-defined indices are kept in two different lists.

AddIndices                Add user-defined indices to a vbundle
RemoveIndices            Remove user-defined indices from a vbundle
NewIndexIn                Generate a computer-defined index
GetIndicesOfVBundle        Give n indices

Functions that return or change the available indices.

Currently there are only user-defined indices. We add some more:

In[91]:=

IndicesOfVBundle[TangentM3]

Out[91]=

{{a, b, c, d, e, f, g, h}, {}}

In[92]:=

AddIndices[TangentM3, {i, j, k, l}]

In[93]:=

IndicesOfVBundle[TangentM3]

Out[93]=

{{a, b, c, d, e, f, g, h, i, j, k, l}, {}}

We can also remove indices, but this is a very dangerous operation because some previous expressions could get corrupted if they contain removed indices. There is no built-in command to check whether this is happening or not.

In[94]:=

RemoveIndices[TangentM3, {j, i, l, k}]

In[95]:=

IndicesOfVBundle[TangentM3]

Out[95]=

{{a, b, c, d, e, f, g, h}, {}}

xTensor` generates new indices using NewIndexIn

In[96]:=

NewIndexIn[TangentM3]

Out[96]=

h1

In[97]:=

IndicesOfVBundle[TangentM3]

Out[97]=

{{a, b, c, d, e, f, g, h}, {h1}}

The user-function to get any number of indices is GetIndicesOfVBundle. Note that the last argument is a list of symbols that we do not want to get:

In[98]:=

GetIndicesOfVBundle[TangentM3, 14, {d, e, h3}]

Out[98]=

{a, b, c, f, g, h, h1, h2, h4, h5, h6, h7, h8, h9}

In[99]:=

IndicesOfVBundle[TangentM3]

Out[99]=

{{a, b, c, d, e, f, g, h}, {h1, h2, h3, h4, h5, h6, h7, h8, h9}}

The indices of complex conjugated vbundles are paired, and therefore if we generate an index in one of them, automatically the complex conjugated index is generated in the other one:

In[100]:=

NewIndexIn[InnerC]

Out[100]=

ℌ1

In[101]:=

IndicesOfVBundle[InnerC]

Out[101]=

{{, , ℭ, , , , , ℌ}, {ℌ1}}

In[102]:=

IndicesOfVBundle[InnerC†]

Out[102]=

{{†, †, ℭ†, †, †, †, †, ℌ†}, {ℌ1†}}

In[103]:=

GetIndicesOfVBundle[InnerC†, 10]

Out[103]=

{†, †, ℭ†, †, †, †, †, ℌ1†, ℌ†, ℌ2}

In[104]:=

IndicesOfVBundle[InnerC]

Out[104]=

{{, , ℭ, , , , , ℌ}, {ℌ1, ℌ2}}

Note the information associated to an abstract index:

In[105]:=

? 

Global`A

AbstractIndexQ[A]^=True
DaggerIndex[A]^=A
xAct`xTensor`Private`NoDollar[A]^=A
PrintAs[A]^=A
InnerC`Q[A]^=True
VBundleOfIndex[A]^=InnerC

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