9.4. Inert heads
Sometimes we need to wrap tensors with some head. This is an extremely general concept and it is prepared to play the role of an arbitary head with the only property of being "transparent" to the symmetry and canonicalization routines. Dagger and ERROR are both inert heads.
A prototypical example could be traceless, transverse tensors: We define an inert head called TTPart:
In[933]:=
In[934]:=
Out[934]=
In[935]:=
Out[935]=
In[936]:=
With help from Guillaume Faye, this concept has been improved in version 0.9.2 of xTensor` in three different ways:
1) There is an option LinearQ to make the inert head linear with respect to constants. The default value is False.
In[937]:=
In[938]:=
Out[938]=
In[939]:=
Out[939]=
2) There is an option ContractThrough to specify a list of metrics, projectors and/or the delta tensor which can be contracted through the inert head. In this example only the delta tensor can be contracted:
In[940]:=
In[941]:=
In[942]:=
|
Compare now these cases:
In[943]:=
Out[943]=
In[944]:=
Out[944]=
3) It is possible to have additional arguments, including arguments with synchronized lists of indices. This does not even have to be specified as an argument. The indices must be surrounded with the head IndexList. The system keeps a one to one relation between the indices in the tensorial expression and the indices in the lists of arguments. This correspondence is based on the slots: for example in the following expression the IndexList marks the {3, 2} slots of the tensor U, and this is kept through the use of the xTensor` functions:
In[945]:=
In[946]:=
Out[946]//InputForm=
mhead[U[b, f, a], {a, c}, IndexList[a, f]]*U[-a, -b, d]
In[947]:=
Out[947]//InputForm=
mhead[U[c, -a, -b], {a, c}, IndexList[-b, -a]]*U[d, a, b]
In[948]:=
Out[948]//InputForm=
mhead[U[b, -f, a], {a, c}, IndexList[a, -f]]*U[-a, -b, d]
Perhaps there should be something more general than slot-syncronization, but we do not know of a complete set of possibilities, and no other case has been asked for until now.
DefInertHead Define an inert head
UndefInertHead Undefine an inert head
$InertHeads List of defined inert heads
LinearQ Boolean option to specify whether an inert head is linear or not
LinearQ Detect whether an inert head is linear
ContractThrough Option to specify which metrics, projectors or delta can be contracted through the inert head
ContractThroughQ Detect whether a metric, projector or delta can be contracted through an inert head
Definition of an inert head.
Created by Mathematica (May 16, 2008) | ![]() |