




I my work, I need to be able to handle a large number of the commutators of gauge covariant derivatives. With the program MathTensor being able to automatically handle the commutator of covariant derivatives, it is a relatively straightforward exercise to build a library of gauge covariant commutators for future use. All that is involved is the recognition of a few patterns, and then the use of an iterative procedure to build as many of these as needed.
In the work below, the covariant derivative will be denoted by the traditional semicolon ";" whole the gauge covariant derivative will be indicated by the vertical bar "|". I am assuming the reader is familiar with the notation and commands of MathTensor. I am assuming the reader is familiar with LaTeX, since it will be helpful for me to use some of the LaTeX style to emphasize subscripts, superscripts, etc.
a = ad2 - I a e F
|ab ab ab
p
a = a - I e a F + a R
|acb |abc |a bc |p a bc
p p
a = a - I e ad2 F + ad2 R + ad2 R
|abdc |abcd ab cd pb a cd ap b cd
p
a = a - I a e F - I e a F - I e a F + a R
|cab |abc ac;b |b ac |a bc |p a bc
Here, I is the square root of (-1), while "e" is the coupling
constant (charge) of the electromagnetic field, and MaxwellF
represents the Maxwell Tensor. The object a_{|abdc} represents
four gauge covariant derivatives of "a".
The OrderCD[] command within MathTensor does this for covariant
derivatives very rapidly, but my work needs the additional
information carried by the MaxwellF tensor, as shown above.
DefineTensor[ad1,{{1},1}]
DefineTensor[ad2,{{1,2},1}]
DefineTensor[ad3,{{1,2,3},1}]
DefineTensor[ad4,{{1,2,3,4},1}]
DefineTensor[ad5,{{1,2,3,4,5},1}]
DefineTensor[ad6,{{1,2,3,4,5,6},1}]
PermWeight::"def": "Object \!\(\"ad1\"\) defined"
PermWeight::"def": "Object \!\(\"ad2\"\) defined"
PermWeight::"def": "Object \!\(\"ad3\"\) defined"
PermWeight::"def": "Object \!\(\"ad4\"\) defined"
PermWeight::"def": "Object \!\(\"ad5\"\) defined"
PermWeight::"def": "Object \!\(\"ad6\"\) defined"
RuleUnique[ad5d1rule,CD[ad5[la_,lb_,lc_,ld_,le_],lf_],ad6[la,lb,lc,ld,le,lf]] RuleUnique[ad4d1rule,CD[ad4[la_,lb_,lc_,ld_],le_],ad5[la,lb,lc,ld,le]] RuleUnique[ad3d1rule,CD[ad3[la_,lb_,lc_],ld_],ad4[la,lb,lc,ld]] RuleUnique[ad2d1rule,CD[ad2[la_,lb_],lc_],ad3[la,lb,lc]] RuleUnique[ad1d1rule,CD[ad1[la_],lb_],ad2[la,lb]] RuleUnique[ad0d1rule,CD[a,la_],ad1[la]]
In[12]:=
ad2[la,lb]+CommuteCD[CD[a,lb,la],lb,la]-
CD[a,la,lb]-I*e*MaxwellF[la,lb]*a
ad3[la,lb,lc]+CommuteCD[CD[ad1[la],lc,lb],lc,lb]-
CD[ad1[la],lb,lc]-I*e*MaxwellF[lb,lc]*ad1[la]
ad4[la,lb,lc,ld]+CommuteCD[CD[ad2[la,lb],ld,lc],ld,lc]-
CD[ad2[la,lb],lc,ld]-I*e*MaxwellF[lc,ld]*ad2[la,lb]
ad5[la,lb,lc,ld,le]+CommuteCD[CD[ad3[la,lb,lc],le,ld],le,ld]-
CD[ad3[la,lb,lc],ld,le]-I*e*MaxwellF[ld,le]*ad3[la,lb,lc]
ad6[la,lb,lc,ld,le,lf]+CommuteCD[CD[ad4[la,lb,lc,ld],lf,le],lf,le]-
CD[ad4[la,lb,lc,ld],le,lf]-I*e*MaxwellF[le,lf]*ad4[la,lb,lc,ld]
Out[12]=
ad2 - I a e F
ab ab
Out[13]=
p
ad3 - I e ad1 F + ad1 R
abc a bc p a bc
Out[14]=
p p
ad4 - I e ad2 F + ad2 R + ad2 R
abcd ab cd pb a cd ap b cd
Out[15]=
p p p
ad5 - I e ad3 F + ad3 R + ad3 R + ad3 R
abcde abc de pbc a de apc b de abp c de
Out[16]=
p p
ad6 - I e ad4 F + ad4 R + ad4 R +
abcdef abcd ef pbcd a ef apcd b ef
p p
ad4 R + ad4 R
abpd c ef abcp d ef
In the notebook interface, I have found it easiest to take the
"//InputForm" of expressions and directly paste them into
input cells for later use. For extremely long expressions,
this is absolutely crucial in order to avoid transcription
errors with the large number of indices.
In[17]:= ad3[la,lb,lc]+CommuteCD[CD[ad1[la],lc,lb],lc,lb]- CD[ad1[la],lb,lc]-I*e*MaxwellF[lb,lc]*ad1[la]//InputForm Out[17]//InputForm= ad3[la, lb, lc] - I*e*ad1[la]*MaxwellF[lb, lc] + ad1[l1]*RiemannR[la, u1, lb, lc] In[18]:= ad4[la,lb,lc,ld]+CommuteCD[CD[ad2[la,lb],ld,lc],ld,lc]- CD[ad2[la,lb],lc,ld]-I*e*MaxwellF[lc,ld]*ad2[la,lb]//InputForm Out[18]//InputForm= ad4[la, lb, lc, ld] - I*e*ad2[la, lb]*MaxwellF[lc, ld] + ad2[l1, lb]*RiemannR[la, u1, lc, ld] + ad2[la, l1]*RiemannR[lb, u1, lc, ld]...and so forth. Now, to redefine these for later use...
DefUnique[ad21[lb_,la_],ad2[la,lb]-I*a*e*MaxwellF[la,lb] ] DefUnique[ad132[la_,lc_,lb_],ad3[la,lb,lc]-I*e*ad1[la]*MaxwellF[lb,lc]+ ad1[l1]*RiemannR[la,u1,lb,lc] ] DefUnique[ad1243[la_,lb_,ld_,lc_], ad4[la,lb,lc,ld]-I*e*ad2[la,lb]*MaxwellF[lc,ld]+ ad2[l1,lb]*RiemannR[la,u1,lc,ld]+ad2[la,l1]*RiemannR[lb,u1,lc,ld] ] DefUnique[ad12354[la_,lb_,lc_,le_,ld_], ad5[la,lb,lc,ld,le] - I*e*ad3[la,lb,lc]*MaxwellF[ld,le] + ad3[l1,lb,lc]*RiemannR[la,u1,ld,le] + ad3[la,l1,lc]*RiemannR[lb,u1,ld,le] + ad3[la,lb,l1]*RiemannR[lc,u1,ld,le] ] DefUnique[ad123465[la_,lb_,lc_,ld_,lf_,le_], ad6[la,lb,lc,ld,le,lf] - I*e*ad4[la,lb,lc,ld]*MaxwellF[le,lf] + ad4[l1,lb,lc,ld]*RiemannR[la,u1,le,lf] + ad4[la,l1,lc,ld]*RiemannR[lb,u1,le,lf] + ad4[la,lb,l1,ld]*RiemannR[lc,u1,le,lf] + ad4[la,lb,lc,l1]*RiemannR[ld,u1,le,lf] ]
To reorder a_|{bac}, start by using the definition for ad21 above to reorder two derivatives of a: ad21[lb,la]. Then, take the covariant derivative with respect to the index "c". Finally, replace the covariant derivatives of the tensor ad2_{ab|c} and the scalar a{|c} with the generic tensors ad3_{abc} and ad1{c}, respectively.
In[53]:=
temp1=ad21[lb,la]
temp2=CD[temp1,lc] /. { CD[e,lc] -> 0 }
temp3=Expand[
temp2/.{CD[ad2[la,lb],lc]->ad3[la,lb,lc],CD[a,lc]->ad1[lc]}]
temp3//InputForm
Out[53]=
ad2 - I a e F
ab ab
Out[54]=
ad2 - I (a e F + e a F )
ab;c ab;c ;c ab
Out[55]=
ad3 - I a e F - I e ad1 F
abc ab;c c ab
Out[56]//InputForm=
ad3[la, lb, lc] - I*a*e*CD[MaxwellF[la, lb], lc] -
I*e*ad1[lc]*MaxwellF[la, lb]
The last line is now pasted directly into a DefUnique[] cell
for later use.Reordering a_|{cab} is a bit more involved. Start by commuting the "c" and "a" indices of a_{|ca} using ad21[lc,la]. Then, take the covariant derivative with respect to "b" ("temp3" below). "temp4" converts derivatives of the tensors into other tensors using the rules {ad2d1rule,ad1d1rule,ad0d1rule}. However, note that "temp4" contains ad3_{acb}, which has the indices out of order. This must be replaced with the appropriate expression which has the indices in order. This replacement is in "temp5" and uses the entity ad132_{acb} to replace ad3_{acb}. Finally, temp5 is the desired result, with a_|{cab} rewritten in terms of a_|{abc} plus terms involving both the Riemann and MaxwellF tensors.
In[62]:=
temp1=ad2[lc,la]
temp2=ad21[lc,la]
temp3=CD[temp2,lb] /. { CD[e,lb] -> 0 }
temp4=ApplyRules[temp3,{ad2d1rule,ad1d1rule,ad0d1rule}]
temp5=temp4 /. { ad3[la,lc,lb] -> Dum[ad132[la,lc,lb]] }
temp5//InputForm
Out[62]=
ad2
ca
Out[63]=
ad2 - I a e F
ac ac
Out[64]=
ad2 - I (a e F + e a F )
ac;b ac;b ;b ac
Out[65]=
ad3 - I a e F - I e ad1 F
acb ac;b b ac
Out[66]=
p
ad3 - I a e F - I e ad1 F - I e ad1 F + ad1 R
abc ac;b b ac a bc p a bc
Out[67]//InputForm=
ad3[la, lb, lc] - I*a*e*CD[MaxwellF[la, lc], lb] -
I*e*ad1[lb]*MaxwellF[la, lc] - I*e*ad1[la]*MaxwellF[lb, lc] +
ad1[l1]*RiemannR[la, u1, lb, lc]
In[68]:= DefUnique[ad213[lb_,la_,lc_], ad3[la,lb,lc]- I*a*e*CD[MaxwellF[la,lb],lc]-I*e*ad1[lc]*MaxwellF[la,lb] ] DefUnique[ad312[lc_,la_,lb_], ad3[la,lb,lc]- I*a*e*CD[MaxwellF[la,lc],lb]-I*e*ad1[lb]*MaxwellF[la,lc] - I*e*ad1[la]*MaxwellF[lb,lc]+ad1[l1]*RiemannR[la,u1,lb,lc] ]
In[20]:=
temp1=ad213[lb,la,lc]
temp2=CD[temp1,ld] /. { CD[e,ld] -> 0 }
temp3=ApplyRules[temp2,{ad3d1rule,ad1d1rule,ad0d1rule}]
temp3//InputForm
Out[20]=
ad3 - I a e F - I e ad1 F
abc ab;c c ab
Out[21]=
ad3 - I (e a F + a e F ) - I e (ad1 F + ad1 F )
abc;d ;d ab;c ab;cd c ab;d c;d ab
Out[22]=
ad4 - I e ad1 F - I e ad1 F - I a e F - I e ad2 F
abcd d ab;c c ab;d ab;cd cd ab
Out[23]//InputForm=
ad4[la, lb, lc, ld] - I*e*ad1[ld]*CD[MaxwellF[la, lb], lc] -
I*e*ad1[lc]*CD[MaxwellF[la, lb], ld] -
I*a*e*CD[MaxwellF[la, lb], lc, ld] - I*e*ad2[lc, ld]*MaxwellF[la, lb]
In[24]:=
temp1=Dum[ad312[lc,la,lb]]
temp2=CD[temp1,ld] /. { CD[e,ld] -> 0 }
temp3=ApplyRules[temp2,{ad3d1rule,ad1d1rule,ad0d1rule}]
temp3//InputForm
Out[24]=
p
ad3 - I a e F - I e ad1 F - I e ad1 F + ad1 R
abc ac;b b ac a bc p a bc
Out[25]=
p
ad3 + ad1 R - I (e a F + a e F ) -
abc;d p a bc;d ;d ac;b ac;bd
I e (ad1 F + ad1 F ) - I e (ad1 F + ad1 F ) +
b ac;d b;d ac a bc;d a;d bc
p
ad1 R
p;d a bc
Out[26]=
ad4 - I e ad1 F - I e ad1 F - I e ad1 F +
abcd d ac;b b ac;d a bc;d
p
ad1 R - I a e F - I e ad2 F - I e ad2 F +
p a bc;d ac;bd bd ac ad bc
p
ad2 R
pd a bc
Out[27]//InputForm=
ad4[la, lb, lc, ld] - I*e*ad1[ld]*CD[MaxwellF[la, lc], lb] -
I*e*ad1[lb]*CD[MaxwellF[la, lc], ld] -
I*e*ad1[la]*CD[MaxwellF[lb, lc], ld] +
ad1[l1]*CD[RiemannR[la, u1, lb, lc], ld] -
I*a*e*CD[MaxwellF[la, lc], lb, ld] -
I*e*ad2[lb, ld]*MaxwellF[la, lc] - I*e*ad2[la, ld]*MaxwellF[lb, lc] +
ad2[l1, ld]*RiemannR[la, u1, lb, lc]
In[45]:=
temp1=ad3[ld,la,lb]
temp2=Dum[ad312[ld,la,lb]]
temp3=CD[temp2,lc] /. { CD[e,lc] -> 0 }
temp4=ApplyRules[temp3,{ad3d1rule,ad1d1rule,ad0d1rule}]
temp5=temp4 /. { ad4[la,lb,ld,lc] -> Dum[ad1243[la,lb,ld,lc]] }
temp5//InputForm
Out[45]=
ad3
dab
Out[46]=
p
ad3 - I a e F - I e ad1 F - I e ad1 F + ad1 R
abd ad;b b ad a bd p a bd
Out[47]=
p
ad3 + ad1 R - I (e a F + a e F ) -
abd;c p a bd;c ;c ad;b ad;bc
I e (ad1 F + ad1 F ) - I e (ad1 F + ad1 F ) +
b ad;c b;c ad a bd;c a;c bd
p
ad1 R
p;c a bd
Out[48]=
ad4 - I e ad1 F - I e ad1 F - I e ad1 F +
abdc c ad;b b ad;c a bd;c
p
ad1 R - I a e F - I e ad2 F - I e ad2 F +
p a bd;c ad;bc bc ad ac bd
p
ad2 R
pc a bd
Out[49]=
ad4 - I e ad1 F - I e ad1 F - I e ad1 F +
abcd c ad;b b ad;c a bd;c
p
ad1 R - I a e F - I e ad2 F - I e ad2 F -
p a bd;c ad;bc bc ad ac bd
p p p
I e ad2 F + ad2 R + ad2 R + ad2 R
ab cd pc a bd pb a cd ap b cd
Out[50]//InputForm=
ad4[la, lb, lc, ld] - I*e*ad1[lc]*CD[MaxwellF[la, ld], lb] -
I*e*ad1[lb]*CD[MaxwellF[la, ld], lc] -
I*e*ad1[la]*CD[MaxwellF[lb, ld], lc] +
ad1[l1]*CD[RiemannR[la, u1, lb, ld], lc] -
I*a*e*CD[MaxwellF[la, ld], lb, lc] -
I*e*ad2[lb, lc]*MaxwellF[la, ld] - I*e*ad2[la, lc]*MaxwellF[lb, ld] -
I*e*ad2[la, lb]*MaxwellF[lc, ld] +
ad2[l1, lc]*RiemannR[la, u1, lb, ld] +
ad2[l1, lb]*RiemannR[la, u1, lc, ld] +
ad2[la, l1]*RiemannR[lb, u1, lc, ld]
As always, the next step is to DefUnique these results for use
in the next iteration, which would reorder five gauge covariant
derivatives of "a".