RearrangeIndices - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Tensor[RearrangeIndices] - rearrange the argument/indices of a tensor

Calling Sequences

     RearrangeIndices(T, P)

     RearrangeIndices(T, C)

Parameters

   T    - a tensor of rank r

   P    - list of integers, giving a permutation of the integers 1...r

   C    - a list of lists of integers, describing a permutation as the composition of cycles

 

Description

Examples

Description

• 

We describe, by example, the conventions used to define a permutation. The list  denotes a permutation acting on a 5 element list  by sending the first element of  to the second slot, the second element of  to the third slot, the third element of to the first slot and so on. Thus, if we apply  to  the result is . The same permutation can be written in cycle notation as . As another example the permutation which interchanges  with  in the list  is defined in permutation notation by or in cycle notation as .

• 

A tensor  is a multi-linear map whose arguments are vectors or forms. The command RearrangeIndices defines a new tensor by rearranging the arguments of  according to the permutation . For example, if  is a rank 3 covariant tensor and  = RearrangeIndices(T, [3, 2, 1]) then .

• 

This command is part of the DifferentialGeometry:-Tensor package, and so can be used in the form RearrangeIndices(...) only after executing the command with(DifferentialGeometry) and with(Tensor) in that order.  It can always be used in the long form DifferentialGeometry:-Tensor:-RearrangeIndices.

Examples

 

Example 1.

First create a 3 dimensional manifold  and define two tensors  and  on .

M > 

(2.1)
M > 

(2.2)

 

Interchange the arguments for the tensor .

M > 

(2.3)

 

Interchange argument 1 with 2 and argument 3 with 4 in the tensor . This can be done in two ways, by specifying a permutation or a list of cycles.

M > 

(2.4)
M > 

(2.5)

 

Cyclicly permute the last 3 arguments of . This can be done in two ways, by specifying a permutation or a list of cycles.

M > 

(2.6)
M > 

(2.7)

 

Cyclicly permute all 4 arguments of .  This can be done in two ways, by specifying a permutation or a list of cycles.

M > 

(2.8)
M > 

(2.9)

 

Example 2.

Arguments of different spatial types can also be rearranged. Define a rank 2 vector bundle  over a 2 dimensional base.

M > 

E > 

(2.10)
E > 

(2.11)

See Also

DifferentialGeometry

Tensor

SymmetrizeIndices

 


Download Help Document