MomentumCombine[expr]
is the inverse operation to MomentumExpand
and ExpandScalarProduct
. MomentumCombine
combines also Pair
s.
Overview, ExpandScalarProduct, Momentum, MomentumExpand.
[p] - 2 Momentum[q] // MomentumCombine // StandardForm
Momentum
(*Momentum[p - 2 q]*)
[p, \[Mu]] + 2 FV[q, \[Mu]]
FV
= MomentumCombine[%] ex
// StandardForm
ex
(*Pair[LorentzIndex[\[Mu]], Momentum[p + 2 q]]*)
// ExpandScalarProduct ex
3 Pair[LorentzIndex[\[Mu]], Momentum[p]] + 2 Pair[LorentzIndex[\[Mu]], Momentum[q]]
= MomentumCombine[%] ex
// StandardForm
ex
(*Pair[LorentzIndex[\[Mu]], Momentum[3 p + 2 q]]*)
In some cases one might need a better control over the types of expressions getting combined. For example, the following expression will not be combined by default, since the coefficients of scalar products are not numbers
[a1, FCVariable] = True;
DataType[a2, FCVariable] = True; DataType
= SPD[a1 p, n] + SPD[a2 p, nb] ex
[ex] MomentumCombine
Setting the option NumberQ
to False
we can still achieve the desired form
[ex, NumberQ -> False] MomentumCombine
However, in the following case combing with the other two scalar products is not useful
= SPD[p] + SPD[a1 p, n] + SPD[a2 p, nb] ex
[ex, NumberQ -> False] MomentumCombine
To prevent this from happening there is a somewhat hidden option "Quadratic"
that can be set to False
[ex, NumberQ -> False, "Quadratic" -> False] MomentumCombine
= SPD[p] + SPD[a1 p, n] + SPD[a2 p, nb] + SPD[p, l] + SPD[p, k] ex
In this case we we would like to prevent the scalar products involving l
and k
from being combined with the rest. To that end we need to use the option Except
[ex, NumberQ -> False, "Quadratic" -> False, Except -> {k, l}] MomentumCombine