Matchete`
Matchete`

Contract

Contract[expr]

contracts all Delta[a,b] functions and Metric[μ,ν] tensors in the expression expr whenever possible.

Details and Options

  • When contracting flavor indices, Contract should only be applied to entire Lagrangian terms and not to sub-expressions. For more details see Possible Issues section.

Examples

open allclose all

Basic Examples  (2)

Defining a scalar field with a flavor index:

Contracting expressions with one Delta:

Similarly, we can contract multiple metric tensors:

Generalizations & Extensions  (3)

When multiple instances of Metric are multiplied together, they contract automatically among them, but they do not contract with indices of other objects like Fields:

Metric[μ,μ] evaluates to the space time dimension :

Similarly, when multiple instances of Delta are multiplied together, they contract automatically among them (except for flavor indices), but they do not contract with indices of other objects like Fields:

Delta[a,a] evaluates to the dimension of the representation of a:

The exception to this are flavor indices for which Delta does not automatically contract (for more details see Possible Issues section):

Flavor indices must always be contracted using Contract:

Delta[p,p] gives the number of flavors defined for this type of flavor index, which can be symbolic:

Possible Issues  (1)

Special attention has to be paid when contracting flavor indices. This is because of certain flavor tensors, such as diagonal mass matrices, carrying only a single flavor index, which breaks the conventional Einstein summation convention.

Consider the following setup with a flavored scalar field, which has a flavor non-universal, but diagonal mass matrix:

The following expression would be problematic if flavor deltas would automatically contract with each other such as gauge deltas do. In particular, the flavor index r on the mass M would not be properly relabeled:

Therefore, one has to manually use Contract for flavor indices, which takes care of the proper relabeling of all flavor indices, including the ones on diagonal flavor tensors:

Notice, however, that Contract should only be applied to full Lagrangian terms, but not to subexpressions. The problem can be seen with the example above:

Here the flavor index r outside the Contract was not properly identified and relabeled, highlighting that special care should be paid to properly applying Contract only to full Lagrangian terms and not sup-expressions.