tensor
dual
perform the dual operation on the indices of a tensor
Calling Sequence
Parameters
Description
Examples
dual(LC, T, index_list)
LC
-
Levi-Civita pseudo-tensor
T
tensor to dual
index_list
list of indices of T to dual
Important: The tensor package has been deprecated. Use the superseding packages DifferentialGeometry and Physics instead.
The function dual(LC, T, [i1, i2, ... ]) computes the dual of the tensor T on indices i1, i2, ... of T using the components of the Levi-Civita pseudo-tensor LC. This is done by forming the inner product of LC with T, contracting over the appropriate indices of T and dividing by the appropriate normalizing factor.
The index_list must contain indices of T which are all of the same covariant / contravariant character and in which T is skew-symmetric. The number of indices to dual cannot exceed the dimension of the space (which equals the rank of LC) and must be greater than zero. At this time, the routine does not check if T is really antisymmetric in the given indices -- it is a precondition.
All of the indices of the LC tensor must have character opposite to that of the indices of T of which the dual is to be taken. No mixed-type LC tensors are permitted. Thus, the dual of indices of T of opposite character must be computed separately by calling the function twice. The LC tensor can be obtained by using tensor[Levi_Civita].
The result is a tensor type of rank equal to:
dimension+rank⁡T−2⁢size⁡index_list
The normalizing factor is equal to factorial(size(index_list)).
If the number of indices being dualed equals the rank of the input tensor, then the components of the result will be completely skew-symmetric (since their indices are the free indices of the Levi-Civita tensor). In this case, the result uses the antisymmetric indexing function for its component array.
Simplification: This routine uses the `tensor/prod/simp` routine for simplification purposes. The simplification routine is applied to each component of result after it is computed. By default, `tensor/prod/simp` is initialized to the `tensor/simp` routine. It is recommended that the `tensor/prod/simp` routine be customized to suit the needs of the particular problem.
with⁡tensor:
Define the coordinates and metric of Minkowski space-time:
coord≔t,x,y,z
g≔create⁡−1,−1,array⁡symmetric,sparse,1..4,1..4,4,4=1,1,1=−1,2,2=1,3,3=1
g≔table⁡compts=−1000010000100001,index_char=−1,−1
ginv≔invert⁡g,detg:
Use the Levi_Civita routine to generate the Levi-Civita pseudo-tensor:
Levi_Civita⁡detg,4,cov_LC,con_LC
Define the contravariant components of the Electromagnetic Field tensor:
F≔create⁡1,1,array⁡antisymmetric,1..4,1..4,1,2=E1,1,3=E2,1,4=E3,3,4=H1,2,4=−H2,2,3=H3
F≔table⁡compts=0E1E2E3−E10H3−H2−E2−H30H1−E3H2−H10,index_char=1,1
Compute the dual of F:
F_star≔dual⁡cov_LC,F,1,2
F_star≔table⁡compts=0H1H2H3−H10E3−E2−H2−E30E1−H3E2−E10,index_char=−1,−1
Compute the dual of the dual of F:
F_star_star≔dual⁡con_LC,F_star,1,2
F_star_star≔table⁡compts=0−E1−E2−E3E10−H3H2E2H30−H1E3−H2H10,index_char=1,1
lin_com⁡F,F_star_star
table⁡compts=0000000000000000,index_char=1,1
See Also
tensor(deprecated)
tensor(deprecated)/Levi_Civita
tensor(deprecated)[prod]
tensor(deprecated)[simp]
Download Help Document