Twisted Circle Compactifications of 6d SCFTs

We study 6d superconformal field theories (SCFTs) compactified on a circle with arbitrary twists. The theories obtained after compactification, often referred to as 5d Kaluza-Klein (KK) theories, can be viewed as starting points for RG flows to 5d SCFTs. According to a conjecture, all 5d SCFTs can be obtained in this fashion. We compute the Coulomb branch prepotential for all 5d KK theories obtainable in this manner and associate to these theories a smooth local genus one fibered Calabi-Yau threefold in which is encoded information about all possible RG flows to 5d SCFTs. These Calabi-Yau threefolds provide hitherto unknown M-theory duals of F-theory configurations compactified on a circle with twists. For certain exceptional KK theories that do not admit a standard geometric description we propose an algebraic description that appears to retain the properties of the local Calabi-Yau threefolds necessary to determine RG flows to 5d SCFTs, along with other relevant physical data.


Introduction
Recently, there has been a resurgence of interest in the problem of classifying 5d superconformal field theories (SCFTs), with a particular emphasis on exploring the relationship between 5d UV fixed points and 6d UV fixed points [1][2][3][4][5][6][7][8][9][10][11]. The motivation for studying this relationship is the observation that all known 5d SCFTs can be organized into families of theories (connected to one another by RG flows) whose "progenitors" are 6d SCFTs compactified on a circle [1,2], and hence every 6d SCFT compactified on a circle provides a natural starting point for the systematic identification of a large family of 5d SCFTs.
While it has been appreciated in the literature for some time that circle compactifications of 6d SCFTs can flow to 5d SCFTs, only recently has the existence of a 6d UV fixed point been understood in an intrinsically 5d setting. To understand this point, let us recall that the most widely used method for identifying 5d SCFTs is to construct a candidate effective field theory assumed to be a relevant deformation of a 5d UV fixed point, and to verify the effective theory passes a number of consistency checks which are believed to be sufficient to guarantee the existence of a such a non-trivial UV fixed point. This method, which has been used to construct numerous examples of UV complete minimally supersymmetric 5d QFTs-both by means of standard gauge theoretic methods [1,12,13], as well as string theory constructions such as (p, q) 5-brane configurations in type IIB string theory [14][15][16][17][18][19][20] and M-theory compactifications on local Calabi-Yau threefolds [2,[21][22][23]-has also led to the identification of numerous examples of theories that despite not satisfying the criteria necessary for the existence of a non-trivial 5d UV completion, nonetheless exhibit certain features that suggest they can be UV completed in 6d. All known examples of such theories are characterized by the emergence of an intrinsic length scale that is interpreted as the size of a compactification circle, and it has been argued that each of these theories is a circle compactification of a 6d SCFT possibly twisted by the action of a discrete global symmetry 1 ; see for example [2-4, 18, 24-28]. These observations have led to the identification of a set of criteria believed sufficient to imply the existence of a 6d UV completion for certain 5d theories, and this introduces the possibility of also classifying circle compactifications of 6d SCFTs using 5d physics.
It was recently conjectured [2] that all 5d SCFTs can be obtained via RG flows starting from 5d Kaluza-Klein (KK) theories. The latter are defined as 6d SCFTs compactified on a circle (of finite radius) possibly with discrete twists around the circle. Given a 5d KK theory, the RG flows of interest correspond to integrating out BPS particles from the 5d KK theory-thus, if the full BPS spectrum is known then according to the conjecture of [2] it is possible to classify all 5d SCFTs by systematically studying all possible RG flows from the 5d KK theory.
In this paper, we focus on the geometric approach in which one realizes a 5d KK theory via a compactification of M-theory on a genus one fibered Calabi-Yau threefold. The set of holomorphic curves in the threefold completely encode the information about the spectrum of BPS particles required to track all RG flows down to 5d SCFTs. Therefore, a precursor to classifying RG flows from 5d KK theories to 5d SCFTs is to geometrically classify all 5d KK theories themselves in terms of Calabi-Yau threefolds. See [10] (also [2]) for explicit application of this geometric procedure to the classification of 5d SCFTs upto rank three.
It is believed that all 6d SCFTs can be constructed by compactifying F-theory on singular elliptically fibered Calabi-Yau threefolds admitting certain singular limits characterized by the contraction of holomorphic curves in the base of the fibration.
Here we should distinguish between two different kinds of compactifications of F-theory depending on whether or not they contain O7 + plane from the point of view of type IIB string theory. If there is no O7 + , then the compactification is said to lie in the unfrozen phase of F-theory; otherwise it is said to lie in the frozen phase [29][30][31] of F-theory. These two phases are qualitatively different in the following sense: The rules for converting geometry in the unfrozen phase to the corresponding 6d physics are far more straightforward than the rules for converting geometry in the frozen phase to the corresponding 6d physics [32]. See [33,34] (see also [35]) for the classification of 6d SCFTs arising from the unfrozen phase of F-theory, and [36] for the classification of 6d SCFTs arising from the frozen phase of F-theory.
A 5d KK theory corresponding to the untwisted compactification of a 6d SCFT arising in the unfrozen phase can be constructed by compactifying M-theory on a Calabi-Yau threefold which is a resolution of the Calabi-Yau threefold arising in the F-theory construction. This fact is a special case of the duality between M-theory and (unfrozen phase of) F-theory compactified on a circle (without any twist). Explicit resolution of all Calabi-Yau threefolds associated to 6d SCFTs was performed by [3,4], and hence the Calabi-Yau threefolds associated to corresponding 5d KK theories was determined. These threefolds are elliptically fibered since the threefolds associated to 6d SCFTs are elliptically fibered to begin with.
In this paper, we extend the work of [3,4] and determine a resolved local Calabi-Yau threefold describing every 5d KK theory, with the exception of certain examples which do not appear to admit a conventional geometric description 2 . Not only do we include twisted compactifications of 6d SCFTs arising in the unfrozen phase, but also the untwisted and twisted compactifications of 6d SCFTs arising in the frozen phase. We find that these Calabi-Yau threefolds are in general only genus one fibered and may not be elliptically fibered, which means that the fibration may not admit a zero section.
Our analysis can be divided into two parts. In the first part of the analysis, which is purely field theoretic, we determine the prepotential for each 5d KK theory by using the following observations: Each 6d SCFT admits a 6d gauge theory description which can be reduced on a circle with an appropriate twist to obtain a canonical 5d gauge theory description of the associated 5d KK theory. The Green-Schwarz term in 6d reduces to a Chern-Simons term in the 5d gauge theory, which induces a tree-level contribution to the prepotential. Combining this contribution with the one-loop contribution coming from the 5d gauge theory produces the full prepotential for the 5d KK theory. In the second part of the analysis, we interpret the prepotential as describing the triple intersection numbers of 4-cycles inside a yet to be determined Calabi-Yau threefold. Using the data of these triple intersection numbers, along with some other consistency conditions, we are able to determine a description of the Calabi-Yau threefold as a neighborhood of intersecting Kähler surfaces along the lines of the discussion in [2][3][4], and we verify that each threefold admits the structure of genus one fibration 3 . By construction, compactifying M-theory on this Calabi-Yau threefold leads to the 5d KK theory whose prepotential we computed in the first part of the analysis.
One can view these Calabi-Yau threefolds as providing hitherto unknown M-theory duals of general unfrozen and frozen F-theory configurations compactified on a circle possibly with a discrete twist. Even though we have provided explicit results only for F-theory configurations realizing 6d SCFTs, our methods should in principle apply to any general F-theory configuration.
Notice that at no step in our analysis do we distinguish between 6d SCFTs arising from the unfrozen phase and 6d SCFTs arising from the frozen phase. Thus, according to our analysis, the rules for converting geometry into the corresponding 5d physics are uniform irrespective of whether the 5d KK theory arises from the compactification of a 6d SCFT lying in the frozen or the unfrozen phase. In other words, the frozen and unfrozen six-dimensional compactifications of F-theory are given a unified geometric description 4 in M-theory.
We close the introduction with a brief overview of the structure of Calabi-Yau threefolds that we associate to 5d KK theories. By construction, the structure of these threefolds descends from the structure of 6d SCFTs. Recall that an important object characterizing a 6d SCFT is the matrix of Dirac pairings of "fundamental" BPS strings visible on the tensor branch of the 6d SCFT. The matrix of Dirac pairings is a symmetric, positive definite, integer matrix with positive entries on the diagonal and non-positive off-diagonal entries. Thus, the Dirac pairing matrix is analogous to the Cartan matrix of a simply laced Lie algebra, and we can associate to this matrix a graph analogous to a Dynkin graph for a simply laced Lie algebra.
As discussed in more detail later in the paper, the matrix of Dirac pairings descends to a matrix of Chern-Simons terms in the canonical gauge theory associated to the 5d KK theory, where the precise map between the two matrices depends on the choice of twist. We find that 5d KK theories end up organizing themselves according to this matrix of Chern-Simons terms. Like the matrix of Dirac pairings, the matrix of Chern-Simons terms is in general a positive definite, integer matrix with positive entries on the diagonal and non-positive off-diagonal entries, where off-diagonal entries can only be zero if their transposes are also zero. But, unlike the matrix of Dirac pairings, the matrix of Chern-Simons terms is not necessarily a symmetric matrix. Thus, the matrix of Chern-Simons couplings is analogous to the Cartan matrix of a general (simply or non-simply laced) Lie algebra, and we associate to it a graph analogous to a Dynkin graph for a general Lie algebra.
In this way, 5d KK theories are characterized by graphs that generalize Dynkin graphs. The associated Calabi-Yau geometry is assembled according to the structure of this graph: • To each node in the graph, we associate a collection of Hirzebruch surfaces intersecting with each other. In fact, we associate a family of such collections parametrized by an integer ν, where the collections labeled by different values of ν are related to one another by flop transitions. A key point is that a certain linear combination of the P 1 fibers of these Hirzebruch surfaces has genus one, and an appropriate multiple of the genus one fiber is identified physically with the KK mode of momentum one around the circle.
• To a pair of nodes connected to each other by some edges, we associate certain gluing 5 rules. These gluing rules describe how to glue the collection of surfaces associated to a node to the collection of surfaces associated to another node. These gluing rules capture the data of intersections between the two collections of surfaces. In general, the gluing rules provided in this paper work only for a subset of the values of ν parametrizing the two collections of surfaces being glued together. Our claim is that given a 5d KK theory, we can always find at least one value of ν for each node in the associated graph such that the gluing rules for each edge work.
By applying these gluing rules, it can be checked that a multiple of the genus one fiber in one collection of surfaces is glued to a multiple of the genus fiber in the other collection of surfaces. These multiples are such that the KK mode associated to one collection is identified with the KK mode associated to the other 5 When two Kähler surfaces intersect transversely along a common holomorphic curve inside of a Calabi-Yau threefold, the intersection implies that a holomorphic curve inside one of the two surfaces is identified with a holomorphic curve inside of the other surface. We refer to this identification as a gluing together of the two surfaces.
collection. This must be so since there is only a single KK mode associated to the full KK theory and the genus one fibers inside each collection are merely different geometric manifestations of the same mode.
• Once we are done gluing all the collections of surfaces according to the gluing rules associated to each edge, we obtain a larger collection of surfaces intersecting with each other. The Calabi-Yau threefold associated to the KK theory is by definition a local neighborhood of this larger collection of surfaces. As we have described above, this Calabi-Yau threefold is canonically genus one fibered.
The rest of the paper is organized as follows. In Section 2, we review how all 6d SCFTs can be neatly encapsulated in terms of graphs that capture the data of the tensor branch of the corresponding 6d SCFTs. We list all the possible vertices and edges appearing in such graphs. Our presentation treats unfrozen and frozen cases on an equal footing. Another distinguishing feature of our presentation is that we carefully distinguish different theories having the same gauge algebra content and same Dirac pairing. This includes the theta angle for sp(n), different distributions of hypers between the spinor and cospinor representations of so (12), as well as some frozen cases.
In Section 3, we study all the possible twists of 6d SCFTs once they are compactified on a circle. Each twist leads to a different 5d KK theory. The different twists of a 6d SCFT T are characterized by equivalence classes in the group of discrete global symmetries of T. We show that these equivalence classes can be described by foldings of the graphs Σ T associated to T along with choice of an outer automorphism for each gauge algebra appearing in the low energy theory on the tensor branch of T. Thus, different 5d KK theories are also classified by graphs that generalize the graphs classifying 6d SCFTs. We provide a list of all the possible vertices and edges that can appear in the graphs associated to 5d KK theories.
In Section 4, we provide a prescription to obtain the prepotential of any 5d KK theory. This is done by compactifying the low energy gauge theory appearing on the tensor branch of the corresponding 6d SCFT on a circle with the corresponding twist. This leads to a 5d gauge theory whose prepotential, along with a shift, is identified as the prepotential for the 5d KK theory.
In Section 5, we associate a genus-one fibered Calabi-Yau threefold to each 5d KK theory, except for a few exceptional cases, for which we provide an algebraic description mimicking the essential properties of genus one fibered Calabi-Yau threefolds. The chief ingredient in the determination of the threefold is the prepotential determined in Section 4. The prepotential captures the data of the triple intersection numbers of surfaces inside the threefold. Once a description of the threefold as a local neighborhood of a collection of surfaces glued to each other is presented, these triple intersections can be computed in a multitude of different ways. Demanding all of these different computations to give the same result leads to strong consistency constraints on such a description and often uniquely fixes the description (up to isomorphisms). Other consistency conditions playing a crucial role are also discussed in Section 5.1. The description of the geometry is provided in two different steps according to the structure of the graph associated to the 5d KK theory under study. First, a part of the geometry is assigned to each vertex in the graph according to results presented in Section 5.2. Then, depending on the configuration of edges in the graph, different parts of the geometry corresponding to different vertices in the graph are glued to each other via the gluing rules presented in Sections 5.3 and 5.4.
In Section 6, we present our conclusions. In Appendix A, we review some geometric background relevant for this paper. In Appendix B, we address certain exceptional examples of geometries and gluing rules that do not admit a straightforward analysis following the main methods described in this paper. In Appendix C, we provide a concrete and non-trivial check of our proposal for computing the prepotential and geometries associated to 5d KK theories. We demonstrate that a 5d KK theory arising from a non-trivial twist (involving a permutation of tensor multiplets) of a 6d SCFT has a 5d gauge theory description found in earlier studies by using brane constructions. In Appendix D, we provide some more checks of our proposal. Finally, in Appendix E we provide instructions for using the Mathematica notebook submitted as an ancillary file along with this paper. The Mathematica notebook allows one to compute the prepotential for 5d KK theories involving one or two nodes. Combining these results, one can obtain the prepotential for any 5d KK theory. The notebook also converts the prepotential into triple intersection numbers for the associated geometry and displays these intersection numbers in a graphical form.

Structure of 6d SCFTs
In this section, we review the fact that 6d SCFTs are characterized by graphs that are analogous to Dynkin graphs associated to simply laced Lie algebras. In the next section, we will show that 5d KK theories are also characterized by similar graphs that are instead analogous to Dynkin graphs associated to general (i.e. both simply laced and non-simply laced) Lie algebras.
The low-energy theory on the tensor branch of a 6d SCFT T can be organized in terms of tensor multiplets B i . There is a gauge algebra g i associated to each i where g i can either be a simple or a trivial algebra. Each tensor multiplet B i is also associated to a "fundamental" BPS string excitation S i such that the charge of S i under B j is the  Table 1. List of all the possible nodes with non-trivial g i appearing in graphs associated to 6d SCFTs. A hat or a tilde distinguishes different nodes having same values of Ω ii and g i .  Table 2. List of all the possible nodes with trivial g i that can appear in graphs associated to 6d SCFTs. If Ω ii = 2, we refer to the trivial gauge algebra as su(1) and if Ω ii = 1, we refer to the trivial gauge algebra as sp(0). In the latter case, sometimes a Z 2 valued theta angle is physically relevant. We also list the flavor symmetry algebra f for each case. The sum of gauge algebras neighboring each such node must be contained inside the corresponding f.
Kronecker delta δ i j . The Dirac pairing Ω ij between S i and S j appears in the Green-Schwarz term in the Lagrangian where F j is the field strength for g j if g j is simple and F j = 0 if g j is trivial.
[Ω ij ] is a symmetric, positive definite matrix with all of its entries valued in integers. Thus, it is analogous to the Cartan matrix for a simply laced Lie algebra. The only possible values for off-diagonal entries are Ω ij = 0, −1, −2. We note that Ω ij = −2 is only possible for 6d SCFTs arising from the frozen phase of F-theory [32,36].
We can thus display the data of a 6d SCFT in terms of an associated graph Σ T that is constructed as follows: • Nodes: For each tensor multiplet B i , we place a node i with value Ω ii g i . All such possibilities are listed in Table 1 when g i is non-trivial, and in Table 2 when g i is trivial. In the former case, each node contributes hypers charged under a representation R i of g i where R i is shown in Table 1. In the latter case, for the node with g i = sp(0), an important role is played by the adjoint representation of e 8 , which is formed by the BPS string excitations associated to this node.
We note that the node 1 su( n) only arises in the frozen phase of F-theory.
In the case of Ω ii = 1 and g i = sp(n), there is a possibility of a Z 2 valued 6d theta angle which is physically relevant (in the context of 6d SCFTs) only when the 2n + 8 hypers in fundamental are gauged by a neighboring su(2n + 8) gauge algebra. For g i = sp(0), the theta angle is physically relevant (in the context of Ω ii g i Ω jj g j Comments Mixed hyper content 1 sp(n i ) 2 su(n j ) n i ≤ n j ; n j ≤ 2n i + 7 6d SCFTs) only if there is a neighboring su(8) gauge algebra [38]. This can be understood in terms of two different embeddings of su(8) into e 8 (both having embedding index one), so that the adjoint of e 8 decomposes differently in the two cases, leading to different spectrum of string excitations.
In the case of Ω ii = 1 and g i = su (6), there are two possible choices of matter content. We distinguish the non-standard choice of matter content by denoting the corresponding g i as su (6).  Table 6. List of all the possibilities for multiple neighbors of sp(0).
In the case of g i = so (12), the two spinor representations S and C are not conjugate to each other but have same contributions to the anomaly polynomial. The total number of hypers in the two spinor representations is fixed by the value of Ω ii . But since the two spinor representations are not conjugate, the relative distribution of hypers between the two makes a difference. For Ω ii = 1, 2, we can obtain two inequivalent theories in this way (note that the existence of two inequivalent theories with so(12) gauge symmetry was pointed out in [11].) The version containing both S and C is distinguished from the one contataining only S by denoting its g i as so ( 12).
• Edges: Consider two nodes i and j whose values are Ω ii g i and Ω jj g j respectively. We place −Ω ij number of edges between i and j. For instance, if Ω ij = −1, then we display this as and, if Ω ij = −2, then we display this as There are no edges between nodes i and j if Ω ij = 0. All the possible edges are listed in Table 3 when both g i and g j are non-trivial, in Table 4 when only one of g i and g j is non-trivial, and in Table 5 when both g i and g j are trivial.
Each edge corresponds to a hyper transforming in a mixed representation R ij = R ij,i ⊗ R ij,j of g i ⊕ g j where R ij,i is a representation of g i and R ij,j is a representation of g j . The possible R ij are shown in the third column of Table 3. Note that we must have In the case of Ω ii = 1, g i = sp(n i ), Ω jj = k, g j = so (7,8) and Ω ij = −1, there are two possible mixed representations 1 2 (F ⊗ F) or 1 2 (F ⊗ S). We distinguish the case 1 2 (F ⊗ S) by denoting the corresponding edge as a dashed line. Notice that when g j = so (8), the dashed edge is only physically relevant when it is a part of a configuration of form Otherwise, the dashed edge can be converted to the non-dashed edge by applying an outer-automorphism of so(8).
• Multiple neighbors of sp(0): Consider a node i with value 1 . Related to the fact that the flavor symmetry algebra associated to this node is e 8 , it can be shown that its neighbors must satisfy ⊕ j g j ⊆ e 8 where only those j are included in the sum for which Ω ij = −1. In fact all such subalgebras are realized except 6 for so(13) ⊕ su(2).
In the context of 6d SCFTs, it is not possible for sp(0) to have more than two neighbors. We collect all the possibilities for multiple neighbors of sp(0) in Table  6.
Notice that the relationship between Σ T and [Ω ij ] is analogous to the relationship between Dynkin graph and Cartan matrix of a simply laced Lie algebra.
3 Structure of 5d KK theories

Twists
Consider a QFT T that admits a discrete global symmetry group Γ. When we compactify T on a circle, we have the option of "twisting" T around the circle. This means that we introduce a holonomy γ ∈ Γ for the background gauge field corresponding to Γ. Note that the number of distinct twists is not given by the number of elements in Γ, but rather by the number of conjugacy classes in Γ. This is because two holonomies that are conjugate in Γ are physically equivalent and thus lead to the same twist.
In this section, we will explore all the possible twists for 6d SCFTs. Each twist leads to a different 5d KK theory.

Discrete symmetries from outer automorphisms
A general discrete symmetry of a 6d SCFT T is generated by combining two kinds of basic discrete symmetries. We start by discussing the first kind of basic discrete symmetries. These arise from outer automorphisms of gauge algebras g i . su(n) for n ≥ 3, so(2m) for m ≥ 4 and e 6 admit an order two outer automorphism that we call O (2) . It exchanges the roots in the following fashion · · · · · · su(2n), O (2) : special maximal subalgebra and then embedding so(16) into e 8 as a regular maximal subalgebra. The embedding index of the su(2) factor under this embedding is two rather than one, thus so(13) ⊕ su(2) cannot be realized as a neighbor of sp(0). The absence of so(13) ⊕ su(2) neighbor was first noticed in [39]. · · · so(2n), O (2) : so(8) also admits an order three outer automorphism which we call O (3) . It cyclically permutes the roots as shown below The full group of outer automorphisms of so(8) is the symmetric group S 3 which can be generated by combining O (2) and O (3) . Note that O (2) and O (3) are not conjugate to each other (since they have different orders) and hence we need to consider both of them.
The above action of an outer automorphism O (q) (for q = 2, 3) on the roots of g translates to an action on the Dynkin coefficients of the weights for representations of g. In other words, the action of O (q) can be viewed as an action on representations of g-see Table 7.
where O (q i ) · R denotes the action of O (q i ) on R. We should keep in mind that a hyper in a representation R is the same as a hyper in representationR. So, R i and R ij,i are only defined up to complex conjugation on constituent irreps. Thus, whenever R ↔R in Table 7, it means that two distinct hypers in R are interchanged with each other under the action of the outer automorphism. Table 7. List of non-trivial outer automorphisms O (q) of g and their actions O (q) · R g on various irreducible representations R g of g. F denotes fundamental representation, Λ n denotes the irreducible n-index antisymmetric representation, S 2 denotes the irreducible 2-index symmetric representation, and S and C denote irreducible spinor and cospinor representations. Bar on top of a representation denotes the complex conjugate of that representation. F of so(2m) is left invariant by the action of O (2) .
As an example consider the 6d theory given by The theory includes 2n hypers in F. The outer automorphism O (2) of su(n) descends to a discrete symmetry of the theory whose action on the hypermultiplets can be manifested as follows. We divide the 2n hypers into two ordered sets such that each set contains n hypers. Then we exchange these two sets with each other.

Discrete symmetries from permutation of tensor multiplets
Now we turn to a discussion of the second kind of basic discrete symmetries. These arise from permutation of tensor multiplets i → S(i) such that for all i, j. This is a symmetry of T if for all i, j.
As an example, consider the 6d theory given by is a symmetry of the theory.
As another example, consider the 6d theory given by The permutation 2 su(n) 2 is a symmetry of the theory. Now, consider a permutation S that is a symmetry of T. We can use the data of S to convert [Ω ij ] into another matrix [Ω αβ S ]. Here α, β etc. parametrize orbits of nodes i under the iterative action of S. To define a particular entry Ω αβ S , we pick a node i lying in the orbit α and let Ω αβ S = j∈β Ω ij (3.12) where the sum is over all nodes j lying in the orbit β. Notice that the resulting matrix [Ω αβ S ] need not be symmetric but must be positive definite. It turns out for S associated to 6d SCFTs that whenever Ω αβ S = Ω βα S , then the smaller of the two entries is −1. Thus, [Ω αβ S ] is analogous to the Cartan matrix for a general (i.e. either simply laced or non-simply laced) Lie algebra.
Let us compute the matrix [Ω αβ S ] for the above example (3.8).
There are three orbits. The third node lies in the first orbit, the second and fourth nodes lie in the second orbit, and the first and fifth nodes lie in the third orbit. Applying our prescription (3.12), we find that Similarly, we can compute the matrix [Ω αβ S ] for the above example (3.10). [ Now, we define a graph Σ S T associated to [Ω αβ S ]: • Nodes: The nodes of Σ S T are in one-to-one correspondence with the set of orbits α. The value of node α is Ω ii g i where i is a node of Σ T lying in the orbit α.
• Edges: Let α = β and let Ω αβ S ≥ Ω βα S . Then we place −Ω αβ S number of edges between nodes α and β. If Ω αβ S = Ω βα S , then the edges are undirected. If Ω αβ S > Ω βα S , then all the edges are directed from α to β.
• Self-edges: Let l α = Ω ii − Ω αα S where i is a node of Σ T lying in the orbit α. Then, we introduce l α edges such that the source and target of each edge is the same node α.

Σ S
T can be understood as a folding 7 of Σ T by the action of S. Observe that the relationship between Σ S T and [Ω αβ S ] is analogous to the relationship between the Dynkin graph and Cartan matrix for a general (i.e. either simply laced or non-simply laced) Lie algebra. We note that, starting from the data of Σ S T , we can only reconstruct S up to conjugation. But this is enough to keep track of the twist associated to S. Thus, throughout this paper, we will specify twists via folded graphs Σ S T and will not refer to an explicit S inducing the folding.

General discrete symmetries
We now discuss twists associated to general discrete symmetries that combine the basic discrete symmetries discussed in Sections 3.2 and 3.3. That is, we consider actions of the form where S is a permutation of the tensor multiplets and O (q i ) is an outer automorphism of order q i of gauge algebra g i , where each q i ∈ {1, 2, 3} and q i = 1 denotes the identity automorphism. (3.15) is a symmetry of the 6d theory T only if (3.17) and As in Section 3.3, we associate the matrix [Ω αβ S ] to the twist generated by the action of (3.15).
As an example, consider the 6d SCFT Suppose we want to perform the outer-automorphism O (2) for the middle su(n) node. Recall from the discussion around (3.3) that the outer automorphism of su(n) exchanges the fundamental hypers in pairs. However, the graph in (3.20) indicates that the fundamental hypers of the middle su(n) algebra are part of bifundamental representations formed by taking the tensor product with the fundamental representations of the neighboring su(m) algebras. Therefore, if we want O (2) to be a symmetry of the theory, we must permute the two neighboring su(m) as well. Thus, O (2) by itself is not a symmetry of the theory, but its combination with the permutation 2 su(n) 2 is a symmetry of the theory. Thus, we see that in general it is not possible to decompose a general symmetry of the form (3.15) into more basic symmetries discussed earlier.
As another illustrative example, consider Consider sending the left so(2m) to the right so(2m) with an outer automorphism O (2) , and sending the right so(2m) to the left so(2m) without any outer automorphism. We can represent this action as This action is a symmetry of the theory and is represented as in the notation of (3.15). Here we have labeled the nodes as 1, 2, 3 from left to right and the subscript of O denotes the node it is acting at. We can also consider the action which is also a symmetry of the theory and is represented as in the notation of (3.15). Now, let g α = g i and Ω αα = Ω ii where i is a node of Σ T lying in the orbit α of S. Then O (q i ) can be viewed as an outer automorphism of g α . Let us define an outer where each O (q i ) on the right hand side is viewed as an outer automorphism of g α and the O (q i ) for all i lying in the orbit α are then multiplied with each other to produce the outer automorphism O (qα) of g α . Notice that we have chosen some ordering of various i while evaluating the product i∈α O (q i ) .
su(n) (1) n ≥ 1; non-geometric Table 8. List of all the new nodes that can appear in graphs associated to 5d KK theories. We also list all the possibilities where an edge starts and ends on the same node. The comment "non-geometric" for the last entry refers to the fact that there is no completely geometric description of this node. See also a node appearing in Table 1. If a KK theory involves either of these two kinds of nodes, then it does not admit a conventional geometric description.
Similarly, for (3.23), Σ   3   Table 11. List of all the possible directed edges involving at least one non-gauge-theoretic node that can appear in graphs characterizing 5d KK theories.
which does not involve any outer automorphisms. Thus, according to our claim, (3.25) and 3.31) must be in the same conjugacy class. Let us demonstrate it explicitly. Con- • First of all, the nodes listed in Tables 1 and 2 are all allowed. We simply write each gauge algebra g appearing in Table 1 as g (1) .
• Similarly, the edges appearing in Tables 3, 4 and 5 are all allowed with each gauge algebra being written as g (1) .
• The new nodes that can appear in graphs associated to 5d KK theories but do not appear in graphs associated to 6d SCFTs are listed in Table 8.
• The new undirected edges appearing for graphs associated to 5d KK theories are listed in Table 9.
The configuration 1 sp(n α ) (1) k so(n β ) (2) (3.36) for n β = 4n α + 16 and n α ≥ 0 is not allowed since the choice of theta angle for sp(n α ) in the associated 6d theory is correlated to the choice of a spinor representation of the neighboring so(4n α + 16). Thus, the outer automorphism O (2) of so(4n α + 16) is not a symmetry of the theory 8 .
• The directed edges between two nodes both carrying a non-trivial gauge algebra are listed in Table 10.
For similar reasons, the configuration with 3n β = 4n α + 16 is not allowed. • Other kinds of directed edges are listed in Table 11.
Due to similar reasons as explained above, the configuration 1 sp(0) (1) k is not allowed.
• There are various kinds of possibilities for multiple neighbors of sp(0) (1) . All of the possibilities listed in Table 6 are allowed with the substitution of g (1) in place of every trivial or non-trivial algebra g appearing in that table. New possibilities involving undirected edges are listed in Table 12. These are obtained by performing outer automorphisms on the possibilities listed in Table 6. However, some of the outer automorphisms do not yield a symmetry of the the theory. is an allowed KK theory since the combined outer automorphism of su(3) and e 6 is indeed a symmetry of the decomposition (3.42). Correspondingly, neither (3.43) nor (3.44) appears in the Table 12, while (3.45) does appear in Table 12.
Similarly, the reader can check that the following configurations do not give rise to allowed KK theories: for q = 1, 3. However, q = 2 is allowed.
for (p, q) equal to (1, 2) and (2, 1). However, (1, 1) and (2, 2) are allowed.    k so(7) (1) 1 • It is not possible for sp(0) (1) to have multiple neighbors when one of the neighbors is connected to it by a directed edge going outwards from sp(0) (1) . This is simply a consequence of the fact that sp(0) cannot have three neighbors in the context of 6d SCFTs.
However, it is possible for sp(0) (1) to have multiple neighbors with some neighbors having directed edges pointing inwards towards sp(0) (1) . These possibilities can be simply obtained by replacing one or more undirected edges appearing in Tables  6 and 12 by suitable directed edges (pointing inwards) taken from Table 11. One has to ensure that the matrix associated to the resulting configuration is positive definite, which disallows some substitutions. We do not pursue a full classification of such cases since they won't be useful in this paper. Later on, in Section 5.4.4, we will provide a general prescription to obtain the gluing rules associated to such directed edges from the gluing rules associated to their "parent" undirected edges.

Prepotential for 5d KK theories
The goal of this section is to propose a formula for the prepotential of a 5d KK theory T KK S,{qα} starting from the tensor branch description of the corresponding 6d SCFT T. Compactify a 6d SCFT T on a circle with a twist S, {q α } around the circle. Let us analyze the low energy theory. Every node α in Σ S,{qα} T gives rise to a low energy 5d gauge algebra h α = g α /O (qα) which is the subalgebra of g α left invariant by the action of outer automorphism O (qα) . In this paper, our choice of outer automorphisms is such that the invariant subalgebras are those listed in Table 13. For each node α, we obtain an additional u(1) α gauge algebra in the low energy 5d theory coming from the reduction of a tensor multiplet B i on the circle where i lies in the orbit α. Now we determine the spectrum of hypermultiplets charged under ⊕ α h α under the low energy 5d theory. First of all, for every node i in 6d theory, we define

Prepotential
. Recall that T i ⊆ R i and hence the 6d theory contains hypermultiplets charged under representation S i of g i where S i is defined such that S i ⊕ T i = R i . S i is the representation formed by those hypers that are only charged g i and not under any other gauge algebra g j with j = i.
As detailed in Table 13, irreducible representations R gα of g α can be viewed as irreducible representations of R hα . We can thus view hypers transforming in representation S i of g i as transforming in a representation of h α . Let us denote this representation of h α byS α . The outer automorphism O (qα) then permutes constituent irreps insidẽ S α and thus acts onS α as an automorphism. The low energy 5d theory then contains hypers transforming in the representation These hypers are only charged under h α and not under any other gauge algebra h β with β = α. Now consider other hypermultiplets that are charged under multiple gauge algebras in the 6d theory. These descend to hypermultiplets charged under multiple gauge algebras in the low energy 5d theory plus some hypers only charged under the individual algebras. Consider the mixed representation R ij = R ij,i ⊗ R ij,j of g i ⊕ g j in the 6d theory. Let i and j lie in orbits α and β respectively. Let R ij,i decompose as R αβ,α ⊕ n αβ,α 1 when viewed as a representation of h α , where R αβ,α is the full subrepresentation that is charged non-trivially under h α . Similarly, let R ij,j decompose as R αβ,β ⊕ n αβ,β 1 when viewed as a representation of h β , where R αβ,β is the full subrepresentation that is charged non-trivially under h β . Then, under the twist, R ij descends to a mixed representation R αβ of h α ⊕h β plus representations S αβ,α and S αβ,β of h α and h β respectively. Here R αβ = R αβ,α ⊗ R αβ,β , S αβ,α = n αβ,β R αβ,α , and S αβ,β = n αβ,α R αβ,β .
In addition to the above, we also obtain hypers in the symmetric product Sym 2 (R ij,i ) for all j = i such that both j and i are in the same orbit α. Thus, the full representation R α formed by hypers under h α is where Sym 2 (R ij,i )| hα means that we view Sym 2 (R ij,i ) as a representation of h α . Note that in the above expression, i is a fixed node in the orbit α, j cannot equal i, and β cannot equal α. There are no hypers charged under u(1) α . Just as the representations R i and R ij for all i and j determine the full matter content for 6d SCFTs, the representations R α and R αβ for all α and β determine the full matter content for 5d KK theories.
As an example, let us determine the low energy 5d theory for (3.23). The 5d gauge algebra is h = sp(n) ⊕ so(2m − 1). A half-bifundamental of sp(n) ⊕ so(2m) decomposes as a half-bifundamental of sp(n) ⊕ so(2m − 1) plus a half-fundamental of sp(n). Thus, the two half-bifundamentals between the sp(n) and the two so(2m) in (3.23) descend to a half-bifundamental of h plus a half-fundamental of sp(n) in the 5d theory. There are 2m − 8 − n extra fundamentals of the left so(2m) in (3.23) not charged under any other gauge algebra. Similarly, there are 2m − 8 − n extra fundamentals of the right so(2m) in (3.23) not charged under any other gauge algebra. These two sets of fundamentals descend to 2m − 8 − n fundamentals of so(2m − 1) in the 5d theory. We also obtain 2m − 8 − n singlets that decouple and so we ignore them. Finally, there are 2n + 8 − 2m extra fundamentals of sp(n) in (3.23) not charged under any other gauge algebra. These hypers descend to 2n + 8 − 2m extra fundamentals of sp(n) in the low energy 5d theory that are not charged under so(2m − 1). To recap, the low energy 5d theory is an sp(n) ⊕ so(2m − 1) gauge theory with a half-bifundamental plus 4n + 17 − 4m half-fundamentals of sp(n) plus 2m − 8 − n fundamentals of so(2m − 1).
As another example, let us determine the low energy 5d theory for (3.14). The two su(m) get identified to a single su(m) algebra. Similarly, the two su(n) get identified to a single su(n) algebra. Thus the 5d gauge algebra is h = su(n) ⊕ su(m). The bifundamentals of su(m) ⊕ su(n) descend to a single bifundamental of h. The bifundamental of su(n) ⊕ su(n) descends to S 2 of su(n). Furthermore, we obtain n − m extra fundamentals of su(n) and 2m − n extra fundamentals of su(m). Thus, the low energy 5d theory is an su(n) ⊕ su(m) gauge theory with a bifundamental plus (2m − n)F of su(m) plus (n − m)F ⊕ S 2 of su(n).
The low energy 5d gauge theory also contains tree-level Chern-Simons terms that arise from the reduction of (2.1) on the circle. These can be written as where A 0,α is the gauge field corresponding to the u(1) α obtained by reducing B α on the circle and F β is the gauge field strength for h β . In writing (4.3), we have used the fact that the index of h β in g β is one which is true for our choice of h listed in Table 7. (4.3) contributes the following tree-level term to the prepotential where φ 0,α is the scalar living in the vector multiplet corresponding to u(1) α and φ a,β are scalars living in the vector multiplets corresponding to u(1) a,β which parametrize the Cartan of h β . Here K ab β is the Killing form on h β normalized such that its diagonal entries are minimum positive integers while keeping all the other entries integer valued.
Let h = ⊕ α h α be the total gauge algebra visible at low energies. The low energy hypermultiplets form some representation R of h which decomposes into irreducible representations of h as R = ⊕ f R f . Note that it is possible to have f = f such that R f = R f . In other words, the index f distinguishes multiple copies of representation R f . Now we can add the one-loop contribution to the prepotential (4.4) to obtain where r are the roots of h = ⊕ α h α , w(R f ) parametrize weights of R f and m f ∈ R is a mass term for each full 9 hypermultiplet f . The notation w · φ denotes the scalar product of the Dynkin coefficients of the weight w with Coulomb branch parameters. Note that similar approaches for computing prepotentials of 5d theories have appeared in the literature-see for example [40][41][42].
In (4.5) we must impose that mass terms for hypers belonging to S αβ,α and S αβ,β equal the mass term for hypers belonging to R αβ . This is because R αβ , S αβ,α and S αβ,β all descend from the same 6d representation R ij which has only a single u(1) symmetry rotating it. The Wilson lines for this u(1) around the compactification circle gives rise to the mass terms for R αβ , S αβ,α and S αβ,β , and hence all these mass terms must be equal.
We propose that (4.5) is the full exact prepotential for T KK S,{qα} where we have ignored the terms involving the mass parameter 1 R where R is the radius of compactification. We are justified in doing so since these terms do not play any role in this paper. Moreover, only the part of 6F S,{qα} that is cubic in Coulomb branch parameters φ a,α is relevant to the discussion in this paper; so, for convenience, we denote the part of the prepotential cubic in Coulomb branch parameters by 6F φ S,{qα} . Notice that fixing the relative values of φ a,α and m f fixes the signs of the terms inside absolute values in (4.5). As the relative values of φ a,α and m f are changed, the sign of some of the terms in (4.5) changes. This leads to jumps in the coefficients of various terms in the resulting 6F φ S,{qα} . This means that different relative values of φ a,α and m f lead to different phases inside the Coulomb branch of the 5d KK theory.
Let us illustrate through a simple example of the KK theory specified by the graph  and Ω αβ S is a 1 × 1 matrix which equals 2. Without loss of generality, we can take r · φ for positive roots to be positive. This implies that r · φ for negative roots is negative.
Let us first fix all the mass terms to be zero. Then the first weight (1, 0) contributes with a positive sign since the positivity of r · φ for positive roots implies that φ 1 is positive. Similarly, the third weight (0, −1) contributes with a negative sign to the prepotential. However, the sign of second weight (−1, 1) cannot be determined uniquely, and hence the theory has two phases when all mass parameters vanish. These two phases are distinguished by the sign s of the contribution due to the weight (−1, 1). The prepotential can be written as Here 12φ 0 (φ 2 1 + φ 2 2 − φ 1 φ 2 ) is the contribution coming from the Green-Schwarz term in 6d, (2φ 1 − φ 2 ) 3 + (φ 1 + φ 2 ) 3 + (2φ 2 − φ 1 ) 3 is the contribution coming from the positive and negative roots, and −3 s (φ 2 − φ 1 ) 3 + φ 3 1 + φ 3 2 is the contribution coming from the weights of six hypers in fundamental.
When we turn on mass parameters, the sign of the weights corresponding to different hypers can be changed. For example, consider turning on a mass parameter for one of the fundamentals m 1 while keeping the mass parameters for the other five fundamentals zero. Now we obtain contributions from terms of the form |m 1 + φ 1 |, |m 1 − φ 1 + φ 2 | and |m 1 − φ 2 |. Depending on the value of m 1 , we go through various new phases of the theory which are parametrized by choices of signs of these three terms. For example, suppose that m 1 is positive and very large, so that all the three terms are positive. Moreover, assume that φ 2 − φ 1 is positive, so that s = +1. Then the resulting phase is governed by the following prepotential which implies that the truncated prepotential is We caution the reader that there can be phases of the KK theory which cannot be traversed by changing the signs of various contributions to the prepotential. In other words, they are not visible to the canonical low energy gauge theory that we associated to the KK theory in the beginning of this subsection. We will refer to such phases as non-gauge theoretic. This terminology does not mean that the low energy theory governing such phases cannot be understood as Coulomb branch of a gauge theory. Rather it simply means that low energy theory governing such phases cannot be understood as part of Coulomb branch of the canonical gauge theory associated to the corresponding KK theory.

Shifting the prepotential
Consider a 6d theory T with gauge algebras g i on its tensor branch. Consider further compactifying T on a circle of finite size without a twist. On a generic point of the resulting 5d Coulomb branch, the massive BPS spectrum includes W-bosons for the corresponding untwisted affine gauge algebras g (1) i . In other words, the abelian gauge algebra visible at low energies on the Coulomb branch is ⊕ a u(1) a,i parametrizing the Cartan of g i plus a u(1) 0,i responsible for affinization. The u(1) i arising from the reduction of tensor multiplet B i is central to ⊕ a u(1) a,i ⊕ u(1) 0,i . The untwisted Lie algebras are listed in Table 14 along with their Coxeter and dual Coxeter labels.
We now generalize the above statements to the twisted case. Consider compactifying T on a circle of finite size with a twist S, {q α }. On a generic point of the resulting 5d Coulomb branch, the massive BPS spectrum includes W-bosons for the corresponding twisted/untwisted affine gauge algebras g (qα) α . In other words, the abelian gauge algebra visible at low energies on the Coulomb branch is ⊕ a u(1) a,α parametrizing the Cartan of h α plus a u(1) 0,α responsible for affinization. The u(1) α arising from the reduction of tensor multiplet B i (with i in orbit of α) is central to ⊕ a u(1) a,α ⊕ u(1) 0,α . The twisted Lie algebras are listed in Table 15 along with their Coxeter and dual Coxeter labels.
The charge under u(1) b,α (corresponding to a simple co-root e ∨ b ) of a W-boson W a (corresponding to simple root e a of g (qα) α ) is given by the element A ab of the Cartan matrix. Now consider the u(1) Tables 14 and 15. Since all the W-bosons W a are uncharged under this u(1), it follows that this u(1) can be identified with the central u(1) α . The charge of a particle n α under u(1) α can be written as rα b=0 d ∨ b n b,α where n b,α is the charge of the particle under u(1) b,α .
2 : Table 14. Untwisted affine Lie algebras. The affine node is shown as a hollow circle. The numbers in black d ∨ a denote the column null vector for the Cartan matrix, popularly known as dual Coxeter labels. The numbers in red d a denote the row null vector for the Cartan matrix, popularly known as Coxeter labels.
To facilitate comparison with geometry, we wish to write the prepotential in terms of Table 15. Twisted affine Lie algebras. The affine node is shown as a hollow circle. The numbers in black d ∨ a denote the column null vector for the Cartan matrix, popularly known as dual Coxeter labels. The numbers in red d a denote the row null vector for the Cartan matrix, popularly known as Coxeter labels. The total number of nodes for su(2n + 1) (2) is n + 1, for so(2n) (2) is n, and for su(2n) (2) is n + 1.
Coulomb branch parameters corresponding to u(1) b,α for 0 ≤ b ≤ r α . This is achieved by performing the following replacement in 6F φ for all 1 ≤ b ≤ r α and for all α. 10 We will call the prepotential obtained after this shift asF S,{qα} . The Coulomb branch parameter φ 0,α inF S,{qα} corresponds to u(1) 0,α rather than u(1) α . For illustrative purposes, we note that the shift for our example (4.6) is which means that the shifted prepotential corresponding (4.7) is where we have chosen the phase s = +1. The shifted prepotential for (4.9) is A Mathematica notebook accompanying the submission of this draft can be used to compute the contribution to 6F (in any gauge-theoretic phase) from a single node or two nodes connected by an edge. Using these two results, one can write the contribution to 6F from two nodes connected by an edge as contributions from the two nodes alone and a contribution from the edge. Thus, we can figure out what is the contribution to 6F by each possible edge. Combining the contributions from the nodes and the edges, one can obtain 6F S,{qα} for any arbitrary graph Σ S,{qα} T . More details and the instructions for using the notebook can be found in Appendix E.

General features
In this subsection, we start with a description of general features of the geometric structure of X S,{qα} and the relationship between this geometry and the low energy effective theory governing the Coulomb branch of the KK theory T KK S,{qα} . We will show that X S,{qα} can be realized as a local neighborhood of a collection of irreducible compact holomorphic surfaces intersecting with each other pairwise transversely. As we will see, the surfaces fall into families indexed by α. We denote the irreducible surfaces in each family α as S a,α where 0 ≤ a ≤ r α (where r α is the rank of h α ). The Kahler parameters associated to S a,α are identified as the Coulomb branch parameters φ a,α of the corresponding 5d KK theory discussed in the previous section. Whenever h α is trivial, the rank of h α is zero and hence there is only a single surface S 0,α associated to the node α in that case.

Triple intersection numbers and the prepotential
A key role in the relationship between X S,{qα} and T KK S,{qα} is played by the shifted prepotential 6F S,{qα} . The coefficients c aα,bβ,cγ of φ a,α φ b,β φ c,γ in 6F S,{qα} capture the triple intersection numbers of surfaces in X S,{qα} as follows: A triple intersection product of three surfaces can be computed via intersection numbers inside any one of the three surfaces. To explain it, let us first first define the notion of "gluing curves". Consider the intersection locus L aα,bβ between two distinct surfaces S a,α and S b,β in X S,{qα} . L aα,bβ splits into geometrically irreducible components as i L i aα,bβ . Each L i aα,bβ appears as an irreducible curve C i a,α;b,β in S a,α and an irreducible curve In other words, we can manufacture the intersection of S a,α and S b,β by identifying the curves with each other for all i. Identifying pairs of curves in the above fashion can be thought of as "gluing together" two surfaces along those curves 12 . The reducible curve C a,α;b,β := i C i a,α;b,β is called the "total gluing curve" in S a,α for the intersection of S a,α and S b,β . Similarly, C b,β;a,α := i C i b,β;a,α is called the total gluing curve in S b,β for the intersection of S a,α and S b,β .
As two distinct surfaces S a,α and S b,β can intersect each other, so can a single surface S a,α intersect itself. Much as above for the intersection of two distinct surfaces, the self-intersection of S a,α can be captured in terms of gluings where C i a,α and D i a,α are irreducible curves in S a,α . Then the triple intersection numbers can be expressed as: and K a,α denotes the canonical class of S a,α .
As an illustrative example consider the KK theory (4.6) for which the shifted prepotential in a particular phase is displayed in (4.11). We propose that the associated geometry is as follows. Since there is a single node, we drop the index α and only display the index a. The surfaces are S 0 = F 0 , S 1 = F 2 , S 2 = F 6 4 . The gluing curves between S 0 and S 1 are C 0;1 = e, C 1;0 = e. The gluing curves between S 1 and S 2 are C 1;2 = h, C 2;1 = e. The gluing curves between S 2 and S 0 are Now we can check that the intersections of these curves indeed give rise to the various coefficients in (4.11): • One third the coefficient of φ 0 φ 2 1 is zero which matches C 2 0;1 = (e 2 ) S 0 where (e 2 ) S 0 denotes that the intersection number e 2 is computed inside S 0 and that in particular the curve e is inside S 0 . The coefficient also matches Similarly, we can check the matching of such intersection numbers with one third the coefficients of other terms of the form φ a φ 2 b .
• One sixth the coefficient of φ 0 φ 1 φ 2 is zero which matches C 0;1 · C 0;2 = (e 2 ) S 0 = 0, On the other hand, the geometry associated to (4.12) has S 0 = F 1 0 , S 1 = F 2 and S 2 = F 5 4 . The gluing curves between S 0 and S 1 are C 0;1 = e, C 1;0 = e. The gluing curves between S 1 and S 2 are C 1;2 = h, C 2;1 = e. The gluing curves between S 2 and S 0 are Here x denotes the exceptional curve of the blowup of S 0 and x i denote the exceptional curves of the blowups of S 2 . One can check that the intersections of these curves indeed give rise to the various coefficients in (4.12).

Consistency of gluings: volume matching, the Calabi-Yau condition, and irreducibility
Not every pair of curves can be identified with one another to form a consistent gluing. First of all, the topology of the two curves must be identical. This implies that a geometrically irreducible curve in one surface can only be identified with a geometrically irreducible curve in another surface, and furthermore that the genera (as defined in Appendix A.3) of the two curves must be identical and non-negative. If C ⊂ S is an irreducible curve, then a necessary condition that must be satisfied by C is that for any other irreducible curve C ⊂ S such that C = C, the intersection product must be non-negative: In this paper, some of the algebraic examples are non-geometric (i.e. do not admit a conventional geometric description satisfying these consistency conditions) because they involve gluings which identify a geometrically reducible curve in one surface with a geometrically irreducible curve in another surface. Despite this apparent pathology, these examples nevertheless satisfy the remaining conditions described below.
In addition to the above topological constraints, the volumes of a pair of gluing curves must be the same. The volume of a curve C is computed by intersecting the curve with the Kahler class J via where m f are mass parameters and N f are non-compact surfaces corresponding to those mass parameters. The contribution of mass parameters to the volume will not play a prominent role in this paper, so we define a truncated Kahler class J φ which only keep track of the contribution of Coulomb branch parameters to the volume The volume of C equals the mass of the BPS state obtained by wrapping an M2 brane on C because the intersection number − S a,α · C (5.14) captures the charge under u(1) a,α of the BPS state arising from M2 brane wrapping C. If C lies in S a,α , then the intersection (5.14) is computed via If C lies in some other surface S b,β , then (5.14) is computed via Now, for (5.4) to be consistent we must have which is an important consistency condition for constructing X S,{qα} . We have checked that (5.17) is satisfied for all the geometries presented in this paper. Finally, the gluing curves also have to satisfy the Calabi-Yau condition which states that where g is the genus of C i a,α;b,β . See [2,4] for more details. Notice that in special situations the Calabi-Yau condition (5.18) is automatically satisfied as long as we satisfy (5.17). This is the situation when there is a single gluing curve C a,α;b,β ∼ C b,β;a,α between two surfaces S a,α and S b,β such that neither of them is a self-glued surface. Then, (5.17) implies Adding C 2 a,α;b,β to both sides of the above equation we get As an example, in what preceded above we discussed the geometry associated to (4.11). We can check that (5.17) is satisfied for all the gluing curves in the geometry. For instance, and comparing it with we find that indeed the gluing C 0;1 ∼ C 1;0 is consistent. Similarly, it can be checked that all the other gluings are consistent as well. In a similar fashion, one can also check that all of the gluings in the geometry associated to (4.12) discussed above satisfy (5.17).

Weights, phase transitions and flops
A hypermultiplet transforming in a representation R f of the 5d gauge algebra h = ⊕ α h α appears as a collection of curves inside X S,{qα} . These curves are characterized as follows. Let m f be the mass parameter corresponding to R f . For each weight w(R f ) of R f , define a quantity vol (w(R f )), which we call the virtual volume, by shifting the quantity by the shift (4.10) for all α. Then, one can find a holomorphic curve In general, the curve C w(R f ) can be a positive linear combination of curves living inside various irreducible surfaces. However, some of the curves C w(R f ) turn out to be living purely inside a single irreducible surface S a,α . If such a curve C w has genus zero and self-intersection −1 inside S a,α , then one can perform a flop transition 13 on X S,{qα} by flopping C, which corresponds to a phase transition in the Coulomb branch of the 5d gauge theory described in previous section. We refer to such a flop transition as a "gauge-theoretic flop transition" to distinguish it from the flop transitions associated to more general −1 curves not associated to any hypermultiplet.
Let the geometry obtained after the flop transition associated to C w be X S,{qα} . As where vol (w(R f )) is the shift of the quantity (5.27) computed in the new phase. The relationship between the two virtual volumes vol (w(R f )) and vol (w(R f )) is with a minus sign. We know from the analysis presented in the last section that the canonical 5d gauge theory associated to (4.6) is an su(3) gauge theory with six fundamental hypers. The Dynkin coefficients of the weights of fundamental are (1, 0), (−1, 1) and (0, −1). We call these weights w 1 , w 2 and w 3 respectively. We can compute Recall that the phase (4.11) corresponds to vol(w 1 ) and vol(w 2 ) being positive and vol(w 3 ) being negative for all the six fundamentals. Now compute the volume of one of the blowups x i living in the surface S 2 in the geoemtry corresponding to (4.11): vol In fact, the geometries corresponding to (4.11) and (4.12) are related by a flop transition. We first blow down one of the blowups, say x 6 , inside S 2 . Under this blowdown the identity of S 2 changes from F 6 4 to F 5 4 . Since x 6 intersects the gluing curve The other gluing curve inside S 2 is unaffected since x 6 does not intersect with it. Correspondingly, since the gluing curve for S 1 in S 2 does not intersect x 6 , the surface S 1 is unaffected by the flop transition. However, since the gluing curve for S 0 in S 2 intersects x 6 , we have to blowup S 0 at a point lying on the gluing curve for S 2 inside S 0 . Under the blowup the identity of S 0 changes from F 0 to F 1 0 . The gluing curve for S 2 inside S 1 is changed to e − x.
Recall that the phase (4.12) corresponds to turning on a large mass m for one of the fundamentals such that for this fundamental is positive. Correspondingly, we can compute that which indeed matches (5.36) up to the contribution from mass parameter, thus verifying (5.31). We are not keeping track of non-compact surfaces in this paper, so we are only able to verify (5.31) up to the contribution from m.

Affine Cartan matrices and intersections of fibers
For each surface S a,α in X S,{qα} , we define a canonical fiber f a,α inside it: • If g α is non-trivial, then S a,α will always be a Hirzebruch surface 14 whose fiber class is the canonical fiber f a,α . An M2 brane wrapping this curve gives rise to the W-boson W a,α discussed in last section.
• If the node α is then it turns out that there is a single corresponding surface S 0,α = F 2 0 which is self-glued since e − x and e − y are identified with each other where x and y are the exceptional curves corresponding to the two blowups. Due to the self-gluing, the fiber class of S 0,α intersects itself inside the threefold X S,{qα} and appears as an elliptic curve with a nodal singularity. It is this fiber class that we refer to as the canonical fiber f 0,α in this case.
• If the node α is then it turns out that there is a single corresponding surface S 0,α = dP 9 . The del Pezzo surface 15 dP 9 admits a unique elliptic fiber class 3l − x i which we refer to as the canonical fiber f 0,α in this case.
• If the node α is then it turns out that there is no completely geometric description. We provide an algebraic description in terms of algebraic properties of the curves inside the surface S 0,α = F 2 1 which is self-glued since x and y are identified with each other. The canonical fiber in this case is f 0,α = 2h + f − 2x − 2y which is a genus one curve of self-intersection zero.
14 In this paper, by a "Hirzebruch surface", we refer to a Hirzebruch surface possibly with blowups at generic or non-generic locations. Some background on Hirzebruch surfaces can be found in Appendix A. 15 In this paper, by a "del Pezzo surface dP n ", we refer to a surface which is an n point blowup of P 2 but the blowups can be at non-generic locations. Some background on del Pezzo surfaces can be found in Appendix A.
where A ab is the Cartan matrix of g (qα) α and A ab ≡ A 00 = 0 whenever g α is trivial. This means that the fibers of Hirzebruch surfaces S a,α for a fixed α intersect in the fashion of Dynkin diagram associated to affine Lie algebra g (qα) α . Intersection (5.41) is of the form C · S a,α where C is some curve in the threefold X S,{qα} and S a,α is a surface inside the threefold. Like the triple intersection numbers of surfaces inside a threefold, such intersections can also be computed in terms of intersection numbers inside a surface. If C is a curve inside S a,α , then Consider the example of (4.11) whose associated geometry was described towards the end of Section 5.1.1. We can compute that Thus we see that f a · S b indeed reproduces the negative of Cartan matrix of affine Lie algebra su(3) (1) . We can similarly check that the geometry associated to (4.12) also leads to the Cartan matrix of su(3) (1) .

The genus one fibration
For each α, combining the fibers f a,α , let us define a fiber f α via where d a are Coxeter labels for g (qα) α listed (in red color) in Tables 14 and 15. If g α is trivial, then d 0 := 1.
We claim that f α is a genus one fiber. This means that f α can be obtained by a degeneration of a torus. It is well-known that torus fibers can degenerate into Kodaira fibers, which are collections of rational curves 16 intersecting in the pattern of untwisted affine Dynkin diagrams of type su(n) (1) , so(2n) (1) and e (1) n . The multiplicity of each rational component curve is given by the Coxeter label for the corresponding node in the affine Dynkin diagram. The fiber f α , on the other hand, is composed of rational curves f a,α with their multiplicity given by the Coxeter labels for affine Dynkin diagram g (qα) α . Now, one can notice that every affine Dynkin diagram can be obtained by folding affine Dynkin diagrams of type su(n) (1) , so(2n) (1) and e (1) n as follows: Moreover, observe that the Coxeter numbers of two nodes are added if they are identified under gluing. This means that f α can be obtained by identifying the rational components of the Kodaira fibers according to the above folding rules. This explicitly shows that f α is a genus one fiber. Moreover, we find that due to the virtue of gluing rules, f α is glued to f β as This generalizes the condition in the untwisted unfrozen case [4] where f i ∼ f j whenever there is an edge between i and j in Σ T . This shows that certain multiples of genus one fibers are identified with each other as one passes over from one collection of surfaces to another, allowing us to extend the fibration structure consistently throughout the threefold. More formally, according to a theorem due to Oguiso and Wilson [52,53], a threefold X admits an genus one fibration structure if and only if there exists an effective divisor S T 2 satisfying where S T 2 lives in the extended Kähler cone, possibly on the boundary. The extended Kähler cone is parameterized by all the Coulomb branch and mass parameters satisfying for all holomorphic curves C in X. Physically, the extended Kähler cone corresponds to the Coulomb branch of the (possibly mass deformed) 5d theory corresponding to X. In all of geometries associated to 5d KK theories, we can find an S T 2 which lies in the extended Kähler cone satisfies (5.61). Pick any node α and define where d ∨ a are dual Coxeter labels for the associated affine algebra g (qα) α (see Tables 14  and 15) and r α is the rank of invariant subalgebra h α . If the node α carries a trivial gauge algebra, then we define d ∨ 0 = 1 and take (5.63) to be the definition of S T 2 . In the gauge theoretic case, the direction parametrized by (5.63) is special since all the fibers f a,α have zero volume along this direction 17 Similarly, in the non-gauge theoretic case where the last equality can be checked to be true for every non-gauge theoretic case. Moreover, the reader can check using the explicit description of geometries presented in this paper that for all other holomorphic C in the threefold X S,{qα} . So, S T 2 as defiend in (5.63) lies in the extended Kähler cone of X S,{qα} . Now it can be easily checked for all the geometries presented in this paper that where d a are the Coxeter labels for g (qα) α with d 0 := 1 if α is a non-gauge theoretic node. We can now compute thus verifying both the conditions in (5.61) and establishing the presence of a genus one fibration in X S,{qα} . Let us now discuss the relationship between fibers f α and the radius of compactification circle R. In general, we can find at least one node µ such that Then the curve with l µ defined in Section 3.3 can be identified with the KK mode of unit momentum in T KK S,{qα} and has mass 1 R where R is the radius of the circle on which the 6d theory T has been compactified. Thus, all the f α can be identified as fractional KK modes with mass 1 nαR where n α = l µ n µ,α . This generalizes the condition in the untwisted unfrozen case where the KK mode is identified with Let us now discuss some examples. For the KK theory For the KK theory (3.30), we find that For the KK theory (3.28), our gluing rules say that For the KK theory (3.14), our gluing rules say that An interesting example to consider is the KK theory defined by the untwisted compactification of the 6d SCFT 2 su(p) 4 which arises only in the frozen phase. We find that If (5.81) arose in the unfrozen phase of F-theory, then we would have obtained Thus equation (5.84) is a way to see that (5.81) cannot arise in the unfrozen phase of F-theory.

Geometry for each node
In this section we will describe the surfaces S a,α along with their intersections associated to a single node α.

Graphical notation
We will capture the data of the surfaces and their intersections by using a graphical notation that would be a simpler version of the graphical notation used in [3,4]. This subsection is devoted to the explanation of this notation. We find it best to explain the notation with the following example: which is a particular phase of the KK theory Since the rank of invariant subalgebra h = g 2 is two, we should have three surfaces in this case labeled by S a where 0 ≤ a ≤ 2. The middle number in the label for each node denotes the index a. Thus the node labeled 0 2+2 8 denotes the surface S 0 , the node labeled 1 2+2 6 denotes the surface S 1 , and the node labeled 2 0 denotes the surface S 2 . Every surface S a is a Hirzebruch surface. The subscript in the label for each node denotes the degree of the corresponding Hirzebruch surface. Thus, S 0 has degree 8, S 1 has degree 6, and S 2 has degree 0. The superscript in the label for each node denotes the number of blowups on the corresponding Hirzebruch surface. Thus, S 0 carries 2 + 2 = 4 blowups and hence S 0 = F 4 8 , S 1 carries 2 + 2 = 4 blowups and hence S 1 = F 4 6 , and S 2 carries no blowups and hence S 2 = F 0 .
The fact that the four blowups on S 0 are displayed as 2 + 2 denotes that the four blowups are divided into two sets, with each set containing two blowups. We denote the blowups in the first set as x i and the blowups in the second set as y i . The same is true for S 1 . In a general graph, the blowups on a surface can be divided into more than two sets, and the number of blowups inside each set can be different. Whatever may be the case, we adopt the notation of denoting the blowups inside the first set as x i , the blowups inside the second set as y i , the blowups inside the third set as z i etc.
The label in the middle of an edge between two nodes denotes the number of irreducible components of the intersection locus between the two surfaces corresponding to the two nodes. As already discussed above, each component of the intersection locus can be viewed as an irreducible gluing curve inside each of the surfaces participating in the intersection. Thus, there is a single gluing curve between S 1 and S 2 in the graph (5.86), but there are three gluing curves between S 0 and S 1 . The graph also tells us that the surface S 0 is a self-glued Hirzebruch surface since there are edges which start and end at S 0 . Similarly, S 1 is also a self-glued surface. We can see that the number of self-gluings in S 0 are two, and the number of self-gluings in S 1 are also two.
The curves displayed at the ends of edges tell us the identities of various gluing curves. The left end of the edge between 1 2+2 6 and 2 0 reads e − x i − y i , which means that the corresponding gluing curve inside S 1 is e − x i − y i . The right end of the edge between 1 2+2 6 and 2 0 reads 3e + 2f , which means that the corresponding gluing curve inside S 2 is 3e + 2f . We note that whenever we write x i or y i , we mean a sum of all the blowups in the set of blowups denoted by x i or y i respectively.
In the above graph, the two self-gluings of S 0 are displayed by writing x i at one end and y i at the other end. This tells us that x i in S 0 is glued to y i in S 0 . Since there is no sum over i, this gluing is supposed to be true for each valued of i. Hence, the two self-gluings are x 1 ∼ y 1 and x 2 ∼ y 2 . The same is true for self-gluings of S 1 .
The gluing curves for the three gluings between S 0 and S 1 are displayed as f − These are supposed to be read in the order they are written. Thus, unpacking the notation we learn that the three gluings are We also sometimes suppress multiplicity of a gluing curve. For example, in the geometry the gluing curve for S 2 in S 3 is displayed simply as f . But the edge between S 2 and S 3 shows that there are six gluing curves involved. This means that the true gluing curve for S 2 in S 3 is actually six copies of the fiber f of S 3 . Now, let us extract the prepotential 6F from the graph (5.86). The coefficient of can be computed as (3e + 2f ) 2 as it should for consistency. We can compute the coefficient of Similarly, we can compute coefficients for other terms of the form φ a φ 2 b . Finally, the coefficient of φ 0 φ 1 φ 2 must be 0 since there is no edge between S 0 and S 2 . But this coefficient can also be computed as an intersection number of gluing curves inside S 1 . Thus, the corresponding intersection number better be zero for consistency. Indeed we find that

Untwisted
In this subsection, we collect our results for nodes of the form That is, we restrict ourselves to the case where the associated affine Lie algebra is untwisted. All such nodes are displayed in Table 1 and Table 2. Most such cases were first studied in [3,4]. We will be able to recover their results. We will associate a collection of geometries parametrized by ν to each node of the form (5.99). Geometries for different values of ν are flop equivalent as long as there are no neighboring nodes, but might cease to be flop equivalent in the presence of neighboring nodes. The geometries associated to (5.99) in [4] are obtained as ν = 0, 1 versions of the geometries associated in this paper.
The geometries associated to nodes of the form (5.99) are presented below. We will display the corresponding node inside a circle placed at top of the geometry: where 0 ≤ ν ≤ 2n + 8, n ≥ 1 and the theta angle should be viewed modulo 2π. We can see that f a · S b reproduces the negative of Cartan matrix for untwisted affine Lie algebra sp(n) (1) , where f a is the canonical fiber of Hirzebruch surface S a . The same hold true for all the examples discussed below in this subsection. One can check in each example below that f a · S b reproduces the negative of Cartan matrix for the associated untwisted affine Lie algebra g (1) . Notice that the two geometries (5.100) and (5.101) are isomorphic by virtue of the isomorphism between F 1 0 and F 1 1 discussed in Appendix A.1. Suppose first that ν > 0. Then, the isomorphism applied to S n sends 2h − x 1 in F ν 1 to 2e + f − x 1 in F ν 0 , thus mapping the gluing curve for S n−1 in S n in (5.101) to the gluing curve for S n−1 in S n in (5.100). Thus the whole geometry (5.101) is mapped to the geometry (5.100) by this isomorphism. For ν = 0, the two geometries (5.101) and (5.100) are flop equivalent due to this isomorphism. This is because they are flop equivalent to ν > 0 versions of the geometries (5.101) and (5.100), and we have already established an isomorphism between the latter geometries.
However, it is possible for this isomorphism to not extend to the full Calabi-Yau threefold when sp(n) has other neighbors. The gluing curves inside S 0 and S n for the surfaces corresponding to these neighbors might not map to each other under the above isomorphism plus flops. Whenever the isomorphism extends to the full threefold, the sp(n) theta angle is physically irrelevant. Whenever the isomorphism does not extend to the full threefold, the sp(n) theta angle is physically relevant. We will see examples of both situations later when we discuss gluing rules for sp(n).
For n = 0, we claim that the associated geometry is One way to see this is to notice that both the geometries (5.100) and (5.101) reduce to (5.102) in the limit n = 0. For a more precise way to see that (5.102) is the correct geometry, see the discussion around (B.9). When sp(0) (1) θ has no other neighbors, then all the blowups are generic and we can write S 0 = dP 9 . When sp(0) (1) θ has neighbors, it turns out that S 0 = dP 9 with 9 non-generic blowups is the correct answer, instead of S 0 = F 8 1 with eight non-generic blowups. This is because when the 9 blowups are non-generic, it is not always possible to represent dP 9 as F 8 1 with 8 non-generic blowups. So, S 0 = F 8 1 is not quite the correct answer. See [4] for more discussion on this point. Thus, in this paper, from this point on, we will represent the geometry associated to sp(0) For this geometry, we do not define multiple versions distinguished by the parameter ν. Nevertheless, for uniformity of notation, we denote this geometry with ν = 0. Similarly, we will denote all the following geometries having a single unique version with ν = 0.
For n = 2, we have 0 12  f where 0 ≤ ν ≤ 4n and n ≥ 2. For n = 1, we have where 0 ≤ ν ≤ 4n + 2 and n ≥ 1. For n = 0, we claim that the geometry is which can be recognized as a limit of ν = 1 phase of (5.112). See Appendix B.1 for a derivation that this is the correct answer.
where 1 ≤ k ≤ 3 and we have divided the 16 − 4k blowups into four sets of 4 − k blowups each. We label blowups in the four sets by x i , y i , z i and w i respectively.

Twisted
In this subsection, we will generalize our results to nodes of the form All such nodes are listed in Table 8. where m ≥ 3. Notice that the Cartan matrix associated to this geometry is precisely that of su(2m) (2) . Similar comments hold for all the geometries discussed below in this subsection. For each example below, one can check that f a · S b reproduces negative of Cartan matrix of the associated twisted affine algebra g (q) . f · · · · · · (n + 2) 1 Let us now discuss the reasons why the above five examples are not completely geometric. Let us start with (5.160). The geometry for this example contains the −1 curve h − x − y and hence an M2 brane wrapping this curve should give rise to a BPS particle. However, this BPS particle cannot appear in the associated 5d KK theory for the following reason. The existence of a particle associated to h − x − y implies that the KK mode, which is associated to the elliptic curve 2h + f − 2x − 2y, decomposes as a bound state of h − x − y and h + f − x − y but this is a contradiction since these two curves do not meet each other and hence there cannot be such a bound state. Another reasoning is as follows. The volume of f is 2φ where φ is the Coulomb branch parameter associated to the above surface. On the other hand, the volume of h − x − y is −φ. Requiring non-negative volumes for both curves implies that φ must be zero. In other words, there is no direction in the Coulomb branch where all BPS particles have non-negative mass. Thus, this geometry is not marginal, in the sense defined by [2], which is a condition that must be satisfied by geometries associated to KK theories.
The precise sense in which the above self-glued F 1 surface is associated to the KK theory 2 su(1) (1) is as follows. The Mori cone of the surface is generated by h−x−y, f −x, x, e. However, since the curve h − x − y does not correspond to a BPS particle, the generators of the Mori cone thus do not correspond to the fundamental BPS particles 18 in the associated KK theory (5.161). We propose that the fundamental BPS particles instead correspond to the curves 2h − x − 2y, f − x, x, e. This set of curves satisfies all the properties that must be satisfied by the generators of the Mori cone of a surface. Thus, it is a complete set which can be consistently associated to fundamental BPS particles. The KK mode can be found as a bound state of 2h − x − 2y and f − x. One can check that this set of proposed BPS particles is marginal in the sense that it allows a direction in Coulomb branch with all BPS particles having non-negative volumes. See also Appendix B.1 where we verify that this description of the KK theory allows the existence of an RG flow to an N = 2 5d SCFT, which is a fact well-known in the literature.
There are two viewpoints one can take on the relationship between self-glued F 1 and the KK theory (5.161). The first is that indeed compactifying M-theory on this surface leads to the KK theory (5.161), but the compactification has some extra ingredients which account for the mismatch between the set of Mori cone generators and the set of fundamental BPS particles 19 . The other viewpoint is that the relationship with selfglued F 1 has no deep meaning and is probably a red herring. At the time of writing of this paper, we do not know which of these two viewpoints, or if either of these two viewpoints, is the correct one. We leave this issue for future exploration, and only use the relationship between the two as an algebraic tool to build a formalism for KK theories from which one can explicitly perform RG flows to 5d SCFTs. Now let us discuss the non-geometric nature of the KK theories 2 su(m) (1) with m > 1. Consider as an example the case of m = 3. The surface S 2 contains a gluing curve e + f − x − 2y and hence there must be a BPS particle associated to it. However, notice that it decomposes as e + f − x − 2y = (e − x − y) + (f − y) such that the components e − x − y and f − y do not intersect each other. This leads to the same problem as discussed above, and we are forced to hypothesize that the fundamental BPS particles are distinct from the generators of Mori cone due to some non-geometric feature in the M-theory compactification. It is also evident that some of the components of the gluing curves in certain surfaces (which are identified with irreducible curves in adjacent surfaces as part of the gluing construction) fail to satisfy the necessary properties of irreducible curves that are described at the beginning of Section 5.1.2. 20 Similar comments apply to each of the m > 1 models presented above 19 A similar situation occurs in the frozen phase of F-theory [32], where the set of generators of the Mori cone of the base of a threefold used for compactifying F-theory does not match the set of fundamental BPS strings arising in the associated 6d theory. 20 For example, in the case m = 3, one can see that the surface 2 1+1+1 0 contains a curve class should be regarded as an algebraic proposal which retains many of the features of the local threefolds that seem to be necessary to compute RG flows to 5d SCFTs. Similar comments apply to (5.107) and (5.108), and they are also not conventionally geometric.

Gluing rules between two gauge theoretic nodes
In this section we will describe how to glue the surfaces S a,α corresponding to a node α to the surfaces S b,β corresponding to another node β if there is an edge between α and β. The gluing rules are different for different kinds of edges between the two nodes. It turns out that the gluing rules between α and β are insensitive to the values of Ω αα and Ω ββ . This was also true for all of the cases studied in [4]. For this reason, we will often suppress the data of Ω αα and Ω ββ in this subsection.
As a preface to the following subsections, we re-emphasize that the gluing rules must be compatible with the general consistency conditions described in Section 5.1.2, and those that do not must again be regarded, most conservatively, as an algebraic proposal that retains certain salient features of conventional smooth threefold geometries. The basic, underlying hypothesis of the gluing rules is that, given a pair of geometries corresponding to circle compactifications of 6d SCFTs, if there exists a consistent gluing of these two nodes along their respective genus one fibers, then there must also exist a mutual gauging of the respective global symmetries of the parent 6d SCFTs that allows the two theories to be coupled together in the sense described in Section 2.

Undirected edges between untwisted algebras
Such edges are displayed in Table 3. The gluing rules for all of these cases except for su(n α ) (1) so(n β ) (1) 2 were first studied in [4]. We are able to reproduce their results using our methods.

Gluing rules for sp(n α )
(1) θ su(n β ) (1) : We can take any geometry with 0 ≤ ν ≤ 2n α + 8 − n β for sp(n α ) (1) θ , and any geometry with 0 ≤ ν ≤ 2n β − 2n α for su(n β ) (1) . The gluing rules below work irrespective of the value of θ. The gluing rules are: e + f − x − 2y, which is identified with the curve class h in the surface 1 3 . Since h is irreducible, this implies that e + f − x − 2y must also be irreducible, but this leads to a contradiction (with smoothness) if the usual class f − y remains among the generators of the Mori cone of 2 1+1+1 By convention, the first item in the above list of gluing rules displays the gluings in an order. That is, f − x 1 in S 0,α is glued to f − x 1 in S 0,β and x n β in S 0,α is glued to x 2nα in S 0,β . We will adopt this convention in what follows. All the gluings should be read in the order in which they are written.
Let us label the fiber of the Hirzebruch surface S a,α as f a,α and the fiber of the Hirzebruch surface S b,β as f b,β . According the above gluing rules, f 0,α is glued to Combining these two we see that thus confirming the gluing rule (5.60) for the torus fibers. In a similar fashion, the reader can verify that (5.60) is satisfied for all the gluing rules that follow. The theta angle of sp(n α ) is physically irrelevant if n β < 2n α + 8 and physically relevant if n β = 2n α + 8. Thus the above gluing rules should allow the isomorphism between (5.100) and (5.101) to extend to the combined geometry for in the case n β < 2n α + 8, but not in the case of n β = 2n α + 8. To see this for n β < 2n α + 8, we can go to the flop frame ν = 1 for sp(n α ) θ without changing the above gluing rules. Then we can implement the map that formed the isomorphism between (5.100) and (5.101). Since the above gluing rules do not interact with blowups living on S nα,α , the map trivially extends to an isomorphism of the combined geometry associated to (5.164). For n β = 2n α + 8, we cannot reach ν > 0 frame without changing the above gluing rules. Thus the map implementing isomorphism between (5.100) and (5.101) does not extend to an isomorphism of the combined geometry associated to (5.164).

Gluing rules for sp(n α )
(1) θ so(2n β ) (1) : Here we allow 2n β = 12. We can take any geometry with 0 ≤ ν ≤ 2n α + 8 − n β for sp(n α ) (1) θ , and any geometry with 0 ≤ ν ≤ 2n β − 4 − Ω ββ − n α for so(2n β ) (1) . The gluing rules below work for both values of θ. In the future, if the value of θ is unspecified, then the gluing rules work for both the values. In our present case, the gluing rules are: To show that the theta angle is irrelevant for n β < 2n α + 8, we first notice that we can go to the flop frame ν = 1 for sp(n α ) (1) θ without changing the above gluing rules. Then the isomorphism between (5.100) and (5.101) extends to an isomorphism of the combined geometry for For n β = 2n α +8, the above argument does not work since going to ν = 1 frame changes the gluing rules. However, it turns out that the combined geometries for different θ are flop equivalent up to an outer automorphism of so(2n β ). To see this, notice that the combined geometry for (5.165) is flop equivalent to the following geometry. We pick the frame ν = 2n α + 8 for sp(n α ) θ and ν = 2n β − 8 for so(2n β ) (1) with the gluing rules being: Now it is clear that exchanging f − x 1 and x 1 interchanges S n β ,β and S n β −1,β . Thus the choice of theta angle for sp(n α ) (1) is correlated to the choice of an outer automorphism frame of so(2n β ) (1) for n β = 2n α + 8.
The gluing rules for a configuration having multiple edges are simply obtained by combining the gluing rules mentioned above. We have to just make sure that we never use the same blowup twice. For example, consider the configuration Then we can use any geometry with 0 ≤ ν ≤ 2n α + 8 − n β − n γ for sp(n α ) (1) θ , any geometry with 0 ≤ ν ≤ 2n β − 4 − Ω ββ − n α for so(2n β ) (1) , and any geometry with 0 ≤ ν ≤ 2n γ − 2n α for su(n γ ) (1) . The gluing rules for the sub-configuration are the same as the ones listed above, while the gluing rules for the sub-configuration are as follows: In a similar way, by choosing mutually exclusive sets of blowups, we can combine the gluing rules to obtain geometries for graphs with multiple algebras and edges between them. Sometimes some of the blowups are allowed to appear in more than one gluing rules. In such cases, we will explicitly mention such blowups and the configurations in which they can appear in multiple gluing rules.
Gluing rules for sp(n α ) (1) θ so(2n β + 1) (1) : We can take any geometry with θ , and any geometry with 0 ≤ ν ≤ 2n β − 3 − Ω ββ − n α for so(2n β + 1) (1) . The gluing rules are: To show that the theta angle is irrelevant, use the map that exchanges x 1 and f − x 1 in S nα,α . If this is accompanied by x i ↔ y i in S n β ,β , then the gluing rules remain unchanged.
with the x 1 in S nα,α being the same blowup as used in the gluing rules above for (5.170).
The blowup x 1 in S nα,α can be repeated once more if there is another g 2 neighbor or an so(2n γ + 1) (1) neighbor of sp(n α ) (1) θ . That is, when we consider configurations of the form sp(n α ) or of the form sp(n α ) As before, if there is a third g 2 or so(2n δ + 1) (1) neighbor of sp(n α ) θ , then we must use another blowup x 2 on S nα,α for the gluing rules corresponding to this neighbor.

Undirected edges between a twisted algebra and an untwisted algebra
Now let us provide gluing rules for those cases in Table 9 in which both the nodes have non-trivial gauge algebras associated to them, such that at least one of the gauge algebras is twisted.

Directed edges
Now we move onto gluing rules for edges listed in Table 10.

2
: We can take any geometry with 0 ≤ ν ≤ 2n α + 8 − 2n β for sp(n α ) (1) , and any geometry with 0 ≤ ν ≤ 2n β − 4 − Ω ββ − n α for so(2n β ) (1) . The gluing rules are: From this case onward, we are dropping the subscript θ on sp(n) (1) whenever theta angle is not physically relevant. In such cases, the gluing rules will work uniformly for both values of θ and using arguments used earlier in the paper, the reader can easily check that the combined geometries descending from different values of theta angle are indeed isomorphic.

Gluing rules involving non-gauge-theoretic nodes
There are only three such nodes which are listed below 1 sp(0) The theta angle for sp(0) (1) is physically irrelevant as long as there is no neighboring su (8).
First consider the edges shown as last two entries of Table 4. The gluing rules for these cases are as follows. : We can choose any geometry with 1 ≤ ν ≤ 10 for sp(1) (1) and any geometry with 1 ≤ ν ≤ 4 for su(2) (1) . The (non-geometric) gluing rules are: As in cases discussed in last subsection, the blowup x 1 in S 1,β can be used for gluing sp(1) (1) or su(2) (1) with another neighbor such that the gluing rules for sp(1) (1) or su(2) (1) with that neighbor allow a blowup on S 1,β to be used for more than once.
The gluing rules for the edges shown in Table 5 are as follows.
Gluing rules for 1 See Appendix (B.2) for a derivation of the above gluing rules.
Gluing rules for 2 The blowups x in S 0,α and x in S 0,β can be used for gluing to other su(1) (1) neighbors. See Appendix (B.2) for a derivation of the above gluing rules.
Now consider the edges shown in the last entry of Table 9: Gluing rules for 2 Gluing rules for 2 The blowup x in S 0,β can be used for gluing to other su(1) (1) neighbors. See Appendix (B.2) for a derivation of the above gluing rules. We remind the reader that this gluing rule involves the non-geometric node (5.161) and hence the above gluing rules should be viewed only as an algebraic description and not as a geometric description. See the discussion after equation (5.160) for more details.
Now consider the last entry of Table 11: Gluing rules for 2 We can use any geometry with 1 ≤ ν ≤ 3 for su(2) (1) . The gluing rules are: The blowups x 1 in S 0,α and x 1 in S 1,α can also be used for gluing to other neighboring nodes of su(2) (1) that carry some su(n) (1) .

Gluing rules for
: We can use any geometry with 1 ≤ ν ≤ 3 for su(2) (1) . The gluing rules are: The blowups x 1 in S 0,α and x 1 in S 1,α can also be used for gluing to other neighboring nodes of su(2) (1) that carry some su(n) (1) .

Gluing rules for
(Note that the gluing rules proposed above are non-geometric.) The blowups x in S 0,α and x in S 0,β can be used to further glue to other neighboring su(1) (1) . See Appendix (B.2) for a derivation of the above gluing rules.
Gluing rules for 2 (Note that the gluing rules proposed above are non-geometric.) The blowups x in S 0,α and x in S 0,β can be used to further glue to other neighboring su(1) (1) .

sp(0) (1) gluings: untwisted, without non-simply-laced
At this point, we are only left with gluings of sp(0) (1) to other nodes carrying non-trivial gauge algebras. In this case, we also have to provide gluing rules for two neighbors at a time. This is because the torus fiber for dP 9 is 3l − x i which involves all of the blowups. So all of the blowups must appear in the gluing rules associated to each edge. This is in stark contrast to the gluing rules for non-trivial algebras g (q) where (typically) the blowups used for gluing rules associated to different edges are different. Thus in the case of g (q) , the gluing rules for different edges naturally decouple. However, in the case of sp(0) (1) , we have to provide gluing rules for multiple neighbors at a time and show explicitly that the curves inside dP 9 involved in gluing rules for different edges do not intersect. It turns out that in the context of 6d SCFTs, sp(0) (1) can only have a maximum of two neighbors carrying non-trivial algebras.
In the case when all the neighbors are untwisted, sp(0) (1) gluings were first studied in [4]. For the completeness of our presentation, we reproduce their results in this subsection (providing enhanced explanations while we do so) before moving onto sp(0) (1) gluings arising in the twisted case. Following [4], we will represent these sp(0) (1) gluing rules in a graphical notation that we review as we review the results of [4].
To start with, let us consider the gluing rules for which are displayed below (5.184) where each node denotes a curve in dP 9 whose genus is zero and self-intersection is −2.
If there are n edges between two nodes, it denotes that the two corresponding curves intersect in n number of points. Each curve C a shown above is glued to the fiber f of a Hirzebruch surface S a in the geometry associated to e (1) 8 . Which curve glues to the fiber of which S a can be figured out from the position of the curve in the graph above, because the graph takes the form of the corresponding Dynkin diagram, which in this case is e (1) and thus the torus fibers on both nodes are glued to each other, satisfying (5.60) for the untwisted case. Now, we can use the above gluing rules to obtain gluing rules for regular maximal subalgebras of e 8 as follows. For example, to obtain the gluing rules for  (2) is converted to the affine Dynkin diagram of su(2) (1) and similarly the finite Dynkin diagram of e 7 is converted to the affine Dynkin diagram of e (1) 7 . This is easy to do since we know that a weighted sum of the −2 curves participating in gluing to each affine Dynkin diagram must be 3l − x i . This requirement uniquely fixes the extra −2 curves that need to be added. We thus obtain (5.187) as the gluing rules for (5.186). l − x 3 − x 8 − x 9 glues to the fiber of affine surface for e (1) 7 and x 8 − x 9 glues to the fiber of affine surface for su(2) (1) . Notice that the curves in each sub-Dynkin diagram sum up to 3l − x i if the sum is weighted by the Coxeter labels of the corresponding affine Dynkin diagram. Also notice that the curves forming the Dynkin diagram for e (1) 7 do not intersect the curves forming the Dynkin diagram for su (2) (1) , which explicitly shows that the gluing rules for the two neighbors of sp(0) (1) decouple from each other as required.
Incidentally, (5.187) allows us to determined gluing rules for (1) 7 (5.190) with the fiber in affine surface glued to l − x 3 − x 8 − x 9 and with the fiber in affine surface glued to x 8 − x 9 . Deleting other nodes from (5.184), we can obtain the following gluing rules where x 8 − x 9 glues to the fiber of affine surface for so (16) (1) . 9 glues to the fiber of affine surface for su (9) (1) .
(1) 6 (5.194) where l − x 7 − x 8 − x 9 glues to the fiber of affine surface for e (1) 6 and x 8 − x 9 glues to the fiber of affine surface for su(3) (1) . Incidentally, this also allows us to obtain the following individual gluing rules (1) 6 (5.195) with the fiber in affine surface glued to l − x 7 − x 8 − x 9 , and with the fiber in affine surface glued to x 8 − x 9 . Now we can delete some nodes from the above set of gluing rules to obtain gluing rules for other algebras that arise as regular maximal subalgebras of the above algebras. For example, by deleting nodes from (5.192), we can obtain the gluing rules for so (8) (1) sp(0) (1) so (8) (8) is a regular maximal subalgebra of so (16). The gluing rules are where the fibers in affine surfaces glue to Tha bove gluing rules imply that the gluing rules for a single so(8) (1) are obtained by amputating one of the so(8) (1) sub-graph from (5.198).
with the fiber in affine surface glued to x 8 −x 9 . The reader might wonder what happens if amputate the other so(8) (1) sub-graph from (5.198) to obtain the gluing rules as It turns out that (5.199) and (5.200) are related by an automorphism of dP 9 . To see this, let's first relabel the blowups as so that (5.199) is converted to Now we perform two basic automorphisms of dP 9 . The basic automorphisms are described in Appendix A.2 and involve a choice of three blowups. For the first basic automorphism we choose the blowups x 1 , x 2 and x 4 , and after performing this operation the gluing rules (5.205) are transformed to For the second basic automorphism we choose x 6 , x 7 and x 8 thus transforming (5.206) to which precisely matches (5.200), thus demonstrating that (5.199) and (5.200) are isomorphic gluing rules. This will hold true in general in what follows. Whenever we will find two seemingly different gluing rules, they will always turn out to be related by an automorphism, except for two cases. These two cases are the gluing rules for su (8) (1) and su (8) (2) , where we find two possible gluing rules in each case. The two possibilities correspond to different choices of theta angle for sp(0) in the 6d theory.
Let us collect all of the remaining gluing rules below where the fibers in affine surfaces glue to where the fiber in affine surface glues to x 8 − x 9 .
where the fibers in affine surfaces glue to x 8 − x 9 and l − x 7 − x 8 − x 9 .
where the fibers in affine surfaces glue to where the fibers in affine surfaces glue to where the fibers in affine surfaces glue to where the fiber in affine surface glues to 2l − where the fiber in affine surface glues to x 8 − x 9 .
where the fibers in affine surfaces glue to where the fibers in affine surfaces glue to where the fiber in affine surface glues to 2l − where the fiber in affine surface glues to x 8 − x 9 .
where the fibers in affine surfaces glue to where the fibers in affine surfaces glue to x 8 − x 9 and 3l − x 1 where the fibers in affine surfaces glue to where the fibers in affine surfaces glue to where the fibers in affine surfaces glue to where the fibers in affine surfaces glue to where the fiber in affine surface glues to x 8 − x 9 .
where the fiber in affine surface glues to x 8 − x 9 . Finally, we come to the gluing rules for su(8) (1) for which we have two versions depending on the choice of theta angle for sp(0). The adjoint of e 8 decomposes into the adjoint plus an irreducible spinor of so (16). In our study, this spinor corresponds to the node of so(16) Dynkin diagram whose corresponding fiber is glued to x 2 − x 1 in (5.192). This is visible from the gluing rules (5.184) for e (1) 8 since the extra particles in adjoint of e 8 come from the curve x 3 − x 2 which indeed transform in the spinor of so (16) associated to Now, to obtain the gluing rules for su (8) (5.192), and we have the choice to either delete l − x 1 − x 2 − x 3 or x 2 − x 1 . This latter choice leads to another choice of spinor of so (16). If we delete x 2 − x 1 , then this matches the previous choice of spinor we had, and leads to the gluing rules for θ = 0. If we delete l − x 1 − x 2 − x 3 , then this does not match the previous choice of spinor we had, and leads to the gluing rules for θ = π. In the latter case, su(8) gauges the spinor of so (16) in the adjoint of e 8 , and in the former case it does not. Thus the latter case has less global symmetry compared to former. We refer the reader to [38] for more details. The two gluing rules are thus as follows: (5.229) In both the cases, the fiber in affine surface glues to x 8 − x 9 .

sp(0) (1) gluings: untwisted, with non-simply-laced
Until now, we have only considered simply laced subalgebras of e 8 . To generalize our gluing rules to non-simply laced subalgebras of e 8 , we use the folding of Dynkin diagrams. The Dynkin diagrams for untwisted affine non-simply laced algebras can be produced by folding the Dynkin diagrams for untwisted affine simply laced algebras. The foldings relevant in our analysis are: For example, to obtain the gluing rules for we simply fold the graph (5.192) to obtain (5.234) where the fiber in affine surface glues to x 8 − x 9 and the rightmost node denotes two −2 curves x 2 − x 1 and l − x 1 − x 2 − x 3 . Both of these curves glue to a copy of the fiber of the corresponding surface in the geometry for so (15) (1) . We can check that the weighted sum of fibers equals 3l − x i .
Since we can now have multiple gluing curves associated to the gluing of dP 9 to some other surface, we have to make sure that all of the gluing curves are on an equal footing. More precisely, we have to make sure that the condition (5.17) is satisfied, which translates to the following condition. Let S a be the different surfaces dP 9 is glued to, and let C i a be the different gluing curves in dP 9 for the gluing to S a . The total gluing curve for the gluing to S a is Then (5.17) translates to the condition that for all i, j, a, b. It can be easily verified that (5.234) satisfies this condition. This condition (5.236) will be an important consistency condition in what follows and the reader can verify that all of the geometries that follow satisfy (5.236). By folding other gluing rules presented above, we can obtain the following gluing rules where the fibers in affine surfaces glue to where the fiber in affine surface glues to x 8 − x 9 .
where the fibers in affine surfaces glue to x 8 − x 9 and l − x 7 − x 8 − x 9 .
-120 -where the fibers in affine surfaces glue to x 8 − x 9 and 2l − x 1 where the fibers in affine surfaces glue to where the fibers in affine surfaces glue to x 8 − x 9 and 2l − x 1 where the fibers in affine surfaces glue to where the fibers in affine surfaces glue to where the fibers in affine surfaces glue to where the fiber in affine surface glues to 2l − where the fibers in affine surfaces glue to x 8 − x 9 and l − x 7 − x 8 − x 9 .
where the fibers in affine surfaces glue to x 8 − x 9 and 2l − x 1 where the fibers in affine surfaces glue to where the fibers in affine surfaces glue to where the fibers in affine surfaces glue to where the fiber in affine surface glues to 2l − where the fiber in affine surface glues to l − x 7 − x 8 − x 9 .
where the fibers in affine surfaces glue to x 8 − x 9 and 2l − x 1 where the fibers in affine surfaces glue to x 8 − x 9 and 3l − 2x where the fibers in affine surfaces glue to where the fiber in affine surface glues to 2l − where the fibers in affine surfaces glue to where the fiber in affine surface glues to x 8 − x 9 . The above cases do not completely exhaust all the possible non-simply laced subalgebras of e 8 . Some of these subalgebras cannot be thought of as foldings of simply laced subalgebras of e 8 . One such example is f 4 ⊕ g 2 . Notice that unfolding f (1) leads to e (1) 6 ⊕ so(8) (1) , but e 6 ⊕ so (8) is not a subalgebra of e 8 . To obtain the gluing rules for this example, we find a collection of curves giving rise to g (1) 2 not intersecting (5.253) and satisfying (5.236): where the fibers in affine surfaces glue to x 8 − x 9 and l − x 7 − x 8 − x 9 . Notice that even though, by the virtue of (5.236), the total gluing curves see different component gluing curves equally, the different components do not. For example, even though the gluing curve x 3 − x 2 has different intersections with the gluing curves l − x 2 − x 5 − x 7 and l − x 1 − x 4 − x 7 , the total gluing curve (x 3 − x 2 ) + (x 5 − x 6 ) equal intersections with the two gluing curves l − x 2 − x 5 − x 7 and l − x 1 − x 4 − x 7 , as required by (5.236). Similar remarks apply to many of the gluing rules that follow.
To obtain the gluing rules for so(9) ⊕ so (7), we start from (5.241) and extend the chains for one of the so (7): where the fibers in affine surfaces glue to By folding so (7) (1) we can obtain g 2 , so folding the above gluing rules we obtain the following gluing rules where the fibers in affine surfaces glue to

sp(0) (1) gluings: twisted algebras, undirected edges
Now we provide gluing rules for the cases involving twisted gauge algebras and undirected edges, that is gluing rules of the form Most of these gluing rules can be understood as foldings of gluing rules of the form provided above. The relevant foldings are For example, for so (14) (2) , we fold (5.234) to obtain (1) so(14) (2) (5.271) where two copies of fibers in affine surface glue to Let d a be the dual Coxeter labels for so (14) (2) and f a be the fibers in the Hirzebruch surfaces corresponding to so(14) (2) . Then, Thus, (5.60) holds true in this case. Same holds true for all the following examples in this subsection, as the reader can verify.
To obtain other so(2n) (2) of lower rank, we add the curves lying in the middle of the chain in (5.271). Adding x 4 − x 5 to x 1 ' − x 4 , we obtain the gluing rules for so(12) (2) : Continuing in this fashion, we obtain glue to fibers in affine surface.
glue to fibers in affine surface.
glue to fibers in affine surface.
By folding (5.192), we obtain the following two gluing rules where x 8 − x 9 , x 2 − x 1 glue to fibers in the affine surface.
Combining x 6 − x 7 , x 5 − x 6 and x 4 − x 5 in (5.277), we obtain the gluing rules for su(6) (2) : where x 8 − x 9 , x 2 − x 1 glue to fibers in the affine surface. Folding (5.277), we obtain glue to four copies of fiber in the affine surface. By adding the curves in the previous configuration, we obtain the following two: glue to four copies of fiber in the affine surface.
glue to four copies of fiber in the affine surface. Folding (5.253), we obtain 6 and l − x 7 − x 8 − x 9 glue to three copies of fiber in the affine surface.
By folding (5.190) and (5.187) we obtain: where l − x 3 − x 8 − x 9 and x 6 − x 7 glue to two copies of fiber in the affine surface. 9 and x 6 − x 7 glue to fibers inside corresponding affine surfaces.
In a similar fashion, by folding other configurations and sometimes adding some of the curves in them, we can obtain the following configurations: 9 and x 3 − x 2 glue to fibers inside corresponding affine surfaces. 9 and x 3 − x 2 glue to fibers inside corresponding affine surfaces. 3 glue to fibers inside corresponding affine surfaces.
glue to fibers inside corresponding affine surfaces. 3 glue to fibers inside corresponding affine surfaces.
glue to fibers inside corresponding affine surfaces. 3 glue to fibers inside corresponding affine surfaces.
glue to fibers inside corresponding affine surfaces. 7 glue to fibers inside corresponding affine surfaces. 7 and x 5 − x 9 glue to fibers inside corresponding affine surfaces.
glue to fibers inside corresponding affine surfaces.
glue to fibers inside corresponding affine surfaces.
glue to fibers inside corresponding affine surfaces. 9 glue to fibers inside corresponding affine surfaces. 9 glue to fibers inside corresponding affine surfaces.
glue to fibers inside corresponding affine surfaces. 9 glue to fibers inside corresponding affine surfaces. 6 , and l − x 7 − x 8 − x 9 glue to fibers inside corresponding affine surfaces. 6 , and l − x 7 − x 8 − x 9 glue to fibers inside corresponding affine surfaces.
glue to fibers inside corresponding affine surfaces.
glue to fibers inside corresponding affine surfaces.
glue to fibers inside corresponding affine surfaces. 9 glue to fibers inside corresponding affine surfaces.
glue to fibers inside corresponding affine surfaces. Now, we are left with some possibilities that do not arise as foldings. For example, the unfolding of e (2) 8 . To obtain the gluing rules for this case, we notice that folding of (5.190) has zero mutual glue to fibers inside corresponding affine surfaces.
glue to fibers inside corresponding affine surfaces. 9 glue to fibers inside corresponding affine surfaces. 4 and l − x 2 − x 7 − x 8 glue to fibers inside corresponding affine surfaces.
x8 and x 4 − x 7 glue to fibers inside corresponding affine surfaces.

sp(0) (1) gluings: Directed edges
Finally we consider cases in which one or both the neighbors of sp(0) (1) are connected to it via directed edges. Our main constraint comes from (5.60) which states that the torus fibers must be glued appropriately. Let us define C 0,α be a −2 curve in dP 9 which glues to the affine surface for g (qα) α in the gluing rule associated to an undirected edge, that is gluing rule for sp(0) (1) g (qα) α (5.319) If q α = 1, then there is a unique C 0,α . If q α > 1, then there can be multiple such −2 curves. In this case, we pick the curve containing the blowup x 9 as C 0,α . This uniquely fixes the −2 curve C 0,α . The reason for the prominence of the blowup x 9 in this definition is that the KK mass 1 R enters into the volume of x 9 , and the volume of any other curve in dP 9 that does not involve x 9 is independent of 1 R . We refer the reader to [4] for more details.
To obtain the gluing rules for γ eγ (5.320) we start from the gluing rules for g (qα) α sp(0) (1) g (qγ ) γ (5.321) and simply replace the curve C 0,γ in dP 9 by the curve C 0,γ + e γ (3l − x i ). Similarly, to obtain the gluing rules for γ eγ eα (5.322) we start from the gluing rules for and simply replace the curves C 0,γ and C 0,α in dP 9 by the curves C 0,γ + e γ (3l − x i ) and C 0,α + e α (3l − x i ) respectively. It is trivial to see that this replacement satisfies (5.60). Now we only need to consider gluing rules of the form γ eγ (5.324) since in the context of 6d SCFTs, it is not possible for any other node to attach to sp(0) (1) in (5.324).
We first work out the following gluing rules by hand: where x 8 − x 9 , x 2 − x 1 glue to two copies of fiber in the affine surface. Indeed we can check that twice the torus fiber for so (8) (1) is glued to 3l − x i . By folding the above gluing rules, we obtain: glue to four copies of fiber in the affine surface. Treating su (3) (1) as a subalgebra of so (7) (1) , we can obtain the following gluing rules where x 4 − x 9 , x 2 − x 7 glue to two copies of fiber in the affine surface. Finally, folding (5.326), we obtain glue to eight copies of fiber in the affine surface.

Conclusions and future directions
In this paper, we have associated a genus-one fibered Calabi-Yau threefold to every 5d KK theory, except a few cases for which we provide an algebraic description mimicking the properties of genus-one fibered Calabi-Yau threefolds. Compactifying M-theory on the threefold constructs the KK theory on its Coulomb branch. The threefold is presented as a local neighborhood of a collection of surfaces intersecting with each other. We explicitly identify all the surfaces and their intersections for every KK theory. Such a description of the threefold allows an easy determination of the set of all compact holomorphic curves (known as the Mori cone) inside the threefold along with their intersection numbers with other cycles in the threefold. The Mori cone encodes crucial non-perturbative data needed to perform RG flows on the KK theory which lead to 5d SCFTs. For the cases without a completely geometric description we propose an analog of Mori cone using which one can perform RG flows on these outlying KK theories as well.
According to a conjecture (see [2][3][4]) for which substantial evidence was provided in [2], all the 5d SCFTs sit at the end points of such RG flows emanating from 5d KK theories. Thus, this work can be viewed as providing a preliminary step towards an explicit classification of 5d SCFTs. In principle, the Coulomb branch data of all 5d SCFTs is encoded in the properties of Calabi-Yau threefolds presented in this paper (see Section 5). Explicitly, such RG flows are performed by performing sequences of flops and blowdowns on the Calabi-Yau threefolds associated to 5d KK theories. See [2][3][4] for a general discussion and [10] for the explicit classification of 5d SCFTs upto rank three using the results of this paper. Extending the classification to higher ranks, perhaps using a computer program, would be of significant interest.
The Calabi-Yau threefold associated to a 5d KK theory is determined by combining the data of the prepotential of the KK theory with certain geometric consistency conditions. We provide a concrete proposal for the computation of this prepotential based on the definition of the 5d KK theory in terms of a 6d SCFT on a circle and twisted by a discrete global symmetry around the circle. See Section 4 for more details.
Along the way, we provide a graphical classification scheme for 5d KK theories which mimics the graphical classification scheme used to classify 6d SCFTs. In fact the graphs associated to 5d KK theories generalize the graphs associated to 6d SCFTs just as Dynkin graphs associated to general Lie algebras generalize the Dynkin graphs associated to simply laced Lie algebras. We provide a full list of all the possible vertices and edges that can appear in graphs associated to 5d KK theories. See Section 3 for more details. We leave an explicit classification of 5d KK theories to a future work. Such a classification can be performed in a straightforward fashion starting from the explicit classification of 6d SCFTs presented in [33,36] and applying the folding operations discussed in Section 3.
A noteworthy point deserving a special mention is that our work applies uniformly to all 6d SCFTs irrespective of whether they are constructed in the frozen phase of F-theory or in the unfrozen phase of F-theory. In other words, the dictionary relating M-theory and 5d KK theories applies uniformly to all 5d KK theories irrespective of the F-theory origin of the associated 6d SCFT. This is in stark contrast with the case of 6d SCFTs for which the dictionary relating F-theory and the resulting 6d theory is modified depending on the presence (called the frozen phase) or absence (called the unfrozen phase) of O7 + planes in the base of the elliptic Calabi-Yau threefold used for compactification of F-theory. See [32] for more details.
In the future, it will be interesting to use the geometries presented in this paper to derive 5d gauge theory descriptions associated to 6d SCFTs compactified on a circle (possibly with a twist). This can be done by performing local S-dualities on the geometries associated to 5d KK theories. See the recent work [54] for more details on the methodology. this appendix.

A.1 Hirzebruch surfaces
A Hirzebruch surface is a P 1 fibration over P 1 . We denote a Hirzebruch surface with a degree −n fibration as F n . We refer to the fiber P 1 as f and the base P 1 as e. Their intersection numbers are Another very important curve in F n is whose genus is zero and intersection numbers are Note that e = h for F 0 . The set of holomorphic curves, often referred to as Mori cone, for F n with n ≥ 0 is generated by e and f . For F n with n ≤ 0, the Mori cone is generated by h and f . The canonical class K of F n is an antiholomorphic curve which can be determined by the virtue of adjunction formula which states that for a surface S and a curve C inside S, the canonical class K S of S satisfies where g(C) is the genus of C. Demanding that K satisfies (A.8) for e, f determines it to be from which we can compute that Notice that F n and F −n are isomorphic to each other via the map h ↔ e (A. 13) It is easy to see that the above isomorphism only works when the blowups are generic. For, the non-generic one point blowup of F 1 contains the curve e − x, which would be sent to e − f inside F 1 0 . But e − f is not a holomorphic curve in F 1 0 . The above isomorphism is responsible for the equivalence of geometries corresponding to 1 sp(n) whenever the theta angle is physically irrelevant. In the situations where theta angle is physically relevant, the above isomorphism is broken by the presence of neighboring surfaces.
To differentiate between the different surfaces F b n for fixed n and b, we have to track the data of their Mori cone. One important point is that the gluing curves inside the surfaces must be the generators of Mori cone. In the paper, we find many instances in which a surface F b n appearing in different contexts carries different kinds of gluing curves, thus demonstrating that the two F b n are different surfaces. For example, the geometry with ν = 0 for The final point we want to address is that F 2 and F 0 are same up to decoupled states. This can be seen by noticing that the Mori cone of latter embeds into the Mori cone of former. This embedding This means that F 2 equals F 0 plus some decoupled states. Decoupling these states corresponds to performing a complex structure deformation F 2 → F 0 . When F 0 and F 2 carry blowups, this conclusion might be changed or unchanged depending on how the blowups are done. See the discussion after (B.17) for an example where this conclusion still holds true even in the presence of blowups.

A.2 del Pezzo surfaces
The discussion of del Pezzo surfaces starts with the discussion of complex projective plane P 2 which contains a single curve l whose genus is zero and intersection number is Performing n blowups on P 2 at generic locations leads to the del Pezzo surface dP n . It can be described in terms of curve l and x i with intersection numbers Again, the blowups create new holomorphic curves which can be written as with α, γ i ≥ 0. In the paper, we abuse the notation and call a non-generic n point blowup of P 2 as dP n too. The canonical class for dP n is del Pezzo surfaces and Hirzebruch surfaces are related to each other by virtue of an isomorphism dP 1 → F 1 which acts as A one point blowup of P 2 is always generic and thus there is a unique dP 1 which appears in the above isomorphism. A special example of del Pezzo surfaces for us in this paper will be dP 9 which is the geometry associated to 1 sp(0) (1) (A.41) The curve has the properties that F 2 = 0 (A. 43) and Thus, F is a fiber of genus one, or in other words a torus fiber inside dP 9 . dP n for n ≥ 3 admits the following basic automorphism. We first choose three distinct blowups x i , x j and x k , and then implement Combining this automorphism with permutations of blowups, we can obtain more general automorphisms of dP n (with n ≥ 3) which can be decomposed as a sequence comprising of above mentioned basic automorphisms and permutations of blowups. Notice that for dP 9 , any such automorphism leaves the torus fiber (A.42) invariant.

A.3 Arithmetic genus for curves in a self-glued surface
When a surface has no self-gluings, then the arithmetic genus 22 of curves living inside the surface can be computed using the adjunction formula (A.8). However, when the surface has self-gluings, the genus of the curve is modified. For example, consider gluing the exceptional curves x and y in a generic two point blowup of F 1 . The curve h − x − y looks like an elliptic fiber with nodal singularity, so its arithmetic genus should be one instead of zero, which is what would be suggested by (A.8). This example suggests that the intersection numbers of a curve C with the 22 Throughout this paper, we never use the geometric genus. Whenever the word "genus" appears in this paper, it always refers to arithmetic genus.
curves C 1 and C 2 participating in a self-gluing should be used to modify (A.8) in order to obtain the correct arithmetic genus. However, not all such intersection numbers participate in such a modification. To see this, consider the curve f − x in the above example. Even though it intersects x, its genus is correctly captured by (A.8).
What we learn from the examples of h − x − y and f − x is that the genus of a curve C is only modified whenever an intersection with C 1 has a partner intersection with C 2 . Thus our proposal for the computation of genus of an arbitrary curve C is as follows: Let n 1 and n 2 be the intersections of C with C 1 and C 2 respectively, and let n = min(n 1 , n 2 ). Then, our proposal for computation of genus is 2g(C) − 2 = (K S + C) · C + 2n (A.49) (A.49) allows certain curves to have a non-negative genus even though they did not have a non-negative genus before self-gluing. For example, consider The curve e − x − 2y has g = 0 according to (A.49) while it has g = −1 according to (A.8) which is the formula we would use in the absence of self-gluing. e − x − 2y appears as a gluing curve in some of our geometries, for example (5.107), (5.108), (5.156) and (5.158).

B Exceptional cases
In this Appendix we study some of the exceptional cases where the methods used in the paper are not applicable in a straightforward manner.

B.1 Geometries for non-gauge theoretic nodes
The following non-gauge theoretic nodes arise in our analysis According to our proposal the prepotential 6F for each case must be zero. So the geometry cannot be directly guessed from the prepotential. One can try to take corresponding limits of the geometries for the following gauge theoretic nodes But this procedure is unreliable. For example, taking the limit of the geometry (5.112) would suggest that there should exist a phase of (B.2) governed by the geometry 3) is known, which allows us to reliably compute the corresponding geometries. In terms of the language used throughout this paper, this gauge theory description is a "noncanonical" gauge theory description of these KK theories, since it does not correspond to the 6d gauge theory description on the tensor branch of the corresponding 6d SCFT.
To start with, it is known that (B.1) can be described by the gauge theory su(2) with eight fundamental hypers. We can compute the prepotential via and convert it into a geometry as described in Section 5.1. When all mass parameters are turned off, we obtain the geometry which equals dP 9 . See the discussion that follows (5.102). Next, it is known that (B.2) can be described by the gauge theory sp(1) with an adjoint hyper and θ = 0. Moreover, it is known that upon integrating out the adjoint matter of sp(n), the theta angle remains unchanged. We know that the geometry corresponding to pure sp(1) with θ = 0 is where we adopt the convention that f is the W-boson of sp(1) and e is an instanton. So, we just have to integrate the adjoint matter into (B.10) to figure out the geometry for (B.2). We can write the weights of the adjoint as w 1 = (2), w 2 = (0) and w 3 = (−2) in terms of their Dynkin coefficient. When mass parameter for adjoint is very large, then according to the discussion in Section 5.1, we should be able to find a −1 curve C living inside a non-compact surface N such that C intersects S 0 = F 0 transversely at two points. We can consistently choose the gluing curve for N inside S 0 to be f since N · f must be zero as the mass of the W-boson must be independent of the mass parameter associated to N which is the mass parameter associated to adjoint hyper. As we bring the mass of adjoint to zero, C undergoes a flop transition. If a −1 curve living outside a surface S intersects S at two points transversely, then flopping the −1 curve leads to the emergence of self-gluing on the surface S. Thus, the geometry for (B.2) is with the gluing curve to N being the genus one curve f − x − y. We can write the geometry in an isomorphic way by first exchanging e with f , which keeps the description (B.11) while changing the gluing curve to N as e − x − y. Now we perform the 14) which changes (B.11) to with the gluing curve to N being e. As discussed at the end of Appendix A.1, this geometry gives rise to some decoupled states which can be decoupled by doing a complex structure deformation to Performing an exchange of e and f again leads to the geometry which is what is displayed in (5.113) because the fiber f becomes an elliptic fiber in this frame (with a nodal singularity). This is as we would expect from the fact that (B.2) arises from an untwisted unfrozen 6d SCFT and hence it must be possible to feed the geometry (B.19) into F-theory, which requires the presence of an elliptic fibration. The gluing curves for the non-compact surface responsible for mass parameter of adjoint are x and y in this frame. Finally, it is known that (B.3) can be described by the gauge theory sp(1) with an adjoint hyper and θ = π. The geometry corresponding to pure sp(1) with θ = π is In a similar fashion as above, integrating in the adjoint leads to which is indeed the "geometry" presented in (5.160). We write the word geometry in quotation marks because it is only to be understood as an algebraic description mimicking the properties of the geometric description available for other KK theories. See the discussion after equation (5.160) for more details.

B.2 Gluing rules between non-gauge theoretic nodes
As we combine non-gauge theoretic nodes via edges, the prepotential 6F still remains zero. Thus, another method to compute the gluing rules presented in the main body of this paper is desirable. The goal of this section is to provide this alternative derivation.
Gluing rules for 2 : It is known that this KK theory is equivalent to a 5d sp(2) gauge theory with eight fundamentals and an antisymmetric. The theta angle for sp(2) is irrelevant due to the presence of fundamentals. So we can start with geometry corresponding to any theta angle for pure sp(2) and then integrate in the matter. The geometry with theta angle zero is leading to the same gluing rules as those presented in the main text.
su(1) (1) 2 su(1) (1) : It is known that this KK theory is equivalent to a 5d su(3) gauge theory with an adjoint and Chern-Simons level zero. The geometry for su(3) with CS level zero is (B.28) The weight system for adjoint in this phase is Notice that both the blowups are glued to each other. This can be understood as a consequence of the fact that they both correspond to the same weight i.e. (−1, −1) − , but since there is a single such weight, these two curves must be identified with each other. In this flop frame, the weight system is leading to the same gluing rules as those presented in the main text.
Gluing rules for 2 : It is known that this KK theory is equivalent to a 5d sp(2) gauge theory with an adjoint and theta angle zero. The geometry for pure sp(2) with zero theta angle is known to be (B.32) The weight system for adjoint in this phase is In this phase, the weight (0, −1) + can be identified with curves f 1 − x and f 1 − y, along with a −1 curve z living in a non-compact surface and intersecting S 2 at one point. z is glued to f 1 − x but not to f 1 − y. Since if it glues also to f 1 − y, then it would mean that f 1 − x is glued to f 1 − y resulting in another self-gluing of S 1 , namely After this self-gluing, the volumes of f 1 − x and f 1 − y will be φ 1 − φ 2 leading to a contradiction with our starting step that their volume is −φ 2 . Now, to flip the sign of the weight (0, −1), we have to flop f 1 − x ∼ z which automatically flops f 1 − y since its volume is same. The flop of f 1 − x creates a new blowup on S 1 that we call x . Similarly, the flop of f 1 − y creates a new blowup on S 1 that we call y . Moreover the flop of z creates a blowup on S 2 that we call z .
After the flop S 1 = F 2 4 with f 1 − x glued to f 1 − y and S 2 = F 1 2 . The total gluing curve for S 2 in S 1 is e 1 + x + y , and the total gluing curve for S 1 in S 2 is 2h. The gluing f 1 − x ∼ z transforms into the gluing x ∼ z in the new frame. Thus, the total gluing curve splits into two gluing curves: The reader can check that the curves involved on both sides in both of these gluings have same genus, and moreover (5.17) and (5.18) are satisfied for both gluings. Notice that if we would have tried to split the total gluing curve into three gluing curves e 1 , x , y glued respectively to 2h − 2z , z , z , we would have run into two problems. First is the same problem that we noted before the flop was performed, that this would imply a second self gluing x ∼ y of S 1 and the weight system won't match with the system of curves in the geometry anymore. Second, the genus of 2h 2 − 2z is −1 and the genus of e 1 is +1, so the first gluing curve wouldn't make sense. Thus at this step of the integration process, the geometry is where we have dropped the primes on the blowups. The corresponding weight system is By performing an isomorphism, we can write the geometry as The weight (2, −2) + corresponds to the curve x ∼ y, and the weight (−2, 1) + corresponds to the curve f 2 − z. Upon flopping them, we obtain the geometry with adjoint matter completely integrated in After an isomorphism, we obtain : It is known that this KK theory is equivalent to a 5d sp(2) gauge theory with an adjoint and theta angle π. Thus, the analysis for this case is similar to that of the last case which was 2 su(1) (1) 2 since only the theta angle is different for these two cases. Following similar steps as above, the final "geometry" 23 analogous to (B.38) is found to be which after an isomorphism becomes which matches the gluing rules claimed in the text. 23 We remind the reader that it should only be viewed as an algebraic description since the KK theory involves the non-geometric node.

B.3 Theta angle for sp(n)
Notice that there are two inequivalent geometries which give rise to a 5d pure sp(n) gauge theory: These two geometries correspond to two different possible values of theta angle. The only difference between (B.43) and (B.44) is whether S n = F 0 or S n = F 1 . It is wellknown that (see for instance [2]) for sp(1), θ = 0 has S 1 = F 0 and θ = π has S 1 = F 1 , while for sp (2), θ = 0 has S 2 = F 1 and θ = π has S 2 = F 0 . We claim that for higher n, the same pattern continues to hold and the theta angle corresponding to F 0 (or F 1 ) changes by π (mod 2π) every time one increases the rank n by one unit. To see this, one can start from the statement [55] that the KK theory 2 su(1) (1) 2 with a total of n nodes is equivalent to a 5d sp(n) gauge theory with an adjoint hyper and θ = π. We can build the geometry corresponding to (B.45) by using the data presented in this paper and derived in Appendix (B.2). Now the key point is that integrating out the adjoint matter does not change the theta angle. So, we can simply integrate out the adjoint matter from the geometry corresponding to (B.45) to land on to pure sp(n) theory with θ = π. This process is inverse of the process of integrating in of matter discussed in Appendices (B.1) and (B.2) and corresponds to making the virtual volumes of all the weights of adjoint of sp(n) to have the same sign. Once this is done, it is found that the geometry for θ = π is (B.43) whenever n is even, and the geometry (B.44) whenever n is odd. From this we conclude that the geometry (B.43) corresponds to θ = θ 0 and the geometry (B.44) corresponds to θ = θ 1 where

C A concrete non-trivial check of our proposal
We devote this section to a concrete and non-trivial check of our proposal. It is known that [24] the KK theory 2 su(2) (1) 2 is equivalent to the 5d gauge theory with gauge algebra su(2) ⊕ su(4) with a hyper transforming in F ⊗ Λ 2 . More precisely, the gauge-theoretic phase diagram for the su(2) ⊕ su(4) embeds into the phase diagram for the KK theory (C.1). In this section we will show this explicitly. Let us start with the geometry assigned to (C.1) in the draft with ν chosen to be zero for both su(2) (1) : where the surfaces S 0 and S 1 correspond to the left su(2) (1) in (C.1), and the surfaces S 0 and S 1 correspond to the right su(2) (1) in (C.1). As visible in the above diagram, x 4 in S 0 is glued to x 2 in S 0 . Flopping this curve, we obtain Now flopping f − x in S 1 which is glued to x 1 in S 0 , we obtain which after performing an isomorphism on S 0 can be written as Now, flopping the e curves inside S 0 and S 1 (which are glued to each other), we obtain where a surface without a subscript denotes that the surface is a del Pezzo surface rather than a Hirzebruch surface. That is, S 0 = dP 4 and S 1 = P 2 = dP 0 . Let us use the blowup x 4 on S 0 to write S 0 in terms of the Hirzebruch surface F 1 Flopping x 3 in S 0 glued to f − x 1 in S 1 gives rise to We use x in S 1 to write S 1 in terms of Hirzebruch surface F 1 f ,x-y e y (C.9) three blowups x 1 , x 2 and y 1 to obtain Converting S 1 back into F 1 using the blowup y 2 , we obtain This is the final form of the geometry that we wanted to obtain. It is clear that S 0 , S 0 and S 1 describe an su(4) and S 1 describes an su(2) in (C.17). This can be checked by intersecting the fibers of the corresponding Hirzebruch surfaces with these surfaces. The intersection matrix yields the Cartan matrix for su(4) ⊕ su (2). Now, let us show that the configuration of blowups indeed describes Λ 2 ⊗ F of su(4) ⊕ su (2). For this we relabel the surfaces as thus rewriting the geometry as where the three entries on the left hand side of slash denote the weights with respect to su(4) comprised by S 1 , S 2 and S 3 , and the entry on the right hand side of slash denotes the weight with respect to su(2) comprised by S 1 . Thus we have reproduced the full weight system for Λ 2 ⊗F, justifying our claim. More precisely, the geometry (C.21) describes the su(4) ⊕ su (2) gauge theory in the gauge-theoretic phase given by the following virtual volumes

D Comparisons with known cases in the literature
In this section we present evidence strongly suggesting that our results recover all 5d KK theories associated to compactifications of 6d SCFTs on a circle with (or without) outer automorphism twists along the fiber obtained previously via other methods. In particular, we show that the geometries we obtain admit 5d gauge theory descriptions already proposed in the literature.

D.1 Untwisted
Let us start with an example of untwisted compactification. It has been proposed [28] that 1 sp(n) (1) (D.1) can be described by the 5d gauge theory having gauge algebra su(n + 2) with 2n + 8 hypers in fundamental. To see this consider the ν = 1 phase of (5.101) where we can see that the associated Cartan matrix is that of su(n + 2) and the 2n + 8 blowups sitting on S 0 can be identified with the fundamentals. This identification is done by noticing that the volume for a blowup matches the absolute value of virtual volume of a weight for the fundamental of su(n + 2).

D.2 Twisted
Now, let us consider an example when we twist by an outer automorphism. It has been proposed in [24] that 2 su(n) (2) (D.5) can be described by 5d gauge theory with gauge algebra so(n + 2) and n fundamental hypers. First let us consider the case when n = 2m. In this case the geometry is displayed in (5.142). Flopping all the y i , we obtain The Cartan matrix associated to this geometry is indeed that for so(2m + 2) and the 2m blowups can be identified as 2m hypers in fundamental of so(2m + 2). Similarly, the geometry for n = 2m + 1 is given in (5.143). Flopping x i ∼ y i living on S 0 , we obtain which precisely describes so(2m + 3) with 2m + 1 hypers in fundamental of so(2m + 3).

E Instructions for using the attached Mathematica notebook
A Mathematica notebook is included as an ancillary file with the arXiv submission of this paper. The use of this notebook requires installation of the Mathematica package LieArt.nb which can be found online at. In particular, the notebook provides the evaluation of two functions Geometry5dKK and SignsKK. The former can be used to compute the shifted prepotential 6F (defined in Section 4.2) for 5d KK theories whose associated graph contains either one or two nodes; see Tables 1-5 and Tables 8-11. The latter function can be used for the evaluation of all possible signs associated to different phases of the above prepotential.
The Mathematica notebook is built around the use of the function The above function outputs a graphical representation of the shifted prepotential 6F associated to the input 5d KK theory. The graphical output is naturally organized in the form of triple intersection numbers for the associated geometry. See Section 5.1.1 for the map between triple intersection numbers and the shifted prepotential.

Input
Let us now describe possible inputs for the function Geometry5dKK: • For a single node • When there is a single node, the second and final input captures the data of g (q) . When there are two nodes, the second input captures the data of g (qα) α , and the third and final input captures the data of g (q β ) β . The data of an affine algebra is captured by dividing it into the "algebra part" and the "twist part". For example, the algebra part of g (q) is g which is a finite Lie algebra, and the twist part of g (q) is q. The algebra part can be inserted in LieArt format. For example, A-type can be inserted as And other types can be inserted as
The full input thus is as follows: • For a single node, the following format is used: In order to consider trivial gauge algebras of type su(1), sp(0), one needs to insert a zero in the place of the algebra and twist input: that is we perform the replacement {Algebra, T wist} → 0. For example, if g α is trivial, but g β is not, then the input takes the form Some of the nodes contain extra decorations. Such nodes can be inserted by using extra identifiers as follows: • 1 su(n) (1) vs. 1 su( n) (1) To incorporate the second case, we replace T wist with {T wist, F rozen}. For example,

Choice of Phase
For each input, the output (i.e. the prepotential) depends on a particular choice of gauge-theoretic phase for the theory. The different gauge-theoretic phases correspond to different choices of signs for the virtual volumes of the weights of the representations associated to the matter content for the input KK theory. See Sections 4 and 5.1.3 along with Appendix B for more details. After the input is inserted, the notebook will request as additional input the signs of virtual volumes for all the weights corresponding to matter hypermultiplets. A popup window appears containing the information needed to make a consistent choice of signs. For example, consider 1 su(5) (1) . After inputting the correct data associated to this theory, a window appears as depicted in Figure 1. The information indicated in the window can be understood as follows: 2 This indicates the highest weight of the representation. 3 Here, N f represents the number full hypermultiplets transforming in the given representation. In Figure 1 there are 13 hypermultiplets transforming in the fundamental representation, while in Figure 2 there is one hypermultiplet transforming in the antisymmetric representation. 4 shows the Hasse diagram of the weight system of the representation. The Hasse diagram is a graphical representation of the partial order of the weight system. Recall, that given a highest weight w 1 one can construct the entire weight system by subtracting positive simple roots, w i = w i−1 − n i α i (α i denote the simple roots). For example, the fundamental representation of su (5), which is comprised of weights w i=1,...,5 , is characterized by the partial order w 1 ≥ w 2 ≥ · · · ≥ w 5 , where w i ≥ w j means that w i − w j = n i α i where n i ≥ 0. This information is important when determining the possible choices of signs for the virtual volumes of weights lying in this weight system. For example, if we choose w 3 to be have a positive virtual volume, then w 2 needs to also have a positive virtual volume since w 2 ≥ w 3 according to the Hasse diagram.
The red superscript indicates whether a weight is positive or negative. A positive (resp. negative) weight is defined as the positive (resp. negative) linear combination of simple roots. When no mass parameters are turned on, then the signs of virtual volumes for positive and negative weights are fixed to be positive and negative, respec- tively (assuming the dual of the irreducible Weyl chamber is defined as the region in which the virtual volumes of all positive simple roots are positive.) The signs of the rest of the weights are undetermined by the signs of simple roots and hence can be chosen freely as long as the ordering described by the Hasse diagram is satisfied. When mass parameters are turned on, then it is possible for positive weights to have negative virtual volume and negative weights to have positive virtual volume, for some values of the mass parameters. For a generic choice of mass parameters, the only constraint for any of the signs of the weights is that the ordering provided by the Hasse diagram is respected.
5 This is the area in which a choice of signs should be specified.A default input is given where all the signs are positive, that is "+1". The notation s[i] j is explained as follows: i labels each different representation (in this case, i runs over two two representations) and j labels the different of weights (in this case, for the fundamental representation, j runs from 1 to 5, while for the antisymmetric representation, j runs from 1 to 10). For example, based on the Hasse diagram presented in Figure 1 and assuming we do not turn on any mass parameters, we can make a list of all the allowed choices of signs for the fundamental representation of su (5) In the case of two nodes, the code first asks for the signs of the weights associated to the first algebra. The pop-up window is exactly as discussed above, with the sole difference being that the notation for the signs is modified to s[i] j,1 , where in addition to the subscripts i, j that respectively label the different representations and weights, there is another subscript 1 that indicates the representation is charged under the first algebra. After the signs associated to the representations of the first algebra have been specified, a second window appears requesting the signs associated to the second algebra. The format is identical, with the distinction that the signs are denoted by s[i] j,2 , with the subscript 2 labeling the second algebra. Finally, a third window appears requesting signs for the weights of tensor product representations charged under both the first and second algebras. An example of the third window is displayed in Figure 3. In this case, on the upper left side of the window instead of a slider one can find the number of hypermultiplets transforming in a mixed representation. In Figure 3 there is one such hypermultiplet, but in other cases there can be a half-integer number of hypermultiplets. This information is necessary to determine a consistent choice of signs, since for example mass parameters cannot be switched on for half-hypermultiplets. The Hasse diagram in this case is that of the tensor product representation R 1 ⊗ R 2 , where R 1 = R 2 = 2 of su(2).
Let v i denote the weights associated to the first su(2) and let ω i denote the weights associated to the second su(2). The weight system of the tensor product of these two representations is The Hasse diagram of this weight system can now be determined based on the ordering of the weights v i and ω j . For example, The Hasse diagram and the number of hypermultiplets is enough to determine a consistent choice of signs. The signs follow a similar notation as above, namely b [1] i,j (E. 6) where the bracketed '1' indicates that there is only one mixed representation and the subscripts i, j are the same as the subscripts for w {i,j} , referring to weights of the first and second algebras respectively. The output of this function is the appropriate number of hypermultiplets and the type of representation, together with the Hasse diagrams of the weight systems. As described above, the Hasse diagram includes superscripts indicating whether a weight is positive, negative, or indeterminate sign. In the absence of mass parameters the only signs that need to be determined are those of the indeterminate weights. Note that zero weights have superscript '0'. The output, namely all consistent gauge-theoretic phases of the theory, is presented both as a collection of Hasse diagrams and as a list of sign choices. The Hasse diagrams for the allowed signs includes superscripts indicating when the signs are taken to be positive (blue) or negative (red). This function is useful for determining all allowed phases and corresponding sign choices when computing the geometry.

Allowed signs for the representations
It is important to note that in some cases the signs associated to different hypermultiplets are not independent. For example, consider where the extra labels indicate the number of hypermultiplets included in the theory. In particular, note that there are 2n α + 8 − n β 2 full hypermultiplets of sp(n α ) (1) and one half-hyper in a mixed representation. This half-hypermultiplet comes from the branching of the bifundamental n α ⊗n β → n α ⊗((n β −1)⊕1) after performing the twist of so(n β ) (2) , which leaves invariant the algebra so(n β − 1). This implies that the signs associated to the half-hypermultiplet are not independent but rather depend on the signs chosen for the bifundamental representation. In this case the function SignsKK returns all possible sign choices consistent with these branching rules.
For example, consider n α = 1 , k = 3 and n β = 4. The Hasse diagram for the bifundamental combined with the half-hypermultiplet of sp(1) is displayed in Figure 4. The possible sign choices are displayed in Figure 5.  Once the signs have been specified in Geometry5dKK, the following output is returned (see an example shown in Figure 6), and is comprised of the following elements: 1. The triple intersection numbers for the corresponding geometry are presented in a graphical form similar to the graphs presented in Section 5 of this paper. The vertices of the graph are surfaces and edges between the vertices indicate the intersections between the corresponding surfaces. The superscript on a vertex i denotes 8 − S 3 i . If the superscript is zero, then it is not displayed. Every edge carries two yellow boxes at either ends. Consider an edge going between vertices i and j. The number in the yellow box near the vertex i denotes the triple intersection number S i S 2 j , and the number in the yellow box near the vertex j denotes the triple intersection number S 2 i S j . If the number carried by some yellow box is zero, then that box is not displayed. There is a purple box placed in the middle of every face formed by three edges joining three vertices, say i, j and k. The number in the purple box denotes the triple intersection number S i S j S k . If the number carried by purple box is zero, then it is not displayed.
2. The choice of signs made by the user.
3. The the shifted prepotential 6F. In the case of a KK theory with a single node, φ 0 is the Coulomb branch parameter associated to the affine node of the Dynkin diagram and φ i with i = 1, ...Rank [Algebra] are the Coulomb branch parameters associated to the finite part of the diagram. In the case of a KK theory with two nodes, φ 0,1 , φ i,1 are the Coulomb branch parameters associated to the first (affine) algebra and φ 0,2 , φ i,2 are the Coulomb branch parameters associated to the second (affine) algebra.