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

DefInertHead[TTPart]

** DefInertHead: Defining inert head TTPart.

In[934]:=

TTPart[U[-b, -c, -a]]//ToCanonical

Out[934]=

TTPart[U_abc^   ]

In[935]:=

UpVectorQ[TTPart[v[a]]]

Out[935]=

True

In[936]:=

UndefInertHead[TTPart]

** UndefInertHead: Undefined inert head TTPart

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

DefInertHead[lhead, LinearQ→True]

** DefInertHead: Defining inert head lhead.

In[938]:=

LinearQ[lhead]

Out[938]=

True

In[939]:=

lhead[3T[a, b] + S[a, b]]

Out[939]=

lhead[S_  ^ab] + 3 lhead[T_  ^ab]

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

DefInertHead[chead, ContractThrough→ {delta}]

** DefInertHead: Defining inert head chead.

In[941]:=

DefInertHead[mhead, ContractThrough→ {delta, metricg}]

** DefInertHead: Defining inert head mhead.

In[942]:=

? mhead

Global`mhead

mhead/:ContractThroughQ[mhead,delta]=True
mhead/:ContractThroughQ[mhead,metricg]=True
InertHeadQ[mhead]^=True
Info[mhead]^={inert head,}
LinearQ[mhead]^=False
PrintAs[mhead]^=mhead

Compare now these cases:

In[943]:=

delta[a, -b] {lhead[T[b]], chead[T[b]], mhead[T[b]]}

Out[943]=

{δ_ ( b)^a  lhead[T_ ^b], chead[T_ ^a], mhead[T_ ^a]}

In[944]:=

ContractMetric[metricg[-a, -b] {lhead[T[b]], chead[T[b]], mhead[T[b]]}]

Out[944]=

{lhead[T_ ^b] g_ab^  , chead[T_ ^b] g_ab^  , mhead[T_a^ ]}

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

expr = U[-a, -b, d] mhead[U[b, c, a], {a, c}, IndexList[a, c]] ;

In[946]:=

ReplaceIndex[Evaluate[expr], {c→f}]//InputForm

Out[946]//InputForm=

mhead[U[b, f, a], {a, c}, IndexList[a, f]]*U[-a, -b, d]

In[947]:=

ToCanonical[expr]//InputForm

Out[947]//InputForm=

mhead[U[c, -a, -b], {a, c}, IndexList[-b, -a]]*U[d, a, b]

In[948]:=

metricg[-f, -c] expr//ContractMetric//InputForm

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) Valid XHTML 1.1!