TripleK: A Mathematica package for evaluating triple-K integrals and conformal correlation functions

I present a Mathematica package designed for manipulations and evaluations of triple-K integrals and conformal correlation functions in momentum space. Additionally, the program provides tools for evaluation of a large class of 2- and 3-point massless multi-loop Feynman integrals with generalized propagators. The package is accompanied by five Mathematica notebooks containing detailed calculations of numerous conformal 3-point functions in momentum space.


Introduction
Problem of analytical or numerical evaluation of Feynman diagrams has been at the heart of high energy research and has been tackled by numerous authors. A number of packages designed for analytic evaluation and manipulations of amplitudes and Feynman diagrams exists. In most cases, programs are delivered as Mathematica packages, most suitable for symbolic manipulations. The most popular programs include FeynCalc, [4,5], Package-X, [6,7], LoopTools, [8], HEPMath, [9], FIRE, [10,11], LiteRed, [12], and more.
The main focus of the standard set-up is to consider Feynman diagrams in (close to) 4 spacetime dimensions and composed from a number of bosonic or fermionic massive propagators, with the usual 1/(p 2 + m 2 ) factor. However, due to new developments in momentum space conformal field theory, a similar but different problem has arisen. As shown recently, [13], all conformal (scalar) correlation functions in momentum space can be expressed as momentum integrals with massless, generalized propagators 1/p 2ν , with ν not necessarily equal to one. Furthemore, applications in condensed matter physics, cosmology, or string theory, require the analysis to take place in a wide set of spacetime dimensions. While standard methods employed by the aforementioned programs can be used to some extent in the analysis of such problems, new methods aimed specifically at conformal correlators can be developed.
As far as conformal 2-and 3-point functions are concerned, in [2] a novel approach was proposed, by expressing the correlators in terms of triple-K integrals, where α and β 1 , β 2 , β 3 are parameters related to the dimensions of the operators involved and p 1 , p 2 , p 3 are magnitudes of momenta p 1 , p 2 and p 3 = −p 1 − p 2 . Furthermore, K ν (z) denotes the modified Bessel function of the third kind. In subsequent papers [14][15][16] a detailed analysis of 3-point functions involving scalar operators as well as conserved currents and stress tensors was presented. A large class of physically significant triple-K integrals can be expressed analytically. To achieve it, a comprehensive algorithm was presented in [3]. In this paper I introduce a Mathematica package, which implements this algorithm. From the point of view of Feynman diagramatics the package provides tools for evaluation of 2-and 3-point massless multi-loop Feynman diagrams with generalized propagators. In addition, the package includes a number of notebooks containing results constituting bulk of the material published in [2,[14][15][16]].

Physical significance
Triple-K integrals (1) were introduced in [2] as a convenient tool for the analysis of conformal 3-point functions in momentum space. Their significance comes from the fact that they provide natural way of expressing solutions to conformal Ward identities. This includes any 2-and 3-point functions of conformal operators of arbitrary spin such as conserved currents or stress tensor.
Furthermore, a large class of triple-K integrals can be analytically expressed in terms of almost elementary functions. In particular all 3-point functions of operators of integral conformal dimensions in odd-dimensional spacetimes can be evaluated explicitly in terms of rational functions of momenta magnitudes only. In case of 3-point functions of operators of integral dimensions in even-dimensional spactimes, triple-K integrals provide a reduction scheme which leads to analytic expressions containing single special function: dilogarithm.
Finally, triple-K integrals can be used for explicit evaluation of massless 3-point Feynman diagrams. All such momentum loop integrals can be expressed in terms of triple-K integrals, which then can be turned into explicit expressions. This provides new analytic expressions for a large class of Feynman diagrams.

Conformal invariance
On the level of correlation functions conformal invariance manifests itself through conformal Ward identities. In addition to known consequences of Poincaré invariance, conformal invariance imposes further constrains through dilatation Ward identity and a set of special conformal Ward identities.
Consider a general n-point function in momentum space of arbitrary operators O 1 , . . . , O n of conformal dimensions ∆ 1 , . . . , ∆ n . We work in d Euclidean spacetime dimensions and assume d > 2. Let us consider the n-point function in momentum space and introduce the double bracket notation via The n-point function then depends on n − 1 independent momenta, with p n = −(p 1 + . . . + p n−1 ). With notation in place, the dilatation Ward identity simply forces the n-point function to be a homogeneous function of dimension ∆ t − (n − 1)d, where ∆ t = n j=1 ∆ j . Special conformal Ward identities comprise of a set of second-order differential equations labeled by a single index, κ. Their exact form depends on the tensor structure of the operators involved and can be schematically written as where K κ is a second-order differential operator independent of the tensor structure, while T κ is a first-order differential operator depending on the tensor structure of the operators. The CWI operator K κ equals while the explicit form of T κ can be found in [2].
By carrying out a suitable decomposition of the tensorial structure, one can rewrite conformal Ward identities as a set of scalar Ward identities. This has been carried out for 2-and 3-point functions of scalar operators, conserved currents and stress tensor in [2,15]. The second-order differential operator featuring prominently in these expressions is Note that in this operator the derivatives are taken with respect to the momentum magnitudes, p j , j = 1, 2, 3, i.e., p j = |p j |. Due to the Poincaré symmetry any 3-point function in momentum space can be expressed in terms of three kinematic parameters, which can be taken to be the three momenta magnitudes.
As an example, consider the 3-point function of three scalar operators of dimensions ∆ 1 , ∆ 2 , ∆ 3 . One finds two independent equations expressing special conformal Ward identities, which can be collectively written as where β j = ∆ j − d/2 and i, j = 1, 2, 3. Their solution in terms of the triple-K integral (1) is extremely simple. The 3-point function is uniquely determined up to a single multiplicative constant C (OPE coefficient), The value of the α-parameter is determined by the dilatation Ward identity. When spinning operators are considered, the 3-point function must first be decomposed into a set of tensors multiplying scalar form factors. Such decompositions were worked out in [2,15,16] for 3-point functions containing scalar operators, conserved currents and stress tensor. When the special Ward identities are applied to the decomposition they produce a set of differential equations obeyed by the form factors. Those in turn split into second-order differential equations called primary Ward identities and first-order differential equations called secondary Ward identities. Primary Ward identities can be solved in terms of triple-K integrals, while secondary Ward identities impose additional constraints on the set of integration constants.
Solutions to the primary Ward identities can be expressed in terms of triple-K integrals as in equation (7), with α and β-indices shifted by integers. For this reason it is convenient to follow notation of [2] and define reduced integrals, where the values of ∆ 1 , ∆ 2 , ∆ 3 are implicitly assumed to be that of the conformal dimensions of the operators involved.

Loop integrals
Motivated by conformal invariance, one can define multiple-K integrals by integrating a product of modified Bessel functions of the third kind, While all such expressions are conformal in momentum space, for n > 3 they only represent very special correlation functions, [13,17]. However, double-and triple-K integrals represent all conformal 2-and 3-point functions.
From the point of view of Feynman diagramatics it turns out that every 1-loop 2-and 3-point momentum integral of the form can be expressed in terms of double-and triple-K integrals. For example, where δ t = δ 1 + δ 2 + δ 3 , while general expressions with arbitrary numerators can be found in [2,18]. There are numerous advantages in using multiple-K integrals in place of usual loop momentum integrals: • All parameters are scalars.
• The result is expressed in terms of a single integral rather than a d-dimensional integral, which is much more convenient for numerical analysis.
• Various identities between momentum integrals can be traced back to identities between Bessel functions.
• Renormalization properties are in 1-to-1 correspondence with singularities of multiple-K integrals, which in turn are easy to analyze.
• Analytic expressions can be obtained for a wide class of integrals.
It is the main objective of the presented package to implement the two last points.

Divergences and regularization
Most of the physically interesting multiple-K integrals exhibit singularities, which can be related to the singularities of correlation functions they represent. The position and structure of the singularities can be obtained by the analysis of properties of the Bessel functions. In particular, divergent terms can always be evaluated without evaluating the entire integral. Assuming all p j > 0 and fixed, the multiple-K integral (9) converges if By using analytic continuation one can extend the definition of the multiple-K integral to a larger set of parameters α and β j . From now on we will consider only real α and βparameters and we will refer to this analytic continuation as multiple-K integral. In such case the function exhibits poles whenever there exists a list of signs (σ 1 . . . σ n ) with σ j = ±1 such that is a non-negative integer. If the condition holds for some choice of signs (σ 1 . . . σ n ) we say that the singularity of type (σ 1 . . . σ n ) appears. The order of a pole equals to the number of different choices of the signs (σ 1 . . . σ n ) up to reshuffling. This means that the highest possible pole has order n + 1. Furthermore, note that if both conditions (−, σ 2 . . . σ n ) and (+, σ 2 . . . σ n ) hold, then the corresponding value of β 1 must be integral.
In many physically relevant cases the multiple-K integrals do become singular. In such cases regularization is required. Using generalized dimensional regularization we shift the parameters α and β j by amounts proportional to the regulator and series expand resulting expressions. Since the parameters depend on spacetime dimension d as well as conformal dimensions ∆ j of the operators involved, this is the generalized dimensional regularization scheme.

Evaluation of multiple-K integrals
All double-K integrals can be evaluated explicitly in terms of hypergeometric functions. However, in the context of physical correlation functions the conservation of momentum implies that the only relevant integrals satisfy p 1 = p 2 in (9). In such case one finds Other multiple-K integrals do not admit analytic expressions in a generic case. In principle, they can be expressed in terms of generalized hypergeometric functions: Appell F 4 function in case of triple-K integral, Lauricella functions in case of quadruple-K, [17], and so on. These expressions are not convenient neither for numerical nor analytical manipulations. In some cases, however, simplifications occur. For example as far as triple-K integrals are considered, the following cases can be expressed in terms of more or less elementary functions: • All integrals with half-integral β j parameters are expressible in terms of elementary functions and Euler gamma function.
• All integrals with two out of three half-integral β j parameters can be expressed in terms of the hypergeometric 2 F 1 function.
In particular, the case of half-integral β j parameters arises in the analysis of 3-point functions of operators of integral dimensions ∆ j in odd-dimensional spacetimes.
Most importantly, a large class of triple-K integrals with integral β j parameters can be expressed in terms of elementary functions and dilogarithm, Li 2 . To be specific, the following conditions must be satisfied: All such integrals can be expressed in terms of a single master integral, I 0{111} and the appropriate reduction scheme has been introduced in [3]. The resulting expressions depend on two functions, where Physically, such cases arise from the analysis of 3-point functions of operators of integral dimensions in even-dimensional spacetimes.
As an example, the 3-point function of the operator ϕ 2 in the theory of free massless scalar ϕ in d = 4 dimensions is proportional to I 1{000} , which in turn equals NL /(2 √ λ).

The package
The most recent version of the package can be downloaded from the hepforge repository at https://triplek.hepforge.org/.
• TripleK.wl contains the heart of the package. This file contains procedures for manipulations and evaluations of triple-K integrals.  [14].
In section T µν OO the 3-point function T µν ϕ 2 ϕ 2 is evaluated in the theory of free massless scalar field. ϕ denotes the scalar field while T µν is the stress tensor. The calculations are carried out in d = 3 and d = 4 spacetime dimensions.
Finally, in section Chiral anomaly the 3-point function j µ j ν j ρ is evaluated. We consider the theory of a single free Weyl fermion in d = 4 and j µ denotes the chiral current, j µ =ψασ µαα ψ α . Only after the 3-point function is calculated we apply the external momentum p 1µ (i.e., calculate the divergence) and recover the well-known ABJ anomaly.
• DeriveCWIs.nb contains a derivation of both primary and secondary conformal Ward identities as reported in [2]. This is done by the application of the full conformal Ward identity in momentum space to the general decomposition of various 3-point functions.
Ten sections cover all 3-point functions of scalar operators, conserved currents and stress tensor. The first section, Example:TJJ, provides a more detailed description of the procedure when applied to the 3-point function of stress tensor and two conserved currents.
• SolveCWIs.nb contains solutions to primary and secondary CWIs. These solutions were reported in the series of papers, [2,[14][15][16]. We confirm the results by substituting them back to conformal Ward identities. The analysis of correlators involving stress tensor and conserved currents includes the issue of regulating spurious singularities, as discussed in detail in [15]. The analysis of correlation functions involving scalar operators is carried out in a generic, singularity-free case only.
• CheckCWI.nb contains complete solutions to primary and secondary CWIs in d = 3 and d = 4 spacetime dimensions. In correlation functions involving scalar operators, we consider operators of dimensions ∆ = 2, 4 in d = 4 and ∆ = 1, 3 in d = 3. Furthermore, in all the cases a general structure of possible semilocal terms is derived.

Installation
In the current version the package does not contain a dedicated installer. One can access the package files, TripleK.wl and Konformal.wl by Mathematica's Get command: In its first version all repeated indices in the expression will be contracted, provided they are located on recognized vectors. By default the only recognized vectors are p[j] or those appearing under loop integrals. More vectors can be declared by adding the option Vectors -> v, where v is a single symbol or a list of symbols.
In its second version Contract contracts indices µ and ν in the expression. By default the contraction will take place over any symbols.
Contract also admits a number of options. The most important option is Dimension, which specifies the number of spacetime dimensions the contraction takes place in. If this option is not specified, symbol d is used. For more information on Contract use ?Contract. Various options to Contract and more versions of Contract are described in the attached Mathematica notebook BasicExpamples.nb.
In order to differentiate a given expression with respect to the vector k µ use

Diff[expression, k, μ]
If the vector k is equal to p 1 or p 2 , every p 3 in the expression is assumed to satisfy p 3 = −p 1 − p 2 and the derivatives are taken accordingly.

Evaluations of multiple-K integrals
Double-and triple-K integrals (9) are represented as: In triple-K integrals (but not double-K ) momenta can be omitted. The standard momenta magnitudes p 1 , p 2 , p 3 are then assumed as arguments. In double-K integrals only a single momentum magnitude appears as the argument. It is understood that p 1 = p 2 = p as explained in section 2.4. Parameters in the multiple-K integrals can also be inputted as subscripts.
To evaluate all multiple-K integrals in the given expression explicitly, use

KEvaluate[expression]
This will replace all known triple-K integrals by explicit expressions. Not all triple-K integrals can be reduced to analytic expressions. The set of conditions which leads to analytic expressions is specified in section 2.4. To check if a given triple-K integral has an analytic representation available use which returns True is the triple-K integral can be reduced by KEvaluate and False otherwise. Many interesting tripe-K integrals diverge for a given set of α and β parameters. In such case KEvaluate produces a regulated expression, where is a protected symbol denoting the regulator. If the regulator is used explicitly in the expression the integral evaluates to a power series: If the integral diverges, but no regulator is specified, the default regularization is used, where u and v are arbitrary parameters: The resulting expression can depend on two functions: NL and λ defined in (15)  To fully expand the two functions use KFullExpand. We will describe this function in more detail in section 4.5.

Divergences in multiple-K integrals
The parts of triple-K integrals that are divergent as approaches zero can be obtained without the evaluation of the entire integral. This is done by using KDivergence[expression] As in case of KEvaluate, the default regularization (18) is used if no explicit regularization is specified. By default KDivergence evaluates all divergences together with scheme-dependent parts of the triple-K integrals. Those are the terms that depend on the regularization scheme and can be used to change between various schemes.
which returns True if the integral is divergent and False otherwise.

Momentum loop integrals
The package represents 1-loop momentum space integrals by LoopIntegral. The 2-point and 3-point function loop integrals of the form respectively. Note the order of the δ parameters and a difference in the number of arguments! In 2-point loop integrals the integral depends on a single external momentum q, which is specified as a parameter. For the 3-point integrals the external momentum specification is absent: the integral is assumed to depend on p 1 , p 2 and p 3 = −p 1 −p 2 . The integrals can be nested into other integrals providing a framework to write down and evaluate multiple-loop integrals.
In order to express loop integrals in terms of triple-K integrals use

LoopToK[expression]
By default the function recursively deals with all nested loop integrals and in the process all double-K integrals are reduced to explicit expressions. This may weigh on the performance if the expression actually does not contain any nested integrals. In such a case option Recursive -> False can be added, which tells LoopToK not to look for any nested integrals.
In addition, double-K integrals will not be automatically evaluated.
The result of LoopToK can be reduced to the analytic expression by KEvaluate. In order to go directly from loop integrals to analytic expressions use

Simplification and manipulations
Expressions containing loop integrals and multiple-K integrals can be expanded to various extents by two functions KFullExpand [expression] By default KExpand resolves all derivatives of multiple-K integrals, as well as derivatives of functions NL and λ. It does not substitute analytic expressions for these functions. On the other hand KFullExpand fully expands NL and λ in terms of momenta magnitudes p 1 , p 2 , p 3 according to (15) and (16).
The level of expansion can be controlled by option Level to KExpand. Level 1 (can also be denoted by D or Diff) resolves derivatives only and is equivalent to KExpand without any options. Levels 2 and 3 (denoted also by Integer and λ) apply various levels of expansion to λ. Level 4 (also NL) fully expands expressions and is equivalent to KFullExpand. Level 0 does no expansion.
Basic algebraic relations between various triple-K integrals and loop integrals can lead to significant simplifications. By using KSimplify[expression] the package tries to apply various algebraic relations to carry out such simplifications. Option Assumptions can be added in order to supplement KSimplify with additional assumptions.  (7) up to a multiplicative OPE constant, C. Using KEvaluate we can compute this correlator with ease:

Examples
Since the triple-K integral I 1 2 { 1 2 1 2 1 2 } representing the correlator diverges, KEvaluate used the default regularization (18). Physically, the divergence indicates the conformal anomaly: the correlator should be rendered finite by the addition of the counterterm of the form where φ 0 is the source for the operator O and µ the renormalization scale, which must be inserted on dimensional grounds. For the discussion of physics consult example 7 in [14]. Here we will simply use the observation that the term proportional to the logarithm is scheme-independent: it does not depend on neither u nor v. Again, the physics picture is that the scaling anomaly is a physical, scheme-independent quantity. Next, we will consider a free massless real scalar field ϕ and compute the correlation function : ϕ 4 : : ϕ 4 : : ϕ 4 : in d = 3 spacetime dimensions. Since the scalar field has dimension 1 2 in d = 3, the operator : ϕ 4 : has dimension 2. Hence, we should recover the expression above and we should be able to calculate the OPE coefficient, C, for this particular model.
The Feynman diagram corresponding to the correlation function in momentum space is presented in the left panel of figure 1. Each 2-point loop can be integrated to yield the effective propagator, denoted by the double line in the right panel. Since we expect that the final 3-point function exhibits singularity, we will work in the standard dimensional regularization scheme with d = 3 − 2 and unaltered propagators of 1/p 2 . We find The effective propagator is finite in the → 0 limit. However, since we expect the 3-point function to be divergent, we should keep the regulator consistently at each step.
Including the symmetry factor of [ 4 2 2!] 3 = 1728 we can write down the loop integral representing the 3-point function and reduce it to the triple-K integral, Finally, we can use KEvaluate to evaluate the triple-K integral. As the resulting expression matches the conformal 3-point function stored in ThreePt, we can calculate the OPE coefficient by extracting the coefficient of the logarithm.

Konformal.wl
The package Konformal.wl serves as a repository of results regarding conformal 3-point functions of scalar operators, conserved currents and stress tensor. The package contains bulk of the results published in the series of papers, [2,[14][15][16]. The package also provides operators present in the analysis of conformal Ward identities.

Conformal Ward identities
The package defines a number of differential operators used in the analysis of conformal invariance. Single scalar K j (β) operator (5)  to apply K j (β) to the given expression with parameter β. Similarly, for the difference The full conformal operator as acting on the correlation function in (3) can be applied to the given expression by using In the first form it is assumed that the expression represents an (n + 1)-function of scalar operators. This means that only the K κ operator (4) is applied to the expression. In its second form both K κ and the spin-dependent part T κ is applied under the assumption that the j-th conformal operator has spin m j as indicated by the list of indices µ j1 , . . . , µ jm j . In both cases dimensions of the operators involved are ∆ 1 , . . . , ∆ n as indicated by the list. The dimension and spin of the last, (n + 1)-st operator is irrelevant.
In the process of deriving and analyzing conformal Ward identities, a number of differential operators have been introduced. These are: • LOp and LprimeOp denoting operators L s,N and L s,N as defined in [2].
• ROp and RprimeOp denoting operators R s and R s as defined in [2].
Finally, solutions to the primary Ward identities stored in PrimarySolutions are given in terms of reduced triple-K integrals defined as (8). In order to convert all J-integrals to the standard triple-K integrals in a given expression use

Lists of results
The following results are stored in Konformal.wl.
• The list of primary Ward identities accessible by PrimaryCWIs.
• The list of secondary Ward identities. Left and right hand sides of the Ward identities can be obtained by SecondaryCWIsLhs and SecondaryCWIsRhs respectively.
• The list of transverse Ward identities in generic cases accessible by TransverseWIs.
• The list of solutions to primary Ward identities obtainable by PrimarySolutions.
In order to access any of the objects, use the corresponding function with the index symbol indicating the 3-point function of interest. The following ten index symbols can be used, corresponding to the obvious correlators:

Examples
The derivation and various checks on all conformal Ward identities can be found in the attached files DeriveCWIs.nb, SolveCWIs.nb and CheckCWIs.nb. Here, just as a quick example, consider the primary solution to the conformal Ward identities in case of the J µ OO correlator. The solution can be listed by PrimarySolutions and substituted to primary conformal Ward identities stored in PrimaryCWIs, To evaluate the KKOp operator we have to release hold and process the resulting expression. We can use KExpand to resolve derivatives of the triple-K integrals, but one must use KSimplify to apply suitable identities between various integrals, The expression vanishes indicating conformal invariance of the form factor A 1 .

Summary
In this paper I have introduced a Mathematica package designed for manipulations and evaluations of triple-K integrals and conformal correlation functions in momentum space. This includes tools for evaluation of a large number of 2-and 3-point massless multi-loop Feynman integrals with generalized propagators. The package is accompanied by five Mathematica notebooks containing detailed calculations constituting bulk of results published in the sequence of papers [2,[14][15][16].
A number of extensions and features could be added in future. One important direction would be merging the package with functionality provided by well-known packages for loop integral manipulations such as FeynCalc, [4,5] or Package-X, [6,7]. As far as the content of the package is concerned, extensions to 4-point functions should be possible. Not only would this would include quadruple-K integrals, but also exchange Witten diagrams, [19], which represent scattering amplitudes in anti-de Sitter spacetimes. Such results would be beneficial both for investigations in conformal field theory as well as in amplitude-oriented research.