# Summation over gamma matrices in a spin connection with FeynCalc

I need to construct the following object

$$\Gamma_{\mu} = \frac{1}{8} \omega_{\mu}^{ab}[\gamma_{a},\gamma_{b}]$$

where $$\omega_{\mu}^{ab}$$ is object with space-time index $$\mu$$ and vierbeins index $$a, \ b$$, and the non-vanishing componnents are: $$\omega_{x \ \ \ \ 0}^{ \ \ \ \ j} = \omega_{x \ \ \ \ j}^{ \ \ \ 0} = \frac{b}{a} \delta_{ij}$$ and $$\omega_{x \ \ \ k}^{\ \ \ j}=f \epsilon_{ijk}$$, with $$b, \ a, \ f$$ time functions. My code for all of this:

Metric $$g_{\mu \nu}$$ and its inverse $$g^{\mu \nu}$$:

metric1 = {{a[t]^2, 0 , 0, 0}, {0, -a[t]^2, 0, 0}, {0, 0, -a[t]^2, 0}, {0, 0, 0, -a[t]^2}};
inversemetric1 = FullSimplify[Series[Inverse[metric1], {e, 0, 1}]];
cruzmetric = FullSimplify[Series[Table[Sum[inversemetric1[[μ, σ]]*metric1[[ν, σ]], {σ, 1, 4}], {μ, 1, 4}, {ν, 1, 4}], {e, 0, 1} ]];


etaAB[[a,b]] = $$\eta^{a b}$$ and inverseetaab[[a,b]]= $$\eta_{a,b}$$

etaAB = {{1, 0 , 0, 0}, {0, -1, 0, 0}, {0, 0, -1, 0}, {0, 0, 0, -1}};
inverseetaab = FullSimplify[Series[Inverse[etaAB], {e, 0, 1}]];


Vierbein: vierAmu[[a,μ]] = $$e^{a}_{\mu}$$, vieramu[[a,μ]] = $$e^{a}_{\mu}e_{a \mu}$$, vierAMU[[a,μ]] = $$e^{a \mu}$$

vierAmu = {{a[t], 0 , 0, 0}, {0, a[t], 0, 0}, {0, 0, a[t], 0}, {0, 0, 0, a[t]}};

vieramu = Expand[FullSimplify[Series[Table[Sum[inverseetaab[[a1, b]]*vierAmu[[b, μ]], {b, 1, 4}], {a1,1, 4}, {μ, 1, 4}], {e, 0, 1}]]];
vierAMU = Expand[FullSimplify[Series[Table[Sum[inversemetric1[[a1, b]]*vierAmu[[μ, b]], {b, 1, 4}], {a1, 1, 4}, {μ, 1, 4}], {e, 0, 1}]]];


$$\omega_{\mu}^{ab} = e_{\nu }^a \frac{\partial e^{\text{b\nu }}}{\partial \mu }+e_{\nu }^a \Gamma _{\mu \rho }^{\nu } e^{\text{b\rho }}$$. I divided it in two pieces, the first one is omegamuAB1[[μ,a,b]] = $$e_{\nu}^a \Gamma_{\mu \rho }^{\nu }e^{b\rho}$$, and omegamuAB2[[μ,a,b]]=$$e_{\nu }^a \frac{\partial e^{b\nu}}{\partial \mu }$$.

omegamuAB1 = FullSimplify[Series[Table[Sum[vierAmu[[a1,ν]]*vierAMU[[b1, ρ]]*Connecb[[ν, μ, ρ]], {ν, 1, 4}, {ρ, 1, 4}],{μ, 1, 4}, {a1, 1, 4}, {b1, 1, 4}], {e, 0, 1}]];

omegamuAB2 = FullSimplify[Series[Table[Sum[vierAmu[[a1, ν]]*D[vierAMU[[b1, ν]], crd[[μ]]], {ν, 1, 4}],{μ, 1, 4}, {a1, 1, 4}, {b1, 1, 4}], {e, 0, 1}]];

omegamuAB = FullSimplify[Series[Table[omegamuAB1[[μ, a1, b1]] + omegamuAB2[[μ, a1, b1]], {μ, 1, 4}, {a1, 1, 4}, {b1, 1, 4}], {e, 0, 1}]];


Connecb is a space-time connection with torsion, I made it by hand just for this example.:

 Connecb = = {{{Derivative[1][a][t]/a[t], 0, 0, 0}, {0, (a[t]*b[t])/a[t]^2, 0,  0}, {0, 0, (a[t] b[t])/a[t]^2, 0}, {0, 0, 0, (a[t] b[t])/a[t]^2}}, {{0, Derivative[1][a][t]/a[t], 0, 0}, {b[t]/a[t], 0, 0, 0}, {0, 0, 0, f[t]}, {0, 0, -f[t], 0}}, {{0, 0, Derivative[1][a][t]/a[t], 0}, {0, 0, 0, -f[t]}, {b[t]/a[t], 0, 0, 0}, {0, f[t], 0, 0}}, {{0, 0, 0, Derivative[1][a][t]/a[t]}, {0, 0, f[t], 0}, {0, -f[t], 0, 0}, {b[t]/a[t], 0, 0, 0}}}


The code above works fine! Now I'll define the gamma matrices (using FeynCalc just to help with simplifications)

$$\gamma_{0}$$

g0 = {{0, 0, 1, 0}, {0, 0, 0, 1}, {1, 0, 0, 0}, {0, 1, 0, 0}}


$$\gamma_{1}$$

 g1 = {{0, 0, 0, -1}, {0, 0, -1, 0}, {0, 1, 0, 0}, {1, 0, 0, 0}}


$$\gamma_{2}$$

g2 = {{0, 0, 0, I}, {0, 0, -I, 0}, {0, -I, 0, 0}, {I, 0, 0, 0}}


$$\gamma_{3}$$

g3 = {{0, 0, -1, 0}, {0, 0, 0, 1}, {1, 0, 0, 0}, {0, -1, 0, 0}}


Problem 1#: How to put the gamma matrices into $$\Gamma_{\mu}$$ ?

Problem 2#: I'll create a covariant derivative with $$\Gamma_{\mu}$$ and then a Lagrangian density, so I need a correct contraction over my gamma matrices. By the ways I have tried, I'm getting a tensor $$4 \times 4$$ as Lagrangian.

Using a extreme lame trick:

G = {g0, g1, g2, g3};


It works just to get the commutators. Trying to create a $$\Gamma_{\mu}$$ (using $$[\gamma_{a},\gamma_{b}]=2\gamma_{a}\gamma_{b}$$)

Gammamu = FullSimplify[Series[Table[1/4*Sum[omegamuAB[[μ, a1, b1]](G[[a1]].G[[b1]]), {a1, 1, 4}, {b1, 1, 4}], {μ, 1, 4}], {e, 0, 1}]];


Constructing the covariant derivatives $$D_{\mu}\varphi$$:

Dercovphi = FullSimplify[Series[Table[D[(φ[t]), crd[[μ]]] - Gammamu[[μ]] (φ[t]), {μ, 1, 4}], {e, 0, 1}]];


I can see that I don't say to Mathematica sum up over gamma matrices "internal" index, but I don't know how to do it. By this way $$D_{\mu}\varphi$$ is $$16 \times 16$$ matrix. I'll need to make a $$g^{\mu \nu}D_{\mu}\varphi D_{\nu}\varphi$$ after it.

Let me add another example; The scalar $$g^{\mu \nu}D_{\mu}\varphi D_{\nu}\varphi$$ = prodder is:

prodder = FullSimplify[Series[Sum[Sum[(inversemetric1[[μ, ν]]* Dercovphi[[ν]].Dercovphic[[μ]]), {ν, 1, 4}], {μ, 1, 4}], {e, 0, 1}]];
Expand[DiracSimplify2[SeriesCoefficient[prodder, 0]]]/.f[t]->0


and the output is a $$4 \times 4$$ matrix:

$$\left( \begin{array}{cccc} \frac{b^2 \varphi ^2}{a^4}+\frac{\left(\varphi '\right)^2}{a^2} & \frac{\left(\varphi '\right)^2}{a^2} & \frac{\left(\varphi '\right)^2}{a^2} & \frac{\left(\varphi '\right)^2}{a^2} \\ \frac{\left(\varphi '\right)^2}{a^2} & \frac{b^2 \varphi ^2}{a^4}+\frac{\left(\varphi '\right)^2}{a^2} & \frac{\left(\varphi '\right)^2}{a^2} & \frac{\left(\varphi '\right)^2}{a^2} \\ \frac{\left(\varphi '\right)^2}{a^2} & \frac{\left(\varphi '\right)^2}{a^2} & \frac{b^2 \varphi ^2}{a^4}+\frac{\left(\varphi '\right)^2}{a^2} & \frac{\left(\varphi '\right)^2}{a^2} \\ \frac{\left(\varphi '\right)^2}{a^2} & \frac{\left(\varphi '\right)^2}{a^2} & \frac{\left(\varphi '\right)^2}{a^2} & \frac{b^2 \varphi ^2}{a^4}+\frac{\left(\varphi '\right)^2}{a^2} \\ \end{array} \right)$$

The correct scalar $$g^{\mu \nu}D_{\mu}\varphi D_{\nu}\varphi$$ must be:

$$\frac{3 b^2 \varphi ^2}{4 a^4}+\frac{\left(\varphi '\right)^2}{a^2}$$

Note: I'm using Series[,{e,0,1}] and SeriesCoef[] because it's a problem with first order perturbation, but for this thread it can be ignored.

• I suggest you add "using FeynCalc" or "with FeynCalc" in the title. This will help the search function and users in general Oct 26 '18 at 12:29
• Thank you @magma Oct 27 '18 at 14:37