Extensions of the Standard Model (SM) might involve a different gauge group and/or new fields; in either case, it is important to understand what is the most general Lagrangian invariant under the symmetries of the model. However, sometimes one might forget to write down some valid interactions, and/or even end up writing some interactions which do not exist. Automatizing the process might help to reduce such mistakes.

This page describes the Mathematica code (

The program was first described in the paper "Renato M. Fonseca, *The Sym2Int program: going from symmetries to interactions*, arXiv:1703.05221 [hep-ph]", with more details available in "Renato M. Fonseca, *Enumerating the operators of an effective field theory*, arXiv:1907.12584 [hep-ph]".

Both the *GroupMath* folder as well as the file *sym2Int.m* should be placed in a directory visible to Mathematica. A good place to place them is in

Linux, Mac OS

Windows

That's it. To load

```
<<Sym2Int`
```

For questions, comments or bug reports, please contact me at
fonseca@ipnp.mff.cuni.cz

A model is defined by the following elements:

- A name;
- A gauge group;
- A list of fields.

For each of the fields, it is necessary to indicate the following (the order is important):

- A name;
- The gauge representation;
- The Lorentz representation: scalar ("S"), right/left-handed Weyl fermion("R"/"L"), vector ("V"), etc.);
- Whether it is a real ("R") or a complex ("C") field;
- Number of copies/flavors present in the model.

For example, consider the **Standard Model**:

```
gaugeGroup[SM] ^= {SU3, SU2, U1};
fld1 = {"u", {3, 1, 2/3}, "R", "C", 3};
fld2 = {"d", {3, 1, -1/3}, "R", "C", 3};
fld3 = {"Q", {3, 2, 1/6}, "L", "C", 3};
fld4 = {"e", {1, 1, -1}, "R", "C", 3};
fld5 = {"L", {1, 2, -1/2}, "L", "C", 3};
fld6 = {"H", {1, 2, 1/2}, "S", "C", 1};
fields[SM] ^= {fld1, fld2, fld3, fld4, fld5, fld6};
GenerateListOfCouplings[SM];
```

The following tables are then printed on the screen:

Now, a bit of semantics: each independent gauge and Lorentz invariant contraction of the fields forms an **operator**. Leaving flavor indices unexpanded, several operators can be written down as a single **term** in the Lagrangian. Finally, several terms can correspond to the same **operator type**, which is the set of all gauge and Lorentz invariant contractions of a given combination of fields (with flavor indices ignored). So, even if there is more than one independent gauge and Lorentz invariant contraction of the fields (say) A, B, C and D (flavor indices are to be neglected), they are all considered to be part of a single ABCD type of operator.

For example, in the Standard Model the lepton Yukawa interactions $L_i^* e_j H$ are composed of 9 complex *operators*, which can be written down as a single *term* in the Lagrangian. They also form a single *type of operator*.

With this understanding, the first above table (with red text) contains the following data:

**First column:**just a sequential number associated to each type of operator.**Second column:**the combination of fields which participate in the interaction. A star "*" means that a field is conjugated.**Third column:**mass dimension of the type of operator.**Forth column:**is the combination of fields self conjugated?**Fifth column:**counts the number of operators of a certain type. If the forth column reads "True", these are real operators; otherwise this column indicated the number of complex operators of a given type (so the value in the fifth column must be multiplied by 2 in order to get the number of real operators).**Sixth column:**counts the minimal number of Lagrangian terms needed to write down all interactions of a certain type. These are either real terms (if the forth column reads "True"), or complex terms (if the forth column reads "False").**Seventh column:**list of fields which appear more than once in the operator.**Eighth column:**contains information on the permutation symmetry and number of parameters associated to the operator.

Everything should be self-evident, with the exception of the last column perhaps, so let us look into it in more detail.

Before that, note that a second table containing some summary statistics is also printed on screen. It shows the total number of operators, terms and operator types in the model, for each mass dimension. It is worth pointing out that none of the tables includes the kinetic terms.

Consider line #5 which corresponds to the Higgs quartic coupling in the Standard Model. In this interaction, both H* and H appear twice, hence one can ask what happens when we do permutations of the two H* fields, or permutations of the two H* fields. The answer given in the last column is that the gauge and Lorentz invariant contraction of the fields H*H*HH is symmetric both under the exchange of H*'s (first ) as well as under the exchange of H's (second ). In other words, under the $S_2\times S_2$ permutation group this operator transforms under an {,} representation. Since there only one copy of the Higgs field in the Standard Model, it is quite obvious that any coupling where it appears repeated must be symmetric under permutations.

We encountered here , which is a very simple **Young diagram**. These diagrams consist of a collection of boxes which can be used to label any irreducible representation of a permutation group $S_n$. Generically speaking, boxes along the same row are associated to symmetrization, while boxes sharing the same column are associated to an anti-symmetry.

Consider now the Standard Model with an additional Higgs doublet (the **Two Higgs Doublet Model**). One way to specify it is simply by adding a 7th field:

```
fld1 = {"u", {3, 1, 2/3}, "R", "C", 3};
fld2 = {"d", {3, 1, -1/3}, "R", "C", 3};
fld3 = {"Q", {3, 2, 1/6}, "L", "C", 3};
fld4 = {"e", {1, 1, -1}, "R", "C", 3};
fld5 = {"L", {1, 2, -1/2}, "L", "C", 3};
fld6 = {"H1", {1, 2, 1/2}, "S", "C", 1};
fld7 = {"H2", {1, 2, 1/2}, "S", "C", 1};
fields[TwoHDM] ^= {fld1, fld2, fld3, fld4, fld5, fld6, fld7};
GenerateListOfCouplings[TwoHDM];
```

The program prints the following:

There are scalar mass terms (operators types #1, #2 and #3), Yukawa couplings (operators types #4 to #9) and scalar quartic couplings (operators types #10 to #15). Let us focus just on this last group of interactions: how many numbers/parameters are necessary to describe the scalar quartic interactions? We need in total $1+2+1=4$ **real** couplings for the self-conjugate operators #12, #14 and #15, plus $1+1+1=3$ **complex** couplings for the non-self-conjugate operators #10, #11 and #13. The grand total is then 10 real numbers. Note in particular that line #14 corresponds to the operator $H_2^* H_1^* H_2 H_1$ and, according to the columns 5 and 6, there are two possible independent contractions of the gauge+Lorentz indices.

However, we could have chosen to tell the program that the second Higgs doublet is simply a second flavor of the Standard Model one:

```
gaugeGroup[TwoHDM] ^= {SU3, SU2, U1};
fld1 = {"u", {3, 1, 2/3}, "R", "C", 3};
fld2 = {"d", {3, 1, -1/3}, "R", "C", 3};
fld3 = {"Q", {3, 2, 1/6}, "L", "C", 3};
fld4 = {"e", {1, 1, -1}, "R", "C", 3};
fld5 = {"L", {1, 2, -1/2}, "L", "C", 3};
fld6 = {"H", {1, 2, 1/2}, "S", "C", 2};
fields[TwoHDM] ^= {fld1, fld2, fld3, fld4, fld5, fld6};
GenerateListOfCouplings[TwoHDM];
```

One should get the same interactions as before, but in a different language:

An immediate reaction to the above result might be that there are too few interactions, but in reality that is not the case. The first line says that 4 real numbers control the scalar masses, coinciding with the previous output which said that 2 real parameters + 1 complex one were required. The lines #2, #3 and #4 are the Yukawa interactions, and for each of these lines ...

- There are no permutation symmetries to consider;
- 18 (complex) numbers are needed to parametrize each Lorentz and gauge invariant contraction of the fields;
- There is just one Lorentz and gauge invariant contraction of the fields, so only one term is needed. Each such term require a Yukawa tensor with 3 indices: two contracting with the fermion flavors, and one contracting with the Higgs flavor index.

diagrams say is that one can break this $\lambda$ into two parts: $\lambda^{SS}_{ijkl}$ which is symmetric both under the exchange of indices $i \leftrightarrow j$ and the exchange $k \leftrightarrow l$, and $\lambda^{AA}_{ijkl}$ which is and anti-symmetric tensor under these permutations of indices. It is easy to check that these tensors have 9 ($\lambda^{SS}$) and 1 ($\lambda^{AA}$) independent entries.

For more information on the permutation symmetry of interaction, see arXiv:1907.12584 [hep-ph].

Fields can be in any irreducible representation of the gauge and Lorentz groups.

The **gauge representations** for each simple factor group such as $SU(3)$ can be indicated by the representation's dimension D (e.g., 1, 3, 6, 8, ... in $SU(3)$) and -D if it is the anti-representation (e.g., -3, -6, ... in $SU(3)$). In those cases where two or more representations have the same dimensions (for example the **15** and **15'** of $SU(3)$) one can use Dynkin coefficients, just like in the

On the other hand, the **Lorentz group** is similar to a $SU(2)_L \times SU(2)_R$ group, and in particular it has irreducible representations which can be associated to two non-negative half-integers $j_L$ and $j_R$: $\left(j_{L},j_{R}\right)$. The program needs these numbers. Nevertheless, for the common cases of {0,0} (a scalar), {1/2,0} (a left-handed Weyl spinor), {0,1/2} (a right-handed Weyl spinor) and {1/2,1/2} (a 4-vector), the user can simply type "S", "L", "R" and "V", respectively.

For example, consider a model with $n$ vectors and $m$ left-handed spinors (both with null charge under a $U(1)$ gauge group):

```
gaugeGroup[modelA] ^= {U1};
fld1 = {"A", {0}, "V", "R", n};
fld2 = {"Psi", {0}, "L", "C", m};
fields[modelA] ^= {fld1, fld2};
GenerateListOfCouplings[modelA];
```

Notice the presence of a mixed symmetry {2,2} in the last line of the operators table. This somewhat complicated symmetry yields a rather peculiar expression for the number of operators: $\frac{1}{6} n^2 \left(n^2+5\right)$ real numbers are needed to encode the quartic interactions of the $n$ vector fields.

The last term, $-g^{-1}\partial_{\mu}\theta^{a}$, is specific to gauge bosons. Starting with version 2.0,

The program is not limited to the calculation of renormalizable interactions; it can calculate effective couplings to an arbitrarily large order. Note, however, that the computational time increases rapidly for higher dimensional terms.

For example, the SM interactions up to dimension 6 can be obtained as follows (the SM taken beyond dimension 4 is often called SMEFT: Standard Model effective field theory).

```
gaugeGroup[SM] ^= {SU3, SU2, U1};
fld1 = {"u", {3, 1, 2/3}, "R", "C", 3};
fld2 = {"d", {3, 1, -1/3}, "R", "C", 3};
fld3 = {"Q", {3, 2, 1/6}, "L", "C", 3};
fld4 = {"e", {1, 1, -1}, "R", "C", 3};
fld5 = {"L", {1, 2, -1/2}, "L", "C", 3};
fld6 = {"H", {1, 2, 1/2}, "S", "C", 1};
fields[SM] ^= {fld1, fld2, fld3, fld4, fld5, fld6};
GenerateListOfCouplings[SM, MaxOrder -> 6];
```

This output is in agreement with the results in the paper *B. Grzadkowski et al., JHEP 1010 (2010) 085* (the 'GIMR paper' henceforth)
.
Indeed, looking at the table of operators, the situation is as follows:

- Lines #1 to #5 are the renormalizable operators.
- Line #6 corresponds to the well known Weinberg operator (or rather
*operator type*in the nomenclature we are using in this text). - Operators types #24 to #41 and #46 to #49 involve four fermions, and correspond to those in table 3 of the GIMR paper. Take for example line #24, which corresponds to the $Q^{prst}_{\ell\ell}=\left(\overline{\ell}_{p}\gamma_{\mu}\ell_{r}\right)\left(\overline{\ell}_{s}\gamma^{\mu}\ell_{t}\right)$ operator in the language of the GIMR paper ($p,r,s,t=1,2,3$ are flavor indices). The number of independent entries of the $Q^{prst}_{\ell\ell}$ is not $3^4=81$ because, as indicated in line #24, this tensor can be split into a part which is symmetric under an exchange of indices $p\leftrightarrow s$ as well as of $r\leftrightarrow t$, and a part which is anti-symmetric under each of these exchanges of indices. Hence, the correct number of independent entries of the $Q^{prst}_{\ell\ell}$ is $36+9=45$ (this counting of parameters is explained in arXiv:1907.12584 [hep-ph]). Now consider line #36: it indicates that there are 2 distinct ways of contracting the gauge+Lorentz indices of $Q^*Q^*QQ$ which are symmetric under the permutation of the $Q^*$s and $Q$s, and 2 other distinct ways of contracting the gauge+Lorentz indices in an anti-symmetric fashion. A total of $36\times 2+9\times 2=90$ parameters are required. Crucially, one cannot rely on a single tensor such as $Q^{(1)prst}_{qq}=\left(\overline{Q}_{p}\gamma_{\mu}Q_{r}\right)\left(\overline{Q}_{s}\gamma^{\mu}Q_{t}\right)$ because, by (anti)symmetrization of its indices we get just one symmetric part and one anti-symmetric part. Two terms are therefore needed (this information is shown in column 6), hence $Q_{qq}^{(3)prst}=\left(\overline{Q}_{p}\gamma_{\mu}\tau^{I}Q_{r}\right)\left(\overline{Q}_{s}\gamma^{\mu}\tau^{I}Q_{t}\right)$ must be introduced as well in the effective Lagrangian.
- Operators of type #50, #51, #52 and #53 correspond to $Q_{e\varphi}$, $Q_{d\varphi}$, $Q_{u\varphi}$ and $Q_{\varphi}$.
- What remains is rows #7 - #23 and #42 - #45. They all have one of the following symbols: $\mathcal{D}$, F1, F2 and/or F3. The F's represent the field strength tensors of each gauge factor group, or more precisely the part $F$ with spin $(j_L,j_R)=(1,0)$ such that $F_{\mu\nu}=F+F^*$. The index identifies the gauge factor group: in this case, the gauge group is $SU(3)_C\times SU(2)_L \times U(1)_{Y}$ so F1=$F^C$, F2=$F^L$ and F3=$F^Y$. On the other hand $\mathcal{D}$ represents a derivative: it must be applied to one of the other fields in the interaction, but the program does not indicate which. Note that operator types with derivatives, such as in row #9, can have permutation symmetries with negative coefficients (see last column). That is because some operators with derivatives are redundant and should be ignored; the counting in columns 5 and 6 takes this into consideration. In general, it is more complicated to describe the permutation symmetries of these operators with derivatives, so the information in the last column is more elaborate (see arXiv:1907.12584 [hep-ph]).

One can go beyond dimension 6 operators, but computational time and memory requirements increase quickly. It is not wise to show very long table with many Young diagrams in Mathematica's front end, so

For example, the following code takes **around two hours to run**, and it uses ~4 GB of RAM:

```
savedResults = GenerateListOfCouplings[SM, MaxOrder -> 15]
```

Because the table of operators is not printed on screen, one should instead analyze the raw data returned by the function GenerateListOfCouplings. In this case, it is being saved to the variable savedResults.

The number of operators in the statistics table shown above (second column), as well as the number of types of operators up to dimension 12 (forth column), match the results in the paper

Consider the LR model with the following representations. Fermions (all taken to be left-handed Weyl spinors) are distributed across three copies of the representations $Q=\left(\mathbf{3},\mathbf{2},\mathbf{1},1/3\right)$ and $Q^c=\left(\overline{\mathbf{3}},\mathbf{1},\mathbf{2},-1/3\right) $, $L=\left(\mathbf{1},\mathbf{2},\mathbf{1},-1\right)$ and $L^{c}=\left(\mathbf{1},\mathbf{1},\mathbf{2},1\right)$. The scalar sector is composed of the fields $\Phi=\left(\mathbf{1},\mathbf{2},\mathbf{2},0\right)$, $\Delta_{L}=\left(\mathbf{1},\mathbf{3},\mathbf{1},2\right)$ and $\Delta_{R}=\left(\mathbf{1},\mathbf{1},\mathbf{3},-2\right)$.

```
gaugeGroup[LR] ^= {SU3, SU2, SU2, U1};
fld1 = {"Q", {3, 2, 1, 1/3}, "L", "C", 3};
fld2 = {"Qc", {-3, 1, 2, -1/3}, "L", "C", 3};
fld3 = {"L", {1, 2, 1, -1}, "L", "C", 3};
fld4 = {"Lc", {1, 1, 2, 1}, "L", "C", 3};
fld5 = {"Phi", {1, 2, 2, 0}, "S", "R", 1};
fld6 = {"D", {1, 3, 1, 2}, "S", "C", 1};
fld7 = {"Dc", {1, 1, 3, -2}, "S", "C", 1};
fields[LR] ^= {fld1, fld2, fld3, fld4, fld5, fld6, fld7};
GenerateListOfCouplings[LR];
```

```
gaugeGroup[modelSU5] ^= {SU5};
fld1 = {"F", {-5}, "L", "C", 3};
fld2 = {"T", {10}, "L", "C", 3};
fld3 = {"5", {5}, "S", "C", 1};
fld4 = {"24", {24}, "S", "R", 1};
fields[modelSU5] ^= {fld1, fld2, fld3, fld4};
GenerateListOfCouplings[modelSU5];
```

```
gaugeGroup[PPF331Model] ^= {SU3, SU3, U1};
Psil = {"Psil", {1, 3, 0}, "L", "C", 3};
Q23L = {"Q23L", {3, -3, -1/3}, "L", "C", 2};
Q1L = {"Q1L", {3, 3, 2/3}, "L", "C", 1};
uc = {"uc", {-3, 1, -2/3}, "L", "C", 3};
dc = {"dc", {-3, 1, 1/3}, "L", "C", 3};
J12 = {"J12", {-3, 1, 4/3}, "L", "C", 1};
J3 = {"J3", {-3, 1, -5/3}, "L", "C", 2};
Chi = {"Chi", {1, 3, -1}, "S", "C", 1};
Eta = {"Eta", {1, 3, 0}, "S", "C", 1};
Rho = {"Rho", {1, 3, 1}, "S", "C", 1};
fields[PPF331Model] ^= {Psil, Q23L, Q1L, uc, dc, J12, J3, Chi, Eta, Rho};
GenerateListOfCouplings[PPF331Model];
```

There are some optional parameters which can be used to change the program's behaviour.

At the moment

```
GenerateListOfCouplings[<model>, DiscreteSym->{<charge of field #1>,
<charge of field #2>, ...}];
```

Each charge is a complex number (with modulus 1) associated to a $Z_n$ symmetry, or a list of such numbers, in case there are multiple $Z_{n_i}$ symmetries.

The option

```
GenerateListOfCouplings[<model>, Verbose->False];
```

can be used to force the program to perform the calculation silently, in which case one should save the results of GenerateListOfCouplings to some variable (more details are given in the next section).

One can also print the statistics table only:

```
GenerateListOfCouplings[<model>, Verbose->"OnlyStatistics"];
```

Finally, it is possible to use partitions instead of Young diagrams in the last column of the operators list:

```
GenerateListOfCouplings[<model>, Verbose->"NoTableaux"];
```

We have seen above that the program prints a table with the results (plus another table with some statistics). However, in many cases, one would also like to have this data in a format suitable for further processing. Such data can indeed be obtained by just saving the output of the GenerateListOfCouplings function, which returns a list containing information related to each operator type. For each item in the list, corresponding to some operator type, the following information is provided:

- The number associated to the operator-type.
- The combination of fields which enter the interaction. Each field is identified by its position in the list provided by the user as input (if the field does not appear conjugated in the operator) or minus its position in the list provided by the user as input (if the field does appear conjugated in the operator). Derivatives are assigned the number 0, and the field strength tensors have the indices $x+2$, $x+3$, ... where $x$ is the number of fields given as input. In summary: 0 → derivative; ($1$ to $x$) → the fields given as input; ($x+2$ to $x+i-1$) → field strength tensors, where $i$ is the number of gauge factor groups. Note that the field strength tensors mentioned here are the $F$'s in the Lorentz representation $(1,0)$, such that $F_{\mu\nu}=F+F^*$.
- Mass dimension of the operator.
- Is the combination of fields self conjugated?
- Number of operators (real ones if the previous entry is "True"; complex otherwise).
- Number of terms (real ones if the operator type is self-conjugated; complex otherwise).
- List of fields which appear more than once in the operator (the identification of each field is done as in 2.).
- Information on the permutation symmetry and number of parameters associated to the operator.
- Provides information on the explicit expression(s) of the gauge+Lorentz invariant contraction (or contractions if there are several) of the fields which appear in the operator. In other words, it provides the information needed to write down the Lagragian. This information will only be computed if the following optional arguments are used: CalculateInvariants->True and IncludeDerivatives->False.

Perhaps it is easier to follow what is going on with an example (the Standard Model again):

```
gaugeGroup[SM] ^= {SU3, SU2, U1};
fld1 = {"u", {3, 1, 2/3}, "R", "C", 3};
fld2 = {"d", {3, 1, -1/3}, "R", "C", 3};
fld3 = {"Q", {3, 2, 1/6}, "L", "C", 3};
fld4 = {"e", {1, 1, -1}, "R", "C", 3};
fld5 = {"L", {1, 2, -1/2}, "L", "C", 3};
fld6 = {"H", {1, 2, 1/2}, "S", "C", 1};
fields[SM] ^= {fld1, fld2, fld3, fld4, fld5, fld6};
operatorsDim4 = GenerateListOfCouplings[SM];
operatorsDim6 = GenerateListOfCouplings[SM, MaxOrder -> 6];
```

Note that, unlike some previous examples, now the results are being saved to the variables operatorsDim4 and operatorsDim6. We can get a quick glance at what information is in operatorsDim4, for example, by making a grid:

```
Grid[operatorsDim4, Frame -> All]
```

For instance, the forth row, second column reads {-1,3,6} because the u, Q, H fields are involved (these are the fields #1, #3 and #6 in the input list), and u is conjugated (hence the -1 instead of 1). Note that the last column is empty because the options "CalculateInvariants -> True" and "IncludeDerivatives->False" were not used. Finally, note also that in the last row, column 7, there is a {{2},{2}} permutation symmetry: it stands for the trivial/symmetric $S_2 \times S_2$ irreducible representation (see section "The 'Symmetry and number of parameters' column" above).

In the example above, operatorsDim6 contains the SM operators up to dimension 6. We may write a small code to pick out the position of those types of operators which violate lepton and baryon number:

```
LeptonNumber[term_] := Module[{baryonNumber},
baryonNumber =
Sign[term[[2]]].(Abs[term[[2]]] /. {0 -> 0, 1 -> 0, 2 -> 0, 3 -> 0,
4 -> 1, 5 -> 1, 6 -> 0, 8 -> 0, 9 -> 0, 10 -> 0});
Return[baryonNumber];
]
BaryonNumber[term_] := Module[{baryonNumber},
baryonNumber =
Sign[term[[
2]]].(Abs[term[[2]]] /. {0 -> 0, 1 -> 1/3, 2 -> 1/3, 3 -> 1/3,
4 -> 0, 5 -> 0, 6 -> 0, 8 -> 0, 9 -> 0, 10 -> 0});
Return[baryonNumber];
]
positionLViolation = Cases[operatorsDim6,
x_ /; LeptonNumber[x] =!= 0 :> x[[1]]];
PrintOperatorTable[SM, operatorsDim6[[positionLViolation]]]
positionBViolation = Cases[operatorsDim6,
x_ /; BaryonNumber[x] =!= 0 :> x[[1]]];
PrintOperatorTable[SM, operatorsDim6[[positionBViolation]]]
```

The following two table are printed by the program (they list the lepton and baryon number violating operators):

The function PrintOperatorTable used here is part of

```
PrintOperatorTable[SM,operatorsDim6[[{3,4,10}]]]
```

will print only operators types #3, #4 and #10 in a table.
For SMEFT, the paper *B. Henning et al., JHEP 1708 (2017) 016*
provides (a) the number of operators of each type up to dimension 12; (b) the total number of operators with mass dimension $d \leq 12$ which violate baryon number in $\Delta B=0,1,2$ units; (c) the total number of operators with with mass dimension up to 15. This last part (c) can be checked directly from the summary table printed by the program (see bottom of section "Non-renormalizable terms, derivatives and gauge bosons").

As for parts (a) and (b), they can be checked by computing the list of SM operators up to dimension 12, for Nf generations (**it takes ~10 minutes**), saving the results in a variable (operatorsDim12 below).

```
gaugeGroup[SM] ^= {SU3, SU2, U1};
fld1 = {"u", {3, 1, 2/3}, "R", "C", Nf};
fld2 = {"d", {3, 1, -1/3}, "R", "C", Nf};
fld3 = {"Q", {3, 2, 1/6}, "L", "C", Nf};
fld4 = {"e", {1, 1, -1}, "R", "C", Nf};
fld5 = {"L", {1, 2, -1/2}, "L", "C", Nf};
fld6 = {"H", {1, 2, 1/2}, "S", "C", 1};
fields[SM] ^= {fld1, fld2, fld3, fld4, fld5, fld6};
operatorsDim12 = GenerateListOfCouplings[SM, MaxOrder -> 12,
Verbose -> False];
```

For example, the reference above provides the dimension 5 operators in a data file as the sum \[\frac{\text{Nf}^{2}+\text{Nf}}{2}H^{2}L^{2}+\frac{\text{Nf}^{2}+\text{Nf}}{2}\text{Hd}^{2}\text{Ld}^{2}\] where Nf is the number of generations, H is the Higgs field, Hd is its conjugate, and so on. Derivatives are represented by a t. To convert operatorsDim12 into this format, one can do as follows:

```
ConvertSym2IntResult[termAll_] := Module[{rule, aux, result},
rule = {-10 -> Br, -9 -> Wr, -8 -> Gr, -6 -> Hd, -5 -> Ld, -4 ->
e, -3 -> Qd, -2 -> d, -1 -> u, 0 -> t, 1 -> ud, 2 -> dd, 3 -> Q,
4 -> ed, 5 -> L, 6 -> H, 8 -> Gl, 9 -> Wl, 10 -> Bl};
aux = If[
termAll[[4]], {termAll[[2]]}, {termAll[[2]], -termAll[[2]]}];
result = Expand[termAll[[5]] Total[Times @@@ (aux /. rule)]];
Return[result];
]
Total[ConvertSym2IntResult /@ saveResult]
```

This will provide a sum with all operators up to dimension 12. To get only those with dimension 6 (for example), one can do as follows:

```
Total[ConvertSym2IntResult /@ Cases[saveResult, x_ /; x[[3]] == 6]]
```

The result is this:

In order to collect data on the number of operators of each dimension which violate baryon number, one can proceed as follows:

```
BaryonNumber[term_] := Module[{baryonNumber},
baryonNumber =
Sign[term[[2]]].(Abs[term[[2]]] /. {0 -> 0, 1 -> 1/3, 2 -> 1/3,
3 -> 1/3, 4 -> 0, 5 -> 0, 6 -> 0, 8 -> 0, 9 -> 0, 10 -> 0});
Return[baryonNumber];
]
bTable = Table[
temp = Cases[operatorsDim12,
x_ /; x[[3]] == dim && Abs[BaryonNumber[x]] == b];
Expand[temp[[All, 5]].(temp[[All, 4]] /. {True -> 1, False -> 2})]
, {dim, 5, 12}, {b, 0, 2}];
Grid[Prepend[bTable,
Style[#, Darker[Red]] & /@ {"Delta(B)=0", "Delta(B)=+-1",
"Delta(B)=+-2"}], Frame -> All]
```

The rows printed on screen represent the various dimensions of the operators (5 to 12).

Renato Fonseca

renatofonseca@gmail.com

or

fonseca@ipnp.mff.cuni.cz

29 October 2020