..., 83106786, 114382724, 1509048322, 2343463290, 27410087742, ... Efficient Hilbert Series for Effective Theories

We present an efficient algorithm for determining the Hilbert series of an effective theory and provide a companion code called ECO (Efficient Counting of Operators) in FORM. For example, the Hilbert series for the dimension 15 operators in the Standard Model Effective Theory (SMEFT) can be obtained in a minute on a single CPU core. While our implementation focusses on SMEFT, we allow for a flexible user input of the light degrees of freedom. Furthermore, gravity, as well as additional U(1) global or gauge symmetries can be included.


I. INTRODUCTION
An effective field theory (EFT) is appropriate to describe the effect of heavy degrees of freedom in the low energy limit, where there is insufficient energy to produce the corresponding particles on shell. These heavy degrees of freedom are not part of the EFT, and instead manifest themselves as higher-dimensional operators involving the light degrees of freedom φ i . In the absence of discovering new heavy degrees of freedom, EFTs provide a modelindependent approach to search for new physics. Specific examples of EFTs that are relevant for this paper are the Standard Model EFT, both without (SMEFT) and with gravity (GRSMEFT). For an introduction to EFTs, see e.g. Refs. [1,2].
The operators in the EFT Lagrangian must be invariant under Lorentz transformations and the (gauge) symmetry group G, and operators related by integration by parts and equations of motion can be eliminated to obtain a minimal basis [3,4]. For SMEFT, there is a single operator at dimension 5 [5], and the operator bases at dimension 6 [6,7], 7 [8,9] and 8 [9,10] have been constructed explicitly.
The Hilbert series (HS) of an EFT counts the number c k,r1,...,r N of independent (higher-dimensional) operators involving r i fields φ i and k (covariant) derivatives [11] H(D, (1) Here φ i is simply used to count the number of occurrences of the field in the operator and is not the field itself. (HS had previously been used in particle physics to count e.g. flavor invariants [12,13]. ) We will provide a rather efficient implementation in Form [14,15] for computing Hilbert Series, which we call Eco (Efficient Counting of Operators). It follows the approach developed in Refs. [9,16,17], but is orders of magnitude faster. In table I we list the number of operators in the Standard Model EFT of various dimensions, and the amount of time it took to calculate the HS on a single CPU core. Note that we count operators and their Hermitian conjugate (if distinct) separately. Our Form implementation accompanies this paper. While our focus is on the SMEFT, in our code it is straightforward to add more light degrees of freedom, including gravity (as in Ref. [18]), by adding a line in the Form input. Furthermore, additional U (1) gauge symmetries (e.g. a Z ) or global symmetries (e.g. baryon number) can be added as well.
This paper is organized as follows: In Sec. II, we review the method for obtaining the HS of an EFT of Refs. [9,17]. Restricting our discussion to EFTs in four space-time dimensions allows us to be quite explicit. We then describe the key insights underpinning our efficient implementation and a short overview of how to use the code in Sec. III. We conclude in Sec. IV.

II. HILBERT SERIES
In this section we review the Hilbert Series technique, following the approach of Refs. [9,16,17]. We start in Sec. II A by discussing the HS for operators without derivatives. We subsequently add derivatives, accounting for relations from integration by parts in Sec. II B and equations of motion in Sec. II C. In Sec. II D we discuss how to include gravity.

A. Operators without derivatives
We start by considering a single field φ transforming under the representation R of the symmetry group G. An operator involving n fields φ transforms under the (anti-)symmetric tensor product sym n (R) (Λ n (R)) if φ is a boson (fermion), because the fields (anti-)commute. The corresponding HS can be obtained by exploiting the orthogonality of characters to project onto the trivial representation (the invariant terms) [11], Here µ is the Haar measure for the group G. The characters for representation of n copies of the field (including arXiv:2004.09521v1 [hep-ph] 20 Apr 2020 Dimension  5  6  7  8  9  10  11  12  13  14  15  One generation  2  84 30 993 560 15456 11962 261485  257378  4614554  5474170  Three generations 12 3045 1542 44807 90456 2092441 3472266 75577476 175373592 2795173575 7557369962  Time (in seconds) Dimension  16  17  18  19  20  One generation  83106786  114382724  1509048322  2343463290  27410087742  Three generations 104832630678 320370940524 3877200543051 13044941495798 141535779949640  Time (in seconds)  139  262  586  1351  3410   TABLE I. Number of operators in the SMEFT of a given dimension with 1 or 3 generations, as well as the computing time on a single CPU core of a typical physicist's laptop.
a φ n ) are conveniently summed by the plethystic exponential (PE) [19][20][21] For multiple fields φ i one multiplies their plethystic exponentials before integrating over the Haar measure. Explicitly, for N fields φ i in representation R i of G,

B. Integration by parts
The discussion in Sec. II A applies to a general symmetry group G, including the Lorentz group. We focus on the Lorentz group in this section due to its interplay with derivatives. Exploiting the equivalence of its Lie algebra with SU (2) × SU (2), we denote the representation of φ by its spin = ( 1 , 2 ). To incorporate integration-byparts (IBP) identities, we consider representations of the conformal group which act on objects like [16] Here φ is the highest weight of this representation with scaling dimension ∆. The (covariant) derivatives act as a lowering operators, so IBP identities can be taken into account by solely focussing on the highest weight state. Derivatives transform as ( 1 2 , 1 2 ) under the Lorentz group and their commutators yield field strength (and Weyl) tensors when including gauge groups (gravity), so the character of the representation of Eq. (5) is Here x parametrizes the Lorentz group with its Haar measure dµ L , and q denotes the scaling dimension, that enter in the orthogonality of characters 1 To construct the HS for the Lorentz group we need the character for multiple fields, which is given by the plethystic exponential in Eq. (3) of the character in Eq. (6). In this case we don't project onto the trivial representation, but rather onto Lorentz scalars with a specific scaling dimension. Since we want the highest weight of this representation, we can directly read off the number of derivatives, by dividing out the scaling dimension of the field. This leads to the following expression for the HS of a bosonic field, which takes into account IBP identities, Here D counts the number of (covariant) derivatives. To obtain the last line the integral over q is performed. For a fermionic field the PE is replaced by PEF. The generalization to multiple fields again involves multiplying the corresponding plethystic exponentials. To add symmetry groups, the corresponding characters and Haar measures should be included.

C. Equations of motion
EOM redundancies can be removed by modifying the characters for the conformal representation in the preceding section. We start with the EOM for a Lorentz scalar, which allows us to drop D 2 φ. Contracted indices correspond to taking a trace, which we therefore need to remove from Eq. (5). For example, for the row with two derivatives in Eq. (5), we only want the first term on the right-hand side. While the generalization of Eq. (9) to the row with n derivatives is cumbersome, the corresponding character under the Lorentz group is (10) with 1 the trivial character of D 2 φ andχ the character of the traceless part that we seek. Note that this also removes all powers of equations of motion, since these are descendants of D 2 φ. Implementing this modified Lorentz character changes the character for the conformal representation tõ For fermions and gauge fields the Lorentz structure of the fields enters the fray. The EOM for a lefthanded Weyl fermion allows us to remove / Dψ, which transforms as (0, 1/2) under the Lorentz group, corresponding to the first term on the right-hand side in the decomposition of the tensor product Accordingly, the Lorentz character corresponding to n derivatives acting on a left-handed spinor decomposes as suppressing the argument x of these characters. Using χ instead of χ modifies the character for the conformal representation tõ (14) and similarly for right-handed fermions.
Gauge fields transform under (1, 0) ⊕ (0, 1), hence it is easiest to look at the self-dual and anti-self-dual, (1, 0) and (0, 1), first. We note here that due to the identity D 2 F µν = 0, which follows from the Bianchi identity, we only consider symmetrized and traceless combinations of derivatives 2 . A derivative acting on a (1, 0) then decomposes as 2 See the discussion on short representations in [17]. and we identify the first term on the RHS with the EOM, D µ F µν = J ν . Since currents are conserved, we'd overreach by removing the full vector component, and have to separate out the trace D µ J µ = 0. The character for the conformal representation is therefore given bỹ where we again suppressed the arguments of the characters. A similar argument holds for the (0, 1) component of the field strength. Combining these, we find that the character of the conformal representation for the field strength after removing EOM is given bỹ We will now discuss how to include gravity, providing a brief summary of the approach in Ref. [18]. Quantizing the action of general relativity (GR) yields a non-renormalizable theory. This can of course be used as an effective theory, for which we must include operators of higher mass dimension in the Riemann tensor R µνρσ , whose reducible representation under the Lorentz group is (2, 0) ⊕ (0, 2) ⊕ (1, 1) ⊕ (0, 0). To see which EOM redundancies we need to remove, we look at the Einstein equations with R µν and R the Ricci tensor and scalar, respectively. In vacuum the energy momentum tensor T µν is zero and the Einstein equations reduce to R µν = 0. As explained in Ref. [18], we can perform field redefinitions in the metric tensor to remove any occurrence of Ricci scalar and tensor from the operator basis. Therefore, the building block in the EFT of gravity is the Weyl tensor C µνρσ , which is the Riemann tensor sans its Ricci tensor/scalar traces. The representation of R µν under the Lorentz group is (1, 1) ⊕ (0, 0), meaning that the Weyl tensor has to transform as (2, 0) ⊕ (0, 2). Besides satisfying the Einstein equations, we have to take the contracted Bianchi identity into account, which can be regarded as an additonal equation of motion.
To see which expressions we must subtract in the character for C µνρσ , we again work with the self-dual and anti-self-dual of the Weyl tensor, which yields the irreducible subspaces (2, 0) and (0, 2). As in the gauge field case, commutators of derivatives yield building blocks that are already included, and the Bianchi identity implies that ∇ 2 C µνρσ is not an independent quantity, so we again consider symmetrized and traceless products of derivatives. The tensor product of a derivative acting on (2, 0) decomposes as and we identify ( 3 2 , 1 2 ) with the contracted Bianchi identity. Similar to the gauge field case, subtracting the full ( 3 2 , 1 2 ) removes too much, as ∇ µ ∇ ν C µνρσ ≡ 0 by antisymmetry. This vanishing object is an antisymmetric rank-2 tensor, and so transforms as (1, 0). Therefore, the character of the conformal representation is given bỹ (22) and we find a similar expression for the (0, 2) component. Combining these results yields the EOM-removed character for the conformal representation of the Weyl tensor asχ

III. IMPLEMENTATION
In this section we discuss Eco, our implementation of the Hilbert series in Form. We start in Sec. III A by discussing the structure of the algorithm, explaining some of methods that are key to making it an efficient implementation. In Sec. III B we provide instructions on how the code can be used, and how it can be applied to different EFTs. The possibility to add local and/or global U (1) symmetries is discussed in Sec. III C. In Sec. III D we illustrate the use of our program by applying it to SMEFT, SMEFT for a Higgs-doublet model and GRSMEFT, reproducing known results and obtaining new ones at higher dimensions.

A. Structure of the algorithm
Using the Hilbert series in Sec. II, we see that implementing an algorithm to enumerate the operators in a minimal basis at a desired mass dimension is straightforward. It amounts to inserting the explicit form of the characters for all the different fields, expanding the plethystic exponentials at that mass dimension and integrating over the Lorentz group and the gauge groups. In principle, integrating can be a hard problem, but from the form of the characters and the Haar measure in Table V we see that this amounts to the simple task of taking residues. However, if this is implemented without any refinement, it results in an inefficient algorithm that generates a huge number of terms, of which many will be zero in the end. The trick to getting an efficient implementation is keeping the number of terms in the expansion as small as possible, and figuring out terms that will be zero before carrying out the whole expansion.
To illustrate how to keep the number of terms small, we discuss the example of the Hilbert series for multiple left-handed fermions ψ i (∆ = 3 2 and = ( 1 2 , 0)), which are all charged differently under the gauge group G with χ i the character of the representation of ψ i under G. Because the only dependence on the mass dimension in the argument of the plethystic exponential is in q −∆ χ ∆, (D, x), we see that i ψ i χ i can be treated as one element during the expansion in mass dimension, and the only important feature is the power of its argument (this arises from the g n in Eq. (3)).
To efficiently expand the plethystic exponential, which involves many terms, we make great use of the Brackets+ and id, once features of Form. With the Brackets+ statement we can order the expression with all terms of equal mass dimension in a single bracket. The id, once statement tries to match terms one by one with another expression, giving Form the possibility to sort the whole expression after each insertion i.e. combining same terms. The interested reader can have a look at the comments in the code to see how we used these Form statements for an efficient expansion. Furthermore, we can postpone inserting the explicit form of χ ( 1 2 ,0) and χ (0, 1 2 ) until after the expansion in mass dimension (once again, you only have to keep track of the power of the variables of these characters), when we integrate over the Lorentz group, thus reducing the number of terms in intermediate expressions.
From the character, which is the product of the Lorentz character with the character of the gauge group, we note that after the expansion we can first perform the integral over the Lorentz group and still treat i ψ i χ i just as one term. The integral over the Lorentz group will set many terms equal to zero, so it is not until we perform the integral over the gauge group, that we have to expand the sum i ψ i χ i . Of course, when the gauge group is the product of other groups, the character is a product of characters meaning we can use this trick again; only inserting explicit expressions for these characters when we perform the integral over the corresponding group. Inserting the characters of the gauge groups can be done efficiently by making use of id, once again. Therefore, the algorithm has to perform one expansion for the plethystic exponential of a scalar field, fermion, Field strength or gravity tensor and for every field type a commuting function 3 is used that can be replaced later by the field content (i.e. the symbol to count the occurrence of a field and its character under the gauge group). Furthermore, to account for IBP relations, we have to expand the prefactor 1 P (D,x) . From Eq. (6), we see that this is a plethystic exponential itself, and in order to expand this we can follow the recipe of subsequent substitutions, as described above.
For the Standard Model gauge group U (1) × SU (2) × SU (3), our implementation takes on the following form: • Read in which fields are present, and store their representation under the symmetry groups.
• Expand just one plethystic exponential for every type of field (scalar, fermion, field strength or gravity), and multiply these to get the Hilbert series.
• Insert expressions for Lorentz characters, and perform integral over Lorentz group (from residues).
• Insert expressions for gauge group characters and perform integral, one at the time. First for SU (2), then U (1), and finally SU (3).
Another trick we employ is that we can express characters in terms of a basis. For example, 2 ⊗ 2 = 3 ⊕ 1, so χ 3 = χ 2 2 − 1. This results in a faster algorithm as we can now use the power of Form to combine terms, and only need to substitute the characters of our basis. For SU (2), and similarly the Lorentz group, we therefore only require the character for spin 1 2 .

B. How to use ECO
The user can specify the input in the file main.frm, and execute Eco by calling form main or tform -wn main, where n denotes the number of cores. The structure of this file is as follows: the first part contains settings, such as the desired mass dimension, after which the different fields of the model are specified. The final part of the file performs the calculation described above, giving the Hilbert Series as the output. A summary of all procedures and their action can be found in Table II. All the declarations the program needs and the procedures that can be used to add fields are in the files declare.h, addField.h, and HilbertSeries.h, respectively. These files are included as header files in the main file.
We start by discussing the settings, of which the most important one is the desired mass dimension, which one specifies using the variable massDim. One can choose whether or not EOM and IBP relations should be used to reduce the basis by setting EOM and IBP to 1 or 0, respectively. As an additional feature (useful e.g. in SMEFT), the number of Fermion generations can be defined with numFermGen (by default this is 1). For example, when we want to generate a basis at mass dimension 6, subtract both EOM and IBP relations and with one fermion generation, the Settings section in the main file includes #define massDim "6" #define EOM "1" #define IBP "1" #define numFermGen "1" . . .
Next we specify the fields by calling the procedure #call add'Field'('symbol','SU3','SU2','Q') for every field separately. Here 'Field' refers to the transformation under the Lorentz group, e.g. scalars or left-handed fermions, and a complete list of all supported particles is given in Table V. The argument Symbol of this procedure encodes the symbol used to denote the field, which needs to be declared before calling the procedure. 4 The next three parameters are the representations under SU (3) × SU (2) × U (1). For SU (3) and SU (2) the input of the representation is equal to the dimension of the representation. For the representation under SU(3) the possibilities are the singlet (1), 3 (3),3 (3B) and 8 (8) representations, and for SU (2) one can choose between the singlet (1), doublet (2) and triplet (3) representations. The charge under U (1) needs to be an integer Q, which we achieve by rescaling with a factor of 6 (similarly we rescaled the mass dimensions in our internal code such that they are integers). Charges for additional U (1) symmetries can be added at the end of the string (not shown), as discussed in Sec. III C.

Procedure Description
add'Field'('symbol','SU3','SU2','Q') Adds the field with its symbol (symbol needs to be declared first in Form) to the Hilbert series.
For an efficient algorithm to only count the operators replace symbol by 1, that is use #call add'Field'(1,'SU3','SU2','Q'). See Table V for an overview of the different fields that can be used and what form is expected for the input of the symmetry group SU (3) × SU (2) × U (1).

HilbertSeries('symbol')
Computes the HS at mass dimension massDim with symbol the symbol for the derivative (symbol needs to be declared first in Form). Needs to be called after all particles are added with add'Field' counting Counts the number of operators in the output of HilbertSeries. Needs to be called after HilbertSeries.

TABLE II. Overview of all procedures
Note that the conjugate particles need to be added as independent building blocks. When all fields are declared, the HS is computed by calling the HilbertSeries procedure, which takes the symbol used for momentum as its argument. To count operators one can set the argument to 1, and when set to 0 only operators without derivatives are produced. This procedure carries out the calculation discussed before and therefore takes up the bulk of the run time. The output of this procedure is a Local expression Hilbert that gives the basis as a polynomial of the symbols of the fields declared above and the user-specified symbol for the derivative. For the above example this yields . . . Symbol p; #call HilbertSeries(p) Print; .sort Hilbert = 2*Q^2*Qd^2 + 2*h*hd*Q*Qd*p + 2*h^2*hd^2*p^2 + h^3*hd^3; #call counting Number of operators at mass dimension 6 is 7.
.end 0.03 sec out of 0.03 sec where we also display the result of the Form program in blue. The number of operators can be counted and printed by calling the counting procedure. This procedure only prints the total number of operators that are in the expression Hilbert, without overwriting it. If for a field no charge corresponding to an additional U (1) is provided, we assume that it has charge 0. We remind the reader that these charges must be integers, which is why we multiplied baryon number by a factor of 3.
To get general dependence on the number of fermion generations, we can declare a symbol for this (at the beginning of the main file) Symbol Nf; #define numFermGen "Nf" . . . #call HilbertSeries(p) Print; .sort Hilbert = 2*h^2*hd^2*p^2 + h^3*hd^3 + Nf^2*Q^2*Qd^2 + 2*Nf^2*h*hd*Q*Qd*p + Nf^4*Q^2*Qd^2; To organize this expression in powers of Nf one can use the Brackets command. Details on its use and other tips can be found in the Eco package.

D. Results
With Eco it is now straightforward to reproduce known results for (extensions of) SMEFT. The results for SMEFT up to mass dimension 15 were already given in [9] and with the Form code we extended this up to dimension 20 in a reasonably short amount of time, see Table I. We reproduced the results of Ref. [18] for GRSMEFT at dimension 8 and extended it to dimension 15, see Table III. As an illustration of including an additional U (1) symmetry, we counted how many of the operators in SMEFT conserve baryon minus lepton number (B − L). None of the operators of odd dimension do, while all of the operators of even dimension do up to and including dimension 8 (10) for three (one) generations of fermions. An example of an operator of dimension 10 that violates B − L for two or more generations is h 4 2 1 2 2 . This operator must vanish for 1 = 2 due to the antisymmetry of fermion fields. Our full results are listed in Table IV. Calculating the HS for GRSMEFT is about a factor two slower than SMEFT, while obtaining the B−L conserving operators is about 10% faster.
The Hilbert series approach was applied to the Two Higgs Doublet Model (2HDM) in Ref. [22]. In this extension of the SM, an identical second Higgs doublet is added. We reproduced the 228 operators found in [22] at mass dimension 6. As most of the operators in the SM have a coupling to the Higgs field, it is not surprising that we find a sizable number of additional operators for the 2HDM. This has of course implications for the run time of the program. At mass dimension 15 we find a number of 22020182 (16181746764) operators with one (three) generation(s) respectively. Producing the full operator basis results in a run time which is a factor 2 slower compared to SMEFT. For counting the total number of operators only, more terms can of course be combined, giving a run time which is just a few percent slower.

IV. CONCLUSIONS
We have presented an efficient algorithmic implementation of the Hilbert series for the SMEFT with some extensions, and release a Form instantiation of this approach called Eco. The speed-up due to how we structured the calculation and from using Form allows us to determine the number of operator and field content of a minimal basis up to mass dimensions as high as 20, in less than an hour on a single core. We supplemented our code with capabilities for spin-2 fields and additional U (1) symmetries, which extends its application to GRSMEFT and models with additional Z bosons, or global symmetries such as baryon or lepton number, among others. As we also allow for the inclusion of additional light scalars, vectors, and fermions, we expect this tool to be a valuable addition to the model-building toolkit. Dimension  5 6  7  8  9  10  11  12  13  14  15  One generation  2 94 30 1096 580 17797 12936 314650  291702  5812440  6518462  Three generations 12 3055 1542 45816 91284 2160964 3567228 79514441 182542620 2995340275 8023911776   TABLE III

Appendix A: Characters
In group theory, the character of a representation is equal to the trace of the matrix constituting this representation. Characters of conjugate group elements are equal, and so for simple and semi-simple Lie groups the characters can be given in terms of the Cartan matri-ces' parameters. Table V contains explicit expressions for the characters of all representations that we have implemented. In the fourth column we list the explicit Form procedures (for the Lorentz group representation) and the input for these procedures (gauge group representation) that can be used in Eco. Note that Q needs to be an integer.