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

LTensor

LTensor[p,μ,] or pμ,...
represents the Lorentz tensor

Details and OptionsDetails and Options

  • Generic object that represents a Lorentz tensor.
  • Can be entered with subscript boxes using Ctrl + -.
  • Certain built-in tensors like the metric tensor (,) and the Levi-Civita symbol (ε,,,) will automatically canonically order their indices.
  • The first argument p representing the tensor can be almost any expression. The rest of the arguments μ, representing indices must be Symbols.
  • LTensor[p,μ,] automatically expands out p has head Plus.
  • Four-vectors contracted into higher-rank tensors appear as indices set in braces {}.
  • Clear[LTensor] clears user defined values for LTensor.

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

A four-vector with index :
(enter Greek letter μ using EscmEsc):

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

Enter with subscript using Ctrl + -:

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

A symbolic rank-two tensor:

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

The metric tensor (entered as EscggEsc):

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

Re-express tensor in terms of different vector:

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

Exchange indices:

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

Manually symmetrize the tensor:

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