Contract[expr]
contracts pairs of Lorentz or Cartesian indices of metric tensors, vectors and (depending on the value of the option EpsContract
) of Levi-Civita tensors in expr
.
For contractions of Dirac matrices with each other use DiracSimplify
.
Contract[exp1, exp2]
contracts (exp1*exp2)
, where exp1
and exp2
may be larger products of sums of metric tensors and 4-vectors. This can be also useful when evaluating polarization sums, where exp2
should be the product (or expanded sum) of the polarization sums for the vector bosons.
Overview, Pair, CartesianPair, DiracSimplify, MomentumCombine.
[\[Mu], \[Nu]] FV[p, \[Mu]]
MT
[%] Contract
\overline{p}^{\mu } \bar{g}^{\mu \nu }
\overline{p}^{\nu }
[p, \[Mu]] GA[\[Mu]]
FV
[%] Contract
\bar{\gamma }^{\mu } \overline{p}^{\mu }
\bar{\gamma }\cdot \overline{p}
The default dimension for a metric tensor is 4.
[\[Mu], \[Mu]]
MT
[%] Contract
\bar{g}^{\mu \mu }
4
A quick way to enter D-dimensional metric tensors is given by MTD
.
[\[Mu], \[Nu]] MTD[\[Mu], \[Nu]]
MTD
[%] Contract
(g^{\mu \nu})^2
D
[p, \[Mu]] FV[q, \[Mu]]
FV
[% ] Contract
\overline{p}^{\mu } \overline{q}^{\mu }
\overline{p}\cdot \overline{q}
[p - q, \[Mu]] FV[a - b, \[Mu]]
FV
[%] Contract
\left(\overline{a}-\overline{b}\right)^{\mu } \left(\overline{p}-\overline{q}\right)^{\mu }
\overline{a}\cdot \overline{p}-\overline{a}\cdot \overline{q}-\overline{b}\cdot \overline{p}+\overline{b}\cdot \overline{q}
[p - q, \[Nu]] FVD[a - b, \[Nu]]
FVD
[%] Contract
(a-b)^{\nu } (p-q)^{\nu }
a\cdot p-a\cdot q-b\cdot p+b\cdot q
[\[Mu], \[Nu], \[Alpha], \[Sigma]] FV[p, \[Sigma]]
LC
[%] Contract
\overline{p}^{\sigma } \bar{\epsilon }^{\mu \nu \alpha \sigma }
\bar{\epsilon }^{\alpha \mu \nu \overline{p}}
[\[Mu], \[Nu], \[Alpha], \[Beta]] LC[\[Mu], \[Nu], \[Alpha], \[Sigma]]
LC
[%] Contract
\bar{\epsilon }^{\mu \nu \alpha \beta } \bar{\epsilon }^{\mu \nu \alpha \sigma }
-6 \bar{g}^{\beta \sigma }
[\[Mu], \[Nu], \[Alpha], \[Beta]] LCD[\[Mu], \[Nu], \[Alpha], \[Sigma]]
LCD
[%] // Factor2 Contract
\overset{\text{}}{\epsilon }^{\mu \nu \alpha \beta } \overset{\text{}}{\epsilon }^{\mu \nu \alpha \sigma }
(1-D) (2-D) (3-D) g^{\beta \sigma }
Contractions of Cartesian tensors are also possible. They can live in 3, D-1 or D-4 dimensions.
[i, j] CV[p, i]
KD
[%] Contract
\overline{p}^i \bar{\delta }^{ij}
\overline{p}^j
[p, i] CGA[i]
CV
[%] Contract
\overline{\gamma }^i \overline{p}^i
\overline{\gamma }\cdot \overline{p}
[i, i]
KD
[%] Contract
\bar{\delta }^{ii}
3
[i, j]^2
KD
[%] Contract
(\bar{\delta}^{ij})^2
3
[p - q, j] CV[a - b, j]
CV
[%] Contract
\left(\overline{a}-\overline{b}\right)^j \left(\overline{p}-\overline{q}\right)^j
(\overline{a}-\overline{b})\cdot (\overline{p}-\overline{q})
[i, j, k] CV[p, k]
CLC
[%] Contract
\overline{p}^k \bar{\epsilon }^{ijk}
\bar{\epsilon }^{ij\overline{p}}
[i, j, k] CLC[i, j, l]
CLC
[%] Contract
\bar{\epsilon }^{ijk} \bar{\epsilon }^{ijl}
2 \bar{\delta }^{kl}
[i, j, k] CLCD[i, j, l]
CLCD
[%] // Factor2 Contract
\overset{\text{}}{\epsilon }^{ijk} \overset{\text{}}{\epsilon }^{ijl}
(2-D) (3-D) \delta ^{kl}