Register to reply 
Need a code to construct an antisymmetric tensor with Mathematica 6. 
Share this thread: 
#1
Feb412, 05:31 PM

P: 17

Hello! I'm doing a code in Mathematica 6.0 in order to calculate a contraction of indices with the LeviCivita tensor (in six dimensions) and an antiSymmetric tensor A[m,n,p] (it has 3 indices running from 1 to 6). For example in order to turn A into an antisymmetric tensor, I wrote something like this in the code:
Input: A[m, n, p] := 1/6 (A[m, n, p]  A[m, p, n]  A[n, m, p] + A[n, p, m] + A[p, m, n]  A[p, n, m]); But it seems that mathematica doesnt take it into account because at the end of the final computation, the output shows this kind of things: 2 b (A[5, 4, 6] B[1, 2, 3] + A[5, 6, 4] B[1, 2, 3] + A[6, 4, 5] B[1, 2, 3]  A[6, 5, 4] B[1, 2, 3]  A[3, 5, 6] B[1, 2, 4] + A[3, 6, 5] B[1, 2, 4] + A[5, 3, 6] B[1, 2, 4]  A[5, 6, 3] B[1, 2, 4] ) (B is another antisymmetric tensor and b is a constant). So , as you see, the first 3 terms should be together because of the antisymmetric property of A, but they arent. The expression is already simplified by mathematica. Anybody knows how can i fix the code? thank you in advance. 


#2
Feb512, 07:48 AM

PF Gold
P: 706

As for your code:
$RecursionLimit::reclim: Recursion depth of256 bexceeded. 


#3
Feb512, 09:27 AM

P: 17

yes it does. I want to teach Mathematica to recognize the antisymmetric property. For example: A[4,5,6] =  A[4,6,5] = A[6,4,5]= . . .
I can do it manually , of course, but it takes to long. 


#4
Feb512, 12:48 PM

PF Gold
P: 706

Need a code to construct an antisymmetric tensor with Mathematica 6.
A simple example:
Now that I look at the help file, Under Nested Lists, I see a link to tensors, and then to LeviCevitaTensors in the Mathematica Help file. It appears that running LeviCivitaTensor[6] actually creates an extremely large 6 x 6 x 6 x 6 x 6 x 6 tensor.



#5
Feb512, 04:18 PM

P: 17

Ok doolin thank you for your time. I've seen the link to tensor in the mathematica help file. I'll try to use what you write above and figure it out the swap between row and the book.



#6
Feb512, 05:43 PM

P: 17

I didnt probe it yet but I think this might help:
Antisymmetrize[f_] := Module[{p = Permutations[f]}, Signature[f]Signature/@ p . p] . 


#7
Feb612, 08:51 AM

PF Gold
P: 706

I wonder, do you have the LeviCivitaTensor command in Mathematica 6? I'm running Mathematica 7.



#8
Feb612, 09:24 AM

PF Gold
P: 706

I think using Mathematica (or any programming language) could really help explain these ideas. These are nice tools we can use, so we don't have to be as smart as Einstein to understand everything. Of course the use of a computer prevents us from using any ambiguously defined, or undefinable concepts. That might be a problem if we find that General Relativity relies heavily on these. Humans can "deal" with that, but not computers. 


#9
Feb612, 09:52 AM

PF Gold
P: 706




#10
Feb612, 10:19 AM

P: 95



#11
Feb612, 12:15 PM

PF Gold
P: 706

If you find the relative computational capabilities of the average computer vs. the smartest human depressing, remember...
A computer can perform billions or trillions of floatingpointoperations per second, but it is utterly incapable of formulating an opinion of whether such calculations are interesting, relevant, applicable, or worthwhile. 


#12
Feb612, 02:08 PM

P: 17




#13
Feb612, 02:13 PM

P: 17

Anyway, if you write this in mathematica (I'm using 6.0) Antisymmetrize[f_] := Module[{p = Permutations[f]}, Signature[f]Signature/@ p . p] . it will antisymmetrize your operation, i.e Antisymmetrize[f[a,b,c]] will give you f[a,b,c]f[b,a,c]+.... 


#14
Feb612, 03:24 PM

PF Gold
P: 706

Right. I think I can see what it is doing. It gives you all permutations of {a,b,c} and then gives a positive sign for abc, bca, cab, (shift operations) and a negative sign for acb, bac, cba (swap operations).
I can see what it's doing, but I can't seem to fathom why it's doing it; other than obviously it is programmed to do so. Is there a simple question that someone might ask that would motivate me to antisymmetrize a function of three variables? 


#15
Feb712, 10:36 AM

P: 95




Register to reply 
Related Discussions  
Using cadabra to calculate antisymmetric tensor field  Special & General Relativity  7  
Construct field tensor an dual tensor  Advanced Physics Homework  5  
Totally antisymmetric tensor  Advanced Physics Homework  4  
Simple identity for antisymmetric tensor  Differential Geometry  4  
Antisymmetric 4tensor  Special & General Relativity  3 