Integer solutions to the anomaly equations for a class of chiral gauge theories

We find all the integer charge solutions to the equations for the cancellation of local gauge anomalies in a class of gauge theories which extend the Standard Model (SM) by a gauge group of the form $G \times U(1)$, where $G$ is an arbitrary semisimple compact Lie group. The SM fermions are assumed to be neutral under $G \times U(1)$ gauge interactions, while the new fermions transform in non-trivial representations of both the new and the SM gauge groups. Our analysis is valid also when the latter is embedded in an arbitrary semisimple compact Lie group. Theories with this structure have been recently studied as models of composite axions based on accidental symmetries and can provide a field theory resolution to the axion quality problem. We apply our results to cases of phenomenological interest and prove the existence of charge assignments with Peccei-Quinn symmetry protected up to dimension 18.


Introduction
The consistency of quantum gauge theories relies on the cancellation of gauge anomalies, see for instance [1]. These conditions impose nontrivial restrictions on the choice of charges and representations for fermions with vanishing mass. This is particularly relevant for chiral gauge theories, in which the fermionic mass terms are forbidden by gauge invariance. In the case of four dimensional theories and in the presence of a U(1) gauge group, the condition for the vanishing of the [ U(1)] 3 anomaly, corresponding to a triangle diagram, translates into an homogeneous cubic equation for the charges of the form: x 3 1 + · · · + x 3 n = 0.
Additional conditions derive from the cancellation of mixed gauge anomalies.
If the charges are integers 1 , as believed to be the case if the theory admits a quantum gravity UV completion [2,3] and mandatory if the U(1) group is embedded in a simple non-Abelian gauge group, then one has to deal with a system of Diophantine equations, i.e. polynomial equations over the ring of integers. Cubic Diophantine equations are an active research topic in mathematics and no general method of solution is known at present times. Finding the integer solutions to the anomaly equations thus appears a formidable task.
In the past few years, however, starting from the seminal work of Ref. [4] (see also [5] for earlier progress), it has been realised that some explicit cases of physical relevance can be solved completely using elementary methods. The solved cases include purely Abelian gauge theories [4,6,7], Abelian extensions of the Standard Model (SM) [8][9][10][11] and even the gaugeonly 2 anomalies of the SM [12]. To the best of our knowledge no result is currently available for more general non-Abelian extensions of the SM with fixed matter content. Scenarios based on these constructions have been extensively studied with several phenomenological motivations, including composite Higgs models [13][14][15] (see for instance [16,17] for more recent reviews), models of composite QCD axion [18][19][20][21][22][23][24][25][26][27][28][29], and studies of dark matter and dark sectors [30][31][32][33][34][35][36][37][38][39][40][41][42][43] (see [44,45] for recent reviews). Solving the corresponding anomaly equations provides a way to systematically classify them and restrict the space of physically admissible theories. In this work we shall take one step in this direction by providing the general solution to the equations for the cancellation of local gauge anomalies in a class of chiral gauge theories that extend the SM with a non-Abelian gauge group of the form G × U(1), where G is a semisimple compact Lie group. Our methods of solution will be along the lines of the enlightening geometric approach described in Ref. [6].
We consider theories that extend the SM matter content by a fixed number of dark fermions with charge assignments that are vectorlike under G × G SM , but otherwise arbitrary under the U(1) factor. The analysis is valid also when the SM factor is embedded in an arbitrary semisimple compact Lie group, making it compatible with all the most popular Grand Unification scenarios. Hidden valley models [30,31], where the SM is augmented by a non-Abelian confining SU(N ) factor, offer a compelling mechanism to decouple visible physics from a dark sector at relatively low energy scales. In the hidden valley scenario, the dark fermions are not charged under the SM, but the existence of an Abelian U(1) factor in addition to the confining factor SU(N ) enables a portal between the two sectors, through the kinetic mixing of the U(1) and the SM hypercharge gauge bosons. On the other hand, it is also possible to consider the case where the fundamental dark constituents are in fact charged under the SM, but the confining dynamics of G leaves the SM unbroken. This paradigm, known as vectorlike confinement [33], has received considerable interest in the context of beyond the SM phenomenology. Composite states of the dark gauge theory -such as baryons, pions, or more exotic states -can be stable thanks to accidental global symmetries and act as promising dark matter candidates [34][35][36][37][38][39][40][41][42][43]. The coupling of the dark fermions to G SM , moreover, is a necessary ingredient in the models of composite QCD axions. One might wonder if a dark U(1) could still play a role in these cases, even if the two sectors are already in communication through SM gauge interactions. An interesting possibility is that the additional U(1) makes the matter content chiral, despite a vectorlike assignment under G × G SM . If the U(1) gauge coupling is perturbative, this allows one to have a chiral gauge theory while still keeping control of the low energy dynamics of the non-Abelian factor G (such as its confining nature and the pattern of chiral symmetry breaking). Gauge invariance then forbids mass terms for the fermions and the low energy phenomenology is completely determined by the dark confinement scale. Scenarios of this kind have been studied in [29,43], and give rise to a rich interplay between cosmological and laboratory probes. In combination with theoretical constraints, for instance anomaly cancellation and perturbativity of the gauge couplings, such models can be classified with a minimal set of assumptions. In this spirit, we hope our results may be useful beyond the specific examples we consider, either directly or through an application of the same techniques to similar problems.
As a nontrivial application of our results, we shall consider the theories introduced in Ref. [29] as models of composite axions with accidental Peccei-Quinn (PQ) symmetry, whose properties and phenomenological interest will be reviewed in Section 5. They can provide a resolution to the QCD axion quality problem by forbidding local PQ violating operators up to very high dimensions, depending on the integer values of the charges. They generalise previous constructions of models beyond the SM with accidentally stable composite dark matter candidates [39,40,43]. Our general solution for the anomaly equations can be useful, among other things, to assess which charge assignments give rise to a high quality QCD axion in the models of Ref. [29].
The article is organised as follows. In Section 2 we present the class of gauge theories of interest, defining the matter content and gauge group structure, and formulate the mathematical problem for the cancellation of gauge anomalies. In Section 3 we find all the integer solutions to the system of anomaly equations, building up from simple cases and then addressing the general case. The inclusion of SM hypercharges is then discussed in Section 4, before applying our findings to models of composite QCD axion that address the axion quality problem in Section 5. The reader interested only in the general solution to the anomaly equations can read the general formulation in Section 2 and then jump directly to Section 3.3.

Notation and conventions.
Throughout the paper we work in 3 + 1 dimensions. Given a unitary representation r of a compact Lie group, we denote asr the complex conjugate representation. We employ the notation [x 1 : · · · : x n ], with elements x i ∈ K (the field K being Q or R), to denote the equivalence classes of elements of K n \{0} under the equivalence relation: (x 1 , . . . , x n ) ∼ (y 1 , . . . , y n ) if there is a λ ∈ K such that (x 1 , . . . , x n ) = λ(y 1 , . . . , y n ). This construction defines homogeneous coordinates on the projective space PK n−1 .

The models and the anomaly cancellation conditions
We consider gauge theories which extend the SM by a gauge group of the form G × U(1), where G is a generic semisimple compact Lie group. For the sake of presentation we shall refer to gauge groups, but in fact our analysis will depend on the Lie algebra alone and we shall not specify the global gauge group structure. The fermionic matter content of the theory is that of the SM, with three generations of quarks and leptons and the possible addition of right-handed neutrinos, which are all assumed to transform in the trivial representation of G × U(1), plus a new set of fermions charged under G × U(1) × G SM . In addition we assume that the new fermions have vectorlike charge assignments under both the non Abelian factor G and the SM factor G SM . These requirements will be motivated more precisely in the rest of the section, and they correspond to the class of phenomenologically interesting models described in the introduction.
More in detail, we denote with G SM the SM gauge group, or possibly a compact semisimple gauge group that extends it. This allows us to treat in full generality also the case in which the SM is embedded into a Grand Unification group at high energies (in 3 + 1 dimensions). The case of a simple group corresponds to well-known Grand Unified Theories such as SU (5) or Spin(10), while more general semisimple extensions of the SM include also the Pati-Salam model [ SU(4) × SU(2) × SU(2)] PS and have recently been classified in Ref. [46]. We first consider the case in which G SM is a generic semisimple gauge group which extends the SM, so that the equations for the cancellation of gauge anomalies simplify. The same analysis is valid also for the case in which G SM is the SM gauge group SU(3) QCD × SU(2) EW × U(1) Y but the new fermions carry only SU(2) EW and SU(3) QCD quantum numbers (i.e. have zero hypercharge). The inclusion of hypercharge for the new fermions requires some care since it gives rise to additional anomaly conditions, and its analysis will be deferred to Section 4.
The models are defined in terms of two sets of left-handed Weyl (two-component) fermions where R and r i are generic, possibly reducible, finite dimensional unitary representations of G and G SM respectively, while p i and q i are integers labeling the U (1) charges. We shall pay special attention to the cases n f = 2 and n f = 3, and provide a general solution for arbitrary n f .
It is convenient to introduce the notation: where r i = α r i,α , with r i,α irreducible, dim(r i,α ) is the dimension of each irreducible fragment and T (r i,α ) is its Dynkin index. 3 We define similarly d (G) and T (G) as the dimension and the (total) Dynkin index of the representations R,R of G.
This class of models would correspond to a vectorlike set of fermions if the charges p i , q i were vanishing. However, with a general charge assignment the model is chiral. From a phenomenological point of view, chiral models are particularly interesting, as mass terms for the dark fermions are forbidden by gauge invariance. All relevant scales in the IR (such as masses of the physical particles) are thus generated dynamically. This is in contrast to vectorlike models, where the fundamental fermions can have arbitrary mass terms. Despite being chiral, the theories we consider can give rise to an infrared dynamics that is under theoretical control, if the gauge group G has a well-understood confining dynamics in the infrared, and if the U(1) and G SM factors are weakly coupled at the confinement scale of G. The vectorlike structure with respect to G SM ensures the existence of a G SM preserving vacuum that is dynamically preferred in most cases [47]. A prominent example is obtained if G = SU(N ) and the representation R is the fundamental representation of SU(N ). In many cases, depending on the fermion multiplicities, the infrared spectrum consists of a collection of (pseudo) Nambu-Goldstone bosons associated with the spontaneously broken global symmetries, plus heavier resonances. The U(1) gauge group is expected to be in the Higgs phase if the theory is chiral and the vacuum is aligned in the G SM preserving direction. The dynamically generated masses for the light states can be computed in a systematic way by including the weak gauging of U(1) × G SM in a chiral lagrangian approach for the low energy theory of G, as discussed in detail in Ref. [43]. The conditions for anomaly cancellation and their solutions are in any regard independent from the previous considerations on the infrared dynamics of the theories.
We shall be interested in the conditions for the cancellation of local gauge anomalies for G × U(1) × G SM . Global (non-perturbative) anomalies [48,49] are related to the topology of the gauge group and depend on the specific choice of Lie group rather than just its Lie algebra. Their analysis is left to a future work (see Refs. [50][51][52] for a recent study in the SM and some of its extensions). Since the generators of a representation of a semisimple Lie algebra are traceless, the mixed 3 anomaly vanishes as a consequence of the cancellation of gauge anomalies in the SM (or its semisimple extension) and the fact that the set of additional fermions we introduced is vectorlike with respect to G SM . Similarly, the anomaly [G] 3 vanishes due to the vectorlike structure of the new fermions with respect to G. We are left with the mixed anomalies U(1)×[G SM ] 2 , U(1)×[G] 2 , and the Abelian anomaly [ U(1)] 3 . The only nontrivial condition from the cancellation of local gravitational anomalies is U (1) × [grav] 2 , but in the class of models we consider the latter is equivalent to the condition for U(1) × [G] 2 . We thus obtain a system of three equations of the form: where we have dropped the common factors T (G) and d (G) , which are the same for all fermions and always nonzero. With our notation and conventions this is a system of Diophantine equations with integer coefficients for the integer charges (q i , p i ). Since the equations are defined by homogeneous polynomials, it is sufficient to work over the field Q of rational numbers, and then rescale by an integer multiple to obtain all the integer solutions.

General solution to the anomaly cancellation conditions
In this section we focus on theories in which either the new fermions (ψ i , χ i ) have vanishing hypercharge or the SM gauge group is extended to an arbitrary compact semisimple Lie group that we denote by G SM . We wish to provide a general solution to the system (3) in the case of n f distinct U(1) charges for the fields ψ i and n f for the fields χ i . For n f = 2, 3 the cubic equation can often be reduced to a quadratic equation, and we shall treat these cases first. The general case will then be addressed, providing a solution valid also in the previous instances, but corresponding to a different parametrisation.

Models with n f = 2
For n f = 2, the two linear equations admit solutions with (p i + q i ) = 0 only if T 1 d 2 = d 1 T 2 , in which case they become equivalent.
In the case d 1 = d 2 the system reduces to that of four U(1) charges with zero sum and vanishing sum of cubes. The general solution is well known and is given by assignments of the form (q 1 = −p 1 , q 2 = −p 2 ), (p 2 = −p 1 , q 2 = −q 1 ), and (p 2 = −q 1 , q 2 = −p 1 ).
These assignments are vectorlike with respect to U (1), but can still give rise to overall chiral models, which fall into three classes and have been classified in Ref. [43]. From now on we therefore assume without loss of generality that d 2 > d 1 .
The linear equations (4) and the cubic equation always admit a vectorlike set of solution with (q 1 = −p 1 , q 2 = −p 2 ). On the other hand, if (p 1 + q 1 ) = 0, combining the equations and after straightforward manipulations one arrives at This is a homogeneous quadratic Diophantine equation in the three variables Equations of this type have been extensively studied and they are fully understood, see for instance [53]. In particular there are general criteria for the solvability of these equations and it is known that if a particular nontrivial solution is known then there are actually infinite solutions, and the general solution can be parametrised in closed form in terms of arbitrary integers (Theorem 4 in Chapter 7 of [53]). Let us give a brief description of how this can be achieved in the explicit example of our equation.
From a geometric point of view, eq. (7) defines a conic in the projective plane PR 2 , which in homogeneous coordinates [X : Y : Z] is given by the zero locus of the quadratic form The solutions to the Diophantine equation will be given by all the rational points on this conic, and define a curve in the projective space PQ 2 . Given a rational point P 0 = [X 0 : Y 0 : Z 0 ] on the conic, any other point on the curve is rational if and only if it lies on a rational line 4 passing through P 0 . Indeed, given any other rational pointP on the conic there exists a line passing throughP and P 0 and this line has rational coefficients; vice versa, the intersection of a quadratic curve with a rational line through one of its rational point is always a rational point. In this way, all solutions can be generated from a single one.
In practice, it is convenient to eliminate the redundancy under coordinate rescalings and work in affine space. Since d 2 > d 1 there are no nontrivial solutions with Z = 0, and we are free to divide by Z to switch to affine coordinates x = X/Z and y = Y /Z and consider the quadratic form The zero set of q(x, y) defines an ellipse in R 2 , which corresponds to our conic. A particular rational point on the ellipse can easily be found by inspection and is given by (x 0 , y 0 ) = (0, 1).
All the other rational points will be given by the intersection of the curve with the set of affine lines through (x 0 , y 0 ) with rational coefficients: y = k x + 1 with k ∈ Q. In particular, by carrying out the algebra it follows that such a point is given by: which is always a rational point as expected. To go back to the homogeneous space of integer solutions, one can simultaneously rescale all coordinates by f (k) and homogenise the polynomials: Since we have assumed X = (p 1 + q 1 ) = 0 in deriving the quadratic equation we need to exclude the values k = 0 or = 0 in order to avoid a double counting.
Finally, the general solution for the U (1) charges can be recovered by use of eqs. (4) and (8): where n, k, ∈ Z \ {0}, the {p i ,q i } are defined implicitly above, and plus the vectorlike set of solutions with (q 1 = −p 1 , q 2 = −p 2 ). The factor n takes into account the possibility of rescaling a solution by an arbitrary integer.

Models with n f = 3
Increasing the number of independent charges we consider now theories with n f = 3. The system of equations comprises the two linear equations (15) and the cubic equation This system always admits vectorlike solutions with (p i + q i ) = 0 for i = 1, 2, 3. Moreover, if there is at least a vectorlike pair of fermions then the equations reduce to those of the n f = 2 case. We therefore restrict our attention to the case (p i + q i ) = 0.
For notational simplicity, we introduce the antisymmetric combinations which satisfy the cyclic property We note that if one D ij = 0 but the other two D ij 's are nonzero, one can easily prove by combining the two linear equations (15) that the pair of charges with (k = i, j) is vectorlike: (p k + q k ) = 0. In this case, therefore, the equations reduce to those of the n f = 2 case we already treated.

Nondegenerate system
Let us consider the case D ij = 0 for every i, j. From eq. (18) it follows that the signs of the D ij 's cannot all be equal, and with a suitable permutation of the indices one can always assume sgn D 23 = −sgn D 12 = −sgn D 31 . We shall assume that such a reshuffling has been performed and that D 23 is the one with opposite sign.
In this case the system in (3) can be reduced to a homogeneous quadratic equation and so the general procedure to solve the system parallels that of n f = 2, although the computations become more involved. From the two linear equations (15) one can easily eliminate two variables as Then, direct substitution allows one to turn the cubic equation (16) into a quadratic one in terms of the four variables which can be solved using the same method described previously.
Analogously to the n f = 2 case, solutions can be expressed as the rational points of a hypersurface in the projective space PR 3 , that in homogeneous coordinates [X : Y : Z : W ] is defined by the zero locus of the quadratic form They thus define a quadric hypersurface in the rational projective space PQ 3 . It is convenient to switch again to affine coordinates x = X/W, y = Y /W, z = Z/W , where we are neglecting for the moment the solutions with W = 0, which correspond to points at infinity in the affine space spanned by (x, y, z). 5 The quadratic form becomes 5 Notice that we are choosing to go to affine space by rescaling by W in order to minimise the number of points at infinity of the quadric, since D 23 was the coefficient with opposite sign with respect to D 12 , D 13 .
The rational point (x 0 , y 0 , z 0 ) = (0, 1, 1) always belongs to the surface, since the D ij 's satisfy the cyclic property (18). From the knowledge of a rational solution, all the other rational points can be obtained as the intersection between the surface and the set of rational lines through (x 0 , y 0 , z 0 ), defined by After a coordinate rescaling and homogenisation, the full solution for the U(1) charges can finally be expressed as with k, , m, n ∈ Z and the {p i ,q i } are defined implicitly above. Again, the solutions are parametrised by an extra variable n which corresponds to an overall rescaling. The normalisation constant µ 3 is given by The last question left to determine is whether the points at infinity, corresponding to W = 0, give rise to an additional family of solutions. In this case, the equation reduces to If the sign of the X 2 coefficient sgn d 1 D has nontrivial integer solutions, at least one of them satisfies For any choice of representations, it is therefore possible to determine whether (26) is solvable in a finite number of steps, by checking whether any of the integer triples satisfying (28) solve the equation. In the affirmative case, all the other solutions can be generated from a particular one with the methods employed in the last two sections. All three possibilities can be realised in practice, as shown by the examples in Appendix A.

Degenerate system
If D ij = 0 for every (i, j) then the two linear equations (15) become equivalent. In this case the remaining equations correspond to a special instance of the equations for the cancellation of gauge anomalies for a single U (1) gauge group studied in Refs. [4,6]. In particular, they coincide with the anomaly cancellation equations for a set of 2d 1 +2d 2 +2d 3 fermions charged under a single U (1) gauge group, in which there are d i pairs with charges (p i , q i ) for i = 1, 2, 3.
The method of solution of Ref. [4] does not allow one to easily enforce the constraint that some of the charges are equal. However it is still possible to obtain a closed form solution following an observation stressed in Appendix B of Ref. [6]: given a cubic curve with a known rational point P 0 which is a double point 6 , every other rational point of the curve can be expressed in terms of a rational parameter (see e.g. Theorem 3 in Chapter 9 of [53]). This is a generalisation of the method we used in the case of a quadric. It is sufficient to consider the set of all the rational lines through P 0 : this set covers the whole rational projective space of interest and the intersection of such a line with the cubic is always a rational point, since P 0 is a double point.
In our case we can use the linear equation (15) to eliminate q 3 and obtain a cubic in PQ 4 , defined in terms of homogeneous coordinates [p 1 : q 1 : p 2 : q 2 : p 3 ] by the zero locus of (29) It is easy to verify that the rational point Π 0 = [1 : −1 : 1 : −1 : 1] lies on the cubic and is also a double point, since all the partial derivatives of F vanish. We can therefore find all the rational points of the cubic F as the intersection of F with the rational lines where K = [k 1 : k 2 ] ∈ PQ and Σ = [ 1 : m 1 : 2 : m 2 : 3 ] ∈ PQ 4 (the notation for the components of Σ is chosen for convenience, in analogy with the notation we use for the 6 That is a zero of the cubic and of all its partial derivatives. charges). Substituting (30) in (29) we find the intersection points as the solutions of where For k 2 = 0 we recover the original point Π 0 , whereas for [k 1 : we find all the other rational points on the cubic. Plugging back and using the linear equation to recover q 3 , we obtain the general solution for the charges: with A 1 , A 2 defined in (32), i , m i , n ∈ Z and the {p i ,q i } defined implicitly above. As before, the integer solutions are parametrised by an extra variable n which corresponds to an overall rescaling, and the normalisation constant µ 3 is defined as Notice that A 1 is a multiple of d 3 and so the {p i ,q i } are manifestly integers. Moreover the vectorlike solutions are recovered when A 1 = 0.

Models with arbitrary n f
In this section we set ν ≡ n f for notational convenience. The method of solution described in the last paragraph can be straightforwardly extended to treat the general case. Let us consider first the equations (3b) and (3c), involving the dimensions d i . We can use the linear equation to solve for q ν and plug back in (3c) to obtain a cubic in PQ 2ν−2 . In terms of homogeneous coordinates [p 1 : q 1 : · · · : p ν−1 : q ν−1 : p ν ] it is defined by It is easy to check that it describes a singular cubic hypersurface with Π 0 = [1 : −1 : · · · : 1 : −1 : 1] as a rational double point. As previously described, we can find all the rational points of the cubic F as the intersection of F with the rational lines where K = [k 1 : k 2 ] ∈ PQ and Σ = [ 1 : m 1 : · · · : ν−1 : m ν−1 : ν ] ∈ PQ 2ν−2 .
Carrying out the algebra we find that the rational points are given by where i , m i , n ∈ Z, the index i runs on i = 1, . . . , ν −1 and µ ν , {p i ,q i } are defined in analogy to the previous section. The coefficients A 1 , A 2 are polynomials in the parameters i , m i : The linear equation involving the Dynkin indices (3a) results in an additional constraint on the arbitrary integers i , m i : which can be either solved explicitly in the previous expressions or, more conveniently, taken into account when choosing the integers parametrising the solution.

The inclusion of hypercharge
Having found the general charge assignment for the U (1) gauge group in cases where G SM is a semisimple extension of the SM group we wish now to address the case in which G SM is taken to be SU(3) QCD × SU(2) EW × U(1) Y , and the new fermions ψ i , χ i have nonvanishing hypercharge. The quantum numbers under G × U (1) × G SM are therefore given by (1), with the specification r i = α (r i,α , y i,α ), wherer i,α is an irreducible representation of SU(3) QCD × SU(2) EW , and y i,α their corresponding hypercharge. The anomaly cancellation conditions for the U (1) charges, and their solutions discussed in the previous section, are still relevant for the models we consider here, but must be supplemented by additional conditions. There are only two additional nontrivial equations for the cancellation of gauge anomalies, namely the mixed ones U(1) Y × [ U(1)] 2 and U(1) × [ U(1) Y ] 2 . In the general case they read The approach that we choose to pursue is the following: given a choice of U (1) charges (p i , q i ), which for fixed SU(3) QCD × SU(2) EW representations can be found using the results of the previous section, we want to determine which assignments of hypercharge are consistent with the system (40).
It is always possible to solve the system by solving for one of the hypercharges in the linear equation and plugging back in the quadratic one. We are left with an homogeneous quadratic Diophantine whose solutions can always be found with the methods already illustrated. We shall not do this explicitly in the general case, but the procedure to find the general solution for any case of interest should be clear. We present, however, the explicit solution in two special cases of phenomenological relevance, in connection to models of composite axions (see Section 5 for a brief overview).

Models with n f = 2
We treat the case in which y i,α = y i for every α. The equations for the hypercharges read: In the case of vectorlike assignment (q 1 = −p 1 , q 2 = −p 2 ) they are trivially satisfied for arbitrary y 1 , y 2 . We shall therefore consider the case (p 1 + q 1 ) = 0.
If d 1 = d 2 , the U(1) charges satisfy one of the assignments in (5). It follows that the general solutions with (p 1 + q 1 ) = 0 are: Let us now consider d 2 > d 1 . Then, the first equation in (41) (in combination with eq. (4)), implies that y 1 = ±y 2 . Because of the second equation in (41), however, these assignments are consistent only if the U(1) charges satisfy respectively Since the possible values that {p i , q i } can take are already determined by (13), it is possible to verify whether any of them satisfy (43) upon direct substitution. After a few algebraic manipulations, The only solutions are either k = 0 or = 0, which are already included in the solutions with (p 1 + q 1 ) = 0. We conclude that for d 2 > d 1 the only consistent assignments of hypercharge with y i,α = y i are the vectorlike ones with (q 1 = −p 1 , q 2 = −p 2 ) and arbitrary y 1 , y 2 .

Models with n f = 3 and irreducible representations
For n f = 3 and r i irreducible the anomaly cancellation conditions take the form and As in the n f = 2 case, vectorlike solutions with (p i = −q i ) automatically satisfy the equations for any choice of hypercharges, so we assume p i + q i = 0 in the following. Equation (45), together with the other linear equations (15), immediately implies that for any chiral solution also equivalent to in our notation.
We consider the case in which D ij = 0 for all pairings, that is realised in all the n f = 3 composite axion models classified in Ref. [29], see Tab. 3. Then, eq. (46) can be turned into a simpler form from the relations (19) involving the sums p i + q i . Assuming that the system does not admit solutions with p i + q i = 0 for every i = 1, 2, 3, 7 and without loss of generality taking p 3 = q 3 , upon further substitution we obtain a second degree homogeneous equation in two variables for the hypercharges (51) The values of the hypercharges y 2 , y 3 can be straightforwardly derived from the previous equations given an arbitrary integer value of y 1 .

Composite axion models and Peccei-Quinn violating operators
Having determined the general solutions to the anomaly cancellation equations for a broad class of chiral gauge theories, we wish to apply these results to cases of phenomenological relevance, illustrating their usefulness. We shall do so in the context of the models of composite QCD axion recently introduced in Ref. [29], which we briefly review. We refer the reader to [29] for a more detailed discussion, references to the original literature and alternative approaches.
The models considered have the structure described in eq. (1), with G = SU(N) and R = , with G SM taken to be either the SM gauge group or its unified version SU(5) GUT , and the SU(N) dynamics assumed to be confining with a confinement scale of the order of the Peccei-Quinn scale f P Q 4 · 10 8 GeV. A schematic table depicting the matter content of the models is shown in Table 1. When the set {r i,α } of irreducible G SM representations includes fragments with different Dynkin indices, some of the global symmetries are anomalous and one of them can be identified with the PQ symmetry giving rise to the QCD axion. It is spontaneously broken by the confining dynamics and the QCD axion is identified with one of the (pseudo) Nambu-Goldstone bosons. The accidental nature of the symmetry thus provides a natural explanation for its existence, differently from more traditional constructions where the axion is introduced as the phase of a fundamental complex scalar field and the PQ symmetry is postulated by hand [54][55][56][57]. The models can be seen as generalisations of the composite axion proposed in [18], with the difference that fermions are now charged under an additional U(1) factor. Since the axion decay constant f a will be of order of the confinement scale Λ P Q , the latter has to take very high values in realistic models, Λ P Q > 10 8 GeV. Therefore, the low energy phenomenology is completely determined by the states that remain naturally light, such as (pseudo) Nambu-Goldstone bosons. The effects of the U (1) and G SM weak gaugings can be included systematically, and the dynamics of these states thoroughly analysed, with the use of an effective chiral lagrangian approach. The phenomenological properties of the QCD axion can be well predicted in terms of the UV theory. In the notation of [29], and using the results of [58], one has: m a = 5.70 (7) 10 12 GeV f a µeV, The vanishing of the leading-order UV contributions to the axion-fermion couplings in our model gives a sharp prediction for these quantities, common to all the so-called "hadronic" axion models.
Ref. [29] classified all the choices of G SM representations for n f = 2 and n f = 3 (in the first case with r i reducible, while in the second case with r i irreducible) such that: 1) the  Generic higher dimensional operators can and will break explicitly the global PQ symmetry. In particular, these operators are expected to be generated by every consistent quantum gravity UV completion [2,3], potentially spoiling the QCD axion solution to the strong CP problem. This UV sensitivity is known as the axion quality problem. To quantify the level of protection needed to ensure a robust solution to the strong CP problem irrespectively of the UV physics, it is necessary to identify the leading effects that generate a UV contribution to the QCD axion potential.
It has been shown in Ref. [29] that the PQ violating operators that generate a potential for the QCD axion are gauge invariant operators of the schematic form O PQ = i ψ i χ i , possibly nonlocal products of local gauge invariant scalar operators (i.e. of the operators that appear in the lagrangian). 8 We shall refer to the insertion of a local operator in a correlator as a single insertion, whereas the insertion of a nonlocal operator of the described form will be called a multiple insertion. An operator corresponding to a double insertion will be a bilocal operator O(x 1 , x 2 ), and more general multiple insertions will correspond to multilocal operators. We assume that the anomalous dimensions of the operators are small corrections to the classical dimension. The effective dimension of a nonlocal operator built from N local ones is where ∆ i is the scaling dimension of each local operator, and we are neglecting possible anomalous dimensions. Denoting by ∆P Q the (effective) dimension of the leading PQ violating effects, a solution of the axion quality problem requires ∆P Q ≥ 9. Robust solutions with ∆P Q = 12 have been identified, and we shall show now that with appropriate charge assignments it is possible to have models with ∆P Q up to 18.
It is convenient to adopt a notation such that (ψ i χ i ) κ i = (ψ * i χ * i ) |κ i | for κ i < 0, with the Lorentz, G and G SM indices contracted so that the pair ψ i χ i is a scalar operator, gauge singlet of G and G SM , and κ i is an integer.
In this class of models, any anomalous U (1) global symmetry corresponding to a PQ symmetry always acts as a multiple of the identity on the subsets {ψ i,α , χ i,α } of the fields {ψ i , χ i }, with ψ i,α corresponding to the irreducible G SM representation r i,α , and similarly for χ i,α . Therefore, given an operator of the schematic form i (ψ i χ i ) it is always possible to construct a PQ violating one with the same dimension, by restricting to a single subset of fields on which the PQ symmetry generator acts nontrivially. On the other hand, according to the analysis of [29], the PQ violating operators that generate a potential for the QCD axion are gauge invariant operators of the form i (ψ i,α χ i,α ) κ i , possibly nonlocal products of local gauge invariant scalar operators. Therefore it is sufficient to characterise the set of operators of the form i (ψ i χ i ).
At the level of a single insertion, the lowest dimensional operators generating a potential for the axion will then have a classical scaling dimension of where the minimisation occurs among the set of integers {κ i } satisfying (54). In turn, one can determine the operator dimension for multiple insertions by performing the sum (53).

Models with n f = 2
We focus now on models with n f = 2, whose classification along the lines previously discussed is summarised in Tab. 2. From now on we shall consider the case d 2 > d 1 , with p i + q i = 0, of interest for the solution of the QCD axion quality problem.
Regarding the dimension of PQ violating operators, Ref. [29] identified some universal PQ violating local operators which imply an upper bound on the dimension of the leading PQ violating operator ∆ maẍ P Q . The question of whether there are charge assignments with ∆P Q = ∆ maẍ P Q was however left unsettled. Using our explicit solution we are able now to address this question, showing that in all the models there are charge assignments with ∆P Q = ∆ maẍ P Q , thus providing a positive answer. In particular, for the case n f = 2, there are phenomenologically viable models with ∆P Q = 15, that can therefore provide a particularly robust solution to the axion quality problem.
At the level of local operators, the condition (54) together with equation (13) gives: Its unique nonzero solution for k, = 0 is [κ 1 : , and corresponds to the PQ violating operators already identified in [29]. This shows that those operators are the lowest dimensional among local operators. Their explicit form and classical dimension are The question left to answer is whether it is possible to have a nonlocal operator O PQ of the form (ψ 1 χ 1 ) κ 1 (ψ 2 χ 2 ) κ 2 which is the product of two or more local gauge invariant scalar operators and has a smaller effective dimension. We can always write this operator as the product of two gauge invariant scalar operators, O PQ = O 1 O 2 , which are possibly nonlocal. 9 A net zero charge under U(1) is a necessary but not a sufficient condition for these operators to be gauge invariant, since specific choices of representations under G SM will impose additional requirements; however, these are model dependent and will not be considered in our analysis. Since κ 1 , κ 2 have the same sign, the only possible suboperators which can be gauge singlets for every choice of group G are (ψ i χ i ) λ , (ψ 1 χ 2 ) λ , (ψ 2 χ 1 ) λ , or a product of them. 10 The case O 1 = (ψ i χ i ) λ is excluded unless k = 0 or = 0, which correspond to vectorlike assignments. Similarly, O 1 = (ψ i χ j ) λ , with i = j gives which implies and has no solution for k = 0, assuming [k : ] = [±(d 2 − d 1 ) : d 2 ]. This also excludes the case O 1 = (ψ i χ i ) λ 1 (ψ j χ k ) λ 2 , since the operator O 2 would be of the form we already excluded. We are left with operators of the form O 1 = (ψ 1 χ 2 ) λ 1 (ψ 2 χ 1 ) λ 2 , and correspondingly . Their gauge invariance implies the condition: which is solved by [λ 1 : . Given a choice of dimensions d 1 , d 2 , it is always possible to find a choice of k, such that the classical dimension of O 1 considered as a local operator ∆(O 1 ) is arbitrarily large. Indeed, for k > > 0, 3 (5 ⊕ 1) 6 18 12 14/9 2 (5 ⊕ 1) 2 (5 ⊕ 1) 12 12 6 5 (10 ⊕ 5 1) 5 15 12 14/9 Table 2: Classification of composite axion models with n f = 2, reproduced from [29]. The multiplicity of SM singlets m is an integer in the specified range. ∆ maẍ P Q denotes the dimension of the leading single insertion PQ violating operators, while in the last column we list a lower bound on k/ , for k > > 0, that ensures that the effect of multiple insertions is negligible. An empty slot means that single insertions are always the leading effect for that choice of representation. The corresponding charges can be obtained from eq. (13).
, we have that gcd(λ 1 ,λ 2 ) must be a divisor ofλ 2 −λ 1 = 2 (d 2 − d 1 ). In the limit of large k/ we can therefore increase the dimension of all operators with the same form as O 1 arbitrarily, so that their insertions can be neglected.
On the other hand ∆(O 2 ) ≥ 9 if O 2 is a local operator, so that even in the case in which ∆(O 1 ) > 9 and it can be obtained as a nonlocal composite operator built as the product of local operators O 2 , its effective dimension is bounded by which can again be made arbitrarily large by appropriately choosing k/ .
As a consequence, it is always possible to find charge assignments such that the leading PQviolating effects are associated to local operators of the form (57), with classical dimension ∆ s . In particular, all the n f = 2 models classified in Tab. 2 admit charge assignments with the maximal level of protection, ∆P Q = ∆ maẍ P Q .

Models with n f = 3 and beyond
For considerations related to PQ violating operators it is convenient to use the parametrisation of eq. (37) for the U (1) charges, in the case where n f > 2. For this reason, we shall first provide a unified treatment, and later specialise to the particular case n f = 3. In this section we set again ν ≡ n f for notational convenience. Following this approach, eq. (54) can be written as supplemented by the constraint We remind the reader that the parameters describing the solutions (37) are given by the set ..,ν−1 plus the additional variable ν , which does not appear in the two equations above. The solutions with i = −m i correspond to vectorlike charge assignments, and we shall henceforth assume i + m i = 0.
Substituting the constraint (64) into (63), one is left with an expression only in terms of the independent parameters { i , m i } i=1,...,ν−2 . The case ν = n f = 3 gives a linear Diophantine equation in the three integer variables κ i and this can be easily solved once a choice of representations has been specified. It is given by This shows in particular that at the level of single insertion, the existence of PQ violating operators and their leading dimension is determined only by the choice of G SM representations and does not depend on the specific assignments of U(1) charges. This feature is true also for the n f = 2 models of the previous section, and was also noticed a posteriori in the numerical scan of PQ violating operators performed in [29] for selected n f = 3 models.
In general, defining E = gcd(D 23 , D 31 ), and given an explicit solution (x 0 , y 0 ) to the equation which can always be found through Euclid's algorithm, the general solution to eq. (66) is: with h 1 , h 2 ∈ Z arbitrary integers. Moreover, an obvious solution to eq. (66) is (κ 1 , κ 2 , κ 3 ) = (d 1 , d 2 , d 3 ), which allows one to extract the upper bound This is however hardly saturated in practice, as one can usually find solutions with smaller κ i 's.  Table 3: Classification of composite axion models with n f = 3 and irreducible representations, reproduced from [29]. The dimension d i of the representation r i can be read from the symbol corresponding to the irreducible representation. We report the values of the coefficients D ij defined in eq. (17). The last column reports the dimension of the leading single insertion PQ violating operator, as confirmed from our analysis. For the charge assignments specified by parameters satisfying eq. (85), multiple insertions are negligible and ∆P Q = ∆ maẍ P Q .
For ν = n f > 3, it is always possible to find an assignment of the { i , m i } such that, for any choice of the κ i within a finite set, eq. (65) can only be satisfied if it vanishes term by term, i.e.
To do so, one starts by fixing a desired level of protection ∆ * that is required at the level of single insertions, and correspondingly chooses the κ i to be lying within the set A suitable choice of the { i , m i } can then be constructed as follows. Starting from arbitrary values of ( 1 , m 1 ), the elements { i , m i } i=1...ν−2 should be chosen to satisfy which is well defined for any value of ∆ * since the right-hand side is a bounded quantity (the denominator is a nonvanishing integer) and the set K is finite. Working in reverse, it is now easy to see that all the J i 's in (71) must vanish if eq. (65) is to be satisfied, starting from i = ν − 2 and proceeding in descending order up to i = 1.
With a few algebraic manipulations, the equations in (71) can be turned into the system The first equation coincides with (66) after a relabeling, and is therefore solved by where E ν = gcd(D ν ν−1 , D ν1 ) and, as before, (x 0 , y 0 ) is a particular solution of The remaining ν − 3 variables can be extracted from the corresponding equations as Analogously to the case n f = 2, one can then define a maximum level of protection where the minimization is restricted to the {κ i } taking values in (75) and (77). For n f = 3, this coincides with the ∆ maẍ P Q of [29], corresponding to the operators discussed in the previous paragraph. Setting ∆ * = ∆ maẍ P Q in eq.(72), we have then shown that there exist charge assignments for which all single insertions have a dimension ∆ s ≥ ∆ maẍ P Q . A complete analysis of the effects due to multiple insertions would probably require a numerical, brute-force approach to implement G SM gauge invariance, as performed in [29] for a specific choice of representations. However, we shall show that there always exist values of the { i , m i } (and hence of the U(1) charges) for which the effect of multiple insertions is subdominant with respect to that of single insertions, so that ∆P Q = ∆ maẍ P Q can be obtained even for the models with general n f . In particular, this applies to the n f = 3 models listed in Table 3. The statement can be shown by proving that for such values of the charges it is not possible to write down any local, gauge invariant operator with a dimension smaller then those of the form O s = ν i=1 (ψ i χ i ) κ i . It then follows from (53) that any multiple insertion will have an effective dimension of ∆ eff ≥ N (∆ maẍ P Q − 4) + 4 ≥ ∆ maẍ P Q .
The fermion content of a generic operator can be written as O ε = ν i=1 ψ κ i +ε i i χ κ i i , where gauge invariance under G for arbitrary gauge group G imposes the constraint ν i=1 ε i = 0, and we do not impose invariance under G SM . Generalising (54), the requirement of neutrality under U(1) can be stated as Thus, the lowest dimension they can attain is given by where the minimum is evaluated over all values of {κ i , ε i } satisfying (80). Of course ∆ ε ≤ ∆ maẍ P Q , corresponding to the case where ε i = 0 for all i. Using the fact that ν i=1 ε i = 0, eq. (80) can be turned into (assuming A 1 = 0) the first term can be recognised as the one corresponding to single insertions. We now wish to prove the existence of suitable charge assignments, for which no solutions to eq. (82) can realize ∆ ε < ∆ maẍ P Q . The strategy is to choose values of the { i , m i } such that eq. (82) must be satisfied term by term (with a similar procedure to the one used for single insertions): and such that there are no solutions to (83) with ∆ ε < ∆ maẍ P Q . They are defined as those belonging to the set K ε (∆ maẍ P Q ) = κ i , ε i ∈ Z, with To ensure the latter condition is satisfied, one starts by choosing the { i } in such a way that the elements of K ε (∆ maẍ P Q ) can never solve the independent equations in (83) simultaneously. This can always be done by taking the i to be large enough, for instance j+1 > | j i=1 ε i i | for any ε i ∈ K ε (∆ maẍ P Q ). 11 This implies eq. (83) can be satisfied only if the ε i vanish one by one starting from i = ν, a solution which does not belong to K ε (∆ maẍ P Q ). On the other hand, the {m i } i=1...ν−2 can be chosen in succession so that they satisfy 12 11 The set K ε (∆ maẍ P Q ) is finite, so this prescription is unambiguous. 12 At this point, m ν−1 will be univocally determined by the constraint (64).
in such a way that, in analogy to what was argued previously for eq. (73), any solution of (82) with κ i , ε i ∈ K ε (∆ maẍ P Q ) requires all terms J i (κ) to vanish individually, implying (83). By construction, the solutions of (83) cannot belong to K ε (∆ maẍ P Q ), and one concludes that there cannot be gauge invariant, local operators with a dimension smaller than ∆ maẍ P Q (corresponding to the already identified single insertion). 13 Notice that eq. (85) automatically implies (73), so that single and multiple insertions can be accounted for simultaneously, and the charge assignments now specified indeed have ∆P Q = ∆ maẍ P Q . In particular, all the models of Tab. 3 admit charge assignments with the maximum level of protection.
Case 3: a · b < 0, no solution G SM = SU (5), r 1 = 10, r 2 = 5, One can check numerically that there are no integer solutions in the domain defined by (28), so that the only one is the trivial one.