GenerateTensors - Maple Help

Tensor[GenerateTensors] - generate a list of all product tensors from a list of lists of tensors

Calling Sequences

GenerateTensors(Tlist)

Parameters

Tlist    - a list of lists of tensor fields

Description

 • With Tlist = [${T}_{1},{T}_{2},...,{T}_{r}$] the command GenerateTensors(Tlist) will generate a list of tensors by forming all possible r-fold tensor products ${t}_{1}\otimes {t}_{2}\otimes ...\otimes {t}_{r}$ , where the first tensor ${t}_{1}$ belongs to the list ${T}_{1},$ the second tensor ${t}_{2}$ belongs to the list ${T}_{2}$, and so on.
 • This command is part of the DifferentialGeometry:-Tensor package, and so can be used in the form GenerateTensors(...) only after executing the command with(DifferentialGeometry) and with(Tensor) in that order. It can always be used in the long form DifferentialGeometry:-Tensor:-GenerateTensors.

Examples

 > $\mathrm{with}\left(\mathrm{DifferentialGeometry}\right):$$\mathrm{with}\left(\mathrm{Tensor}\right):$

Example 1.

First create a 3 dimensional manifold $M.$

 > $\mathrm{DGsetup}\left(\left[x,y,z\right],M\right):$

Create a list L1 of all type (1, 1) tensors on $M.$

 M > $\mathrm{T1}≔\mathrm{Tools}:-\mathrm{DGinfo}\left("FrameBaseVectors"\right)$
 ${\mathrm{T1}}{:=}\left[{\mathrm{D_x}}{,}{\mathrm{D_y}}{,}{\mathrm{D_z}}\right]$ (2.1)
 M > $\mathrm{T2}≔\mathrm{Tools}:-\mathrm{DGinfo}\left("FrameBaseForms"\right)$
 ${\mathrm{T2}}{:=}\left[{\mathrm{dx}}{,}{\mathrm{dy}}{,}{\mathrm{dz}}\right]$ (2.2)
 M > $\mathrm{L1}≔\mathrm{GenerateTensors}\left(\left[\mathrm{T1},\mathrm{T2}\right]\right)$
 ${\mathrm{L1}}{:=}\left[{\mathrm{D_x}}{}{\mathrm{dx}}{,}{\mathrm{D_x}}{}{\mathrm{dy}}{,}{\mathrm{D_x}}{}{\mathrm{dz}}{,}{\mathrm{D_y}}{}{\mathrm{dx}}{,}{\mathrm{D_y}}{}{\mathrm{dy}}{,}{\mathrm{D_y}}{}{\mathrm{dz}}{,}{\mathrm{D_z}}{}{\mathrm{dx}}{,}{\mathrm{D_z}}{}{\mathrm{dy}}{,}{\mathrm{D_z}}{}{\mathrm{dz}}\right]$ (2.3)
 M > $\mathrm{nops}\left(\mathrm{L1}\right)$
 ${9}$ (2.4)

Example 2.

Create a list $\mathrm{L2}$ of all rank 3 covariant tensors which are symmetric in their first 2 indices.

 M > $S≔\mathrm{GenerateSymmetricTensors}\left(\mathrm{T1},2\right)$
 ${S}{:=}\left[{\mathrm{D_x}}{}{\mathrm{D_x}}{,}\frac{{1}}{{2}}{}{\mathrm{D_x}}{}{\mathrm{D_y}}{+}\frac{{1}}{{2}}{}{\mathrm{D_y}}{}{\mathrm{D_x}}{,}\frac{{1}}{{2}}{}{\mathrm{D_x}}{}{\mathrm{D_z}}{+}\frac{{1}}{{2}}{}{\mathrm{D_z}}{}{\mathrm{D_x}}{,}{\mathrm{D_y}}{}{\mathrm{D_y}}{,}\frac{{1}}{{2}}{}{\mathrm{D_y}}{}{\mathrm{D_z}}{+}\frac{{1}}{{2}}{}{\mathrm{D_z}}{}{\mathrm{D_y}}{,}{\mathrm{D_z}}{}{\mathrm{D_z}}\right]$ (2.5)
 M > $\mathrm{L2}≔\mathrm{GenerateTensors}\left(\left[S,\mathrm{T2}\right]\right)$
 ${\mathrm{L2}}{:=}\left[{\mathrm{D_x}}{}{\mathrm{D_x}}{}{\mathrm{dx}}{,}{\mathrm{D_x}}{}{\mathrm{D_x}}{}{\mathrm{dy}}{,}{\mathrm{D_x}}{}{\mathrm{D_x}}{}{\mathrm{dz}}{,}\frac{{1}}{{2}}{}{\mathrm{D_x}}{}{\mathrm{D_y}}{}{\mathrm{dx}}{+}\frac{{1}}{{2}}{}{\mathrm{D_y}}{}{\mathrm{D_x}}{}{\mathrm{dx}}{,}\frac{{1}}{{2}}{}{\mathrm{D_x}}{}{\mathrm{D_y}}{}{\mathrm{dy}}{+}\frac{{1}}{{2}}{}{\mathrm{D_y}}{}{\mathrm{D_x}}{}{\mathrm{dy}}{,}\frac{{1}}{{2}}{}{\mathrm{D_x}}{}{\mathrm{D_y}}{}{\mathrm{dz}}{+}\frac{{1}}{{2}}{}{\mathrm{D_y}}{}{\mathrm{D_x}}{}{\mathrm{dz}}{,}\frac{{1}}{{2}}{}{\mathrm{D_x}}{}{\mathrm{D_z}}{}{\mathrm{dx}}{+}\frac{{1}}{{2}}{}{\mathrm{D_z}}{}{\mathrm{D_x}}{}{\mathrm{dx}}{,}\frac{{1}}{{2}}{}{\mathrm{D_x}}{}{\mathrm{D_z}}{}{\mathrm{dy}}{+}\frac{{1}}{{2}}{}{\mathrm{D_z}}{}{\mathrm{D_x}}{}{\mathrm{dy}}{,}\frac{{1}}{{2}}{}{\mathrm{D_x}}{}{\mathrm{D_z}}{}{\mathrm{dz}}{+}\frac{{1}}{{2}}{}{\mathrm{D_z}}{}{\mathrm{D_x}}{}{\mathrm{dz}}{,}{\mathrm{D_y}}{}{\mathrm{D_y}}{}{\mathrm{dx}}{,}{\mathrm{D_y}}{}{\mathrm{D_y}}{}{\mathrm{dy}}{,}{\mathrm{D_y}}{}{\mathrm{D_y}}{}{\mathrm{dz}}{,}\frac{{1}}{{2}}{}{\mathrm{D_y}}{}{\mathrm{D_z}}{}{\mathrm{dx}}{+}\frac{{1}}{{2}}{}{\mathrm{D_z}}{}{\mathrm{D_y}}{}{\mathrm{dx}}{,}\frac{{1}}{{2}}{}{\mathrm{D_y}}{}{\mathrm{D_z}}{}{\mathrm{dy}}{+}\frac{{1}}{{2}}{}{\mathrm{D_z}}{}{\mathrm{D_y}}{}{\mathrm{dy}}{,}\frac{{1}}{{2}}{}{\mathrm{D_y}}{}{\mathrm{D_z}}{}{\mathrm{dz}}{+}\frac{{1}}{{2}}{}{\mathrm{D_z}}{}{\mathrm{D_y}}{}{\mathrm{dz}}{,}{\mathrm{D_z}}{}{\mathrm{D_z}}{}{\mathrm{dx}}{,}{\mathrm{D_z}}{}{\mathrm{D_z}}{}{\mathrm{dy}}{,}{\mathrm{D_z}}{}{\mathrm{D_z}}{}{\mathrm{dz}}\right]$ (2.6)
 M > $\mathrm{nops}\left(\mathrm{L2}\right)$
 ${18}$ (2.7)

Example 3.

Create a list $\mathrm{L3}$ of all rank 3 covariant tensors which are skew-symmetric in their first 2 indices.

 M > $W≔\mathrm{Tools}:-\mathrm{GenerateForms}\left(\mathrm{T2},2\right)$
 ${W}{:=}\left[{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dy}}{,}{\mathrm{dx}}{}{\bigwedge }{}{\mathrm{dz}}{,}{\mathrm{dy}}{}{\bigwedge }{}{\mathrm{dz}}\right]$ (2.8)
 M > $\mathrm{map}\left(\mathrm{convert},W,\mathrm{DGtensor}\right)$
 $\left[{\mathrm{dx}}{}{\mathrm{dy}}{-}{\mathrm{dy}}{}{\mathrm{dx}}{,}{\mathrm{dx}}{}{\mathrm{dz}}{-}{\mathrm{dz}}{}{\mathrm{dx}}{,}{\mathrm{dy}}{}{\mathrm{dz}}{-}{\mathrm{dz}}{}{\mathrm{dy}}\right]$ (2.9)
 M > $\mathrm{L3}≔\mathrm{GenerateTensors}\left(\left[W,\mathrm{T2}\right]\right)$
 ${\mathrm{L3}}{:=}\left[{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dx}}{-}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dx}}{,}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dy}}{-}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dy}}{,}{\mathrm{dx}}{}{\mathrm{dy}}{}{\mathrm{dz}}{-}{\mathrm{dy}}{}{\mathrm{dx}}{}{\mathrm{dz}}{,}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dx}}{-}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dx}}{,}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dy}}{-}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dy}}{,}{\mathrm{dx}}{}{\mathrm{dz}}{}{\mathrm{dz}}{-}{\mathrm{dz}}{}{\mathrm{dx}}{}{\mathrm{dz}}{,}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{dx}}{-}{\mathrm{dz}}{}{\mathrm{dy}}{}{\mathrm{dx}}{,}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{dy}}{-}{\mathrm{dz}}{}{\mathrm{dy}}{}{\mathrm{dy}}{,}{\mathrm{dy}}{}{\mathrm{dz}}{}{\mathrm{dz}}{-}{\mathrm{dz}}{}{\mathrm{dy}}{}{\mathrm{dz}}\right]$ (2.10)