2. Manipulating basis indices: ContractBasis, SeparateBasis, ToBasis

We ended the previous section with an open problem: what to do with expressions such as

In[122]:=

Out[122]=

The first one represents the expansion of a tensor into its components and the second one a basis change.  These operations are seemingly different: we are alternatively contracting basis indices and abstract indices. They are all, however, encompassed by one single function in xCoba` :  ContractBasis.

Conversely, we may want to go from contracted expressions to ones with explicit Basis objects. And we may also need to introduce additional Basis objects in order to take care of a basis change:

In[123]:=

Out[123]=

In the first example, we are simply extracting the Basis object from the tensor, so to speak; but in the second and third cases we are introducing new Basis objects, either to express a tensor in terms of its components or to change their basis. Again, all these operations are performed by just one function: SeparateBasis.

 Created by Mathematica  (May 16, 2008)