2. Manipulating basis indices: ContractBasis, SeparateBasis, ToBasis

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


{Basis[{a, polar}, -b] v[b], Basis[{a, cartesian}, {-b, -polar}] v[{b, polar}], Basis[a, {-b, -polar}] v[{b, polar}]}


{e_b ^( a) v_ ^b, e_ ( b)^a  v_ ^b, e_ ( b)^a  v_ ^b}

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:


{v[{a, polar}] == v[b] Basis[-b, {a, polar}], v[a] == Basis[a, {-b, -polar}] v[{b, polar}], v[{a, polar}] == v[{b, cartesian}] Basis[{a, polar}, {-b, -cartesian}]}


{v_ ^a == e_b ^( a) v_ ^b, v_ ^a == e_ ( b)^a  v_ ^b, v_ ^a == e_ ( b)^a  v_ ^b}

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.

2.1. IndicesOf

2.2. ContractBasis

2.3. SeparateBasis

2.4. ToBasis

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