CITE THIS NOTEBOOK: Counting operators in Effective Field Theories by Jonáš Dujava. Wolfram Community JAN 3 2023.
ORIGINAL THESIS: Jonáš Dujava, Counting operators in Effective Field Theories. arXiv:2211.05759 [hep-th]. https://doi.org/10.48550/arXiv.2211.05759.
GITHUB: https://github.com/jdujava/CountingInEFT.
This is an accompanying Mathematica  notebook to the bachelor thesis [arXiv] with the same title, extensively used for numerous calculations in Section 5. We apply the developed group theoretical formalism to count independent operators for an Effective Field Theory of a single scalar field, and also a more complex case of the electromagnetic field.

Helper functions


Work around ResidueSum to find sum in unit circle

Ultimately, we will calculate numerous complex contour integrals of rational functions around unit circle.
This is most easily done using the residue theorem, and appropriate built-in Mathematica functions.
Unfortunately, this sometimes leads to wrong results, as we would like to illustrate.

Example, where everything works

Consider the following term (IntegrandsScalar[...] is defined in section Integrands). This calculation actually verifies the “by hand” part of Calculation 5.2
term44last=IntegrandsScalar[4,4]//Last
Out[]=
-
(1-
8
q
)
2
x(1)
(x(1)-x(2))x(2)(x(1)x(2)-1)(q-x(1))(qx(1)-1)(q-x(2))(qx(2)-1)
16
2
π
(
4
q
-
4
x(1)
)(
4
q
4
x(1)
-1)(
4
q
-
4
x(2)
)(
4
q
4
x(2)
-1)
Find poles of the term in the variable x[1]
FunctionPoles[term44last,x[1]]
Out[]=
-
1
q
1
-

q
1

q
1
-q
1
-q
1
q
1
Interesting, that this does not seem to finish...
FunctionPoles[{term44last,Abs[x[1]]<1},x[1],Assumptions->Abs[q]<1]
Out[]=
$Aborted
... but this runs without problems.
Here we sum all the residues inside unit circle
ResidueSum[{term44last,Abs[x[1]]<1},x[1],Assumptions->Abs[q]<1]​​integratedonce=2 π %//FullSimplifyCancel
Out[]=
-
(
2
q
+1)x(2)
32
2
π
(
2
q
+
2
x(2)
)(
2
q
2
x(2)
+1)
+

1
64
+

64
(1-
2
q
)x(2)
2
π
(
2
q
+(1-)qx(2)-
2
x(2)
)(
2
q
2
x(2)
+(1-)qx(2)-)
+

1
64
+

64
(
2
q
-)x(2)
2
π
(
2
q
+(1+)qx(2)+
2
x(2)
)(
2
q
2
x(2)
+(1+)qx(2)+)
Out[]=
-
x(2)
8π(
2
q
+
2
x(2)
)(
2
q
2
x(2)
+1)
Integration in x[2] gives us final (correct) result
2 π  ResidueSum[{integratedonce,Abs[x[2]]<1},x[2],Assumptions->Abs[q]<1]
Out[]=
-
1
4(
4
q
-1)

Example, where things start to be problematic

Now consider the following term, which is more complicated
term=IntegrandsScalar[4,5]//Last
Out[]=
-
(1-
10
q
)
3
x(1)
(x(1)-x(2))
2
x(2)
(x(1)x(2)-1)(q-x(1))(qx(1)-1)(q-x(2))(qx(2)-1)
20
2
π
(
5
q
-
5
x(1)
)(
5
q
5
x(1)
-1)(
5
q
-
5
x(2)
)(
5
q
5
x(2)
-1)
FunctionPoles[...] seems to find all poles of “term”
FunctionPoles[term,x[1]]
Out[]=
-
5
-1
q
1
2/5
(-1)
q
1
-
3/5
(-1)
q
1
4/5
(-1)
q
1
-
5
-1
q
1
2/5
(-1)
q
1
-
3/5
(-1)
q
1
4/5
(-1)
q
1
but ResidueSum[...] is not able to calculate residues in unit circle
ResidueSum[{term,Abs[x[1]]<1},x[1],Assumptions->Abs[q]<1]
ResidueSum
:Unable to find the sum of residues of -
1-
10
q
(q-x(1))
3
x(1)
(-1+qx(1))(q-x(2))(x(1)-x(2))5
20
2
π

5
q
-
5
x(1)
-1+
5
q
5
x(1)

in the solution set of x(1)<1.
Out[]=
ResidueSum-
(1-
10
q
)
3
x(1)
(x(1)-x(2))
2
x(2)
(x(1)x(2)-1)(q-x(1))(qx(1)-1)(q-x(2))(qx(2)-1)
20
2
π
(
5
q
-
5
x(1)
)(
5
q
5
x(1)
-1)(
5
q
-
5
x(2)
)(
5
q
5
x(2)
-1)
,x(1)<1,x(1),Assumptionsq<1
Try to calculate one particular residue using Mathematica function Residue[...]
res1=Residueterm,x[1],-
5
-1
q
Out[]=
0
Now use standard formula for a residue in the case of a simple pole. We can also try to calculate with several equivalent expressions
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/5
(-1)
1+
5
-1
x(2)
100
2
π
(
8
q
4
x(2)
+
7
q
(
5
x(2)
+
3
x(2)
)+
6
q
(
6
x(2)
+
4
x(2)
+
2
x(2)
)+
5
q
(
7
x(2)
+
5
x(2)
+
3
x(2)
+x(2))+
4
q
(
8
x(2)
+
6
x(2)
+
4
x(2)
+
2
x(2)
+1)+
3
q
(
7
x(2)
+
5
x(2)
+
3
x(2)
+x(2))+
2
q
(
6
x(2)
+
4
x(2)
+
2
x(2)
)+q(
5
x(2)
+
3
x(2)
)+
4
x(2)
)
Out[]=
0
Out[]=
4/5
(-1)
(
10
q
-1)
2
x(2)

5
-1
q+x(2)
5
-1
qx(2)+1
20-1+
2/5
(-1)
-2
3/5
(-1)
+3
4/5
(-1)

2
π

4/5
(-1)
8
q
-
3/5
(-1)
6
q
+
2/5
(-1)
4
q
-
5
-1
2
q
+1(
4
q
+
3
q
x(2)+
2
q
2
x(2)
+q
3
x(2)
+
4
x(2)
)(
4
q
4
x(2)
+
3
q
3
x(2)
+
2
q
2
x(2)
+qx(2)+1)
res2 and res4 are equivalent (nontrivial) expressions
res2 == res4 // FullSimplifyCancel
Out[]=
True
We obtained different results (zero or some non-trivial expression). It seems that Mathematica has sometimes problems with recognising zeros of polynomials (of degree 5 and more, which is understandable), so Residue or Limit do not recognize the pole, and just return zero.
In this particular case, direct calculation of the residue (by a Limit) with the original expression leads to the correct result, but in general it is rather problematic. However, it seems that applying Cancel with proper Extension solves this issue. This is the reason why we will work with extended functions SimplifyCancel and FullSimplifyCancel, which also seem more efficient in simplifying expressions we encounter.
It would be desirable to have a more robust and dependable process of calculating residues, but the best
implementation we could come up with is in section Poles and residues.
Single scalar field
This is the main chapter of the notebook, where we introduce all necessary definitions/functions and procedures which calculate Hilbert series (generating functions, whose coefficients encode the number of operators of a given type, that is number of fields and number of derivatives).
For simplicity we will at first work in the context of a single scalar field, but it is easy to then extend the definitions and process of calculation (code-wise) to other cases.
Throughout the notebook we use q as a grading parameter corresponding to derivatives.

Graded character of SPGM
R
Φ

The Single Particle Graded Representation
R
Φ
(SPGR) contains all possible operators of only one field Φ and any number of derivatives (so they are of the type
n
∂
Φ
), excluding ones that are trivially zero by use of equations of motion (EOM). We can assing to SPGM
R
Φ
its graded character.
In[]:=
(* graded character of S(), where dim is the dimension of space-time, see Example 3.93 *)​​P[dim_]:=IfOddQ[dim],
1
1-q
,1 Product
1
(1-q x[i])(1-q/x[i])
,i,1,
dim
2
//Simplify
Part of the definition of Plethystic Exponential (see Remark 3.73), where f[k] represents that arguments are to be raised to the kth power
Perform the “Plethystic substitution”, which finalizes the definition of PE

Measure in Weyl integration formula

Using the Weyl integration formula, we can restrict integration of class functions over a compact Lie group only to its maximal torus, but with an appropriately modified measure.
Modified measure on the maximal torus of SO(dim), see Theorem 3.97 and Example 3.99

Integrands

Now we are ready to define the integrands, which after integration will lead to Hilbert Series. It is efficient to organize the calculation by integrating every summand independently.

Poles and residues

As pointed out in section Mathematica is sometimes wrong, we need to implement calculation of residues in a different way then the already built-in functions.
First, we find all poles of a rational expression (using Roots and other functions to parse its output), after which we can select out only poles inside unit circle. The residues are then calculated using the standard formula for a residue of a finite degree pole (note, that Cancel with proper Extension is required to produce correct results).

Integration, calculation of Hilbert series

Results

Here we summarize Hilbert Series for a single scalar field calculated in various dimensions and for different powers of field Φ. It is then easy to tabulate the corresponding numbers of independent operators.
Some calculations can take a long time to complete. One can try several implementations of IntegrateWhole/IntegrateOnce functions, modifying mainly the simplification procedure. It is not entirely clear whether to call just SimplifyCancel, or more aggressive FullSimplifyCancel, and also when is the right time.
Electromagnetic field (photons)
Now we can rather straightforwardly extend our code to calculate Hilbert series for the electromagnetic field.