5. Tracing contractions
One of the most important functions of xCoba` is TraceBasisDummy. We already know how to express a tensor on a given basis, as a contraction with Basis objects. With this new function, we can expand that contraction as a sum of coordinate components.
TraceBasisDummy Expand dummy basis indices into their coordinate ranges
Tracing basis contractions.
In[260]:=
Out[260]=
A shorthand is provided. v[{a,cart}]◦v[{a,cart}], where ◦ is SmallCircle ( :sc:), has the same effect
In[261]:=
Out[261]=
Again, there is complete control over which dummies should be expanded. The complete syntax is TraceBasisDummy[expr, indices], where indices is one of the following:
- A single BIndex.
- A list of basis indices with head Indices.
- A vbundle (all basis dummies belonging to it will we expanded).
- A basis
In[262]:=
Out[262]=
In[263]:=
Out[263]=
In[264]:=
Out[264]=
In[265]:=
Out[265]=
In[266]:=
Out[266]=
With derivatives,
In[267]:=
Out[267]=
In[268]:=
Out[268]=
In[269]:=
Out[269]=
In[270]:=
Out[270]=
Another example
In[271]:=
Out[271]=
In[272]:=
Out[272]=
Created by Mathematica (May 16, 2008) |