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]:=

TraceBasisDummy[v[{a, cartesian}] v[{-a, -cartesian}]]

Out[260]=

v_0^  v_ ^0 + v_1^  v_ ^1 + v_2^  v_ ^2

A shorthand is provided. v[{a,cart}]◦v[{a,cart}], where ◦ is SmallCircle ( :sc:), has the same effect

In[261]:=

v[{a, cartesian}] ◦v[{-a, -cartesian}]

Out[261]=

v_0^  v_ ^0 + v_1^  v_ ^1 + v_2^  v_ ^2

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]:=

traceexpr = S[{-A, -comp}, {A, comp}] T[{-a, -polar}, {-b, -cartesian}] v[{a, polar}] v[{b, cartesian}]

Out[262]=

S_A ^( A) T_ (ab)^   v_ ^a v_ ^b

In[263]:=

TraceBasisDummy[traceexpr]//Simplify

Out[263]=

In[264]:=

TraceBasisDummy[traceexpr, TangentM3]//Simplify

Out[264]=

In[265]:=

TraceBasisDummy[traceexpr, polar]//Simplify

Out[265]=

S_A ^( A) (T_ (0b)^   v_ ^0 + T_ (1b)^   v_ ^1 + T_ (2b)^   v_ ^2) v_ ^b

In[266]:=

TraceBasisDummy[traceexpr, cartesian]//Simplify

Out[266]=

S_A ^( A) (T_ (a0)^   v_ ^0 + T_ (a1)^   v_ ^1 + T_ (a2)^   v_ ^2) v_ ^a

With derivatives,

In[267]:=

TraceBasisDummy[PD[{-b, -polar}][v[{b, polar}]]]

Out[267]=

∂_0^ v_ ^0 + ∂_1^ v_ ^1 + ∂_2^ v_ ^2

In[268]:=

 (u[B] + S[{1, -comp}, {A, comp}] S[{-A, -comp}, B]) + PD[{A, comp}][S[{-A, -comp}, B]] (u[{C, comp}] + S[{-D, -comp}, {C, comp}] u[{D, comp}]) u[{-C, -comp}]

Out[268]=

S_1 ^( A) S_A ^( B) + u_ ^B + u_C^  (u_ ^C + S_D ^( C) u_ ^D) ∂_ ^AS_A ^( B)

In[269]:=

TraceBasisDummy @ %

Out[269]=

In[270]:=

Simplify[%]

Out[270]=

Another example

In[271]:=

TraceBasisDummy[PDpolar[{-a, -cartesian}][v[{a, cartesian}]]]

Out[271]=

_0^ v_ ^0 + _1^ v_ ^1 + _2^ v_ ^2

In[272]:=

SeparateBasis[AIndex][%]//Expand

Out[272]=


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