I am trying to evaluate this expression:

$\epsilon^{abcdef}X^R_a X^S_b X^T_c X^U_d X^V_e X^W_f \epsilon_{RST} \epsilon_{UVW}$


$X = \frac{a^2 +b^2-1}{2a} \mathbb 1_6$

and I wrote this code to evaluate it with the range of parameters $a,b,c,d,e,f$ running from 1 to 6, while $R,S,T, U,V,W$ running from 1 to 3.

 Signature[{a, b, c, d, e, f}] X[[R, a]] X[[S, b]] X[[T, c]] X[[U, 
    d]] X[[V, e]] X[[W, f]] Signature[{R, S, T}] Signature[{U, V, W}]
 , {a, 1, 6}
 , {b, 1, 6}
 , {c, 1, 6}
 , {d, 1, 6}
 , {e, 1, 6}
 , {f, 1, 6}
 , {R, 1, 3}
 , {S, 1, 3}
 , {T, 1, 3}
 , {U, 1, 3}
 , {V, 1, 3}
 , {W, 1, 3}

but it seems that Mathematica takes forever to evaluate this. I don't know of any other way to make it faster and would appreciate it very much if anyone could help me. Thanks !

  • $\begingroup$ Welcome! To make the most of Mma.SE start by taking the tour now. It will help us to help you if you write an excellent question. Edit if improvable, show due diligence, give brief context, include minimal working example of code and data in formatted form. As you receive give back, vote and answer questions, keep the site useful, be kind, correct mistakes and share what you have learned. Why not choosing a meaningful name? $\endgroup$ – rhermans Jun 5 '18 at 11:12
  • $\begingroup$ Probably you could share the code you used to define X[[R, a]] ? $\endgroup$ – rhermans Jun 5 '18 at 11:21
  • $\begingroup$ X is an $6\times 6$ diagonal matrix - the product of the $6\times 6$ identity matrix times a factor $(a^2+b^2-1)/2a$, so X[[R,a]] is just an element of this $6\times 6$ matrix. For example: X[[1,1]] = $(a^2+b^2-1)/2a$ while X[[1,0]] = 0. $R$ and $a$ are just dummy indices running from 1 to 3 and 1 to 6, respectively. $\endgroup$ – user195583 Jun 5 '18 at 11:26
  • $\begingroup$ There are things to do after your question is answered. It's a good idea to stay vigilant for some time, better approaches may come later improving over previous replies. Experienced users may point alternatives, caveats or limitations. New users should test answers before voting and wait 24 hours before accepting the best one. Participation is essential for the site, please do your part. $\endgroup$ – rhermans Jun 5 '18 at 14:38

You can split the problem into simpler parts. You can define the tensor $A_{abc} = X_a^R X_b^SX_c^T\epsilon_{RST}$,

X = (a^2 + b^2 - 1)/(2 a) IdentityMatrix[6];
lc3 = LeviCivitaTensor[3] // Normal;
lc6 = LeviCivitaTensor[6] // Normal;

A = 
    X[[R, a]] X[[S, b]] X[[T, c]] lc3[[R, S, T]], {R, 1, 3}, {S, 1, 
     3}, {T, 1, 3}], {a, 1, 6}, 
       {b, 1, 6}, {c, 1, 6}]//Simplify

Then the expression that you want to compute is simply $\epsilon^{abcdef}A_{abc}A_{def}$. From this we can already say that the result will vanish, because $A_{abc}A_{def}$ is symmetric under the interchange of $(a,b,c)\leftrightarrow (d,e,f)$ and $\epsilon^{abcdef}$ is antisymmetric.

We can check this easily

Sum[lc6[[a, b, c, d, e, f]] A[[a, b, c]] A[[d, e, f]], {a, 1, 6}, {b, 
  1, 6}, {c, 1, 6}, {d, 1, 6}, {e, 1, 6}, {f, 1, 6}]//Simplify

Sadly, this doesn't explain why it is not working for you, but gives you a way to perform the computation.

  • 2
    $\begingroup$ Note that doing the full sum involves $3^6 \cdot 6^6 = 34,012,224$ terms, whereas defining $A_{abc}$ involves a sum over $6^3 \cdot 3^3 = 5832$ terms, and calculating the final sum then involves $6^6 = 46,656$ terms. So it's not surprising that Mathematica likes your method better. $\endgroup$ – Michael Seifert Jun 5 '18 at 13:43
  • $\begingroup$ Thank you very much ! That works brilliantly ! $\endgroup$ – user195583 Jun 5 '18 at 13:57
  • $\begingroup$ ... As evidence of my previous comment, I tried running the OP's code but with Signature replaced by lc3 or lc6 respectively. It returned 0 about 45 minutes later. $\endgroup$ – Michael Seifert Jun 5 '18 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.