MATHEMATICA FEATURED EXAMPLE

Tensor Canonicalization

Mathematica includes a powerful tensor canonicalizer, which can bring expressions involving products, contractions, and transpositions of tensors with symmetries into a standard form. From these standard forms, computations can be optimized, and new identities can be derived.

    
Declare to be a rank-4 tensor in dimension with the transposition symmetries of the Riemann tensor:
In[14]:=
Click for copyable input
There are more than 40,000 possible contractions of , but this counts each contraction multiple times due to contraction order. Accounting for order, there are 105 possible complete contractions:
In[15]:=
Click for copyable input
Out[16]=
However, due to symmetry, there are only nine possible results, and five if the sign is ignored:
In[17]:=
Click for copyable input
Out[17]=
The canonicalizer uses state-of-the-art algorithms to return answers quickly. It can process all 40,320 raw contractions in less than a minute:
In[18]:=
Click for copyable input
Out[18]=
New to Mathematica? Find your learning path »
Have a question? Ask support »