[an error occurred while processing this directive]
Package-X is hosted by Hepforge, IPPP Durham

Contract

Contract[expr]
gives the form of expr where repeated indices attached to multiplying tensors are contracted.

Details and OptionsDetails and Options

  • Contract applies a list of rules to form the appropriate contractions involving four-vectors, the metric tensor (,), the Levi-Civita symbol (ε,,,), and other generic tensors.
  • Contract expresses products of the Levi-Civita symbol (ε,,,) in terms of metric tensor (,).
  • Contract expands out linear combinations of four-vectors contracted into the Levi-Civita symbol (ε,,,).
  • Contract has attribute HoldAll.
  • If Contract wraps Spur or LoopIntegrate, tensors outside are contracted into tensors inside before Spur or LoopIntegrate evaluates. »

ExamplesExamplesopen allclose all

Basic Examples  (6)Basic Examples  (6)

Obtain the dot-product of two 4-vectors:

In[1]:=
Click for copyable input
Out[1]=

Contract a 4-vector with the metric tensor:

In[1]:=
Click for copyable input
Out[1]=

Contract a 4-vector with the Levi-Civita symbol:

In[1]:=
Click for copyable input
Out[1]=

Contract tensors into a DiracMatrix:

In[1]:=
Click for copyable input
Out[1]=

Contract tensors into an inactive Spur (Mathematica 10 and above only):

In[1]:=
Click for copyable input
Out[1]=

Contract tensors into an inactive LoopIntegrate (Mathematica 10 and above only):

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=