FeynCalc manual (development version)

 

Expanding and undoing expansions

See also

Overview.

Manipulations

FeynCalc offers further useful functions for the manipulations of Lorentz tensors and Dirac matrices. To expand scalar products

ex1 = SP[p + q + r, s + t]

(p+q+r)(s+t)(\overline{p}+\overline{q}+\overline{r})\cdot (\overline{s}+\overline{t})

or expressions like

ex2 = FV[p + q + r, \[Mu]]

(p+q+r)μ\left(\overline{p}+\overline{q}+\overline{r}\right)^{\mu }

one can use

ExpandScalarProduct[ex1]

ps+pt+qs+qt+rs+rt\overline{p}\cdot \overline{s}+\overline{p}\cdot \overline{t}+\overline{q}\cdot \overline{s}+\overline{q}\cdot \overline{t}+\overline{r}\cdot \overline{s}+\overline{r}\cdot \overline{t}

ExpandScalarProduct[ex2]

pμ+qμ+rμ\overline{p}^{\mu }+\overline{q}^{\mu }+\overline{r}^{\mu }

For the expansion of Eps tensors, we use

LC[][p1 + p2, q, r, s]
EpsEvaluate[%]

ϵˉp1+p2qrs\bar{\epsilon }^{\overline{\text{p1}}+\overline{\text{p2}}\overline{q}\overline{r}\overline{s}}

ϵˉp1qrs+ϵˉp2qrs\bar{\epsilon }^{\overline{\text{p1}}\overline{q}\overline{r}\overline{s}}+\bar{\epsilon }^{\overline{\text{p2}}\overline{q}\overline{r}\overline{s}}

EpsEvaluate also reorders the arguments of Eps according to its antisymmetric properties

LC[\[Mu], \[Sigma], \[Rho], \[Nu]]
EpsEvaluate[%]

ϵˉμσρν\bar{\epsilon }^{\mu \sigma \rho \nu }

ϵˉμνρσ-\bar{\epsilon }^{\mu \nu \rho \sigma }

The inverse of ExpandScalarProduct is called MomentumCombine

3 FV[p, \[Mu]] + 4 FV[q, \[Mu]]
MomentumCombine[%]

3pμ+4qμ3 \overline{p}^{\mu }+4 \overline{q}^{\mu }

(3p+4q)μ\left(3 \overline{p}+4 \overline{q}\right)^{\mu }

For Dirac matrices the corresponding functions are DiracGammaExpand and DiracGammaCombine

GA[\[Mu]] . GS[p + q] . GA[\[Nu]] . GS[r + s]
DiracGammaExpand[%]
DiracGammaCombine[%]

γˉμ.(γˉ(p+q)).γˉν.(γˉ(r+s))\bar{\gamma }^{\mu }.\left(\bar{\gamma }\cdot \left(\overline{p}+\overline{q}\right)\right).\bar{\gamma }^{\nu }.\left(\bar{\gamma }\cdot \left(\overline{r}+\overline{s}\right)\right)

γˉμ.(γˉp+γˉq).γˉν.(γˉr+γˉs)\bar{\gamma }^{\mu }.\left(\bar{\gamma }\cdot \overline{p}+\bar{\gamma }\cdot \overline{q}\right).\bar{\gamma }^{\nu }.\left(\bar{\gamma }\cdot \overline{r}+\bar{\gamma }\cdot \overline{s}\right)

γˉμ.(γˉ(p+q)).γˉν.(γˉ(r+s))\bar{\gamma }^{\mu }.\left(\bar{\gamma }\cdot \left(\overline{p}+\overline{q}\right)\right).\bar{\gamma }^{\nu }.\left(\bar{\gamma }\cdot \left(\overline{r}+\overline{s}\right)\right)

Notice the DiracGammaExpand does not expand the whole noncommutative product. If you need that, use DotSimplify

GA[\[Mu]] . GS[p + q] . GA[\[Nu]] . GS[r + s]
% // DiracGammaExpand // DotSimplify

γˉμ.(γˉ(p+q)).γˉν.(γˉ(r+s))\bar{\gamma }^{\mu }.\left(\bar{\gamma }\cdot \left(\overline{p}+\overline{q}\right)\right).\bar{\gamma }^{\nu }.\left(\bar{\gamma }\cdot \left(\overline{r}+\overline{s}\right)\right)

γˉμ.(γˉp).γˉν.(γˉr)+γˉμ.(γˉp).γˉν.(γˉs)+γˉμ.(γˉq).γˉν.(γˉr)+γˉμ.(γˉq).γˉν.(γˉs)\bar{\gamma }^{\mu }.\left(\bar{\gamma }\cdot \overline{p}\right).\bar{\gamma }^{\nu }.\left(\bar{\gamma }\cdot \overline{r}\right)+\bar{\gamma }^{\mu }.\left(\bar{\gamma }\cdot \overline{p}\right).\bar{\gamma }^{\nu }.\left(\bar{\gamma }\cdot \overline{s}\right)+\bar{\gamma }^{\mu }.\left(\bar{\gamma }\cdot \overline{q}\right).\bar{\gamma }^{\nu }.\left(\bar{\gamma }\cdot \overline{r}\right)+\bar{\gamma }^{\mu }.\left(\bar{\gamma }\cdot \overline{q}\right).\bar{\gamma }^{\nu }.\left(\bar{\gamma }\cdot \overline{s}\right)