K-Decompositions and 3d Gauge Theories

This paper combines several new constructions in mathematics and physics. Mathematically, we study framed flat PGL(K,C)-connections on a large class of 3-manifolds M with boundary. We define a space L_K(M) of framed flat connections on the boundary of M that extend to M. Our goal is to understand an open part of L_K(M) as a Lagrangian in the symplectic space of framed flat connections on the boundary, and as a K_2-Lagrangian, meaning that the K_2-avatar of the symplectic form restricts to zero. We construct an open part of L_K(M) from data assigned to a hypersimplicial K-decomposition of an ideal triangulation of M, generalizing Thurston's gluing equations in 3d hyperbolic geometry, and combining them with the cluster coordinates for framed flat PGL(K)-connections on surfaces. Using a canonical map from the complex of configurations of decorated flags to the Bloch complex, we prove that any generic component of L_K(M) is K_2-isotropic if the boundary satisfies some topological constraints (Theorem 4.2). In some cases this implies that L_K(M) is K_2-Lagrangian. For general M, we extend a classic result of Neumann-Zagier on symplectic properties of PGL(2) gluing equations to reduce the K_2-Lagrangian property to a combinatorial claim. Physically, we use the symplectic properties of K-decompositions to construct 3d N=2 superconformal field theories T_K[M] corresponding (conjecturally) to the compactification of K M5-branes on M. This extends known constructions for K=2. Just as for K=2, the theories T_K[M] are described as IR fixed points of abelian Chern-Simons-matter theories. Changes of triangulation (2-3 moves) lead to abelian mirror symmetries that are all generated by the elementary duality between N_f=1 SQED and the XYZ model. In the large K limit, we find evidence that the degrees of freedom of T_K[M] grow cubically in K.


Introduction
The six-dimensional (2,0) CFT remains one of the most interesting and enigmatic theories in theoretical physics. One approach to probing its various properties is to compactify the theory down to lower dimensions. Compactification on a (6 − d)-dimensional manifold M 6−d can lead to a theory T [M 6−d ] in d dimensions that is more familiar and more tractable, allowing one to test hypothetical aspects of the 6d theory. In particular, the existence of the 6d theory implies deep relations between the geometry and topology of M 6−d and the physics of T [M 6−d ], leading to new, testable insights in d dimensions. This approach has been extremely fruitful and successful in the study of four-dimensional N = 2 theories of "class S," which can be obtained by compactifying the 6d theory with ADE Lie algebra g on a punctured surface C [1][2][3]. It has resulted in a new understanding of dualities among 4d N = 2 theories -encoded in the geometry of a surface C -as well as new and unexpected relations between 4d N = 2 theories T g [C] on compact spaces and non-supersymmetric topological or conformal theories on C itself [4][5][6].
Recently, the approach has been extended to three-dimensional compactifications [7][8][9]. The partially twisted compactification of the (2, 0) theory with Lie algebra g on a generic 3-manifold M is expected to produce a 3d N = 2 superconformal theory T g Many relations are expected between the physics of T g [M ] and the classical and quantum geometry of flat G C connections on M , where G C is a gauge group 1 with complexified Lie algebra g C . A partial dictionary was provided by [7,8], following predictions of [11]. The dictionary is most interesting when M has a boundary. In this case, the 3d theory T g [M ] provides a half-BPS boundary condition for the 4d N = 2 theory T g [∂M ], and it is necessary, as part of the definition of T g [M ], to specify how the boundary theory would couple to 4d gauge fields and BPS hypermultiplets. Geometrically, this choice is encoded in a polarization Π for the complex symplectic space P G Let us also denote by L G C (M ) the set of flat G C connections on the boundary ∂M that can be extended as flat connections throughout the bulk of M ; generically it should be a Lagrangian submanifold of P G C (∂M ), cut out by algebraic equations. Then the dictionary of [7,8] (extended by [12]) can be summarized as G R Chern-Simons theory on M index on S 2 × S 1 ←→ full G C Chern-Simons theory on M holomorphic blocks on R 2 × q S 1 ←→ analytically cont'd CS wavefunctions on M (1.3) Of course, this is an extremely brief summary, and we refer to the original papers for complete details.
The authors of [7,8] established a complete and explicit construction of theories T 2 [M, Π] for g = A 1 and a very large class of 3-manifolds M with boundary. This allowed the dictionary (1.3) to be tested, and in many cases explicitly proved. Moreover, the construction provided new insight into the class of 3d SCFT's T 2 [M, Π] labeled by 3-manifolds.
For example, it was found that all the theories T 2 [M, Π] can be obtained by flowing to the IR from abelian N = 2 Chern-Simons-matter theories, with possibly nonperturbative 1 The appropriate choice of Lie group with the given Lie algebra is subtle and depends on the precise details of the compactification of the (2,0) theory, cf. [10,Sec 4]. In this paper, when g = AK−1 we will usually take G C = P GL(K, C) P SL(K, C). superpotential couplings that preserve U (1) R . (The superpotentials might contain monopole operators.) It was useful to designate the general set of SCFT's admitting such abelian UV descriptions as "class R." Thus class R includes all the T 2 [M, Π]. A given SCFT in class R may have several different UV Lagrangian descriptions, either abelian or nonabelian, related by 3d mirror symmetry [13,14].
The main physical goal of the present paper is to extend the construction of [7,8] to all g = A K−1 Lie algebras, obtaining theories T K [M, Π] that correspond, in principle, to a stack of K M5-branes wrapping M . Much of the paper will be devoted to developing fundamental mathematical tools to describe flat P GL(K, C) connections on a 3-manifold in the same basic way that flat P GL(2, C) connections were described, in particular by gluing them together "symplectically" from a tetrahedral decomposition. 2 After this is done properly, an immediate result will be that the theories T K [M, Π] also belong to class R -they also have UV realizations as abelian Chern-Simons-matter theories. We will find that the expected dictionary (1.3) continues to hold for g = A K−1 . On the Chern-Simons side, our constructions provide an explicit generalization of a circle of ideas initiated in [18] and studied in [19] and later works for complex gauge group P GL(2, C). Finally, by relating degrees of freedom of theories T K [M, Π] to the volume of P GL(K, C) connections on M , we will find hints that degrees of freedom scale like K 3 when K becomes large.
We now elaborate a little further on the physics and mathematics of the A K−1 constructions.

Physics perspective
A central ingredient in the constructions of [7,8] was the identification between the operations used to glue together and quantize flat P GL(2, C) connections on tetrahedra and operations in 3d N = 2 SCFT's. The geometric gluing rules, as described in [20] following [19,21,22], have a fundamentally symplectic nature. For example, a single ideal tetrahedron ∆ i is assigned a simple symplectic phase space P ∂∆ i := P 2 (∂∆ i ) = {(Z i , Z i , Z i )|Z i + Z i + Z i = iπ} C 2 , with coordinates labeling the tetrahedron's edges ( Figure 1) and Poisson bracket This space describes flat connections on the tetrahedron's boundary. The boundary phase space for a glued 3-manifold M = N i=1 ∆ i is then expressed as a symplectic quotient, where the C k are a set of complex moment maps that correspond to gluing constraints. (Each C k is a sum of parameters Z i , Z i , Z i at internal edges of the triangulation.) Similarly, The Lagrangian L 2 (M ) is the image of a product of tetrahedron Lagrangians L ∆ := L 2 (∆) = {e Z + e −Z − 1 = 0} under the reduction (1.4).
In turn, the 3d theories associated to three-manifolds behave like wavefunctions. Their abelian flavor symmetries are associated to half the coordinates of a boundary phase space, the "positions" in a chosen polarization. For example, in a polarization Π for the tetrahedron phase space with position coordinate Z and momentum Z , the tetrahedron theory T ∆ := T 2 [∆, Π] is the theory of a free chiral multiplet, with flavor symmetry U (1) and real mass Re Z. In order to construct T 2 [M, Π] for a triangulated manifold M , one takes a product of theories T ∆ , changes the polarization so that (new) flavor symmetries U (1) k correspond to the gluing functions C k , and adds operators O k to the superpotential to break these symmetries. Then one flows to the infrared. This is the field-theory version of symplectic reduction. The crucial change of polarization is implemented via an affine extension of Witten's Sp(2N, Z) action on 3d SCFT's [23], which gauges flavor symmetries and modifies Chern-Simons levels. Remarkably, 3d N = 2 mirror symmetry ensures that the construction of theories T 2 [M, Π] is independent of any choices made. In particular, changes of the ideal triangulation of M , which are generated by 2-3 moves (Figure 2), correspond to the elementary mirror symmetry that relates 3d N f = 1 SQED and the XYZ model.
In this paper, we generalize the gluing constructions to P GL(K, C) by introducing a new geometric concept: the K-decomposition of M . Roughly speaking, we first triangulate M and then decompose every tetrahedron into a pyramid of 1 6 K(K 2 − 1) octahedra, as in Figure 3. Every octahedron is defined to carry the same basic geometric and physical data previously associated to P GL(2, C) flat connections on a tetrahedron, Then, by gluing together the octahedra, we are able to construct generic flat P GL(K, C) connections on big tetrahedra and on three-manifolds.
In the spirit of [9,24] (also [25,26] in two dimensions), one may also think about wrapping a stack of K M5-branes on a three-manifold M , in the ambient geometry T * M . At low energies, the branes recombine into a single M5-brane, wrapping a K-fold spectral cover of M . The K-decomposition of M allows a description of the spectral cover so that locally, over every octahedron, only two of the sheets are nontrivially branched. The gluing of octahedra again turns out to have a symplectic nature. In particular, the phase space P K (∂M ) of flat P GL(K, C) connections on the boundary of a 3-manifold is simply the symplectic reduction of a product of octahedron phase spaces where now the moment maps C k come from sums of octahedron parameters at internal vertices in the decomposition. Then the procedure of defining the theories T K [M, Π] in class R becomes familiar and systematic. For example, if M = ∆ is simply an ideal tetrahedron, we put together T K [∆, Π] by applying the gluing rules to 1 6 K(K 2 − 1) free chiral theories. With judicious choices of polarization, we find flavor sym. 2 1 free chiral U (1) 3 4 free chirals U (1) 4 4 10 chirals + degree-six superpotential U (1) 9 5 20 chirals, U (1) 2 gauge group, W = (four monopole ops.) U (1) 16 (1.7) Even tetrahedron theories become quite nontrivial at large K ! For K ≥ 4, internal vertices of the K-decomposition lead to superpotentials, while for K ≥ 5 nontrivial gauge groups and monopole operators are unavoidable. Here, of course, the gauge group is always abelian by construction, though it would be extremely interesting to find nonabelian IR duals of these theories as well.
To build T K [M ] for a more interesting three-manifold M , we can either glue together the tetrahedron theories T K [∆], or simply work entirely in terms of octahedra. Just as for K = 2, the 2-3 moves that change the triangulation of M correspond to mirror symmetries between different UV Lagrangians, and at first glance they look extremely complicated. We find, however, that a 2-3 move for K-decomposed tetrahedra can always be decomposed into a basic 2-3 move for octahedra ( Figure 2). Correspondingly, the mirror symmetries among N = 2 theories T K [M ] always reduce to a composition of basic XYZ ↔ SQED dualities. (This begs the question of whether all IR dualities in class R are generated by XYZ ↔ SQED duality. The answer is still unknown.) From this construction, we might expect that the number of degrees of freedom in T K [M, Π] scales like the number of octahedra (i.e. free chiral theories) involved, at least if superpotential interactions can be neglected in the counting. Of course, in order to talk about the large-K behavior properly, we must find a uniform or standard way to choose the polarization Π for all K. This is easy to do, for example, when M is a knot complement.
In the case that M also admits a hyperbolic metric, the expectation (1.8) can be made more precise, agrees beautifully with the generic prediction from the AdS/CFT correspondence [27,28], cf. [29].

Mathematics perspective
Given a 3-manifold M with boundary, consider the moduli space Loc K (∂M ) of flat P GL(K, C)connections on the boundary ∂M . This space is a symplectic, with the symplectic form at the generic point given by the Weil-Petersson-Goldman construction. The moduli space of flat connections on the boundary ∂M that can be extended to M is expected to be a Lagrangian subvariety L K (M ) ⊂ Loc K (∂M ). One can quantize the symplectic space Loc K (∂M ) by defining a non-commutative qdeformation of the * -algebra of regular functions on Loc K (∂M ), and constructing its *representation in an infinite-dimensional Hilbert space H K (∂M ). This has nothing to do with a 3-manifold: the problem makes sense for any oriented 2d surface C. Assuming that the surface is hyperbolic, that is χ(C) < 0, and has at least one hole, the quantization was done in [30,31]. It generalizes the quantization of Teichmüller spaces [32,33], related to the SL(2) case. Even there, to solve the problem one had to consider a modification of the moduli space Loc K (C), which we discuss a bit later.
The next goal is to quantize the Lagrangian subvariety L K (M ). By this we mean defining a line in H K (∂M ) that must be annihilated by the q-deformations of the equations defining the subvariety L K (M ). In the SL(2) case, this was discussed in a series of physics papers [18], [8,19,20,22], [34][35][36], and is closely related to the mathematical work [37].
The following problem motivated this project. We would like to have a local procedure for the quantization of the moduli space of flat P GL(K, C)-connections on 3-manifolds, by decomposing the manifold into tetrahedra, quantizing the tetrahedra, and then gluing the quantized tetrahedra. This approach for SL (2) was implemented in [20] by introducing the phase space and the Lagrangian subvariety related to a hyperbolic tetrahedron. However, already for SL (2), an attempt to understand even the Lagrangian subvariety itself as a moduli space of flat connections immediately faces a serious problem: Any flat connection on a tetrahedron is trivial, so the corresponding moduli space is just a point, and thus cannot produce a Lagrangian subvariety in the phase space assigned to the boundary, which in this case is a four-holed sphere.
The problem is that the tetrahedron has trivial topology, while the moduli space of flat connections is a topological invariant of the manifold.
We suggest a solution to this problem based on the following idea. We consider moduli spaces of flat connections on 3-manifolds with framings. A framing amounts to introducing invariant flags on each of the so-called small boundary components, which we define below, invariant under the holonomy around the component. This, remarkably, allows one to produce the missing Lagrangian subvariety for the tetrahedron. The corresponding moduli spaces are defined for arbitrary admissible manifolds, and can be "symplectically" glued from the ones assigned to the tetrahedra. So we use the invariant flags to localize flat connections to tetrahedra.
A similar idea was used in [30] to introduce cluster coordinates on the moduli space X P GL(K) (C) of framed flat connections on a surface C with punctures: the invariant flags were invoked to localize flat connections on the ideal triangles.
In Section 2.1 we start with a careful discussion of a class of 3-manifolds with boundary, which we call admissible 3-manifolds, which are glued from truncated tetrahedra. Since the boundary faces of a truncated tetrahedra are of two different types, triangles and hexagons, the boundary of the manifold obtained by gluing them along the hexagonal faces also has two kind of boundary components, big (formed by the unglued hexagons) and small (formed by the triangles). We say that such a manifold is admissible if the fundamental groups of the small boundary components are abelian. This definition is dictated by the notion of framing. The very existence of a framing on an admissible 3-manifold is data rather then a condition, meaning that any vector bundle with flat connection on such a manifold admits at least one framing. Indeed, a family of commuting operators in a vector space V K always has an invariant flag, and typically just K! invariant flags (in a basis in which all operators are diagonal with different eigenvalues, choosing a flag amounts to ordering the basis). So by adding a framing to a flat vector bundle we enlarge the moduli space by taking its cover and partially resolving its singularities, rather then cutting it down.
In section 2.3 we discuss systematically the moduli spaces that we need, emphasizing their symplectic geometry properties, and aiming toward their quantization.
The simplest example of an admissible 3-manifold is the tetrahedron ∆, whose boundary is understood as a sphere with four punctures. The phase space related to the tetrahedron is the moduli space X un 2 (∂∆) of P GL(2, C)-bundles with framed flat connection on the four-holed sphere with unipotent monodromies around the holes. It is a two-dimensional symplectic space. Its Lagrangian subspace L 2 (∆) consists of the connections that can be extended to the bulk with framings at the four vertices at the boundary. Since any connection on the ball is trivial, the only data left is the four flags, which in this case amounts to a configuration of four lines in a two-dimensional space V 2 . The resulting pair L 2 (∆) ⊂ X un 2 (∂∆) (1.9) is our main building block. The basic symplectic phase space discussed around Figure 1 above is nothing else but a logarithmic lift of a natural Zariski open part of the moduli space X un 2 (∂∆), isomorphic to C * × C * . So we get a natural compactification of the latter given as a moduli space (i.e. a stack), which should help to deal with non-generic framings.
The first major goal now is how to build the Lagrangian subspace corresponding to the moduli space of framed flat P GL(K, C)-connections on an admissible 3-manifold M out of these building blocks. The first step, explained in detail in Section 2.4, is to start with an ideal triangulation of M , and, using the flat connection, parallel transport the invariant flags at the vertices to the interior of the tetrahedron. This way we get a well-defined configuration of four flags for each tetrahedron.
The second goal is to prove that our prospected Lagrangian subvariety is Lagrangian in a very strong sense: it is a K 2 -Lagrangian subvariety. Let us explain what do we mean by this.
K 2 -Lagrangian subvarieties. Let F * := F − {0} be the multiplicative group of a field F . Recall that F * ∧ F * = Λ 2 F * is the abelian group generated by elements of the form a ∧ b, a, b ∈ F * , with a ∧ b = −b ∧ a and (a 1 a 2 ) ∧ b = a 1 ∧ b + a 1 ∧ b. The group K 2 (F ) is the quotient of F * ∧ F * by the subgroup generated by Steinberg relations (1 − z) ∧ z, where z ∈ F * − {1}: (1.10) Next, let X be a complex algebraic variety X. Denote by C(X) the field of rational functions on X. Then there is a homomorphism to the space Ω 2 log (X) of holomorphic 2-forms with logarithmic singularities on X: d log ∧d log : C(X) * ∧ C(X) * −→ Ω 2 log (X), f ∧ g −→ d log f ∧ d log g . (1.11) The map kills elements (1 − f ) ∧ f , and so the image of an element W ∈ C(X) * ∧ C(X) * depends only on its class in K 2 (C(X)). It was proved in [30] that the symplectic form on the moduli space X un K (C) of unipotent flat connections on a 2d surface C can be upgraded to its motivic avatar, a class W in K 2 of X un K (C). The symplectic form is recovered as d log ∧d log(W). A much wider class of examples is provided by cluster A-varieties in [38]. This motivates the following definition. Definition 1.1 Let X be a complex variety with a class W in K 2 (C(X)) such that d log ∧d log(W) is a symplectic form at the generic part of X. A subvariety L ⊂ X is called a K 2 -Lagrangian subvariety if W restricts to zero in K 2 (C(L)), and 2 dim L = dim X.
Example. The graph of any cluster transformation A −→ A of a cluster A-variety A is a K 2 -Lagrangian subvariety of the product A × A, see Section 6 of [38].
Let us discuss what do we need to reach these goals. The main geometric tool we need is the notion of a hypersimplicial K-decomposition of a tetrahedron (K-decomposition for short), as in Figure 3. It then becomes natural to to assign parameters to the octahedra of the K-decomposition. Let us review now this circle of ideas.
In Section 3 we will first of all recall the definition of hypersimplices [39] and the hypersimplicial K-decompositions of a simplex [30] (Section 3.1). Next, we review in Section 3.2 a central construction: how to use the K-decomposition to relate configurations of decorated flags to configurations of vectors [40]. In particular, in Sections 3.2.3-3.2.4 we discuss a construction of the canonical homomorphism of complexes α • : Complex of decorated flags in V K −→ Bloch complex. (1.12) The homomorphism (1.12) is the main ingredient of the construction of the universal motivic Chern classes in [40], especially of the second motivic Chern class, most relevant to our story. The main structures involved are the following. Hypersimplices ∆ p,q are certain convex polyhedra parametrized by pairs of non-negative integers p, q. A K-decomposition is a canonical decomposition of an n-dimensional simplex into hypersimplices which depends on an additional natural number K. The complex of configurations of flags in V K is nothing else but the coinvariants of the action of the group GL(V K ) on the chain complex of an (infinitedimensional!) simplex whose vertices are parametrized by the points of the space of decorated flags in V K . The Bloch complex reflects the motivic structure of the dilogarithm function. The combinatorics of the hypersimplices is related to the geometry of the Grassmannians G q p of generic (p + 1)-dimensional subspaces in a given (p + q + 2)-dimensional vector space with a basis [41]. The Grassmannian G q p matches the hypersimplex ∆ p,q , and the canonical maps between the Grassmannians match the boundary components of the hypersimplices. All Grassmannians G q p and canonical maps between them are organized into the biGrassmannian, which leads to a complex, called the biGrassmannian complex [40]. It generalizes the Grassmannian complex [42].
The key construction of [40], discussed in Section 3.

2.3, provides a homomorphism
Complex of decorated flags in V K −→ biGrassmannian complex. (1.13) Given a single generic configuration of (n + 1) decorated flags in V K , one assigns to it a collection of points in the Grassmannians G q p where p + q + 2 = n. Here the K-decomposition is crucial: Each hypersimplex of the K-decomposition of an n-dimensional simplex gives rise to a single point of the Grassmannian that matches the type of the hypersimplex.
Combining this with the homomorphism defined in [43] biGrassmannian complex −→ Bloch complex, (1.14) A biproduct of this analysis is a formula for the variation of the volume, as well as its motivic analog, for a family of generic framed flat P GL(K, C)-connections on an admissible 3-manifold. It generalizes the Neumann-Zagier formula for variation of volumes of hyperbolic 3-manifolds with toric boundary [21], and the work of Bonahon [44] on hyperbolic 3-manifolds with geodesic boundary. The P GL(3, C)-analog of the variation formula was beautifully established by Bergeron-Falbel-Guilloux in [17], providing on the way a better proof of the Neumann-Zagier formula. 5) If the big boundary is absent, and the monodromy over the small boundary is unipotent, the motivic volume lies in the kernel of the Bloch complex map, and thus defines an element of K ind 3 (C) ⊗ Q due to a theorem of Suslin [45]. This is another immediate consequence of our construction and the fact that the map (1.12) is a homomorphism of complexes. The value of the regulator on it is the Chern-Simons invariant of the connection. 6) We introduce in Section 5 an algebra of paths on slices in the K-decomposition of a triangulated admissible manifold M , which simply and intuitively encode the map between octahedron parameters and standard coordinates on X un K (∂M ). This generalizes the work of Neumann [46] in the case of hyperbolic 3-manifolds. The paths are used in Appendix B to prove that the Poisson bracket induced from octahedron parameters agrees with the Weil-Petersson-Goldman bracket at generic points of X un K (∂M ). With a view toward quantization, the paths also provide a formal logarithmic enhancement of octahedron parameters. The resulting "logarithmic" gluing data is exactly what is necessary to define a collection of perturbative and nonperturbative quantum invariants associated to the pair L K (M ) ⊂ X un K (∂M ), by trivially extending known SL(2) constructions.
There are several recent papers closely related to our work. Bergeron-Falbel-Guilloux [17] were the first to study parametrizations of spaces of flat connections on 3-manifolds for K > 2, considering P GL(3, C)-connections. The authors localized flat connections to tetrahedra, defined the equivalent of our octahedron parameters, and generalized the classic formulas for variations of the volume. Garoufalidis-Goerner-Zickert [16], following [15,47,48], localize flat P GL(K, C) connections to tetrahedra by considering "decorated representations" of π 1 (M ), similar to our framed flat connections when M has only small boundary components. In this case, they define parameters that coincide with our octahedron parameters and parametrize framed flat connections in the bulk. Major differences between [16] and the present work include our understanding of both bulk and boundary moduli spaces L K (M ) ⊂ X un K (∂M ) as Lagrangian pairs obtained from symplectic gluing (which necessitates the introduction of "big" boundary); our results on variations of the volume and its motivic avatar; and the eponymous geometric K-decompositions underlying all our constructions. (The paper [16] appeared as this work was being assembled.)

Organization
We have built a measure of redundancy into the various parts of this paper, so that readers from different backgrounds (or with different goals) might pick and choose to read the content that is most relevant for them.
In Section 2 we introduce the notion of a triangulated admissible 3-manifold (Section 2.1), different moduli spaces with framed flat connections (Section 2.3), and explain how the framing allows a localization of framed flat connections to configurations of flags (Section 2.4).
In Section 3 the main new result is that L K (M) is K 2 -Lagrangian (Section 3.3). It implies the variation formula for the volume of framed flat P GL(K, C)-connections on admissible 3manifold M , and its motivic refinement. Sections 3.1-3.2 contain the minimum background needed for the proof, in the case that the "small boundary" of M contains no annuli or tori. At the same time, these sections also introduce some fundamental notions that we use throughout the paper, such as the hypersimplicial K-decomposition (Section 3.1), and configurations of four points on the projective line assigned to its octahedra.
In Section 4 we analyze in much greater detail how octahedron parameters are used to describe framed flat connections on an admissible M and its boundary -focusing on the symplectic properties of the moduli spaces L K (M ) ⊂ X un K (∂M ). We review how the K-decompositions of the 2d simplices, called K-triangulations, were used in [30] to define cluster X -coordinates on X un K (∂M ). Then we revisit the octahedron parameters related to a K-decomposition of M , and show how the symplectic pairs L ⊂ P ∂ for octahedra are glued together to construct a Zariski-open part for the pair L K (M ) ⊂ X un K (∂M ). We also study 2-3 moves, and decompose them into sequences of elementary cobordisms.
In Section 5 we discuss the combinatorics of octahedron parameters, the Poisson brackets that they induce on X un K (∂M ), and the abstract data needed for quantization. We prove the most nontrivial result about Poisson brackets for eigenvalue coordinates on X un K (∂M ) in Appendix B.
In Sections 6 and 7 we return to the physical motivations of this paper. We use the combinatorial data of Section 5 to construct simple theories T K [M ] associated to polyhedra and show how 2-3 moves encode mirror symmetries. We then discuss general properties of theories T K [M ] when M is a knot or link complement, including the large-K scaling behavior. (At the end of Section 7 we provide a few examples of the moduli spaces associated to simple knot complements, and how their coordinates are computed from paths in the K-decomposition.) The complete dictionary between the symplectic data of Section 5, class-R gauge theories, and other quantum invariants is reviewed in Appendix A.

Admissible 3-manifolds and basic moduli spaces
We carefully introduce the basic objects studied throughout the paper.

Gluing admissible 3-manifolds from truncated tetrahedra
Let us truncate a tetrahedron by cutting off its vertices. The resulting truncated tetrahedron has two kinds of faces: (small) triangles replacing the original vertices, and (big) hexagons. Let us glue truncated tetrahedra into an oriented manifold with boundary by allowing pairs of hexagonal faces to be glued, but not triangular ones ( Figure 4). The boundary of the resulting manifold M is tiled by triangles and unglued hexagons. We call the part tiled by triangles the small boundary, and the part tiled by hexagons the big boundary.
A small boundary component could have topology of any oriented surface. However we impose two additional constraints. We say that a gluing is admissible if it satisfies the following topological conditions: • The small boundary components have abelian fundamental groups.
• The small boundary components are not spheres.
The reason for the first condition will become clear in Section 2.3. The second condition is ultimately necessary for the existence of logarithmic path coordinates in Section 5 and subsequent quantization, though it could be relaxed classically. Mathematically, the second condition eliminates stacks * /B which should be assigned to spheres. Here B is a Borel subgroup of P GL(K).
A 3-manifold with boundary is admissible if it is homeomorphic to a manifold with boundary obtained by an admissible gluing of truncated tetrahedra. We consider only admissible manifolds M . An ideal triangulation of an admissible manifold is an admissible tiling of the manifold by truncated tetrahedra. We also assume that the big boundary components are surfaces with negative Euler characteristic. This is done just to avoid stacks in Section 2.3.
A small boundary component must be a closed torus, an annulus, or a disc. A big boundary component is a surface with h ≥ 1 holes (see Figure 4b), provided by the edges of the truncated tetrahedra shared by triangles and hexagons. The hexagonal tiling is equivalent to a 2d ideal triangulation of this surface -shrinking small discs to points we get an ideal triangulation. The small and big boundary components are connected as follows.
1. The small tori are closed, disjoint boundary components. 2. Boundary circles of small annuli must be glued to boundary circles of big surfaces.
3. The boundary circle of a small disc is glued to a boundary circle of a big boundary surface. So each disc fills a hole of a big boundary.
Here are some useful examples of admissible three-manifolds to keep in mind: 1. The most basic example is given by a tetrahedron. Its big boundary is a four-holed sphere, and each hole is filled by a small boundary disc. More generally, any convex polyhedron gives rise to an admissible 3-manifold. Indeed, consider a triangulation of the polyhedron into tetrahedra. Its big boundary is a sphere with the holes matching the vertices of the polyhedron.
2. Another fundamental example is a hyperbolic 3-manifold, triangulated into ideal hyperbolic tetrahedra. The big boundary is then the geodesic boundary. It is a union of geodesic surfaces. Topologically, we can describe the boundary ∂M of an admissible 3-manifold in terms of laminations. A simple lamination γ on a surface with holes is a collection of nonintersecting simple unoriented nonisotopic loops modulo isotopy, such that none of the loops is isotopic to a boundary component. The boundary ∂M is a disjoint union of tori and oriented surfaces with holes and simple laminations. Small discs fill the holes; the small annuli shrink to the loops of the laminations; the surfaces are the big boundary components.
There is also a nice physical interpretation of the admissibility conditions. We ultimately want to study 3-manifolds M on which the 6d (2, 0) theory can be compactified. The big boundaries we have just described are asymptotic regions of M in six dimensions (i.e. of M × R 3 ), of the form C × R + . The small boundaries come from regularizing codimensiontwo defects of the 6d theory. The defects may either be closed loops in M (hence small torus boundaries), infinite lines connecting two asymptotic regions (hence small annuli), or in special cases half -infinite lines attached to one asymptotic region (hence small discs). This will be explained further in [49]. Note that it is impossible to obtain small spheres -there are no codimension-three defects in the 6d theory, which could appear point-like on M .

Configurations of flags
To define the correct phase space assigned to the boundary ∂M of an admissible 3-manifold M , and especially to define its Lagrangian subvariety corresponding to M , we need to start with a small digression on flags and configurations of flags.
A flag F • in a K-dimensional complex vector space V K is a collection of nested subspaces We also employ the notation F i := F K−i for the codimension-i subspace of the flag. Then a flag is denoted In fact later on we will mostly use the second convention. We say that a basis A collection of m flags (F 1,• , F 2,• , ..., F m,• ) in V K is said to be generic if for any collection of integers a 1 , ..., a m that sum to K one has an isomorphism Let us recall the general notion of configurations. Let X be a set, and G a group acting on X. Configurations of n elements in X are the orbits of the group G acting on X n .
It is important to notice that the sets of configurations of objects of any kind associated to a vector space depend only on the dimension of the vector space, but not on the choice of the vector space: Configuration sets assigned to isomorphic vector spaces are canonically isomorphic. This is the reason why we always deal with configurations.
The space of flags is denoted by B, the moduli space of configurations of m flags is denoted by Conf m (B), and the variety of generic configurations of m flags is denoted by Conf * m (B). For P GL(2, C), the space of flags is CP 1 . The cross-ratio provides an isomorphism

The basic moduli spaces
A vector bundle with a flat connection V gives rise to a new bundle with a flat connection on the same space, the flag bundle V B , whose fiber at a point x is the space of all flags at the fiber of V at x. To define a framing we need to define it for each of the small boundary components. A framing at a boundary component can be thought of as an invariant flag, that is a flag in the fiber at a point of the component, preserved by the holonomies around the component.
A collection of commuting linear transformations in a finite-dimensional complex vector space always admits an invariant flag, i.e. a flag preserved by all the transformations. Therefore, since the fundamental group of each small boundary components is abelian, a framing is an additional structure on a vector bundle with connection -it always exists. This is why we consider only small boundary components with the abelian fundamental group. Otherwise the very existence of an invariant flag is a severe restriction on a flat connection.
If the holonomy around a puncture is unipotent, and consists of a single Jordan block, then there is a unique invariant flag there. Otherwise additional freedom arises. For example, if the holonomy is trivial, then the choice of invariant flag is completely arbitrary.
Using the notion of framing, we can define now the moduli spaces needed in the paper.

Definition 2.2
i) The moduli space X K (∂M ) parametrizes framed P GL(K, C)-bundles with flat connections on ∂M * .
ii) The subspace X un K (∂M ) ⊂ X K (∂M ) parametrizes the framed flat connections on ∂M * with unipotent holonomy around the holes (S 1 boundaries) where small discs were removed.
iii) The moduli space L K (M ) parametrizes flat framed P GL(K, C)-connections on ∂M * that can be extended to flat framed connections on M .
iv) The moduli space L K (M ) parametrizes flat framed P GL(K, C)-connections on M .
Any loop on ∂M * around a hole is contractible in M . So the holonomy of a flat connection in M around any such loop in ∂M is trivial, and thus the invariant flags near every puncture are completely unrestricted. So L K (M ) embeds into the moduli space of connections with trivial holonomies around the holes. The moduli spaces are related as follows: The moduli space X K (∂M ) has a canonical Poisson structure. The moduli space X un K (∂M ) is symplectic. It is realized as a closure of a symplectic leaf of X K (∂M ). It serves the role of the phase space. The subspace L K (M ) is supposed to be a Lagrangian subspace.
Zariski-open parts of these moduli spaces can be understood by introducing coordinates. However the coordinates are not everywhere defined. The moduli spaces themselves are of fundamental importance.
The moduli space X K (∂M ) is naturally decomposed into a product of the moduli spaces assigned to the components of ∂M . To state this precisely, let us discuss the moduli spaces assigned to the small boundary components.
1. The phase space for a surface with a simple lamination. Let C be an oriented surface with h > 0 holes and χ(C) < 0. Let γ be a simple lamination on C. (Thus, we have in mind that C is the union of the big boundary of M and the small annular boundaries that connect some pairs of holes; the small annuli are collapsed to lamination curves.) A framing on a flat vector bundle with connection on (C, γ) is a choice of a flat section of the flag bundle over each component of the lamination γ, and near each of the holes. Then This is a finite-dimensional complex space. If g is the genus of C, its dimension is Let Loc K (C) be the traditional moduli space of vector bundles with flat connections on C. Forgetting the framing, we get a projection, which is a finite cover over the generic point: (2.8) Over the locus of connections with unipotent holonomies around the punctures it is generically one to one, and partially resolves the singularities of the traditional unipotent moduli space.
2. The phase space and the coordinate phase space for a surface. The moduli space X K (C) was introduced in [30], for the case with no lamination. It was proved there that any 2d ideal triangulation t gives rise to a rational coordinate system {x t i } on the moduli space X K (C). Moreover, it was shown that there is a Zariski open subset on which the coordinates {x t i } are well defined, and which is identified with a complex torus: We call the complex torus X K (C; t) the coordinate phase space associated with an ideal triangulation, or just the coordinate phase space.
There is a Poisson structure on X K (C), which in any of the coordinate systems {x t i } is given by The Poisson tensor ε t ij depends on the choice of the triangulation. With non-empty lamination, the corresponding moduli space X K (C, γ) is studied and coordinatized in [50]; see also [49,51] for the case K = 2.
3. The phase space for a torus T 2 . The phase space X K (T 2 ) is the moduli space of flat P GL(K, C)-connections on T 2 together with a framing, given by a flat section of the associated flag bundle on T 2 . Alternatively, a framing is a choice of a flag in a fiber invariant under both A-and B-cycle holonomies, or a reduction of the structure group to a Borel subgroup. There is a birational equivalence, that is an isomorphism at the generic point are the diagonal parts of the P GL(K, C)-holonomies around the A-and B-cycles of the torus. Let κ ab be the Cartan matrix. Then the symplectic form is (2.14) The traditional moduli space of flat connections on the torus is birationally isomorphic to the quotient of (2.12) by the symmetric group S K . It makes it more difficult to introduce the canonical coordinates, since they must be invariants of the symmetric group. The choice of invariant flag orders the eigenvalues. Notice that for the torus there is no extra unipotency condition.
Since ∂M is a disjoint union of tori T 2 j and punctured surfaces with simple laminations (C i , γ i ), the moduli space X un K (∂M ) is a product: 4. The moduli space L K (M, t). Let us consider now an admissible 3-manifold M whose boundary ∂M does not have small annuli. Choose a triangulation t of the big boundary of ∂M . We define Examples. 1. Let M = B m be a 3d ball with m ≥ 3 small discs on the boundary. It can be approached combinatorially as a convex polyhedron with m vertices. Then X un K (∂M ) is the moduli space of flat framed P GL(K)-bundles with connections on S 2 minus m discs, and unipotent monodromies around the discs. Now let us figure out the Lagrangian subspace. Since any flat connection on a ball is trivial, the invariant flags are unrestricted, and are the only non-trivial part of the data. So L K (B m ) is the configuration space of m flags, realized as a framing data in a trivialized vector bundle with connection: The statement that this is a Lagrangian subvariety is non-trivial even in this case. It follows from the result of [30] that a flip of a 2d triangulation preserves the Poisson structure. 2. Let M = S 3 \K be the complement of a knot K in S 3 . Then the small boundary is a torus T 2 . The SL(2, C) version of L 2 (M ) is a complex curve. 3 It is usually called the A-polynomial curve of the knot [52]. Therefore for SL(K, C), we arrive at a natural generalization of the A-polynomial as a Lagrangian subvariety in the phase space (2.12). Upon quantization, the operatorsL K (M ) quantizing the equations defining the Lagrangian subvariety L K (M ) are expected to provide recursion relations for the colored HOMFLY polynomials of a knot, just as the quantized A-polynomial (conjecturally) provides a recursion relation for the colored Jones polynomial [18,53,54]. (See e.g. [55][56][57] for quantizations of L K (M ) in several special cases.) Conclusion. At first glance, the moduli space X un K (∂M ) of framed unipotent flat connections on the boundary ∂M of an admissible 3-manifold M is just a modification of the traditional moduli space Loc un K (∂M ) of unipotent flat connections on ∂M , making it more accessible. It turns out however that the moduli space X un K (∂M ) is really indispensable in construction of the Lagrangian subvariety assigned to M : Quite often, there is simply no room in Loc un K (∂M ) for a Lagrangian assigned to M ! Indeed, the canonical projection π : X un K (∂M ) −→ Loc un K (∂M ) can map L K (M ) to a subvariety whose dimension is too small to be Lagrangian.

From framed flat bundles to configurations of flags
Given a framed P GL(K, C)-vector bundle V with a flat connection on a 2d surface C with punctures, and given an ideal triangulation of C, i.e. a triangulation with vertices at the punctures, any ideal triangle t of the triangulation gives rise to a configuration of three flags (A, B, C) in a K-dimensional complex vector space V K . Namely, consider the restriction of the flat bundle V to the triangle t. Then the flat sections defining the framing provide flat sections of the associated flag bundle V B at each punctured disc on C in the vicinity of the vertices of the triangle. Using the connection, we parallel transport each of the invariant flags to a point p inside of the triangle t. Since the connection is flat, and the triangle is contractible, the resulting collection of flags in the fiber V p of the bundle at p does not depend on the paths from the small triangles to p. The resulting configuration of three flags (A, B, C) does not depend on any choices involved. More generally, given any ideal polygon on C we can run the same construction and construct a configuration of flags in V K corresponding to the flat sections near the vertices of the polygon. This construction goes back to [30], and leads to a construction of the coordinates associated with the triangulation in loc. cit. We will recall it later on, in Section 4.1.
Literally the same construction with minimal adjustments can be applied to framed flat vector bundles on an admissible 3-fold with a given ideal triangulation. Here is how it goes. Consider a framed P GL(K, C)-bundle with a flat connection V on an admissible 3-manifold M , and an ideal triangulation of M . Then an ideal tetrahedron T of the triangulation gives rise to a configuration of four flags (A, B, C, D) in a K-dimensional complex vector space V K . Indeed, let us restrict V to the truncated tetrahedron T . The flat sections defining the framing provide flat sections of the flag bundle V B at each of the four small triangles assigned to the vertices of the original tetrahedra. Using the connection, we parallel transport the corresponding invariant flags to a point p inside of the tetrahedra T . Since the connection is flat, and the tetrahedron is contractible, the resulting collection of flags in the fiber V p does not depend on the paths from the small triangles to p. So the resulting configuration of four flags (A, B, C, D) is well defined. Similarly, any ideal polyhedron in M , and in particular an ideal triangle or an ideal edge of the triangulation, leads to a configuration of flags labeled by the vertices of the polyhedron.
The very notions of a framed bundle with flat connection and an admissible manifold were designed in such a way that we can run the above constructions. They deliver a collection of configurations of flags assigned to the ideal tetrahedra (in 3d) or triangles/rectangles (in 2d). So the next important question is how to deal with configurations of flags.
3 Flags, hypersimplicial decompositions, and the biGrassmannian 3.1 Hypersimplicial decomposition of a simplex Let p and q be two non-negative integers. Let p + q = n − 1. An n-dimensional hypersimplex ∆ p,q is defined [39] as a section of the n+1-dimensional cube 0 ≤ x i ≤ 1 by the hyperplane n i=0 x i = q+1. Combinatorially, it is isomorphic to the convex hull of the centers of p-dimensional faces of an n-dimensional simplex.
The hypersimplices ∆ p,0 and ∆ 0,q are just simplices. The simplest hypersimplex different from a simplex is the octahedron ∆ 1,1 . It is the convex hull of the centers of the edges of a tetrahedron.
The boundary of a hypersimplex ∆ p,q is a union of n + 1 hypersimplices ∆ p−1,q and n + 1 hypersimplices ∆ p,q−1 . Indeed, they are given by the intersections with the hyperplanes x i = 0 and x i = 1 of the unit cube. For example, the boundary of the octahedron ∆ 1,1 consists of four ∆ 1,0 -triangles and four ∆ 0,1 -triangles. The boundary of ∆ 2,1 is given by five octahedra ∆ 1,1 and five ∆ 2,0 -tetrahedra , etc.
Consider the standard coordinate space R n+1 . It contains the integral lattice Z n ⊂ R n . The hyperplanes x i = s, where s ∈ Z and i = 0, ..., n, cut the space into unit cubes with vertices at the integral points. Given a positive integer K, consider the n-dimensional simplex ∆ n K given by the intersection of the hyperplane x i = K with the positive octant x i ≥ 0: The hyperplanes x i = s, where s ∈ Z, cut the simplex ∆ n K into a union of hypersimplices. Indeed, the hyperplane x i = K intersect each of the standard unit lattice cubes either by an empty set, or by a hypersimplex.
Definition 3.1 [30] A hypersimplicial K-decomposition (or K-decomposition, for short) of an n-dimensional simplex is a decomposition of the simplex ∆ n K into hypersimplices provided by the hyperplanes x i = s, s ∈ Z.
The polyhedra of a hypersimplicial K-decomposition have vertices at the lattice points The hypersimplices of K-decomposition are the closures of connected components of the complement to the hyperplanes x i = s. The hypersimplices ∆ p,q of the K-decomposition match the K+q n solutions of the equation Finally, a K-decomposition of a simplex induces K-decompositions of any faces of the simplex.
Examples: 1. A K-decomposition of a segment is its decomposition into K equal little segments.
2. When n = 2 we get a K-triangulation of a triangle. It is given by three families of parallel lines, each consisting of K lines including one of the sides, with triple point intersections, as shown on the  A K-triangulated triangle carries K+2 2 lattice points p abc indexed by triples of non-negative integers (a, b, c) with a + b + c = K. The original triangle is decomposed into K 2 small triangles. They are of two types: K+1 2 of them are "upright" ∆ 0,1 -triangles, shaded white, and labeled by the triples (a, b, c) with a + b + c = K − 1. The K 2 of them are "upside-down" ∆ 1,0 -triangles, shaded black and labeled by the triples (a, b, c) with a + b + c = K − 2.
3. When n = 3 we get a K-decomposition of a tetrahedron. It consists of K+2 3 upright ∆ 0,2 -tetrahedra, K+1 3 octahedra ∆ 1,1 , and K 3 upside-down ∆ 2,0 -tetrahedra. It induces a K-triangulation of each of the four faces of the tetrahedron. The lattice points p abcd are labeled by quadruples of non-negative integers that sum to K, see  4. When n = 4 we get a K-decomposition of a four-dimensional simplex into hypersimplices of type ∆ 0,3 , ∆ 1,2 , ∆ 2,1 , ∆ 3,0 .  Figure 8. The 3-decomposition of the tetrahedron. The upright ∆ 0,2 -tetrahedra (white) correspond to lines L abcd , the octahedra (black) to planes P abcd , and the upside-down ∆ 2,0 -tetrahedron (red) to a 3-space V 0000 . Adjacent hypersimplices obey incidence relations, which can be represented as a hypergraph, shown on the right.

Configuration of flags and ∆ p,q -hypersimplices
Consider a configuration of n + 1 generic flags in a K-dimensional complex vector space V K : We assign these flags to the vertices of an n-dimensional simplex ∆ n K . The flags (3.4) define a collection of (p + 1)-dimensional linear subspaces in V K , assigned to the ∆ p,q -hypersimplices of the hypersimplicial K-decomposition of the simplex ∆ n K . Namely, let ∆ p,q a be the ∆ p,q -hypersimplex corresponding to a given partition a = {a 0 , . . . , a n }, a 0 + . . . + a n = K − (p + 1), a i ≥ 0 .
Therefore we get a collection of n + 1 codimension-one subspaces F b ⊂ F a .
One way to organize this data is to assign to the hypersimplex ∆ p,q a the configuration of n + 1 hyperplanes F b in the space F a , which we denote by PC a (F a 0 0 , F a 1 1 , . . . , F an n ).
Equivalently, it is a configuration of n + 1 points in the p-dimensional projective space of hyperplanes in F a . Here are two basic examples 1. Let n = 3. Then • The octahedron ∆ 1,1 a gives rise to a configuration of four lines F b in a 2-plane F a .
The cross-ratio of these four lines is the coordinate z a assigned to the octahedron ∆ 1,1 a .

Let n = 4. Then
• The hypersimplex ∆ 1,2 a gives rise to a configuration of five lines F b in a 2-plane F a .
• The hypersimplex ∆ 2,1 a gives rise to a configuration of five planes F b in a 3-space F a .
Notice that generic configurations of five planes in a 3-space can be identified with generic configurations of five lines in a 2-plane. A nice way to see this is to pass to the corresponding projective configuration of five points in the projective plane, and notice that given five generic points in the projective plane, there is a unique conic containing them. This conic is isomorphic to a projective line, thus providing an isomorphism. (Another way to see it is to combine the two canonical isomorphisms (3.16) and (3.17) discussed below.) This way we get two kinds of "pentagons" related to the octahedral coordinates. We will return to these two pentagons in Section 4, and explore the relevant geometry.
In Section 3.2.2 we upgrade this construction, considering configurations of decorated flags, getting as an output configurations of (n + 1) vectors in the dual space (F a ) * .

Configuration of decorated flags and ∆ (p,q) -hypersimplices
Recall that a decorated flag F • (often called an affine flag) in V K is a flag F • equipped with an additional data: a choice of a non-zero vector f i ∈ F i−1 /F i for each i = 1, ..., K. Denote by A K the space of all decorated flags in V K . It is the principal affine space for GL(K). Denote by Conf * n+1 (A K ) the space of generic configurations of n + 1 decorated flags. Denote by Conf * m (k) the space of generic configurations of m vectors in a vector space of dimension k. Given a partition a as in (3.5), or, equivalently, a hypersimplex ∆ p,q a of the hypersimplicial K-decomposition of an n-simplex, we define a canonical projection Namely, take a generic configuration of decorated flags ( F • 0 , . . . , F • n ) in V K . Intersecting the (p + 1)-dimensional subspace F a := F a 0 0 ∩ . . . ∩ F an n (3.9) with the "previous" flag subspace in each of the flags, we get a configuration of n + 1 codimension one subspaces (hyperplanes) in this vector space: So far we just recovered the configuration of (n+1) hyperplanes in (3.7). Now we use the decorations to produce a configuration of (n+1) vectors in (F a ) * . The decoration f a k ∈ F a k −1 k /F a k k determines a unique linear functional on F a k −1 k /F a k k taking the value 1 on the vector f a k . It provides a linear functional on the (p + 1)-space F a annihilating the hyperplane H k . We denote it by l k . Alltogether, the linear functionals l 0 , ..., l n ∈ (F a ) * provide a configuration (l 0 , . . . , l n ) ∈ Conf n+1 (p + 1). So we put Definition 3.4 Given a generic configuration of n + 1 decorated flags ( F • 0 , ..., F • n ) in V K , we assign to a hypersimplex ∆ p,q a the configuration (3.11) of n + 1 vectors in a p + 1-dimensional vector space: . . , F an n ) ∈ Conf n+1 (p + 1), a = (a 0 , ..., a n ) . (3.12) Its projectivization is the configuration of n + 1 points in a p-dimensional projective space from Section 3.2.1.

Remark:
We use the convention dual to the one in [40]. Notice that a decorated flag in a vector space V K determines the dual decorated flag in the dual space V * K . To match the two conventions, replace the decorated flags by the dual decorated flags. So intersections of flag subspaces here correspond to quotients by direct sums of flag subspaces in [40].

Mapping the decorated flag complex to the biGrassmannian complex
Our next goal is to relate, when n varies, different configurations of n + 1 vectors assigned to • generic configurations of (n + 1) decorated flags in V K , and • the collections of hypersimplices of the hypersimplicial K-decompositions of n-simplex.
Given a configuration (l 1 , ..., l m ) in V n , we can use two operations to get a new configuration of (m − 1) vectors: 1. Forgetting the i-th vector l i , we get a map Here l s stands for the projection of the vector l s to the quotient.
Following [40], we organize the spaces Conf * m (n) into a single object, the biGrassmannian: The name is explained by the canonical isomorphism with the Grassmannian G q p parametrising the (p + 1)-dimensional subspaces in a vector space of dimension p + q + 2 with a given basis (e 1 , ..., e p+q+2 ), which are in generic position to the coordinate hyperplanes. Namely, a generic (p + 1)-plane π gives rise to a configuration of vectors in π * given by the restrictions of the coordinate linear functional x i dual to the basis. In the diagram (3.15), given a Grassmannian G q p , there are p + q + 2 horizontal arrows for the maps f i , and p + q + 2 vertical arrows for the maps p j . Notice that the hypersimplex ∆ p,q match the Grassmannian G q p , as the notation suggest. The arrows f i and p j match the two kinds of boundaries of the hypersimplex ∆ p,q discussed in Section 3.1.
There is a canonical isomorphism It assigns to a (p + 1)-dimensional subspace π in a coordinate vector space of dimension p + q + 2 its annihilator π ⊥ in the dual vector space, equipped with the dual basis. Given a set X, we assign to it a free abelian group Z[X] with the generators {x} parametrized by the elements of X. Applying this construction to the sets of complex points of the configuration spaces = Grassmannians, we arrive at abelian groups They are organized into the Grassmannian bicomplex Here the maps f and p are the alternating sums of the maps f j , and p i : (3.20) Denote by BC * the sum of the groups on the diagonals, shifting the index m by one: As usual, we change the sign of the differentials f in all odd columns, and then define the total differential D : BC m −→ BC m−1 by D := f + p. Then D 2 = 0 (thanks to the sign change). We get the biGrassmannian complex Finally, consider the complex of generic configurations of decorated flags in V K : with the standard simplicial differential Definition 3.5 Given a configuration ( F 0 , ..., F n ) of (n+1) generic decorated flags in V K ,assigned to the vertices of the n-dimensional simplex, take the hypersimplicial K-decomposition ∆ n K of the simplex, assign to every hypersimplex ∆ p,q a in ∆ n K a configuration of vectors C a ( F 0 , ..., F n ), thought of as a point of the Grassmannian G q p , and take the sum over all hypersimplices: Finally, extend the map to a homomorphism of abelian groups The following crucial result was proved in Key Lemma 2.1 from [40].
The collection of maps c n gives rise to a homomorphism of complexes Proof. We claim that, given a configuration of decorated flags ( F 0 , ..., F n ), the map C : ∆ p,q a −→ C a ( F 0 , ..., F n ) (3.28) that assigns to a hypersimplex ∆ p,q a the corresponding configuration of vectors intertwines the operation of taking the boundary of the hypersimplex with the differential in the Grassmannian bicomplex. This would immediately imply the theorem since we apply the map C to the sum of all hypersimplices of the hypersimplicial decomposition of a simplex ∆ n K , and so the total boundary is given by the the total boundary d∆ n K of the simplex. The latter is given by the alternatinmg sum of the n + 1 boundary (n − 1)-dimensional simplices, which matches the differential in the complex of generic configurations of decorated flags.
Let us now formulate the claim precisely. Recall that a hypersimplex ∆ p,q has two kinds of boundaries, call them ∂-and ∂ -boundaries, one consisting of (n+1) hypersimplices of type ∆ p−1,q , and another consisting of (n + 1) hypersimplices of type ∆ p,q−1 . So, the boundary d∆ p,q a of the hypersimplex ∆ p,q a can be written, taking into the account the orientations, as Here ∂ i a and ∂ i a are the partitions which label the boundary hypersimplices. We assert that taking the ∂-boundary of a hypersimplex ∆ p,q a , and then assigning to the obtained hypersimplices the configurations of n vectors we get the same result as first assigning to the hypersimplex ∆ p,q a the configuration of (n + 1) vectors, and then applying the map f i . Precisely, there are two commutative diagrams: The commutativity of these two diagrams is straightforward to verify, and the theorem follows immediately from this.

Mapping the biGrassmannian complex to the Bloch complex
Let F be a field. Recall first the definition of the Bloch group B 2 (F ) [42]. Denote by the free abelian group generated by elements {z} assigned to z ∈ F * − {1}. Let us define a subgroup R 2 (F ) ⊂ Z[F * − {1}] as follows. Take any generic configuration of 5 points (z 0 , ..., z 4 ) on P 1 (F ). Then the subgroup R 2 (F ) is generated by the five-term relations, where r is the cross-ratio: We denote by {z} 2 the projection of the generator {z} to the Bloch group. Next, there is a well known homomorphism of abelian groups The group K 2 (F ) is the cokernel of this map .
We define it by looking at the Grassmannian bicomplex, and defining the map row by row. 0. First, we send the bottom row to zero. The map on the next row is the crucial part of the construction. It amounts to a construction of the map of complexes Here to define ∆(l 1 , l 2 ) we choose a volume form Ω ∈ detV * 2 and put ∆(l 1 , l 2 ) := Ω, l 1 ∧ l 2 . The invariant α(l 1 , l 2 , l 3 ) does not depend on the choice of a volume form Ω.
2. The map c 4 is given by the cross-ratio: 3. The map c 5 assigns to a configuration (l 1 , l 2 , l 3 , l 4 , l 5 ) the corresponding configuration of five points on the projective line, which by the very definition is an element of R 2 .
4. Finally, we define a map C 5 (3) −→ R 2 by assigning to a configuration of five vectors in V 3 the corresponding projective configuration of five points, and then identifying them with five points on a line as in the end of 3.2.1. 5. The rest of the maps are put to be zero. To prove that we get a map of complexes one shows ( [43], Section 2.3) that the right square in (3.36) commutes. The rest is obvious. We arrive at a homomorphism of complexes

Conclusion: from decorated flags complex to the Bloch complex
Combining the homomorphism (3.27) from the complex of decorated flags to the biGrassmannian complex with the homomorphism (3.35) from the biGrassmannian complex to the Bloch complex, we arrive at our final output -a homomorphism from the complex of decorated flags in V K to the Bloch complex: to the Bloch complex, so we can cast the map (3.40) in a more traditional form, where we abuse notation slightly by denoting the middle map by α 4 again: This resulting map of complexes is the main ingredient of the construction of the second motivic Chern class in [40], which is a class In Section 3.3-3.4 we show that the K 2 -Lagrangian property and the variation formula for the volume of a framed flat P GL(K, C)-connection on an admissible 3-manifold in the absence of the small toric and annular boundary follow immediately from these homological considerations.

L K (M ) is a K 2 -Lagrangian subvariety
The symplectic structure on the moduli space X un K (C) of unipotent framed flat P GL(K, C)connections on a punctured surface C is given by a 2-form Ω, the Weil-Petersson form. The form Ω has been identified in [30,Section 15] as the image under the d log ∧d log map of a class W in K 2 of the space X un K (C), called the motivic avatar of the Weil-Petersson form: Recall that K 2 (F ) is a quotient of Λ 2 F * . In order to define the class W in K 2 , a Λ 2 F *representative was assigned to every ideal triangulation t of C in [30], (3.44) Its image in K 2 does not depend on the choice of the triangulation, and defines the class W. For a generic unipotent framed flat P GL(K, C)-connection V C on C its value is Let us recall the definition of W K (V C ; t). Pick an invariant decorated flag F v near each puncture v on C. So each triangle t of the ideal triangulation t with the vertices v 1 (t), v 2 (t), v 3 (t) gives rise to a configuration of three decorated flags ( . We get the element W K (V C ; t) by applying the map α 3 from (3.40) to it, and taking the sum over all triangles: (The definition given in [30,Section 15] is equivalent to this one, and in fact was originally obtained by calculating (3.46).) Assume that M is an admissible 3-manifold without small toric and annulus components. Taking the sum over all big boundary components C i of ∂M , we set Now let us run a similar procedure on an admissible 3-fold M with an ideal triangulation. Take a generic framed P GL(K, C)-bundle with flat connection V on M . Restricting it to an ideal tetrahedron T , we get a generic configuration of four flags (F 1 (T ), ..., F 4 (T )). Applying the map α 4 , we get Here {z a } are the octahedron parameters. Taking the sum over all tetrahedra of the triangulation, we get a B 2 (C)-valued invariant: Theorem 3.2 Assume that M is an admissible 3-manifold without small torus and annulus components. Let V ∈ L K (M ) be a generic framed flat P GL K (C)-connection on M , and Res ∂M (V) its restriction to the boundary. Then Therefore the restriction of the Proof. The second claim evidently follows from the first. Let us prove the first. The result follows from the commutativity of the right square in (3.40). Indeed, calculating δ • α 4 (V) we pick a tetrahedron of the ideal triangulation of M , and calculate the map α 4 followed by δ for the corresponding configuration of four decorated flags. This means taking these four flags and going down and to the right in (3.40). Thanks to the commutativity of the right square in (3.40), we get the same result by applying the differential to the configuration of four decorated flags (going to the left in (3.40)), and then apply the map α 3 (going down). After taking the sum over all tetrahedra of the ideal triangulation of M , the contributions of the internal big faces of the tetrahedra cancel pairwise, and the contribution of the other faces match the definition of W K (Res ∂M (V); t) given by (3.46). Theorem is proved The element (3.49) does depend on the choice of the ideal triangulation t of the big boundary ∂M . However already the difference δ Here is how to extend formula (3.49) when M has small toric boundary components. On each of the toric components T 2 i of the boundary, the symplectic form is naturally lifted to a Λ 2 C * -invariant W K (T 2 i ). Namely, choose a pair of generators A, B of H 1 (T 2 , Z) with intersection number A, B = 1. Present the diagonal parts of the holonomies of a flat P GL(K, C)-connection V on the torus around the A-and B-cycles as in (2.13), using the values a , m b , where a, b = 1, ...K − 1, of the positive simple roots on the Cartan group. Then Here κ ab is the Cartan matrix. See Sections 4.4 and 5.3, where we elaborate on the Poisson structure for the symplectic form defined by this class. We will give a complete proof of formula (3.49) in the case when M has small toric boundary elsewhere. The Poisson brackets for eigenvalues derived combinatorially in Appendix B are almost sufficient to imply (3.49) for toric boundary. See Section 5.3.2 for further remarks on this. Formula (3.49) can also be generalized to admissible 3-manifolds with small annular boundaries (or, equivalently, laminations), but again this will be discussed elsewhere.
Remark. Another way to get Theorem 3.2 is to use the result of [30,Section 10] telling that a flip of a 2d triangulation on a surface C amounts to a cluster transformation on the moduli space A SL(K),C . Indeed, it was shown in [38,Section 6], that any cluster transformation preserves the class W A in K 2 of a cluster A-variety A, and that the difference of the Λ 2 C * -invariants W A (s 1 ) − W A (s 2 ) assigned to two seeds s 1 and s 2 related by a cluster transformation is Here the cluster transformation s 1 → s 2 is written as a composition of n mutations, and the parameters z 1 , ..., z n are the X -coordinates related to these mutations. In the case of a flip of triangulation, these are the octahedron parameters {z a } in (3.47). These two approaches have the same origin: the homomorphism of complexes (3.35), which was in fact used in [30] to obtain the just outlines cluster picture. However, the map α 4 has S 4 skewsymmetry built in its definition. To see the S 4 -skewsymmetry by decomposing a flip into a composition of mutations is a quite non-trivial problem.

Differential of the volume of a framed flat P GL(K, C)-connection
Let G be a complex semi-simple Lie group. Let M be a closed manifold and V a G-bundle with flat connection on M . The flat G-bundle is described by a map to the classifying space BG of the group G made discrete: It is well defined modulo homotopy. It maps the fundamental class Combined with the regulator map we get an invariant of a G-bundle with flat connection V on M : In particular, taking the imaginary part of c 2 (V) we recover the volume invariant of V. The name is suggested by the representation to P GL(2, C) provided by a hyperbolic 3-manifold M , when it is the hyperbolic volume. All this is well known. Now let M have a boundary. Then, although the fundamental class of M does not exist, for a unipotent G-vector bundle with flat connection V on M one can still define an invariant using the "relative fundamental class" construction from [58, Section 3], or [47]. For generic non-unipotent local systems on an admissible 3-manifold M , the B 2 (C)-valued invariant (3.48) is a motivic refinement of the volume invariant. In fact it amounts to the pullback of the explicit construction of the second motivic Chern class (3.42).
To recover the R-valued volume one applies to (3.48) the Bloch-Wigner dilogarithm It satisfies the five-term relation, which just means that it provides a homomorphism Notice that even in the simplest possible case when M is the tetrahedron and thus the flat connection itself is trivial, the volume is a nontrivial invariant. In this particular case it is nothing else but the measurable 3-cocycle of P GL(K, C) defined in [59]: given a flag F , (3.57) Let us show now how formula (3.49) leads to a variation of the volume formula. Given a family V(t) of framed flat P GL(K, C)-connections on an admissible 3-manifold M , depending on a parameter t, we would like to calculate the differential of the P GL(K, C)volume Vol K in this family. We explain how how to do this.
Let X be a complex algebraic variety X. There is a homomorphism to the space A 1 (X) of real valued 1-forms, which are smooth at the generic point of X: The differential of the Bloch-Wigner dilogarithm can be written as a composition of the map δ with the map log d arg: This shows that to calculate i dLi 2 (z i ) one needs to calculate Let us return to the calculation of the differential of the volume. Assume that M is as in Theorem 3.2. Choose an ideal triangulation t of the big boundary. As explained above, (3.60) Applying the log d arg map to the right hand side of (3.49), we get the differential of the volume: So to calculate the differential dVol K (V(t)), we restrict the family V(t) to the boundary ∂M , and then evaluate the universal 1-form log d arg W K (Res ∂M (V(t)); t) on the obtained family of the framed flat connections on the boundary.

Coordinates for framed flat connections
In this section we revisit the construction of octahedron parameters in the K-decomposition of an admissible 3-manifold M (introduced in Section 3.2) in much greater detail, and with a slightly different focus.
Given a 2d ideal triangulation t of the big boundary of M , we know from [30] how to build coordinates on a Zariski-open subset X un K (∂M, t) of the space of framed flat connections on ∂M -the coordinate phase space associated to ∂M and t. We will review the construction in Section 4.1. (We also explained how to extend the definition of X un K (∂M, t) to small torus boundary components in Section 2.) Now let t 3d be a 3d ideal triangulation of M compatible with a triangulation t of the big boundary. We will prove in Sections 4.2-4.3 that octahedron parameters in the bulk of M parametrize an open subset L K (M, t 3d ) of the space that parametrizes the flat connections in the boundary phase space that extend to the bulk. By using sufficiently refined 3d triangulations, or taking a union over all 3d triangulations, we obtain a submanifold L K (M, t) that only depends on t.
Our main conceptual goal is to understand the nature of L K (M, t) as a Lagrangian submanifold of X un K (∂M, t), with its Weil-Petersson symplectic structure. We will do this by expressing L K (M, t) ⊂ X un K (∂M, t) as a symplectic gluing of elementary symplectic pairs L ⊂ P ∂ associated to octahedra.
In Section 4.5, we will investigate how 2-3 moves act on L K (M, t 3d ) and L K (M, t 3d ), and interpreted 2-3 moves in terms of the hypersimplicial K-decompositions of 4-simplices.

Boundary phase spaces
Let C be an oriented surface with at least one puncture and χ(C) < 0e.g. a component of the big boundary of an admissible 3-manifold M . Our first item of business is to review the Xcoordinates on the moduli space X K (C) of framed flat P GL(K, C)-bundles with connections on C [30].
(These X -coordinates were recently reviewed and generalized in [26,60] in the context of the physical 6d (2,0) theory compactified on surfaces C. The work of [26,60] should tie in beautifully with our 3d compactifications, though many details remain to be explored.)

Coordinates from the K-triangulation
Let us fix an ideal triangulation of C. Then, given a P GL(K)-vector bundle with a framed flat connection, each ideal triangle gives rise to a configuration of three flags (A, B, C) in V K , assigned to the vertices of the triangle (as discussed in Section 2.4). We assume that it is a generic configuration of flags. Then it gives rise to a configurations of lines and planes in V K , associated to the white ∆ (0,1) -and black ∆ (1,0) -triangles in the K-triangulation, as in Figure 9. The plane P abc on a black triangle contains all three lines L a+1,b,c , L a,b+1,c , and L a,b,c+1 on the white triangles surrounding it. If the configuration of flags (A, B, C) is generic, these are the only relations among the lines.  Figure 9. 3-triangulation of a triangle, with triples of integers indicated corresponding to points p abc with a + b + c = 3, lines L abc with a + b + c = 2 (black dots), and planes P abc with a + b + c = 1 (white dots). The blue connectors between black and white dots stand for incidence relations between lines and planes.
Next, every internal lattice point p abc of the K-triangulation, which is labeled by three strictly positive integers that add to K, gives rise to a 3-space This space contains all three planes and all six lines on the black and white triangles surrounding it. This data allows us to define a coordinate x abc associated to the internal point. It is a triple-ratio of the collection of lines and planes contained in V a−1,b−1,c−1 , and there are several ways to describe it. For example, choosing any six vectors v a b c generating the six respective lines L a b c that surround p abc , we can define the triple-ratio by setting Here In any unimodular basis in V 3 , it is the determinant of the matrix expressing v, v , v in this basis.
The triple-ratio is independent of the choice of the vectors v, since every vector occurs an equal number of times in the numerator and denominator. It is also independent of the choice of the volume form Ω 3 . The triple-ratio is the only invariant of a configuration of three flags in V 3 . More generally, the K−1 2 triple-ratios x abc assigned to interior points of a K-triangulation parametrize the space of configurations of three flags (A, B, C) in V K .
To describe framed flat connections on the surface C, the triple-ratio coordinates in the interior of each triangle are supplemented by cross-ratio coordinates on edges. Every edge of the ideal triangulation belongs to a distinguished quadrilateral, formed from the two triangles sharing the edge. We parallel-transport the four flags A, B, C, D at its vertices to a point p in its interior. Then we can simultaneously decorate the K-triangulations of both triangles with a collection of lines, planes, and 3-spaces. We label the objects on the triangle ABC with quadruples of integers (a, b, c, 0) and those on the triangle BCD with quadruples (0, b, c, d). See Figure 10.
To define a cross-ratio coordinate, we choose four vectors a, b, c, d inside each respective line, and set Here v ∧ v is defined using a volume form in V 2 . A surface C of genus g with h punctures has −2χ(C) triangles and −3χ(C) edges in any ideal triangulation. Therefore, the cross-ratios and triple-ratios form a total of coordinates for an open patch of the space X K (C). The requirement that the holonomies at every puncture are unipotent imposes (K − 1)h independent constraints on the coordinates. Explicitly, the constraints at a given puncture say that the product of minus the coordinates around each of the K − 1 loops surrounding the puncture is equal to one. This is illustrated in Figure 11, in the case that C is the boundary of an ideal tetrahedron, and K = 3; the x 1020 x 0120 x 0021 x 2010 x 1110 x 0210 x 0111 x 0012 A B C D Figure 11. Unipotent holonomy constraints around a puncture.
products of three coordinates (−x • ) around the first loop and six coordinates (−x • ) around the second loop must both equal one. (The origin of these constraints is explained in [30]; we will re-derive the constraints in Section 4.3.) Altogether, we find that cross-ratios and triple-ratios give independent coordinates for the moduli space X K (C) un . This is precisely the expected complex dimension. The coordinates are C * -valued and cover an open patch. Notice that the cross-ratios and triple-ratios never equal zero or infinity, as long as all of the invariant flags at the punctures are generic.
Dual coordinates. In [30], the coordinates for the moduli space of framed flat connections on a punctured surface were defined slightly differently than we have presented above. Rather than defining lines L abc and L abcd and their invariants by intersecting subspaces of flags, [30] used quotients of flags. The two approaches are very simply related by the operation of dualizing flags, as in (2.3). That is, our cross-ratio and triple-ratio coordinates defined from a collection of flags (A, B, C, ...) (and a flat connection) on C as above are equivalent to (minus) the Fock-Goncharov coordinates defined using the dual flags (A * , B * , C * , ...). The cross-ratio defined in [30] differs from ours by an additional minus sign.

Symplectic structure
The Poisson structure on an open patch of X K (C) corresponding to an ideal triangulation is described by drawing arrows circulating clockwise around every small black triangle in the K-decomposition of the triangulated surface C (see Figure 12). Then the Poisson bracket of two cross-ratio or triple-ratio coordinates x, x at lattice points p, p {x, x } = (# edges from p to p − # edges from p to p) · xx . (4.7) After projection to the traditional moduli space Loc K (C), the symplectic and Poisson structures agree with the standard Weil-Petersson-Goldman symplectic form on the nonsingular part of the moduli space. The latter is expressed simply in terms of complex flat connections A as Ω WP = C Tr (δA ∧ δA).

The Lagrangian pair assigned to a 3d triangulation of M
Having described coordinates for the moduli space of framed flat connections on oriented 2d punctured surfaces C, we now proceed to study the framed flat connections on admissible 3-manifolds M . In the process of building coordinates for flat 3d connections, we will find a natural way to understand the spaces L K (M ) of flat framed P GL(K) connections on the boundary ∂M that extend to the bulk.
which parametrizes the framed flat connections from the coordinate phase space assigned to t that extend to the bulk. Specifically, L K (∂M, t 3d ) is the (closure of) the image of the projection of L K (M, t 3d ) to X un K (∂M, t). We call (4.8) a Lagrangian pair, emphasizing both the complex symplectic torus and its Lagrangian subvariety.
Generically, L K (M, t 3d ) and L K (M, t 3d ) will turn out to be independent of t 3d , depending only on the fixed boundary triangulation t. For certain "degenerate" choices of t 3d , these spaces may lose components. By taking a union over all 3d triangulations, we can obtain spaces L K (M, t) and L K (M, t) that depend only on the boundary triangulation t.
The boundary of a tetrahedron, understood as an admissible 3-manifold, is a fourpunctured sphere with a canonical triangulation. This triangulation, coupled with P GL(2), provides the most basic Lagrangian pair (4.8), which we call the elementary Lagrangian pair -the Lagrangian pair for the P GL(2)-tetrahedron. It is our basic building block, and deserves a special notation: We assign the elementary Lagrangian pair to each of the octahedrons of the K-decomposition of M provided by the 3d triangulation T . Finally, we show that the Lagrangian pair (4.8) is the symplectic gluing of the elementary Lagrangian pairs assigned to the octahedra.

The Lagrangian pair for the P GL(2) tetrahedron
Let us review the framed flat P GL(2, C)-connections on a tetrahedron. We denote by t the canonical triangulation of the tetrahedron. Let us choose framing flags A, B, C, D at the four punctures, as in Figure 13. Each flag is just a line. Abusing notation, we denote the line defining the flag A by A, etc. Just as in Section 4.1, we parametrize X 2 (∂∆, t) by six coordinates x 1 , ..., x 6 assigned to the edges. Each x i is obtained by parallel-transporting the four flags to a common point p i near the edge, and then taking a cross-ratio. For example, where we emphasize the evaluation of flags at p 1 . Computing (4.10), we choose any four non-zero vectors (a, b, c, d) in the lines (A, B, C, D). There are four relations among the x's, reflecting the unipotent holonomy: the product of (−x i ) around every vertex equals one, i.e.
The corresponding four monomials are central with respect to the Poisson bracket (4.7).
z' Figure 13. Coordinates for framed P GL(2, C) connections on an ideal tetrahedron.
Relations (4.11) imply that coordinates on opposite edges are equal. It is then convenient to re-label the x's as z, z , z (as on the right of Figure 13), with zz z = −1. We therefore find a two-dimensional complex torus sitting as a Zariski-open part of the phase space X un 2 (∂∆): (4.12) The notation emphasizes the octahedron . We call it the octahedron phase space. Explicitly, with Poisson brackets (4.14) Now let's fill in the bulk of the tetrahedron. Since the bulk is contractible, any bundle with a flat connection on the bulk is trivial. So the choice of invariant flags A, B, C, D becomes absolutely crucial -the flags are unrestricted, and they carry the only nontrivial degrees of freedom of framed flat connections in the bulk. After filling in the tetrahedron we can parallel-transport all flags to a common point p of the tetrahedron. The previous three cross-ratios z, z , z can be computed at this point: They are no longer independent. In addition to the relation zz z = −1, there is a new Plücker relation The curve defined by (4.16) parametrizes framed flat connections in the bulk (with the canonical triangulation t 3d ) for which the configuration of framing flags is generic. It is isomorphic to its image L 2 (∆, t 3d ) ⊂ X un 2 (∂∆, t), the subset of connections on the boundary that extend to the bulk. So we have defined the elementary Lagrangian pair L ∂ ⊂ P ∂ .

The Lagrangian pair for the P GL(K) tetrahedron
In order to generalize to P GL(K, C) connections, we consider a K-decomposition of the 3d tetrahedron as in Figure 8, repeated for convenience in Figure 14. Working on the boundary of the tetrahedron, we paralleltransport the flags to the midpoint of any of the six edges, by restricting the connection to the quadrilateral defined by the faces adjacent to the edge. The resulting configuration of four flags at this midpoint gives rise to a system of lines L abcd on the white triangles lying on the two tetrahedron faces adjacent to the edge. These lines then give us crossratio and triple-ratio coordinates for the lattice points on these faces and on the edge, just as in Figure 10.
Repeating this for each of the six edges we construct all the cross-ratio and triple-ratio coordinates on X un K (∂∆, t) assigned to the canonical triangulation of the tetrahedron boundary. There are 4 × K−1 2 + 6 × (K − 1) coordinates altogether, with 4 × (K − 1) relations coming from the unipotent-holonomy constraints at the four vertices. This leaves exactly 2(K − 1) 2 independent coordinates on X un K (∂∆, t). Just as in the SL(2) case, if we fill in the bulk of the 3d tetrahedron, the flat P GL(K, C) connection must be trivial. The choice of flags is the only data remaining. Now the coordinates obey additional Plücker relations. The simplest and most beautiful way to describe the relations is to use octahedral coordinates.
Recall that a generic configuration of four flags (A, B, C, D) in V K defines a configuration of lines in V K assigned to the ∆ (0,2) -tetrahedra, and 2-planes assigned to the octahedra abcd := ∆ (1,1) abcd , of the K-decomposition: The four lines sitting on the ∆ (0,2) -tetrahedra surrounding an octahedron abcd are the lines They belong the 2-plane P abcd . They provide the three cross-ratios exactly as in (4.15), replacing the (A, B, C, D) lines there with the four lines here: These cross-ratios are associated with the six vertices of the octahedron abcd . The cross-ratios assigned to the opposite vertices are equal, as in Figure 15 (cf. Figure  13). They satisfy the standard monomial relation as well as the Plücker relation These relations encode the space of framed flat connections in the bulk of the tetrahedron and (isomorphically) the Lagrangian submanifold L K (∆) of framed connections on the boundary that extend to the bulk. To see this, we must relate octahedron parameters to the cross-ratio and triple-ratio coordinates on the boundary.
The key to relating bulk and boundary coordinates is the realization that the 3d array of K+2 3 lines in the K-decomposition of the tetrahedron restricts to the standard 2d arrays of lines in the K-decomposition of the boundary.
Consider, for example, a lattice point p abcd on an edge of the boundary. It has a label induced by the K-decomposition of the bulk, with exactly two of a, b, c, d vanishing. A unique octahedron vertex touches this point, and the cross-ratio x abcd that we would assign from the boundary perspective is nothing but the bulk cross-ratio at the octahedron vertex. Explicitly, the 6 × (K − 1) edge coordinates on the boundary of the tetrahedron are edges: x 0bc0 = z 0b c 0 , x ab00 = z a b 00 , x a0c0 = z a 0c 0 , Similarly, every triple-ratio x abcd on the boundary, with exactly one of a, b, c, d vanishing, is the product of the three octahedron parameters at the vertices of the three octahedra that touch p abcd . For example, on face BCD, we have triple-ratio coordinates faces: and similarly for the other faces. There are several ways to demonstrate this relation. It is sufficient to do the case K = 3, using an explicit parametrization for the ten lines in the 3d K-decomposition, in a chosen basis for V 3 . (Specifying ten lines with the standard incidence relations is equivalent to specifying the configuration of four flags.) Such a parametrization is shown in Figure 16, conveniently chosen to encode the four octahedron cross-ratios, called z, w, x, y. Thus, for example We can then check that the expected triple-ratio coordinate in the middle of (say) the BCD face, namely is equal to the product xw z . Figure 16. Ten vectors parametrizing the ten lines on the K = 3 tetrahedron. We have used a GL(3, C) transformation to put the vectors in the given form; otherwise they are completely generic. We also show the corresponding octahedron parameters (z, w, x, y), on their corresponding vertices. Here and similarly for w, x, y.
Finally, let us look at the internal lattice points of the K-decomposition of a tetrahedron: points p abcd with none of a, b, c, d vanishing. (This first occurs for K = 4.) Each such point coincides with six octahedron vertices, and we could try to assign to the point a coordinate c abcd that is the product of the six surrounding octahedron parameters. This product, however, is automatically trivial, due to a cancellation in the cross-ratios involved. Explicitly: We have shown that a generic configuration of four flags (A, B, C, D) induces octahedron parameters z abcd , z abcd , z abcd in the bulk of a tetrahedron that satisfy relations (4.21)-(4. 22) and (4.27), and are related to the standard boundary coordinates via (4.23)-(4.24). Conversely, if we start with triples of octahedron parameters satisfying these properties, it is possible to reconstruct uniquely the configuration of four flags. One way to show this is to use the coordinates to reconstruct the array of K+2 3 lines on the upright simplices ∆ (0,2) . (We will see explicitly that this can be done in Section 4.3.) Identifying the lines is equivalent to specifying the configuration of flags.
Summarizing, there is a canonical bijection between the following two spaces: 1. The space of octahedron parameters, given by arbitrary collections of the numbers satisfying the relations (4.21)-(4.22) and (4.27),

The subspace of generic configuration four flags
The Lagrangian pair for the P GL(K)-tetrahedron is given by (4.29). Note that in this case we again find that the projection to the boundary

The coordinate phase space for a tetrahedron via symplectic reduction
The coordinate symplectic phase space related to the canonical triangulation t of a tetrahedron is a complex torus X un K (∂∆, t) realized as a Zariski open subset in X un K (∂∆). We can obtain the symplectic coordinate phase space X un K (∂∆, t) as a symplectic reduction of a product of the elementary octahedron phase spaces P ∂ defined in (4.13).
Consider the product of the octahedron phase spaces over the octahedrons of the Kdecomposition of a tetrahedron, equipped with the product symplectic structure: The edge (4.23) and face (4.24) coordinates on the boundary of the tetrahedron, written in the octahedron parameters, can be viewed as a monomials on the complex torus P × . We call them the edge and face coordinate monomials. The Poisson brackets between them coincide with the Poisson brackets of the corresponding edge and face coordinates for the Weil-Petersson Poisson structure (4.7) on X un K (∂∆). The octahedron relations zz z = −1 imply that they satisfy monomial relations given by the unipotent holonomy constraints around each puncture, as in Figure 11.
The products (4.27) of six octahedron parameters around the K−1 3 internal points of the K-decomposition are no longer equal to one. They are independent monomial functions c k on P × . The c k Poisson-commute with each other, as well as with the boundary coordinates. A nice graphical way to see that the boundary monomials and the c k have the expected commutation relations is to draw arrows on each (oriented) octahedron, as on the left of Figure 13. After gluing together the octahedra, the Poisson bracket between product coordinates on any two points of the K-decomposition is proportional to the net number of arrows going from one to the other. All arrows in the bulk of the tetrahedron cancel out in pairs, while the arrows on the boundary reproduce the configuration in Figure 12.
We claim that there is a canonical isomorphism of symplectic spaces The notation on the right denotes the symplectic reduction corresponding to the family of commuting moment maps c k at the level set c k = 1. Each moment map c k provides an independent Hamiltonian flow that amounts to an action of a copy of the group C * . We take the quotient by the resulting action of the complex torus, and then set c k = 1. One can check The image of the product i ∈∆ L i under the symplectic reduction (4.31) produces a Lagrangian submanifold By the conclusion of Section 4.2.2, this Lagrangian parametrizes configurations of four flags, realized as the subset of framed flat connections that extend from the boundary to the bulk.

Gluing constraints for 3-manifolds
Now let M be an admissible 3-manifold with an ideal triangulation t 3d and a framed flat P GL(K, C) connection. Then we can define the parameters z i , z i , z i for every octahedron in the K-decomposition of M . In Section 4.2.2 we found that at every internal point in the K-decomposition of a tetrahedron the product of octahedron parameters is one. We also saw that the product of parameters on a boundary point is equal to the cross-ratio or triple-ratio coordinate in the boundary phase space. Both of these facts generalize. Now the product at every internal point in the K-decomposition of a 3-manifold -including points on faces and edges of glued tetrahedra -is one; while products at external points are equal to big-boundary coordinates. We explain briefly why this is so. (The situation for small torus boundaries is slightly more subtle, and will be deferred to Section 4.4.) First consider a point p on a big internal face in M , shared by two tetrahedra, as in Figure 17. As a boundary point for the top tetrahedron, p is assigned a triple-ratio x top formed from flags A, C, E. As a boundary of the bottom tetrahedron, p is also assigned a triple-ratio x bottom formed from A, C, E, but in the opposite orientation. Therefore, x top x bottom = 1. Moreover, the quantity x top x bottom is itself the product of the six octahedron parameters at vertices that touch p, so the product of these octahedron parameters must be one.   Figure 19. Configuration of octahedra around a point on a trivalent internal edge.
Next, consider points on an internal edge E in M shared by N tetrahedra. We picture this arrangement as an N -gonal bipyramid, as in Figure 18, and use the flags at the N + 2 vertices to define octahedron parameters throughout the bipyramid. 4 Each of the K − 1 lattice points on E is touched by N octahedron vertices. The product of the N octahedron cross-ratios at each lattice point involves numerators and denominators that cancel in pairs, and so automatically equals one. For example, a situation with N = 3 is shown in Figure 19. The three octahedron parameters touching a point on the internal edge are Figure 20. Point on an external edge.
Finally, let us consider external lattice points on a big boundary. For a point on a boundary face, we already know from Section 4.2.2 that its triple-ratio coordinate is a product of three octahedron parameters. For a boundary edge E, let us again suppose that E is shared by N tetrahedra in the bulk. The boundary cross-ratio parameter x for a point p on E can be computed as a 4 Note that the N tetrahedra forming this bipyramid need not all be distinct. Multiple edges of a single tetrahedron might be glued to E. This does alter the conclusion of the current argument; one just needs to be careful about identifying octahedron cross-ratios with the proper orientations.
product of octahedron parameters that touch p. Just like in the case of internal edges above, there will be a cancellation between numerators and denominators, but the cancellation is incomplete, and simply leaves behind the single expected cross-ratio x. For example, in the situation depicted in Figure 20 (for N = 2), the octahedron product is which is independent of v 5 and agrees with the boundary cross-ratio. Notice that the octahedron parameters constructed from a framed flat connection on M are well defined and take values in C * − {1} as long as the configurations of four flags paralleltransported to the interior of every tetrahedron are generic. Conversely, we claim that starting with a collection of octahedron parameters z i , z i , z i ∈ C * − {1} in the K-decomposition of M that satisfy the octahedron equations (4.21)-(4.22) and that the product at any internal point is one we can reconstruct a unique framed flat connection on M . So: We will prove this in Section 4.3.
We would also like to show that the phase space X un K (∂M , t) is a symplectic reduction of octahedron phase spaces (4.12). Observe that if we define gluing monomials c k on the product phase space as the product of octahedron parameters at every internal lattice point of the K-decomposition of M , then the c k all Poisson-commute with each other. This follows easily from a cancellationof-arrows argument as in Section 4.2.3. Moreover, for the lattice points on the big boundary of M , we define functions x j to be the products of octahedron parameters there. Then they satisfy the standard boundary commutation relations and commute with all the c k , because while octahedron arrows cancel out in the bulk they leave behind the standard arrangements of Figure 12 on the boundary. We then expect, at least when M has only big boundary (with holes filled in by small discs) that there is an equivalence To prove this, it suffices to count dimensions and to check that the c k are all independent, which we will do elsewhere (see Section 5.3.2). Moreover, the Lagrangian submanifold should be obtained as the image of a product of octahedron Lagrangians L × = i ∈M L i under the reduction (4. 36), assuming that that the moment maps c k and their flows are transverse to L × .

Holonomy representation
We would like to show that, given octahedron parameters in the K-decomposition of an admissible manifold M that satisfy the octahedron equations (4.21)-(4.22) as well as the gluing equations at every internal lattice point of the K-decomposition, we can reconstruct a unique framed flat P GL(K, C) connection on M -and thus prove Theorem 4.1. To do so, we will extend the 2d notion of local projective bases labelled by "snakes" [30] to three dimensions.
We will begin with a framed flat connection on M , and derive the rules for constructing projective bases and the transformations from one projective basis to another (which all involve octahedron parameters). Then we will run the argument in reverse, starting from abstract octahedron parameters and using 3d snakes to reconstruct projective bases and a framed flat connection.

3d snakes in a tetrahedron
We first consider a single ideal tetrahedron and its K-decomposition.
We start with a generic configuration of four flags in V K . It gives rise to K+2 abcd . We are going to construct projective bases in V K labeled by geometric objects that we call 3d snakes. To define a 3d snake, we begin with an oriented path on the edges of the (K − 1)-decomposition of a tetrahedron, which starts at any of the tetrahedron vertices and ends at a lattice point on the opposite face, consisting of K − 1 segments (the small edges it traverses). We orient the segments toward the opposite face. We decorate each segment of the path by a fin. To define a fin observe that a path segment is an edge of a unique ∆ (0,2) tetrahedron; the fin is a face of that ∆ (0,2) tetrahedron containing the edge. We visualize it by saying that a fin points from the midpoint of the segment to one of the two unoccupied vertices of the ∆ (0,2) tetrahedron ( Figure 21). We define a 3d snake as a path as above whose segments are decorated by fins.
It may help to observe that every ∆ (0,2) abcd tetrahedron in the K-decomposition corresponds to a lattice point of the (K − 1)-decomposition; thus the vertices of snakes are labeled by lines L abcd . Moreover, every octahedron in the K-decomposition corresponds to a black ∆ (0,2) tetrahedron in the (K − 1)-decomposition, and octahedron parameters z, z , z label the edges of these black ∆ (0,2) tetrahedra.
The K lines L abcd that label the vertices of a 3d snake are generic since the original configuration of four flags is generic. Let us associate a basis (v 1 , ..., v K ) to the snake so that  There are four elementary moves that can be used to move a 3d snake to any position within a tetrahedron. They are shown in Figure 24. Each move acts as a simple P GL(K, C) transformation on the projective basis associated to a 3d snake. The moves are expressed in terms of two kinds of GL(K, C) matrices. The first are the elementary unipotent matrices , where E n,k is the matrix with entry 1 on the n-th row and k-th column and zero elsewhere. The second are the diagonal matrices H i (x) = diag(1, ..., 1, x, ..., x), with the (i + 1)-st through K-th entries equal to x. Their arguments are always the negatives of octahedron parameters. Observe that F i and H j (x) commute unless i = j.
Move I can only occur at the head of a snake, adjacent to the face where it ends. It moves the head across a small black tetrahedron, keeping the fins on the same tetrahedron Figure 24. The four fundamental snake moves. In each case we go from the orange snake to the green snake. Move IV is shown for K = 4. face, and acts as (Here we act on the left on column vectors containing the v i .) Move II is a fin-flip that can occur at any segment along the snake; it simply multiplies v i (at the head of the segment) and all subsequent vectors by (minus) the octahedron parameter associated to the segment's edge. Move III can act on any two consecutive segments of a snake in the position shown; note that the fins on the second segments are pointing inwards. Move III is a sort of combination of Moves I and II, and involves the octahedron parameter on the edge that the snake slides across. 5 Finally, Move IV is a reversal of orientation that makes sense only when a snake lies entirely along an edge of a big tetrahedron; the fins are unmodified. Move IV reverses the order of the basis vectors, and negates every even-numbered vector, thus multiplying by an anti-diagonal matrix The first three moves preserve a flag; i.e. they are lower-triangular matrices. Indeed, any move keeping the tail of a snake attached to a specific vertex of the big tetrahedron preserves the flag associated to that vertex. An example of the sequence of moves that can be used to move a snake from one edge of a big tetrahedron to another (with fins oriented the same way) appears in Figure 25. Multiplying the matrices in this example shows that the transformations of 3d snakes along a 2d surface are equivalent to the snake transformations of [30] -given the usual identification of octahedron parameters and boundary cross-and triple-ratios. The single most important thing to observe about snakes on a tetrahedron is that the projective bases associated to them are well-definedi.e. the P GL(K, C) holonomy inside the tetrahedron can be trivializedif and only if the octahedron relations zz z = −1, z + z −1 − 1 = 0, and the sextic internal gluing constraints are satisfied. On one hand, if we derive both octahedron parameters and projective bases by using a configuration of four flags, then the bases are automatically well defined and the relations are automatically satisfied. Conversely, if we simply place a triple of unconstrained coordinates z abcd , z abcd , z abcd ∈ C * − {1} on every octahedron and define the P GL(K, C) transformations from one snake to another using the rules of Figure 24, we will find that the holonomy around a closed path in the space of snakes is trivial if and only if the standard relations are obeyed.
For example, to move a snake all the way around a black tetrahedron with parameters z, z , z , as shown in Figure 26, we can use a combination of Moves II (fin-flips) and either Moves I or III. Either way, the total holonomy is diagonal aside from a 2 × 2 block conjugate to Having trivial eigenvalues requires zz z = −1, and having a trivial holonomy requires z + z −1 − 1 = 0. If K ≥ 4, then the (K − 1)-decomposition of a tetrahedron contains K−1 3 upside-down ∆ (2,0) tetrahedra in addition to the upright black ones. We may move snakes around these upside-down tetrahedra in a similar way, and find that the holonomy is trivial if and only if the sextic gluing constraints are satisfiedi.e. the product of six octahedron vertices at corresponding internal points in the K-triangulation is one. Once we know that the P GL(K, C) holonomy inside a big tetrahedron is trivial, we can use octahedron parameters and snake moves to reconstruct the configuration of framing flags. We first choose any projective basis (v 1 , ..., v K ) for C K associated to a snake along one of the edges of the tetrahedron. The basis is unique up to P GL(K, C) isomorphism. Then snake moves determine vectors (hence lines L abcd ) on every other lattice point of the (K − 1)-decomposition, which uniquely reconstruct the configuration flags.

3d snakes in a 3-manifold
Now we extend 3d snakes and projective bases to an entire triangulated 3-manifold M , and prove that octahedron parameters are coordinates for an open subset of framed flat connections. Figure 27. The fifth snake move: jumping between glued tetrahedra, fins along the common face.
We simply need one more elementary move to transport a snake from one tetrahedron to another, across a common face (Figure 27). It can be derived by looking at a bipyramid, as in Section 4.2.4 (see Figure 17). We assume that all fins lie along the common glued face, and don't change position during the jump between tetrahedra. The lines determining the snakes' projective bases are all built from the three flags at the vertices of the common glued face (in Figure 17, these are flags A, C, E), but they come with opposite orientation on the two sides. Therefore, the snake move is implemented by a diagonal matrix J of alternating ±1's.
We can now run the argument backwards. Suppose that we assign arbitrary parameters to each octahedron of the K-decomposition of a triangulated 3-manifold M . Consider the set of all snakes in the manifold. We assign to each snake s a standard K-dimensional vector space C K s with a basis. We treat the latter as a projective basis, i.e. consider bases that differ by common C * rescaling as equivalent. If two snakes s 1 and s 2 are related by an elementary move of type I-V from Figures 24 and 27, we define a linear map C K s 1 → C K s 2 using the snake move matrices and the octahedral coordinates (4.40). The collection of the vector spaces C k s and the maps between them determines a P GL(K, C) connection. The holonomy of this connection inside of a tetrahedra is trivial if and only if the octahedron parameters satisfy the two relations in (4.40), and the sextic gluing constraints for internal lattice points of tetrahedra. Now by moving snakes among different tetrahedra we can show that the P GL(K, C) holonomy around any contractible cycle for the snakes in M is trivial if and only if the face and edge gluing constraints of Section 4.2.4 are also obeyed. For example, to find the face constraints we can compute the holonomy around the loop shown in Figure 28. The loop encircles a lattice point p of the K-decomposition that lies on the common glued face (corresponding to a white triangle in the (K −1)-triangulation of the face). It is easy to see that corresponding holonomy matrix is diag(1, ..., 1, z w xy v t, ..., z w xy v t), with K − i nontrivial entries. For a trivial holonomy the product z w xy v t of the six octahedron parameters that touch p must equal onei.e. the face constraint must be satisfied.
In a similar way, we may analyze the internal edge constraints by moving snakes in a circle around that edge. The corresponding holonomy matrix is a product of diagonal fin-flips and J-matrices. Requiring trivial holonomy forces the products of octahedra co-ordinates at every point on the edge to equal one. To make this explicit, suppose that N tetrahedra are glued around an edge and in each tetrahedron there are K − 1 octahedra touching the edge, with parameters z ., x 1 · · · x K−1 ). Then the total snake holonomy around the edge is  In combination with loops inside tetrahedra, the face and edge loops just discussed are enough to generate all the homotopically trivial transformations of snakes. Thus, we find that imposing all the standard octahedron gluing constraints allows to define a flat P GL(K)-connection on the space of snakes, which induces a flat P GL(K)-connection on the threefold M .
To be more explicit about the last step, we may "doubly truncate" every big tetrahedron ∆ in the triangulation of M ( Figure  29). This polyhedron has 24 vertices. It has hexagons in places of the original vertices and faces, and rectangles in place of the original edges. It is isomorphic to the convex hull of the orbit of a generic point in the space R 3 , realized as a hyperplane x 1 +x 2 +x 3 +x 4 = 1 in R 4 , under the action of the group S 4 permuting the coordinates (x 1 , ..., x 4 ). It is nothing else but the 3d associahedron. 6 Now, we mark the 24 vertices of each doubly-truncated tetrahedron in the triangulation of M . Each marked point labels one 6 A similar "cutting" procedure in R d leads to a d-dimensional associahedron with (d + 1)! vertices. It is isomorphic to the convex hull of the S d+1 -orbit of a generic point in the hyperplane R d ⊂ R d+1 . For example, for d = 2 we get a hexagon. of 24 canonical snakes on the edges of a given tetrahedron, with all fins going along the same tetrahedron face. The location of the point indicates: 1) the edge choice; 2) the snake orientation; and 3) the fins.
At every marked point s in M we fix a standard K-dimensional vector space C K s with a projective basis. The snake holonomy matrices then define a P GL(K, C) transformation between these vector spaces, determined by the octahedron parameters. Within a single tetrahedron we use Moves I-IV to obtain holonomies along the edges of the associahedron, and we know that any closed cycle in the graph has trivial holonomy. We can represent this by filling in the closed cycles with 2-cells. We then extend the graph from one tetrahedron to another by using Move V, and fill in all the closed cycles corresponding to face and edge gluing constraints with 2-cells as well, since these cycles also have trivial holonomy. In the end, we obtain a 2-complex that has the same fundamental group as M , so we have produced a flat P GL(K, C) connection on M . Finally, as at the end of Section 4.3.1, we use the projective bases assigned to snakes within each tetrahedron to reconstruct the framing flags; and, by construction, the flags at all small boundaries of M will be preserved by the flat P GL(K, C) connection. So we arrive at a framed P GL(K, C) connection on M .
Notice again that the space L K (M, t 3d ) of octahedron parameters parametrizes framed flat connections for which the 4-tuples of framing flags for each tetrahedron in t 3d ) are generic. For certain choices of t 3d , the space L K (M, t 3d ) may lose components. For example, if t 3d includes a tetrahedron glued to itself along two faces, forming a univalent internal edge, the space L K (M, t 3d ) will be empty. (It is impossible to satisfy the gluing constraints along the univalent edge with octahedron parameters in C * − {1}.) By taking a union over all 3d triangulation t 3d we can define a space L K (M, t) that depends only on the boundary triangulation. For any sufficiently refined t 3d , the algebraic closures of L K (M, t 3d ) and L K (M, t) must coincide.

Small torus boundaries
We have shown in general that octahedron parameters, subject to gluing constraints, parametrize an open patch of the moduli space of framed flat P GL(K, C) connections on an admissible 3-manifold M . We also expect in general that the boundary phase space associated to M (with a fixed big-boundary triangulation) is equivalent to a quotient, where the moment maps c k are products of octahedron parameters at every internal lattice point in the K-decomposition of M for a 3d triangulation inducing the 2d triangulation t on the boundary. Moreover, we should be able to define the Lagrangian submanifold L K (M, t 3d ) ⊂ X un K (∂M , t) of framed flat connections on ∂M that extend to the bulk by taking the image of the product Lagrangian L × = {z i + z −1 i − 1 = 0} under the symplectic reduction. We made this precise at the end of Section 4.2.4 in the case that M has only big boundary, with holes filled in by small discs, under the assumption that all the c k 's are independent. We may now make a few comments about small torus boundaries as well. Suppose that ∂M consists of a single small torus boundary, and choose A and B cycles for it. The 3d snakes of Section 4.3 show us how to express the holonomy eigenvalues around the A and B cycles in terms of octahedron parameters. We compute the full holonomy around a cycle by fixing the tail of a snake on the torus boundary, and swinging the head around the desired cycle ( Figure 31). Only snake moves I, II, III, and V are used, which leads to a lower-triangular holonomy matrix; this must be so, since the holonomy must preserve the flag on the torus. Therefore, the eigenvalues can simply be read off from the diagonal of the matrix, and take the form of Laurent monomials in the octahedron parameters. A more intuitive and constructive method for finding these monomials will be described in Section 5.
For now, we make the following claims. As coordinates on the product phase space P × = i ∈M P ∂ i , the holonomy eigenvalues Poisson-commute with all of the internal gluing functions c k . Moreover, they satisfy the expected Weil-Petersson Poisson bracket for the torus boundary. Explicitly, let us parametrize the P GL(K, C) eigenvalues as The functions l a are the characters of the Cartan group of P GL(K) provided by the simple positive roots. The Poisson brackets between them are described by the Cartan matrix κ ab : Here we assumed that the intersection number of the A and B cycles on the torus A, B = 1, with the orientation of the torus induced from that of M . Otherwise the formula reads { a , m b } = A, B κ ab a m b . Then we indeed expect that 7 Notice that here the result of the (linear) symplectic reduction is a complex torus. Thus, we hope to obtain the smooth part of X K (T 2 ), isomorphic to (C * ) 2K−2 , discussed in Section 2.3. We may motivate the symplectic reduction by counting degrees of freedom. An ideal triangulation of M with N tetrahedra has exactly N internal edges (this can be verified by computing the Euler character) and 2N internal faces. Therefore, the number of internal gluing functions is This is the same as the number of octahedra in the K-decomposition of M . Thus, if all the c k 's were independent moment maps, the quotient P × (c k − 1) would be zero-dimensional. However, in the presence of a small torus boundary, it turns out that there are K −1 automatic relations among the c k . We will demonstrate this in Section 5. Then -assuming that the remaining c k are independent -P × (c k − 1) does have dimension 2(K − 1), as required.
If we take the image of the product octahedron Lagrangian L × under the reduction P × (c k − 1), and assume that the moment maps and their flows are transverse to L × , then we will obtain a Lagrangian submanifold L K (M, t 3d ) ⊂ X K (T 2 ). It is typically just a component of the variety of framed flat connections on the boundary that extend to the bulk. In particular, the requirement that the framing flags for each big tetrahedron in M be generic (so that octahedron parameters are well defined) implies that L K (M, t 3d ) only parametrizes flat connections whose boundary holonomy has minimal stabilizer. Whenever the boundary holonomies have coincident eigenvalues, these eigenvalues must fit in a single Jordan block.
Finally, recall that if ∂M consists of multiple big components C i and small torus components T 2 i , the boundary phase space is just a straightforward product X un ( . The expected equivalence (4.42) should generalize in the obvious way.

2-3 moves via 4d cobordism
As a final application of the ideas in this section, we describe how 2-3 moves act on Kdecompositions and octahedron parameters.
Recall that a 2-3 Pachner move (shown in Figure 2 on page 4) affects a triangular bipyramid in the triangulation of a 3-manifold M . It changes the bulk triangulation of the 7 Although we continue to use the notation "X un K (∂M )" to discuss boundary phase spaces associated to small tori, we emphasize again that we never require unipotent holonomy around the cycles of a torus. It is only a condition at the holes in the big boundary of M . bipyramid, leaving its boundary intact. Any two bulk triangulations of M can be connected a sequence of 2-3 moves [61,62]. So if M is an admissible 3-manifold, a 2-3 Pachner move leaves the big-boundary triangulation fixed.
In general, alterations of d-dimensional triangulations (Pachner moves) can be thought of as elementary cobordisms that amount to gluing (d + 1)-dimensional simplices to dtriangulations. For example, in two dimensions, changing a triangulation of a quadrilateral by performing a flip is equivalent to gluing a 3d tetrahedron onto the quadrilateral. We should think about the 2-3 move as a cobordism provided by a 4-simplex.
Studying framed flat P GL(K)-connections on a d-manifold, it is essential to realize that d-simplices are no longer the most elementary pieces of the manifold: we rather have to consider K-decompositions of simplices in a d-dimensional triangulation. Therefore Pachner moves, understood as cobordisms provided by (d + 1)-simplices, should no longer be the most elementary cobordisms. Instead, the elementary cobordisms should reflect the hypersimplices of the the K-decomposition of a (d + 1)-simplex. The Pachner move needs to be decomposed into a sequence of such elementary cobordisms.
In two dimensions, this led to the decomposition of a flip into K+1 3 elementary mutations. Each mutation corresponded to one of the octahedra ∆ (1,1) in a 3d tetrahedron [30]. Now we would like to proceed similarly, and decompose a 2-3 move as a sequence of elementary moves that reflect the hypersimplicial K-decomposition of a 4-simplex. Altogether, these are 1 2 K 2 (K 2 − 1) elementary "2-3 moves" on octahedra ∆ (1,1) in the Kdecomposition.
This is exactly what we find. Topologically, the two types of moves ( Figure 32) look identical. Indeed, the simplices ∆ (1,2) and ∆ (2,1) are isomorphic, both having five 3d octahedra on their boundary. Geometrically, we will see (momentarily) that the first elementary move changes coordinates on the configuration space of five lines in a 2-dimensional space V 2 , while the second move changes coordinates on the space of five planes in a 3-dimensional space V 3 , (4.48) These two moduli spaces are canonically isomorphic. The order in which the 2-3 elementary moves are performed is important, but not unique. Every choice of 3d slicing of a 4d simplex gives a different ordering. One systematic way to organize the elementary moves is shown in Figure 33 for K = 3 and in Figure 34 (below) for K = 5. It can be described as follows. We start with a bipyramid made from two tetrahedra. We start on the "2" side. In the first step, we take the K 2 pairs of octahedra that are glued along black faces (at the common face of the two big tetrahedra) and apply the 2-3 move on the left of Figure 48 to each pair. This creates 3 × K 2 octahedra in a single "equatorial" plane. Among them, there are K−1 2 triples of octahedra glued along three white faces and sharing an internal vertex. For the second step, we apply to these triples the move on the right of Figure 48, in the 3 → 2 direction. Then we repeat. At the i-th step, for i odd, there should be ( i+1 2 ) × K−(i−1)/2 2 pairs of octahedra glued along common black faces. They appear in i+1 2 horizontal planes. We apply the 2 → 3 move on the left of Figure 48 to them. At the i-th step for i even, there Figure 34. The sequence of elementary 2-3 moves for K = 5.
should be i 2 × K−i/2 2 triples of octahedra glued along three white faces, with an internal trivalent vertex. They appear in i/2 horizontal planes. We apply the 3 → 2 move on the right of Figure 48 to them. After 2K − 3 steps we are done: we arrive at a big bipyramid triangulated into three ideal tetrahedra.

Coordinates
Geometrically, the decomposed 2-3 move gives us many different coordinate systems for a generic configuration of five flags in V K . They are the five flags (A, B, C, D, E) at the vertices of the bipyramid, or (better yet) the five flags at the vertices of a 4d simplex. Then every full slice of the 4d simplexi.e. every collection of octahedra that fit together into a bipyramid, at some stage in the sequence of 2-3 moves -provides a complete coordinate system. The octahedra are assigned standard cross-ratio coordinates using the general construction of Section 3.
To demonstrate this, let us label 4d hypersimplices by 5-tuples in the usual way, octahedra that are involved in the sequence of 2-3 moves by a 5-tuple abcde (a + b + c + d + e = K − 2) with one of the five indices "underlined" or "decorated" The decoration serves (in part) to encode how octahedra occur as boundaries of hypersimplices: the boundaries of ∆ (1,2) and ∆ (2,1) contain ∂∆ (1,2) abcde : abcde , abcde , abcde , abcde , abcde ; (4.51) Notice that the same octahedron may be on the boundary of both ∆ (1,2) and ∆ (2,1) hypersimplices. On the other hand, the 5 × K+1 3 octahedra that appear at the beginning and end of the full 2-3 move (composing either 2 or 3 complete tetrahedra) are distinguished by the fact that the decorated index vanishes; thus they can only be boundaries of ∆ (1,2) 's.
Every octahedron is associated with a 2-plane, regardless of the decoration, e.g.
It is also associated with four lines, corresponding to the undecorated indices, abcde L (a+1)bcde , L ab(c+1)de , L abc(d+1)e , L abcd(e+1) . (4.54) Then the octahedron inherits standard vertex coordinates z, z , z formed from cross-ratios of these lines in P abcde . It is easy to check that on any slice of the 4-simplex (at any step in the sequence of 2-3 moves) the product of octahedron parameters at any internal lattice point equals one. That is, the standard gluing equations are obeyed. By the usual methods, one checks that the octahedron parameters on a slice are coordinates for the configuration space of five flags. Moreover, if we isolate a cluster of five octahedra involved in one of the elementary moves of Figure 32, the products of parameters z, z , z on the nine external vertices of this cluster are unchanged during the move. The proof follows from analyzing the cross-ratios involved. This is a local version of the universal statement that boundary coordinates are products of bulk coordinates, no matter how the bulk is decomposed.
It should be clear that the first type of elementary move relates coordinates for five lines in V 2 : the five octahedra on the left of Figure 32 carry subsets of four of the five lines and cross-ratios thereof. On the other hand, the second elementary move relates invariants of the configuration of five planes P (a+1)bcde , P a(b+1)cde , P ab(c+1)de , P abc(d+1)e , P abcd(e+1) ⊂ V abcde . (4.56) Each of the octahedra in this second move carries the four lines (cf. (4.54)) that are intersections of one of these five planes with the other four! Four example, abcde carries the intersection of P (a+1)bcde with the other planes, and the cross-ratios formed from the resulting lines.
The moduli spaces of generic configurations of five lines in V 2 and five planes in V 3 are canonically isomorphic, or better to say canonically dual to each other, see 3.2. This is why the elementary moves on octahedra look so similar.
We would like to emphasize that the "K-decomposition" of a full 2-3 move into elementary moves is a much refined version of the collection of the "pentagons" assigned to a configuration of five flags in section 3 -the later were understood there as the five-term relation in the Bloch group.
Finally, we note that the symplectic constructions of phase spaces and Lagrangian submanifolds that we have discussed throughout this section commute beautifully with 2-3 moves -simply because they commute with the elementary moves on octahedra. For example, the boundary phase spaces X un K (∂M, t) can be obtained by symplectic reduction at any intermediate step in a decomposed 2-3 move. (The 2-3 moves never change the boundary triangulation!) We will say more about this in Section 5.5. Moreover, the elementary 2-3 moves induce birational maps on the spaces L K (M, t 3d ) and L K (M, t 3d ). The maps are one-to-one so long as the configurations of five flags involved in the move are generic.

Paths and combinatorics
In this section we introduce a complementary graphical approach for describing the combinatorics of coordinates for framed flat P GL(K, C) connections that were developed in Section 4. We will use an algebra of paths on slices in the K-decomposition of a 3-manifold M to encode the relationship between octahedron parameters on one hand, and gluing functions and boundary coordinates on the other. This generalizes the work of [46] in the context of hyperbolic geometry. The approach is especially useful for describing holonomy eigenvalues around small torus boundaries and analyzing their Poisson brackets. The algebra of paths also has a second important advantage: it allows us to work with a formal logarithmic lift of all the phase space coordinates, promoting them from C * -to C-valued.
If we use C * -coordinates as in Section 4, we know that gluing functions c k and boundary coordinates all take the form of (Laurent) monomials in the octahedron parameters. We could encode the exponents of these monomials in a symplectic matrix g, which holds all the necessary information for expressing a patch of X un K (∂M ) as a symplectic reduction of the product P × of octahedron phase spaces, as well as reproducing the Lagrangian submanifold L K (M ) ⊂ X un K (∂M ). However, this information is not sufficient for quantization. A consistent quantization (in the sense of [20]) requires keeping track of an extra vector of integers σ that translate to q-corrections in the quantum Lagrangian operatorsL K (M ), as well as in any quantum wavefunctions. In terms of 3d N = 2 theories T K [M ], the extra vector of integers encodes a consistent UV U (1) R charge assignment, which is necessary for compactification of T K [M ] on any curved backgrounds. The formal logarithmic algebra of path coordinates in this section is simply used to specify, unambiguously, the vector σ.
The consistent definition of path coordinates fundamentally requires all small boundary components of M to admit a Euclidean 2d structure. Indeed, the path coordinates will look like Euclidean angle structures on slices of M parallel to the small boundary. This is one of the reasons for the second restriction on small boundaries back in Section 2.1.
Ultimately, we will want to choose polarizations Π and Π × for the logarithmic lifts of phase spaces X un K (∂M ) and the product octahedron space P × . Then the gluing data g and σ should be combined into an affine symplectic transformation (g, σ) ∈ ISp(2N, Z), or sometimes ISp(2N, Q) (where N is the number of octahedra), which relates the two polarizations and is the fundamental piece of information needed to define T K [M ] and any quantum wavefunctions associated to M .
Most of this section can be read without knowledge of the framed flat connections of Sections 2-4. In this sense it is a combinatorial guide to producing the data for quantization and for theories T K [M ].
In this section, we will suppress the dependence of various moduli spaces (coordinate phase spaces and Lagrangians) on 2d triangulations t and 3d triangulations t 3d . The 2d boundary triangulation t is always assumed to be fixed. We use the notation P K (∂M ) to denote the logarithmic version of coordinate phase spaces X un K (∂M, t), and use uppercase variables (e.g. Z, Z , X, ...) to denote the logarithmic C-valued lifts of the corresponding C * -valued parameters (e.g. z = exp Z, z = exp Z , x = exp X,...) . (We abuse notation, continuing to use P ∂ for the canonical logarithmic lifts of octahedron phase spaces; we also will not distinguish between Lagrangian submanifolds L K (M, t 3d ) ⊂ X un K (∂M, t) and their preimages in P K (∂M ).)

Octahedra and slices
Recall that an admissible 3-manifold M can be decomposed into ideal tetrahedra, each of which has a further K-decomposition. In particular, the K-decomposition cuts an ideal tetrahedron into K+1 3 = 1 6 K(K 2 − 1) octahedra i , which are our central players. Each octahedron is oriented and its faces can be canonically assigned two distinct colors, according to whether they align with big faces of a tetrahedron (black) or with the truncations of vertices (white). The colors alternate on neighboring faces. We label the six vertices of every octahedron with formal complex parameters Z i , Z i , Z i , equal on opposite vertices and occurring in a clockwise order around every black face. (Thus there are three distinct ways to label any octahedron, related by a cyclic permutation Figure 37. Four parallel sets of slices in the K = 4 decomposition. Notice that the decomposition into octahedra naturally identifies four families of K − 1 parallel slices of every tetrahedron ∆, as shown in Figure 37. Each family of slices is centered around one of the four vertices (a small boundary component). Moreover, every slice is densely tiled by black and white faces of octahedra: white faces from octahedra below the slice and black faces from octahedra above the slice. The three dihedral angles of these small black and white triangles can all be labeled by the vertex parameters Z i , Z i , Z i of the octahedra that they came from. We have attempted to indicate this in Figure 37, for the four triangles associated with the top octahedron. When ideal tetrahedra are glued together to form M , the slices can be continued from one tetrahedron to the next, as indicated in Figure 38. Indeed, every small boundary component of ∂M acquires a family of K − 1 global slices throughout M centered around that small boundary and having the same topology. For example, a small torus boundary comes with K − 1 toroidal slices in the K-decomposition.

Coordinates on the product phase space
We now want to revisit the symplectic gluing of elementary Lagrangian pairs for octahedra to form the Lagrangian pair for an admissible 3-manifold M . We will assume that the boundary ∂M does not contain small annuli (i.e. it only has small tori and the small discs that fill in holes on the big boundary).
Suppose that M is triangulated into N ideal tetrahedra, so that the K-decomposition has 1 6 N K(K 2 − 1) total octahedra. To each octahedron i we associate a formal logarithmic phase space with holomorphic symplectic form Ω ∂ i = dZ i ∧ dZ i , or equivalently with Poisson bracket These coordinates Z i , Z i , Z i are the octahedron vertex parameters, logarithmic lifts of the cross-ratios of Section 4.2. We also associate to i the canonical Lagrangian submanifold with z i = exp Z i , etc.; and we recall that both the phase space and Lagrangian are invariant For the entire manifold M , we build a product phase space with independent Poisson brackets for (Z i , Z i , Z i ) and (Z j , Z j , Z j ) when i = j. This space contains the canonical product Lagrangian We saw in Section 4 that the phase space P K (∂M ) and Lagrangian L K (M ) associated to the glued manifold M itself are symplectic reductions of P × , L × . Let us describe how this works logarithmically.

Paths on slices
It is extremely useful to encode various affine linear functions on P × in terms of paths on the slices of the octahedral decomposition of a manifold M . Recall that there are K − 1 global slices associated to every small boundary component of M , which extend from one tetrahedron to the next. We always view the slices from above, that is, from the point of view of the small boundary. On any one of these slices, we consider oriented paths made of segments that begin at the midpoint of a side of a small black or white triangle, curve to the left or right inside the triangle, and end at the midpoint of another side. Two examples are shown in Figure  39. The entire path may either be closed or open; if open we require it to begin and end on faces of big tetrahedra.
To any such oriented path γ, we can assign an affine linear function on the product phase space P × by 1. adding octahedron vertex parameters (Z i , Z i , Z i ) for the dihedral angles subtended counterclockwise by segments of γ; 2. subtracting vertex parameters for dihedral angles subtended clockwise; 3. adding (resp., subtracting) iπ for a 180-degree "bounce" in a counterclockwise (resp., clockwise) direction. Figure 40. Path homotopy.
We will call these functions path-coordinates. For example, the open path γ 1 in Figure 39 has path-coordinate −Z 1 + Z 2 + Z 3 + Z 4 + Z 5 − iπ + Z 5 , while the closed path γ 2 has path-coordinate The constraint that Z i + Z i + Z i = iπ (for all octahedra i ) in the product phase space implies that path-coordinates are invariant under homotopies inside the small black and white triangles, as shown in Figure 40.

Gluing functions
Now we proceed to define the new coordinates on P × . For every internal lattice point in the octahedral decomposition of M , we define an affine linear function C k on the product phase space to be the sum of octahedron vertex parameters (Z i 's) that touch that point, minus an overall factor of 2πi. These gluing functions C k include: points inside every ideal tetrahedron (for example, there is one internal point in the K = 4 tetrahedron of Figure 35); points on every pair of big faces of ideal tetrahedra that are glued together (i.e. on every internal tetrahedron face);

points on every internal tetrahedron edge.
For example, for the two K = 3 tetrahedra glued together in Figure 38, there are no points inside tetrahedra, and there are no internal tetrahedron edges; but there is one lattice point in the center of the internal face.
In general, suppose that the big boundary of M (tiled by unglued faces of tetrahedra) has genus g and h holes. Let us define the quantity d K (g, h) = 2(K 2 − 1)(g − 1) + K(K − 1)h as in (2.7), which is the expected complex dimension of the phase space associated to that boundary. Then by a straightforward Euler character argument, it turns out that the total number of internal points in the octahedral decomposition of M is exactly h) .
(If there are multiple disjoint big boundaries, each contributes − 1 2 d K (g i , h i ) to (5.6)-(5.7).) Every function C k is the path-coordinate (minus 2πi) for a small closed loop surrounding a lattice point on a slice of M . The three types of vertices described above correspond to the three types of closed loops shown in Figure 41: γ 1 surrounds a point inside a tetrahedron, γ 2 surrounds a point on the face between tetrahedra, and γ 3 surrounds a point on a shared tetrahedron edge. Conversely, every path-coordinate (minus 2πi) for such a small closed loop on a slice defines a C k , though the same C k may arise from multiple loops on different slices. When homotoping a path through a lattice point, as in Figure 42, its path-coordinate simply picks up a contribution ±C for the gluing function assigned to that point. A nice application of this fact is to illustrate the K − 1 linear relations among the C k coming from every small torus boundary of M . Consider any of the K − 1 global slices of M associated to a small torus boundary -each having the topology of a torus. Choose two small adjacent triangles on this slice, as in Figure 43, and draw a closed path γ 1 as shown, so that everywhere outside the two triangles segments of γ 1 always come in pairs with opposite orientations. Due to cancellations from these segments, the path-coordinate for γ 1 is just 2πi. We can then homotope γ 1 to a second path γ 2 that just surrounds a single vertex p, as shown on the left of Figure 43. The difference in the path-coordinates for γ 1 and γ 2 is the sum of C k 's corresponding to every lattice point on this slice except for p. The path-coordinate for γ 2 is C p + 2πi (where C p corresponds to p). Therefore, we find that the sum of C k 's for all the vertices lying on this slice (including C p ) must be zero. Repeating the argument for the K − 1 slices parallel to any small torus boundary produces K − 1 linear constraints, which modify the counting in (5.7).

Big boundary coordinates
Recall that the ideal triangulation of M induces a 2d ideal triangulation of the big boundary. Moreover, every big triangle (the face of a tetrahedron) on the big boundary acquires a 2d K-triangulation.
For every lattice point p j in the K-triangulation of the big boundary we define the function X j to be the sum of octahedron parameters (Z i , Z i , Z i ) at octahedron vertices incident to p j . This includes 1 2 (K − 1)(K − 2) functions for every big tetrahedron face on the boundary, and K − 1 functions for every edge on the boundary. These are logarithmic versions of the boundary triple-ratios and cross-ratios of Section 4.1. Figure 44. The big boundary functions X j as path-coordinates on slices.
The functions X j can be interpreted as path-coordinates for open paths on the slices associated with small disc boundaries of M . This is illustrated in Figure 44, in the case of three vertices on a face and one on the edge of a single tetrahedron. Just as in the case of gluing functions C k , a single X j may by represented by multiple paths on multiple slices.

Small torus coordinates
Finally, we define 2(K−1) functions on P × for every small torus boundary of M . Given a torus boundary, we begin by choosing a basis of A and B homology cycles for it, with intersection Longitude and meridian paths on the 2 nd slice of a torus boundary. number A, B = 1. If M is a knot complement in S 3 , there is a distinguished basis given by the meridian and longitude of the torus boundary, and we will sometimes use this terminology. If M is not a knot complement, the basis of cycles can be chosen at will.
We consider the K − 1 torus slices in the octahedral decomposition of M that are associated to the small torus boundary. Let us number the slices in order of their proximity to the torus boundary -so that inside a given tetrahedron ∆ the a-th slice is tiled by a 2 small triangles. On each slice, we draw two non-self-intersecting paths µ a and λ a such that their projections to the actual torus boundary are in the homology classes of the A and B cycles, respectively. An example of such paths is shown in Figure 45. The path-coordinates U a and V a of the paths µ a and λ a provide the desired functions on P × .
Notice that the definition of U a and V a depends on precisely which paths µ a and λ a are chosen to represent a given homology class. However, changing the choice of paths can only modify U a and V a by multiples of the gluing functions C k , since any two paths in a fixed homology class are homotopic (using the moves in Figures 40 and 42).
After setting C k = 0, the path coordinates U a and V a are completely unambiguous. They are logarithms of the holonomy eigenvalues called m a and a in Section 4.4 ! It is quite easy to show this by using 3d snakes to compute the holonomies, as depicted in Figure 31. A snake rotating around a torus boundary simultaneously sweeps out K − 1 paths (say) µ a on the K − 1 slices parallel to that boundary, and the octahedron parameters that the snake moves pick up are exactly the exponentiated versions of the corresponding path coordinates.

Poisson brackets and the quotient
For a triangulated manifold M , whose tetrahedra are decomposed into octahedra, we have defined three sets of affine linear functions on P × : the gluing functions C k associated to internal vertices in the octahedral decomposition; the functions X j associated to external vertices (on big boundaries); and the 2(K − 1) functions U These functions on the product phase space P × satisfy very special Poisson brackets. First, the gluing functions all commute with each other and with the boundary functions: Second, the Poisson bracket of two functions X j and X j associated to vertices p j and p j on the big boundary is equal to the number of octahedron edges going from p j to p j , counted with orientation: {X j , X j } = # edges from p j to p j (5.8b) − # edges from p j to p j .
The orientation is clockwise around every black octahedron face. Thus, on every external tetrahedron face, the RHS of (5.8b) can be represented by arrows drawn as in Figure 46 (cf. Section 4.1). Note that the X j coordinates on two disjoint big boundaries necessarily commute. Third, the big boundary coordinates commute with torus coordinates, is the Cartan matrix of SL(K). Namely, the logarithmic A and B cycle coordinates coordinates on different torus boundaries commute; while on the slices corresponding to a single boundary the Poisson bracket is proportional to the intersection number of the cycles, and vanishes if parallel slices are more than one layer apart. These Poisson brackets generalize a fundamental theorem of Neumann and Zagier [21] for K = 2.
All of the brackets above can be understood intuitively as statements about path-coordinates. In particular, the coordinate of a closed contractible path γ commutes with the coordinate of any other open or closed path γ , so long as γ (if open) begins and ends at the boundary of M . The coordinates of two general paths that intersect have a bracket (roughly) proportional to their intersection number.
We have already proved that the C k commute with each other and with all other coordinates in Section 4.2. We also proved there that big-boundary coordinates X j have the expected Poisson bracket, coming from the Weil-Petersson symplectic form. The trickiest commutation relations to show are the ones for the A and B cycle holonomies; we present a full proof in Appendix B.
The Poisson brackets allow us to define the (holomorphic) symplectic quotient P K (∂M ) = P × (C k ) , (5.10) using the C k 's as moment maps. Since our space P × is affine-linear, the quotient is rather trivial to describe: each C k generates a C translation action; we quotient out by these translations and then set C k = 0. Assuming the linear independence of the C k 's counted in (5.7) the brackets imply that the quotient is spanned by the affine-linear functions X j , U (ν) a , and V (ν) a . Then the space P K (∂M ) has complex dimension where t is the number of small torus boundaries and g i , h i are the genus and number of holes for each of the b big boundaries. Recall that d K (g, h) = 2(K 2 − 1)(g − 1) + K(K − 1)h. Note that on the quotient (5.10) the functions U We can similarly attempt to "pull" the product Lagrangian L × through the quotient (5.10) to define a Lagrangian submanifold L K (M ) ⊂ P K (∂M ). This involves projecting with respect to the flows of the moment maps C k , then intersecting with C k = 0. Assuming that the moment maps and their flows are transverse to L × , the result is a Lagrangian L K (M ) that is algebraic in the exponentiated coordinates x j = exp X j , m a = exp U This is easy to understand in terms of slices. The hole in the big boundary is filled in by a small disc, and in the octahedral decomposition of M there are K − 1 slices parallel to this disc. The path-coordinate for a path on the periphery of such a slice, as on the right of Figure 47, is a sum of functions (X j − iπ); but since the path is a contractible clockwise loop its total coordinate (after setting C k = 0) must equal −2πi. After exponentiating, these relations among the X j are nothing but the requirement that the holonomy around a hole in the big boundary be unipotent, as discussed in Section 4.1 (cf. Figure 11).

Independence of the gluing functions
In several places in this paper we have assumed that the gluing functions C k (or their exponentiated versions) are independent, aside from the K − 1 relations coming from small torus boundaries -in other words, that the number of independent C k 's is given by (5.7). This is a rather important result, which unfortunately we will not prove here. For example, is necessary (and sufficient) to demonstrate the symplectic equivalence of boundary coordinate phases spaces with symplectic quotients of octahedron phase spaces, as in (4.36), (4.42), or (5.10). Together with the Poisson brackets (5.8), the result would also immediately imply the general formula for variation of the motivic volume from Section 3.4.
Note that the number of independent C k 's must always be less than or equal to the quantity on the RHS of (5.7), due to the Poisson brackets (5.8). Indeed, the maximal number of linear functions that can possibly commute with the boundary coordinates X j , U a , V a equals the RHS of (5.7). Thus, what one needs to show is that there are no additional relations among the gluing functions. This is obvious if M is an ideal tetrahedron or polyhedron, but rather nontrivial in general.
In the case of hyperbolic 3-manifolds and P GL(2, C) connections, the independence of the gluing functions was proved by [21] by (in our language) analyzing the images of Lagrangian submanifolds under symplectic reduction, and using Mostow rigidity. The argument could easily be generalized here, if one knew about rigidity for framed flat P GL(K, C) connections. However, the statement about independence of the C k 's is ultimately much more general, and should hold independent of any rigidity properties of connections in the bulk. (For example, independence was proven in [46] for P GL(2, C) by purely combinatorial means, for any admissible M .)

Symplectic data
In order to define a class-R theory T K [M ] associated to M (as well as any quantum wavefunctions), we must make several more choices.
At the big boundary of M we must choose a polarization: a splitting of the X j into linearly independent "positions" X j and "momenta" P j that obey canonical Poisson brackets In general there is no canonical way to do this. It may also be necessary to take rational linear combinations of the X j 's (rather than individual X j 's). At every small torus boundary of M , we have already chosen meridian and longitude (or A and B) cycles, which amounts to a partial polarization. We must also choose (rational) linear combinations V a of the V a 's that have canonical Poisson brackets with the meridian coordinates, { V a , U a } = δ aa . (5.14) Altogether, we call these choices a polarization Π for the boundary ∂M . The theory T K [M, Π] depends on this polarization.
We also make two inconsequential choices: we choose a maximal independent set of gluing functions C k , and a set of affine linear functions Γ k on P × that are canonically conjugate to these independent C k , i.e. {Γ k , C k } = δ kk .
The independent C k , along with the Γ k and the functions X j , P j , U (ν) a , V (ν) a , define a new set of symplectic coordinates on P × . Their relation to the original coordinates (Z i , Z i , Z i ) can be encoded in the affine symplectic transformation  where g is a symplectic matrix in Sp 1 3 N K(K 2 −1), Q , and σ is a 1 3 N K(K 2 −1)-dimensional vector of rational numbers. (Recall that N is the number of tetrahedra in the triangulation of M .) The rows of g and σ corresponding to the gluing functions C k are quite special; their properties are discussed further in Appendix A. Here it is at least clear that they only contain integer entries. Often (but not always) it is possible to choose polarization wisely so that the entire g and σ contain only integer entries, i.e. (g, σ) ∈ ISp 1 3 N K(K 2 −1), Z . For example, this seems possible for any knot complement in S 3 , for any K.
Given the symplectic data (g, σ) corresponding to the triangulation of M and a choice of polarization, it is straightforward to try to define a gauge theory T K [M, Π] as well as various quantum wavefunctions associated to M , following [7,8,20]. Each of these objects requires that the triangulation satisfy a few extra properties in order to be well-defined. For example, in order to define superpotentials in the gauge theory, the gluing functions C k must satisfy a certain constraint that is true for sufficiently refined triangulations. The construction of T [ M, Π] and quantum wavefunctions is summarized in Appendix A.

Remarks on quantization
Having described how to construct a "formal logarithmic lift" of functions on the product octahedron phase space using path coordinates, let us briefly review how the extra logarithmic data should lead to a canonical quantization of Lagrangian submanifolds L K (M ). We follow [20].
First, for every octahedron, quantization promotes the coordinates Z i , Z i , Z i to operators with commutation relations and a central constraintẐ We may also exponentiate, settingẑ i = expẐ i , etc., as well as q = exp . Then the commutation relations areẑ iẑ i = qẑ iẑ i , etc., and the central constraint isẑ iẑ iẑ i = −q. The octahedron Lagrangian becomes an operatorL i : which generates a left ideal in the q-Weyl algebra of exponentiated operators. Notice that the left ideal is invariant under cyclic permutationsẑ i →ẑ i →ẑ i →ẑ i , due to the correction in the central constraint (5.17). Now we can promote the rules for path coordinates of Section 5.2 to define new linear operatorsĈ k ,X j ,Û a ,V a in the algebra generated by theẐ i ,Ẑ i ,Ẑ i for all octahedra i . Along a given path, we simply add octahedron parameters with the appropriate signs, and modify every contribution of ±iπ to ±(iπ + /2). Moreover, we setĈ k to be the sum of octahedron parameters around a closed loop, minus (2πi+ ). The consistent modification of factors of iπ to iπ + /2 leads to a consistent prescription for quantum path coordinates that are invariant under path homotopy.
In order to glue the octahedra together, we perform the quantum-mechanical version of symplectic reduction. We form the product left idealL × = (ẑ i +ẑ −1 i − 1) # octs i=1 , and take the centralizer of this ideal with respect to the quantum gluing functionsĈ k . This leads to an ideal that involves only the exponentiated operatorsĉ k = expĈ k ,x j = expX j , m a = expÛ a , andˆ a = expV a . In the centralizer, we can unambiguously setĉ k = 1, and obtain a quantization of the LagrangianL K (M ). By construction, upon setting q → 1, this Lagrangian must reduce to the classical ideal L K (M ) -possibly with some extra components that only become reducible in the classical limit.
Now we see that the only purpose in life of the logarithmic path coordinates (from the perspective of quantization) was to properly keep track of powers of q. The construction of L K (M ) here suffers from a few technicalities that remain to be sorted out (for example, the operation of taking the centralizer ofL × with respect to theĈ k is not proved to succeed in general). However, modulo these technicalities, it was shown in [20] that the prescription for assigning q-corrections here is absolutely unique. It is the only prescription that allows cyclic invariance of the (5.18) and allowsL K (M ) to be invariant under 2-3 moves -a restricted set of 2-3 moves that we discuss below.
Note that the quantization of L K (M ) does not require a choice of polarization Π, and so does not need the full affine-symplectic data (g, σ). The polarization becomes relevant when defining theories T K (M ) and their partition functions, a.k.a. wavefunctions on M .

2-3 moves and path coordinates
We now return briefly to the 2-3 moves of Section 4.5. We demonstrate how our logarithmic path coordinates change under elementary 2-3 moves, and why they can be consistently defined as the triangulation of an admissible manifold M changes. The discussion here is essentially identical to that in [20], with K = 2 tetrahedra replaced by octahedra.
One purpose for studying 2-3 moves is to obtain a "bottom-up" proof that objects such as P K (∂M ), L K (M ), their quantization, and (especially) theories T K [M, Π] do not depend on a chosen internal triangulation for an admissible 3-manifold M . For example, we can show that linear phase spaces P K (∂M ) are invariant under all elementary 2-3 moves, which implies triangulation independence. Other objects, such as Lagrangian submanifolds, quantum wavefunctions, and gauge theories, are only well defined for sufficiently "regular" triangulations (e.g., those for which configurations of framing flags are generic on every tetrahedron). Then we can prove invariance under 2-3 moves that preserve the appropriate regularity conditions. This is not quite enough to rigorously demonstrate triangulation independence because it is unknown whether regular 2-3 moves can connect any regular triangulation of M to any other. But it is an important first step. We

Elementary moves
Let us take another look at the two elementary moves on octahedra from Section 4.5. We show them again in Figure 48. From a combinatorial perspective, they are absolutely identical. Figure 48. The two 2-3 moves on octahedra. The second is equivalent to the first, viewed from behind.
Let us assign logarithmic parameters Z i , Z i , Z i to the octahedra on the "2" side of the move, and parameters W i , W i , W i to the octahedra on the "3" side. We found previously that the coordinates associated to the nine points on the "boundary" of the clump of octahedra involved in the move did not change under the move -they were products of octahedron cross-ratios before and after. Logarithmically, this leads us to the nine relations On the "3" side, there is also an internal trivalent vertex, giving a gluing function C = W 1 + W 2 + W 3 − 2πi. Therefore, the dimension of the boundary phase space associated to this clump of octahedra is 4 on both sides. For example, if we choose a polarization (X 1 , X 2 ; P 1 , P 2 ) = (Z 1 , Z 2 ; Z 1 , Z 2 ) for the product phase space P ∂ Z 1 ×P ∂ Z 2 on the "2" side and a consistent polarization (X 1 , X 2 , C; P 1 , P 2 , Γ) = (W 2 + W 3 , W 2 + W 3 , W 1 + W 2 + W 3 − 2πi; W 1 + W 2 , W 3 + W 1 , W 1 ) for the product phase space P ∂ W 1 ×P ∂ W 2 ×P ∂ W 3 on the "3" side, then it is clear that We can also compute the Lagrangians corresponding to the clump, and check invariance. Let us set x i = e X i , p i = e P i as usual. On the "2" side we trivially find while the Lagrangian on the "3" side is given, after eliminating e Γ and setting e C = 1, by The ideals (5.21) and (5.22) are equivalent, provided that x 1 x 2 = e W 1 = 1. This is precisely the condition that octahedra are non-degenerate, i.e. their cross-ratio parameters take values in C * \{1}, which is ensured if classical configurations of framing flats are generic. In general, the map of Lagrangians is a birational correspondence. Similarly, we might try to quantize the Lagrangians on the two sides, as in Section 5.4. We will find that the factorization in (5.22) is very nontrivial in the quantum operator algebra, and that it uniquely fixes the prescription for q-corrections to be the one given by modifying iπ → iπ + /2 in path coordinates [20]. Then, with the canonical q-corrections, the quantum Lagrangians are invariant provided that the quantum prefactor (1 −x 1x2 ) is invertible.
Finally, we recall from [7] that the theories T clump,Π associated to the clumps of octahedra in Figure 48 are invariant under 2-3 moves, in the sense that the theories are IR dual. We will return to these gauge theories in Section 6.2. Other wavefunctions and their invariance under elementary 2-3 moves have been described in [8,20,37,63,64].

Composing elementary moves
In order to perform a full 2-3 move on ideal tetrahedra that have K-decompositions, we iterate the elementary 2-3 moves. We recall in Figure 49 how this worked for K = 3. Figure 49. The sequence of moves on octahedra that realizes a full 2-3 move for K = 3. The key is that these objects can either be constructed all at once (from the K-decomposition of an entire manifold M ), or sequentially. For example, one can glue together octahedra one-by-one, using a symplectic reduction at each step to define appropriate P, L, T , etc., and modifying these objects slightly with the addition of every new octahedron. Alternatively, one can form M by putting together several clumps of octahedra first, and then gluing the clumps together. It makes absolutely no difference. 8 Therefore, if we want to argue that applying the moves 8 A classical way to say this is that the reductions by C k in (5.10) can be done in any order. In terms of gauge theory, the statement is basically that operators O k corresponding to gluing constraints can be added to a superpotential in any order.
of Figure 48 to the octahedral decomposition of a triangulation does not change P K (∂M ), L K (M ), T K [M, Π], it suffices to isolate the clump of octahedra involved in the move, and to show that the objects P ∂(clump) , L clump , T clump,Π are unchanged. The consistent translations of path coordinates as in Figure 50 then tell us how to glue the clump back into the rest of the manifold, before and after the move.
Note finally that the symplectic gluing data (g, σ) obtained from a decomposition of M into octahedra does change under a 2-3 move on octahedra. It must: the dimension of the symplectic matrix g increases or decreases by one for every move. Nevertheless, objects that are computed from the gluing data are invariant.

Tetrahedron and polyhedron theories
In this section we present the first and simplest examples of N = 2 gauge theories T K [M ] associated to 3-manifolds with K > 2. We will also compute some of their observables and the corresponding geometric quantities for the 3-manifolds, such as the supersymmetric parameter space L SUSY L K (M ).
We start with a survey of tetrahedron theories T K [∆, Π] for K = 2, 3, 4, 5. These beautifully illustrate the types of complexities that arise at higher K and how they can be handled. With a judicious choice of boundary polarization Π, the theories can be described as flavor sym. In general, the class-R methods of this paper construct T K [∆] as a theory with manifest flavor symmetry 9 U (1) (K−1) 2 , where 2(K − 1) 2 is the dimension of the phase space P K [∂∆]. The theory has 1 6 K(K 2 − 1) chirals (the number of octahedra in the K-decomposition) and 1 6 (K − 1)(K − 2)(K − 3) operators added to its superpotential (the number of internal lattice points). The dynamical gauge group depends on the choice of boundary polarization, though for K ≥ 5 there will always be a nontrivial gauge group; likewise, for K ≥ 5 the superpotential will always contain some monopole operators. We also consider the bipyramid theory for K = 3. The triangular bipyramid can be triangulated in two different ways, leading to two different theories T 3 [bip, Π] that are mirror symmetric. With a suitable choice of polarization, one theory (coming from two tetrahedra) can be described as a collection of eight chirals with a single degree-six superpotential; while the other (coming from three tetrahedra) is a U (1) 6 gauge theory with twelve chirals and five operators in its superpotential, including three monopole operators. The mirror symmetry is quite non-trivial! Nevertheless, we know mirror symmetry must hold, and it can systematically be broken down into a sequence of fundamental XYZ ↔ SQED mirror symmetries just by looking at the geometric decomposition of a 2-3 move into octahedra, as in Figure 49. This is a nice example of how a complicated physical duality is encoded by relatively simple geometry.
The polyhedron theories T K [M, Π] in this section all depend on a choice of polarization, and in general there is no canonical choice. 10 This makes them somewhat ill-suited for a study of large-K behavior, despite the nice hint of K 3 scaling for degrees of freedom that comes from counting octahedra. On the other hand, we should keep in mind that in many circumstances the choice of polarization is not important. For example, the choice dissolves once the theories are re-interpreted as boundary conditions for U (1) gauge fields in four dimensions (i.e. by weakly gauging U (1) flavor symmetries in a 4d bulk). This was explained in [7]. In three dimensions, it is natural to think of theories T K [M, Π] as coming in families or equivalence classes whose elements are related by Sp (2N, Z) transformations. While some observables of a theory (such as partition functions or indices) depend on a choice of representative in the class, and transform under Sp(2N, Z), others (such as L SUSY L K (M )) do not.
In this section, we will generally consider the logarithmic lifts P K (M ) of phases spaces L K (M ). We alternatively use uppercase logarithmic coordinates (e.g. Z i ) and the lowercase exponentiated ones (e.g. z i = exp Z i ), as appropriate.
A summary of the systematic rules used to obtain a 3d gauge theory in class R from the symplectic gluing data (g, σ) of an octahedral decomposition is given in Appendix A. We use these rules implicitly to derive gauge theories below, but focus the discussion on more intuitive aspects of the geometry-physics correspondence.

Review: the octahedron theory
To begin, let us review the theory T associated to an octahedron -or, equivalently a tetrahedron for K = 2. It was constructed in [7].
Recall that the vertices of an octahedron are labeled by a triplet of parameters (Z, Z , Z ), occurring in the same clockwise cyclic order around every black face. Classically they satisfy Z + Z + Z = iπ and the Poisson brackets {Z, Z } = {Z , Z } = {Z , Z} = 1. Once we fix a labeling, the octahedron has a canonical initial polarization with Z a position and Z a momentum. Typically we will also choose the final polarization Π Z = (X; P ) = (Z; Z ) to agree with the initial one. Then T := T 2 [ , Π Z ] is the theory of a free N = 2 chiral multiplet.
Specifically, we define T : Free chiral φ , U (1) F flavor symmetry with complex mass parameter Z ; charges: The theory has a U (1) F flavor symmetry rotating the phase of the chiral, and we add −1/2 units of Chern-Simons coupling 11 for a background vector multiplet associated to this flavor symmetry. This is a Chern-Simons contact term, as in [67,68]. The theory also has a U (1) R R-symmetry. We specify an R-charge assignment, as well as mixed background Chern-Simons couplings between R-symmetry and flavor-symmetry fields. These are irrelevant in flat space, but become important when one compactifies the theory on S 1 , S 3 , S 2 × S 1 , etc. Similarly, in flat 3d space the mass parameter associated to the flavor symmetry (a scalar in the vector multiplet) is real, but gets complexified in any of these compactifications. This mass parameter is identified with Z. On the 3-manifold side, it is the logarithmic lift of phase-space coordinates that lets us consistently keep track of R-charge assignments and complexified masses Z in the compactifications. (These comments apply not just to the octahedron theory, but to all 3-manifold theories obtained from triangulations.) Notice that T has a chiral operator φ. Geometrically, it can be associated to both of the vertices with final position coordinate X = Z in (6.2). We are also at liberty to choose different final polarizations for the octahedron theory, related to Π Z by an Sp(2, Z) transformation. In any given polarization Π = (X; P ), the octahedron vertices commuting with the position coordinate X (if any exist) will be assigned chiral operators.
For example, if we choose polarization Π Z = (Z ; Z) with Z as a position, the theory becomes T := T 2 [ , Π Z ] T : 1) G gauge theory w/ a chiral φ , U (1) J topological flavor symmetry w/ complex mass Z ; charges: It has a gauge-invariant monopole operator V + "sitting" on the Z vertices. Similarly, in 11 As usual, chiral matter in three dimensions produces one-loop half-integer contributions to effective Chern-Simons levels for gauge or flavor symmetries, cf. [13,65,66]. Thus bare Chern-Simons must sometimes take half-integer values, as in (6.2), in order for the full theory to be gauge invariant.
U (1) G gauge theory w/ a chiral φ , U (1) J topological flavor symmetry w/ complex mass Z ; charges: The three theories above are actually all mirror-symmetric: In any polarization, the octahedron theory will have a supersymmetric parameter space 12 isomorphic to L SUSY L = {p + x −1 − 1 = 0}. Changing the polarization just acts as an Sp(2, Z) transformation on (X; P ), with x = exp X and p = exp P as usual.

Warmup: elementary 2-3 move theories
As a warmup exercise, we derive the theories associated to the clusters of either 2 or 3 octahedra that enter elementary 2-3 moves. Alternatively, these are theories T 2 [bip] for a K = 2 bipyramid, as investigated in [7]. Versions of these theories appear as building blocks in almost all more interesting 3-manifold theories. They also illustrate the fundamental mirror symmetry associated to the 2-3 move on octahedra, which (putatively) is used to build up all the mirror symmetries in class R.
In all cases, the theories have U (1) 2 flavor symmetry. Put differently, the dimension of the phase spaces P ∂(cluster) corresponding to these clumps of octahedra is always four. We label octahedra by parameters (z 1 , z 2 ) on the 2-side and (w 1 , w 2 , w 3 ) on the 3-side, as shown in Figures 51-52 (just as in Section 5.5). Then we have where C = W 1 + W 2 + W 3 − 2πi is the gluing function for the internal point on the 3-side.
There is no canonical final polarization on P ∂(cluster) , but there are two somewhat natural choices: a "longitudinal" polarization ( Figure 51) and an "equatorial" polarization ( Figure  52). The two choices give slightly different descriptions of the mirror pairs of theories.
In the longitudinal polarization, the cluster of two octahedra is very simple. We take Π long = (X+, X − ; P + , P − ) := (Z 1 , Z 2 ; −Z 1 , Z 2 ). Since the final positions X ± match the initial positions Z 1,2 , the theory is just a product of two octahedron theories, a.k.a. an N = 4 hypermultiplet: In the charge matrix, we have used the positions X ± to label the U (1) ± symmetries. The background Chern-Simons levels follow from the choice of momenta P ± . Notice that the cluster of octahedra has three external coordinates Z 1 , Z 2 , and Z 1 + Z 2 that commute with the positions X ± ; correspondingly, T hyper has three chiral operators q, q, and q q transforming under the flavor symmetries at these coordinates.
If instead we build the cluster with three octahedra, we now have a non-trivial Sp(6, Z) transformation acting on the product phase space: The fact that there are initial momenta (W 2 , W 3 ) mixed into the final positions X ± means that we must have a non-trivial gauging. Indeed, we find that the gauge theory is now described as N = 4 SQED. In N = 2 language: Dynamical U (1) theory with three chirals and a superpotential W = φϕφ; flavor symmetry U (1) + × U (1) − corresponding to (axial±topological) charges: ) Each chiral φ, φ, ϕ corresponds to one of the original octahedra, and their product forms an operator O C that must be added to the superpotential to enforce the internal gluing constraint. The remaining flavor symmetry is an axial U (1) A and a topological U (1) J , which are re-grouped into U (1) ± . It can be checked (following, e.g., rules of [13]) that the theory has both a gauge-invariant monopole operator V + and an anti-monopole V − , with charges as shown. The operators V ± and the neutral chiral ϕ now sit at the three external vertices of the clump that commute with X ± . The duality is one of the classic examples of 3d mirror symmetry [70,71].
In the equatorial polarization, the final positions X ± now involve initial momenta on the 2-side but not on the 3-side. Thus, the 2-side gives a dynamical U (1) gauge theory while the 3-side has three ungauged chirals with a superpotential. Figure 52. Equatorial polarization on mirror-symmetric clumps of octahedra.
Explicitly, on the 2-side, we set (X + , X − ; P + , This results in N = 2 SQED, Dynamical U (1) theory with two chirals q, q; flavor symmetry U (1) + × U (1) − corresponding to (axial ± topological) charges: This is nothing but N = 4 SQED without the neutral chiral and the superpotential; indeed, geometrically, if we remove the third octahedron from the right side of Figure 51 and rotate the picture by ninety degrees, we recover the left side of Figure 52. The theory T N =2 SQED has axial and topological U (1) symmetries. Its gauge-invariant operators are a monopole/antimonopole v ± and a meson q q, which sit at three vertices on the boundary of the cluster.
Finally, if we use the equatorial polarization and build the cluster from three octahedra we obtain the "XYZ" model: The chiral operators φ 1 , φ 2 , φ 3 sit at external vertices of the cluster.
The mirror symmetry T N =2 SQED T XYZ (6.14) is a classic example of N = 2 mirror symmetry [13,14]. It is equivalent to the N = 4 mirror symmetry (6.10). We can simply act with an Sp(4, Z) transformation on both sides of (6.10) to change the boundary polarization from longitudinal to equatorial, recovering (6.14). In physical language: if we simultaneously gauge a vector U (1) in the free hyper theory and a corresponding topological U (1) J in N = 4 SQED, we recover N = 2 SQED and the XYZ model, respectively. 13

Tetrahedra at higher K
We now proceed to describe the ideal-tetrahedron theories T K [∆] for K > 2. They were summarized in (6.1), and we want to demonstrate how they are constructed.
6.3.1 K = 3 13 To see that we recover the XYZ model this way, we must remember that gauging a U (1) and subsequently gauging its U (1)J is equivalent in the IR to gauging nothing at all -it is the statement that S 2 = −I in the symplectic group [23]. The four octahedra in a K = 3 tetrahedron can be assigned triples of parameters (z, w, s, t) as in Figure 53. Since there are no internal lattice points, we expect that the phase space P 3 (∂∆) and Lagrangian L 3 (∆) are just products of four copies of the octahedron phase space and Lagrangian. Similarly, in suitable polarizations, the theory T z ⊗ T w ⊗ T s ⊗ T t should just be a product of four octahedron theories.
Explicitly, the phase space P 3 (∂∆) -an open patch of the space of framed flat P GL(3, C) connections on the boundary with unipotent holonomy at the punctures -is parametrized by the twelve edge coordinates and four face coordinates on the boundary of the tetrahedron, subject to eight constraints from the vertices. The vertex constraints, imposing unipotent holonomy, say that sums of logarithmic coordinates around loops encircling the vertices equal −2πi, cf. (5.12) and Figure 11. A convenient choice of linearly independent boundary coordinates is given by the polarization Π = (X 1 , X 2 , X 3 , X 4 ; P 1 , P 2 , P 3 , P 4 ) = (Z, W, S, T ; Z , W , S , T ) , (6.15) a simple product of octahedron polarizations. Then the Lagrangian becomes the product It parametrizes an open patch of the configuration space of four flags in C 3 -the invariant flags on the tetrahedron's vertices.
Using the polarization (6.15) we find that the theory is exactly i.e. a theory of four free chirals. It has U (1) 4 flavor symmetry. The chiral operators φ z , φ w , φ s , φ t are associated with four external points on the K = 3 tetrahedron, as indicated in Figure 53. Only these external points have coordinates that commute with the positions in Π.

K = 4
For K = 4, the tetrahedron is decomposed into ten octahedra, as in Figure 54. The novelty is that there is an internal lattice point in the middle of the tetrahedron. It leads to a gluing constraint and to a superpotential coupling. A convenient choice of octahedron labelings is shown in the figure. We arrange that all six octahedron vertices surrounding the internal point are labeled by un-primed coordinates, so that the classical gluing constraint takes the form C = Z 5 + Z 6 + Z 7 + Z 8 + Z 9 + Z 10 − 2πi → 0 .
(6.18) Figure 54. Octahedra, final polarization, and operators for K = 4. The octahedron in the middle of the back edge is drawn separately; note that its parameter is not part of the polarization. On the right we show the three slices around the top vertex.
Then in the gauge theory the corresponding operator will easily be built as a product of six fundamental chirals. Moreover, we notice that all ten of the initial positions Z i appear as coordinates on the edges of the boundary. Therefore, we can choose an independent set of nine of them (independent modulo the gluing constraint) as positions in the final polarization Π as well; for example, we take Then the theory T 4 [∆, Π] involves no gauging at all. It is basically a product of octahedron theories: T 4 [∆, Π] : ten chirals φ i with a superpotential W = φ 5 φ 6 φ 7 φ 8 φ 9 φ 10 U (1) 9 flavor symmetry left unbroken (6.20) As dictated by this polarization, the first four U (1) i flavor symmetries rotate the first four φ i 's; while the for 5 ≤ i ≤ 9 the field φ i has charge +1 and φ 10 has charge −1. Moreover, the first nine fields have R-charge zero and φ 10 has R-charge 2. The background Chern-Simons levels can be determined after a precise choice of momenta P i in Π is made. (In general, changing the momenta only effects background couplings.) We might notice that the construction of T 4 [∆, Π] is a simple generalization of the construction of the XYZ model in Section 6.2.
The phase space P 4 (∂∆) for the boundary of the K = 4 tetrahedron is the symplectic quotient of a product of ten octahedron spaces, using the gluing coordinate C as a moment map. Thus it has complex dimension 18. Recall that C should be thought of as a coordinate on the product P × = 10 i=1 P ∂ i , with product polarization Π × = (Z i ; Z i ). We can describe P 4 (∂∆) more explicitly by choosing new symplectic coordinates on P × that include the 18 positions and momenta (X i , P i ) of a final boundary polarization, as well as C and a canonical conjugate Γ so that {Γ, C} = 1. For example, it suffices to choose Γ = Z 10 , (6.21) together with X i = Z i (1 ≤ i ≤ 9) as well as P i = Z i for 1 ≤ i ≤ 4 and P i = Z i − Γ for 5 ≤ i ≤ 9. Then Note that all the P i here can be written as linear combinations of boundary coordinates on the tetrahedron. This must always be the case, due to the Poisson brackets of Section 5.3. The nine-dimensional Lagrangian submanifold is obtained by eliminating γ = z 10 from , setting c = z 5 z 6 z 7 z 8 z 9 z 10 = 1, and re-writing the equations in terms of x i and p i : In fact, it is also easy to quantize the Lagrangian using the prescription of [20], outlined in Section 5.4. We find the left ideal These are the line operators that annihilate partition functions of T 4 [∆, Π].

K = 5
The K = 5 tetrahedron is a good example of the complexity that arises for general K. It gets decomposed into twenty octahedra ( Figure 56), with four internal lattice points. No matter how we label the octahedra, the gluing functions at these lattice points can never simultaneously be written as sums of initial positions Z i . Correspondingly, the four operators added to the superpotential of the theory T 5 [∆] can never simultaneously be written as products of elementary chiral fields -monopole operators are unavoidable. Figure 55. The central cluster of the K = 5 tetrahedron.
It is instructive to build the tetrahedron and the corresponding gauge theory in pieces. We start with a cluster of four octahedra, which have a small upright tetrahedron (∆ (0,2) simplex) in their center ( Figure 55). We label octahedra with parameters (z, w, s, t) as shown, and choose a boundary polarization Π cluster = (X i ; P i ) 4 i=1 for the cluster so that the four light-blue boundary points in the figure commute with the positions of Π cluster . That means that there will be gauge-invariant operators associated to them.
Explicitly, we set {X 1 = Z + W, X 2 = S + T, X 3 = Z + S + T , X 4 = S +Z +W }. The positions X 1 , X 2 are combinations of initial octahedron positions, while X 3 , X 4 involve initial momenta; thus we expect something like a U (1) 2 gauge theory. In matrix form,  By comparing the form of this matrix with (6.11), we find that the cluster theory is basically two copies of N = 2 SQED. More accurately, it is two copies of SQED whose U (1) gauge fields are coupled by a mixed Chern-Simons term: T cluster : charges:  0 0 −2 (6.26) Notice that each U (1) i gauge group has both monopole and anti-monopole operators, denoted by V ± i . However, due to the dynamical mixed Chern-Simons term, the monopoles of U (1) 1 are not gauge invariant under U (1) 2 , and vice versa. We fix this by "dressing" the monopoles with chiral fields. We then find the four gauge-invariant operators with flavor charges as indicated. These operators correspond to the light-blue dots in Figure 55.
To complete the SL(5) tetrahedron, we couple the central cluster to sixteen additional octahedra on the periphery, as shown in Figure 56. We label the new octahedra with param- i,j=1 as shown. The precise gauge theory we obtain depends on the final boundary polarization for the whole ensemble.
The simplest final polarization keeps X 1 and X 2 from Π cluster as position coordinates. We can re-write each of them as a sum of four coordinates on the final boundary; for example For the fourteen remaining positions we take a subset of fourteen Y ij coordinates from octahedra on the periphery (due to the internal gluing constraints, these boundary coordinates are not all independent). Then the final gauge theory is simply the cluster theory (6.26), coupled to 16 T theories with chirals φ ij (1 ≤ i, j ≤ 4) via a superpotential, T cluster ⊗ (T ) 16 , with U (1) 16 flavor symmetry preserved by the superpotential (6.28) Notice that the four products of chirals φ i1 φ i2 φ i3 are associated to vertices on the groups of peripheral octahedra that become identified with the four distinguished vertices of the central cluster during the gluing. The four superpotential couplings combine the operators on the two sides of the gluing.

The K = 3 bipyramid
We now come to the theory of the bipyramid for K = 3. We expect that by splitting the bipyramid into ideal tetrahedra two different ways we will find two different theories T 3 [bip-2] and T 3 [bip-3] that are mirror symmetric, generalizing the K = 2 examples of Section 6.2. We will check that this is the case by relating T 3 [bip-2] and T 3 [bip-3] via a sequence of fundamental mirror symmetries for octahedra. Of course, the K = 3 bipyramid theories depend on a choice of polarization. There are two somewhat natural options, shown in Figure 57, and designated "equatorial" and "tropical". Some of the main features of the theories in their two polarizations can be summarized as: Just like in the K = 2 case, we switch from one polarization to the other by performing an Sp(14, Z) transformation simultaneously on both sides -in this case, gauging three U (1) flavor symmetries. In any polarization, we will always have mirror symmetry We begin by describing the theories on the two sides, and then explain how the mirror symmetry works.

Two tetrahedra
Let us focus on the tropical polarization, since it makes the two-tetrahedron theory especially simple. The decomposition of the bipyramid into two tetrahedra, and subsequently into eight octahedra, is shown in Figure 58. It has a single internal lattice point, lying in the center of the identified faces of the octahedra. Quite conveniently, we can label the octahedra so that their initial positions Z i coincide with the final positions X i in the polarization. Specifically, we can set X i = Z i for 1 ≤ i ≤ 7. Moreover, the central gluing function C = Z 3 + Z 4 + Z 5 + Z 6 + Z 7 + Z 8 − 2πi is made of six octahedron positions (with no octahedron momenta).
The first two flavor symmetries U (1) 1 , U (1) 2 rotate the decoupled chirals φ 1 , φ 2 ; while the remaining five symmetries {U (1) i } 7 i=3 rotate φ i and φ 8 with charges (+1, −1). We could proceed further and specify seven momenta P i for the polarization Π trop . They must be some linear combinations of boundary coordinates. However, the choice only affects background Chern-Simons levels, of which we won't keep track in this example.
If we used the equatorial polarization rather than the tropical polarization, the three pairs of octahedra that are glued together along a face would become three copies of N = 2 SQED, as on the left of Figure 52. (In the tropical polarization, we could have said that these pairs of octahedra were three N = 4 hypermultiplets, as on the left of Figure 51.) Nothing happens with the two octahedra at the poles. Then we would get Three copies of SQED with chirals {q i , q i } 3 i=1 , plus two additional decoupled chirals φ 1 , φ 2 ; W = (q 1 q 1 )(q 2 q 2 )(q 3 q 3 ), preserving U (1) 7 flavor sym.
The superpotential is a product of the three mesons. The decomposition of the bipyramid into three tetrahedra, and subsequently into twelve octahedra, is shown in Figure 59. Now there are five gluing constraints: three on the glued pairs of tetrahedron faces, and two on the internal edge. The theory can be assembled in a few steps, much like the K = 5 tetrahedron theory of Section 6.3. We will first build a central "core" out of six octahedra surrounding the central edge. Then we will couple the core to a halo of six octahedra around the equator (see Figure 61).

Three tetrahedra
To construct the core, we put together two copies of N = 4 SQED, exactly as in (6.9), corresponding to the right side of Figure 60. The core of the SL(3) bypyramid, built from two copies of N = 4 SQED. Figure 51. We call the copies T N =4 SQED and T N =4 SQED . Each of them already has a cubic superpotential enforcing a gluing constraint, so there are no additional constraints in assembling them. However, we should change the polarization in order to allow more boundary points on the core to carry gauge-invariant operators, as indicated in Figure 60. We choose two new positions X 1 = X − + X + and X 2 = P − − P + (and conjugate momenta P 1 = P − , P 2 = X + ) in addition to the old positions X + and X − (and conjugate momenta P + , P − ). In matrix form, we have  (6.33) This amounts to gauging the anti-diagonal U (1) d of the global symmetry group U (1) − ×U (1) + . The operators V + and V − are clearly uncharged under U (1) d , as is the product η = V − V + , so they survive the gauging. In addition, we gain a new pair µ ± of monopole/anti-monopole operators 14 for U (1) d , charged under a new topological symmetry U (1) J . They are associated to the boundary coordinates shown in Figure 60. In summary, the core theory theory is two copies of SQED with a new polarization, T core = g • (T N =4 SQED ⊗ T N =4 SQED ), and explicitly T core : six chirals, and superpotential W = φϕφ + φ ϕ φ Here we have denoted by U (1) d (or 'D') the diagonal of U (1) − × U (1) + that is preserved as a flavor symmetry. In order to complete the bipyramid, we must add a "halo" of six octahedra to the core of Figure 60. This is shown in Figure 61. Three new gluing constraints arise, and each of the operators η, µ + , µ − from the core participates in one of three new superpotential couplings. For the tropical polarization on the final boundary, we should represent the halo as three copies of N = 2 SQED (cf. (6.12) and Figure 52). The meson operators q i q i in the three copies of SQED couple with the three operators η, µ + , µ − of the core in a superpotential. The theory becomes 3 , U (1) 6 gauge theory with 12 chirals and the U (1) 7 flavor symmetry preserved by W = φϕφ + φ ϕ φ + q 1 q 1 η + q 2 q 2 µ + + q 3 q 3 µ − .
(6.35) The U (1) 7 flavor symmetry comes from U (1) 4 from the core and U (1) 6 from the halo, minus the three symmetries broken by the core-halo couplings. The positions in the final tropical polarization consist of X + , X − from the core and any five of the six X i , X i from the halo (after gluing, the six halo positions are not all independent). The theory has eight gaugeinvariant operators associated to the external light-and dark-blue dots on the bipyramid: the monopoles V + , V − of the core and the monopoles v + i , v − i (i = 1, 2, 3) for the three copies of SQED in the halo.
If instead we wanted to reproduce the equatorial polarization on the final boundary, we would just use a different polarization for the halo. In fact, in the equatorial polarization, the halo just becomes six free chirals (or three N = 4 hypers). Three pairs of these chirals combine with the three core operators η, µ + , µ − to form three cubic superpotential couplings. We obtain a U (1) 3 gauge theory with a total of 12 fundamental chirals, five superpotential couplings, and a preserved U (1) 7 flavor symmetry.

Mirror symmetry
We have found an extremely simple bipyramid theory T 3 [bip-2], and a somewhat more complicated one T 3 [bip -3]. To finish, let us proceed through the chain of fundamental mirror symmetries that link these two theories, demonstrating their IR equivalence. We simply follow the chain of 2-3 moves on octahedra shown in Figure 49. We will be somewhat loose on the details, since the construction (ultimately) is completely systematic. We work in the tropical polarization, and start with the theory T 3 [bip-2] (6.31) built from two tetrahedra and eight octahedra. Consider the three pairs of chirals (φ 3 , φ 6 ), (φ 4 , φ 7 ), (φ 5 , φ 8 ) corresponding to the three pairs of octahedra that touch across the big internal face. They represent three N = 4 hypers, coupled by an N = 2 superpotential (6.36) The first set of three 2 → 3 moves dualizes the hypers to three copies of N = 4 SQED ( Figure 62). Let us denote the charged and neutral chirals in the N = 4 SQED's as . Each hyper is replaced with a pair of SQED monopole/anti-monopole operators, e.g.
(6.38) (The XYZ superpotential has been eliminated in the duality.) The gauge group is U (1) d , acting on (r, r ). Figure 63. The final step in going from two SL(3) tetrahedra to three: forming the core.
The halo of six octahedra is now complete, and we just need to form the core. It requires the last set of two 2 → 3 moves, shown in Figure 63. We bring in the two octahedra at the poles of the bipyramid, and think of each pair (r, φ 1 ) and (r, φ 2 ) as an N = 4 hyper. We want to dualize these pairs to N = 4 SQED. This is subtle: the chirals r, r are not gauge-invariant, and we are effectively assuming that it is ok to interchange an order of limits (of gaugings) as we flow to the IR. With this assumption, the result of the duality is the core theory of (6.34): two copies of N = 4 SQED, for which a combination of axial and topological symmetriesidentified with U (1) d -has been subsequently gauged.
The operators µ + , µ − , η all survive as monopoles of the core theory, as described in Section 6.4.2. In addition, there are two new monopoles V + and V − coming from the copies of N = 4 SQED. The gauge group has become U (1) 3 , comprising the two N = 4 SQED gauge groups and U (1) d . The superpotential gets two cubic N = 4 SQED operators added to it: Altogether, we recover the coupled core-halo system that describes T bip-3 .

Knot complement theories
We have finally arrived at the theories T K [M ] associated to knot complements M = S 3 \K. More generally, we can take M = M \K, where M is any closed 3-manifold. Recall from Section 5 that in the ideal triangulation of a knot complement, all big faces of tetrahedra are completely glued, leaving behind a small torus boundary on which all the tetrahedron vertices sit. Physically, the theory T K [M ] should correspond to wrapping K M5-branes on M ×R 3 , in the ambient geometry T * M ×R 3 ×R 2 . We then add K additional "probe" branes along N * K× R 3 , where N * K ⊂ T * M is the co-normal bundle of the knot. 15 This is the M-theory version of creating a small torus boundary -specifically one with boundary conditions relevant for parametrizing irreducible flat connections on M . The setup preserves four supercharges and flows to an effective N = 2 theory on R 3 in the infrared. Alternatively, we may start with the A K−1 (2,0) theory in six dimensions and compactify it on M (with a suitable topological twist), adding a codimension-two defect along K. In the language of [3] (see also [74,75]), the codimension-two defect is of the type corresponding to a "full" or "maximal" puncture. From either construction, it is straightforward to deduce that T K [M ] should be an SCFT with SU (K) flavor symmetry. 16 As discussed in Section 5 (and Appendix A), a knot-complement theory can systematically be defined by extracting symplectic gluing data (g, σ) from an ideal triangulation of M , and the K-decomposition thereof. We will give some examples below in Sections 7.3-7.4. The complexity of the theory does grow quite quickly with K. With N tetrahedra, our description of T K [M ] will contain 1 6 N K(K 2 − 1) chirals, and potentially a very large abelian gauge group. The superpotential will also contain 1 6 N K(K 2 − 1) operators -corresponding to the internal lattice points of the octahedral decomposition -of which K − 1 do not break flavor symmetries. Nevertheless, despite this apparent complexity, we will be able to use combinatorics to deduce (and/or verify) several interesting general properties of knot-complement theories. For example, we can see immediately from the dimension of the boundary phase space P K (T 2 ) that T K [M ] has U (1) K−1 flavor symmetry, which may be enhanced to SU (K).
One particularly interesting question to ask is how theories T K [M ] depend on K as K becomes large. Simply counting chiral multiplets in a UV description leads to the naive guess that degrees of freedom scale like K(K 2 − 1). We can make this somewhat more precise by (conjecturally) relating degrees of freedom to the volume of flat P GL(K, C) connections on M -as given by the imaginary part of the Chern-Simons functional Im M Tr AdA + 2 3 A 3 . In turn, when M is hyperbolic, we will be able to see combinatorially that there is a flat P GL(K, C) connection whose volume is exactly 1 6 K(K 2 − 1) times the hyperbolic volume of M . This adds some further evidence that the naive guess for the scaling is correct.
Let us observe that this scaling of degrees of freedom appears to be in very good agreement with results from the AdS/CFT correspondence. If M is a closed manifold, the gravity solutions dual to theories T K [M ] should be given by the AdS 4 compactifications of M-theory that were obtained in [29] by considering the near-horizon limit of M5-branes wrapping a Special Lagrangian 3-cycle. One explicit solution is known, in which the internal 7-manifold is an S 4 -fibration over a closed hyperbolic 3-manifold M (this is in fact the 11d uplift of a 7d supergravity solution originally found in [76]). The free energy F = − log |Z| can be determined from the computation of the effective 4d Newton constant using standard 15 Constructions of this type, which use intersecting branes to embed a knot-complement geometry in Mtheory, are quite common. They were introduced in [72], and have made many recent appearances, including [73] as well as [7,8]. 16 The relation between theories T [M ], compactifications of the 6d (2,0) theory, and M-theory is further explored in [49].
AdS/CFT techniques [27,77] and is expected to be given essentially by K 3 Vol(M ), where Vol(M ) is the hyperbolic volume. In the particular case of knot complements, one would have to enhance the setup slightly by introducing the additional probe branes that intersect M along the knot K, much as was done for 4d N = 2 theories of class S in [78]. However, as long as the knot complement M has nonzero hyperbolic volume, the K 3 Vol(M ) scaling should remain robust. Tantalizingly, a subleading correction to this result modifying K 3 → K(K 2 − 1) was predicted by the authors of [28] from the requirement of anomaly cancellation for M5-branes. This appears to match the exact scaling of volumes of flat connections mentioned above.
We remark that all the ideas and constructions in this section apply in a completely straightforward way to "link complements," or manifolds M with multiple small torus boundaries. We focus on knot complements for simplicity.

Flavor symmetry and marginal operators of T K [M ]
A knot complement theory T K [M ] that is constructed combinatorially from an ideal triangulation of M will always have flavor symmetry that is at least U (1) K−1 . This is clear from the dimension of the boundary phase space, dim C P K (T 2 ) = 2(K − 1) (Sections 5.3 and 4.4). We can say quite a bit more about T K [M ], however, by looking at how the combinatorial gluing actually happens.
Recall from Sections 4.4 and 5.2 that an ideal triangulation of a knot complement M with N big tetrahedra, has exactly N internal edges as well. There are also 2N distinct internal faces. Therefore, after decomposing further into octahedra, the total number of internal gluing constraints C k (i.e. lattice points) will be This is equal to the number of octahedra. However, not all of these gluing constraints are independent. As discussed in Section 5.2.2 (cf. Figure 43), K − 1 linear combinations of them will vanish automatically. Therefore, the final boundary phase space P K (T 2 ) can be written as a symplectic reduction of the 1 3 N K(K 2 − 1)-dimensional product octahedron phase space using any independent subset of the C k as moment maps. Now consider what this means in terms of gauge theory. We build T K [M ] by starting with 1 6 N K(K 2 − 1) octahedron theories T , applying a symplectic transformation (g, σ) to obtain a theory T with U (1) 1 6 N K(K 2 −1) flavor symmetry, and then adding operators O k to the superpotential to break flavor symmetries. We should add one O k for every gluing constraint C k . However, we find that after adding operators O k for any independent subset of 1 6 N K(K 2 − 1)−(K−1) gluing constraints, we are done. The remaining (K−1) operators can be added, but they do not break any additional flavor symmetries. Moreover, their R-charge is necessarily set equal to two. Thus, they are marginal operators that do not break any flavor symmetry, and by the arguments of [79] they must be exactly marginal. This set of (K − 1) exactly marginal operators provides a strong indication that the remaining U (1) K−1 flavor symmetry of T K [M ] can be enhanced to SU (K) at some special point p * in the space of marginal deformations. Indeed, at such a point p * , an additional K(K −1) marginal operators must arise, paired with the currents of SU (K)/U (1) K−1 that are restored [79] (see also [80] for similar arguments). Altogether, the K(K −1)+(K −1) = K 2 −1 marginal operators at p * beautifully fill out the irreducible adjoint representation of SU (K).
Both the marginal operators that are lifted off of p * and the K − 1 exactly marginal operators that survive can be understood from an M-theory perspective. The M-theory explanation appears in [49].
We can also address the issue of polarization. As usual, for any M with a boundary, the theory T K [M ] will depend on a polarization Π. In the case of a knot complement, however, the choice is basically canonical. Indeed, by representing a manifold M with torus boundary as the complement of a knot K in a specific closed manifold M (which is certainly necessary from the M-theory perspective, where the K arises from intersecting branes or defects), we automatically identify a "meridian" cycle µ on the torus boundary. It is the cycle that forms an infinitesimally small loop linking K in M , and would be contractible if we removed K. The eigenvalues of the meridian holonomy then become canonical position coordinates for Π.
If moreover M is a knot complement in M = S 3 or any homology sphere, then there is also a canonical longitude cycle λ dual to the meridian on the boundary. It is the unique cycle that is null-homologous in M . The eigenvalues of the longitude holonomy become canonical momentum coordinates, as explained in Sections 4.4 and 5.3. However, we often do not require a canonical choice of momenta, since they only affect background Chern-Simons couplings.
Note that the K − 1 real mass deformations of T K [M ] coming from the U (1) K−1 flavor symmetry correspond directly to the meridian eigenvalues of a flat connection on Mi.e. the position coordinates for the boundary phase space, in the canonical polarization. More precisely, after compactifying T K [M ] on any combination of circles or spheres, the real masses get complexified, and the complex masses correspond to the complex meridian eigenvalues. If we want to keep T K [M ] at a conformal point (that is, on the conformal manifold parametrized by marginal deformations), we should turn all mass deformations off. This means making all eigenvalues trivial, setting up to conjugation. This is not a trivial boundary condition: in order for the holonomy of a flat connection to be irreducible (e.g. as discussed in Section 4.4) the meridian holonomy must contain a single Jordan block. The matrix (7.2) is called the maximal parabolic element of P GL(K, C), and can be described nicely as ρ [K] ·( 1 0 1 1 ), where ρ [K] : P GL(2, C) → P GL(K, C) is the K-dimensional irreducible representation, or principal embedding.

K 3 scaling in T K [M ]
We would like to sketch an argument indicating that the degrees of freedom of T K [M ] at a conformal point scale like 1 6 K(K 2 − 1) when K is large, and M is hyperbolic. The argument has two parts. First we observe that, when M is hyperbolic, there is a flat P GL(K, C) connection on M with boundary conditions (7.2) whose volume is 1 6 K(K 2 − 1) times the hyperbolic volume Vol(M ). Second, we try to relate the free energy of T K [M ] on a sphere to the volume of this flat P GL(K, C) connection. The second part of the argument involves several nontrivial assumptions that we hope to investigate in subsequent work.

P GL(K) volume from octahedra
The complex volume of a framed flat P GL(K, C) connection A on a knot complement M was discussed in Section 3.4. It can be interpreted as the value of the holomorphic Chern-Simons functional, with appropriate boundary conditions. When a connection has unipotent boundary holonomy, the real part is defined modulo (2πi) 2 Z while the imaginary part is a well-defined real "volume." When M is a hyperbolic 3-manifold, the unique complete hyperbolic metric can be re-written as a flat P GL(2, C) connection A geom . This geometric flat connection has parabolic holonomy at the meridian, Hol(µ) ∼ ( 1 0 1 1 ), and its real volume equals the hyperbolic volume of M , Vol(A geom ) = Vol(M ) . (7.4) In general there are a finite number of flat P GL(2, C) connections with parabolic holonomy, but the geometric one is distinguished as the connection with the largest volume. 17 On a hyperbolic manifold M there is also a distinguished conjugate connection A conj = A geom . Its real volume is clearly −Vol(A geom ), and it has the smallest volume of all connections with parabolic holonomy.
Given the geometric P GL(2, C) connection A geom , we can always construct an irreducible P GL(K, C) connection A (K) geom on M by using the irreducible K-dimensional representation ρ [K] to embed P GL(2, C) into P GL(K, C). As explained above, ρ [K] simply maps one parabolic element to another; therefore, A (K) geom will have parabolic holonomy (7.2) around the meridian. Moreover, the complex volume of A (K) geom is exactly 1 6 K(K 2 − 1) times V(A geom ); in particular, This fact was proved in [15]. It can be intuited from the RHS of (7.3). Momentarily we will give a simple, constructive combinatorial argument for the validity of (7.5), similar to that used by [15]. In general, for a hyperbolic manifold M there may be (finitely) many flat P GL(K, C) connections A α with parabolic meridian holonomy. They may or may not have anything to do with lower-rank embeddings. Explicitly, they can be described as the solutions to the classical gluing equations of an octahedral decomposition that have meridian eigenvalues m a = 1; or as the points of intersection of the Lagrangian submanifold L K (M ) with the Lagrangian {m a = 1}. Interestingly, however, the geometric connection A (K) geom seems to have the largest volume of all the A α (and its conjugate A geom the smallest). 18 In order to demonstrate (7.5) using the combinatorics of this paper, we proceed as follows. Let M be a hyperbolic knot complement. Promote A geom to a framed flat connection (the choice of invariant flag at the torus boundary is unique); and choose an ideal triangulation of M such that A geom induces well-defined cross-ratio coordinates for the octahedra of the 2-decomposition. Almost any triangulation will do. Recall that in the 2-decompositions, there is a single octahedron per tetrahedron; so we can label the octahedron parameters where Li(z) is the Bloch-Wigner dilogarithm function (3.55). Now consider the K-decomposition of the same triangulation. Suppose that every octahedron in a big tetrahedron ∆ i is labelled with the same triple of parameters {z i , z i , z i } N i=1 that encoded A geom above. We align all the primes and double-primes to coincide with their former locations in the 2-decomposition. Then every gluing constraint at a lattice point inside a tetrahedron ∆ i takes the form z i z i z i z i z i z i = 1 and is automatically satisfied. Every face gluing constraint takes the form z i z i z i z j z j z j = 1, which is automatic as well; and every edge gluing constraint is a copy of the corresponding edge constraint for K = 2, which is already satisfied. Since this uniform assignment of octahedron parameters satisfies all of the octahedron gluing constraints, it defines a framed flat P GL(K, C) connection on M . Moreover, it is straightforward to check from the snake rules of Section 4.3 that the holonomy around any closed cycle in M is simply the image of the A geom holonomy under ρ [K] . In particular, the meridian holonomy at the boundary is parabolic.
Therefore, this assignment of octahedron parameters at general K simply parametrizes the flat connection A (K) geom . Its volume is easy to calculate, since every octahedron in a big tetrahedron gives the same contribution:

From free energy to volumes
Now we come to the more nontrivial part of the scaling argument. A standard measure for the number of degrees of freedom in a three-dimensional theory is the S 3 partition function Z[T ]. The free energy F = − log |Z[T ]| is extensive in the number of degrees of freedom, and has several extremely nice properties; for example, for an N = 2 theory, it is maximized at the superconformal values of R-charges [84,85]. Unfortunately, although the S 3 partition function can be computed systematically for theories T K [M ] in class R [7,86], it is not immediately clear how it relates to the volumes of flat connections discussed above. There does exist a closely related measure of degrees of freedom for N = 2 theories that is related to volumes: the partition function Z b [T ] on an ellipsoid S 3 b . The ellipsoid deformation stretches out the three-sphere, so that metrically it can be described by the embedding b 2 |z| 2 + b −2 |w| 2 = 1 in flat C 2 R 4 ; for b = 1 we recover round S 3 . The partition functions of class-R theories on S 3 b can also be systematically calculated [7,87]. For a 3-manifold theory, Z b [T K [M ]] agrees with the analytically continued partition function of SL(K, R) Chern-Simons theory on M , with appropriate boundary conditions at ∂M . Moreover, it follows from results of [7] (based on [18][19][20]22]) that in the b → 0 limit, Vol(A α ) + O(1) , (7.8) where A α is the volume of one of the flat P GL(K, C) connections on M with parabolic meridian holonomy. In order to prove the desired large-K scaling from (7.8), we must make two assumptions -both of which are rather interesting and will be elucidated elsewhere. First, we must assume that (7.8) accurately measures the degrees of freedom of T K [M ] at a superconformal fixed point, and in particular with the correct superconformal R-symmetry. Second, we need to know that the flat connection A α entering the RHS of (7.8) is the conjugate flat connection A conj on the RHS of (7.8) means that this connection dominates the SL(K, R) Chern-Simons partition function. There have been hints in [37] that this does happen for K = 2, though more is needed to understand the general story. 19 19 The question of which complex critical points dominate a real partition function is a tricky and subtle one, and closely related to the (still open) Volume Conjecture for compact Chern-Simons theory [88,89]. The Volume Conjecture could be proved physically if it were known that geometric flat connections dominated SU (2) partition functions [18,90].

Trefoil knot invariants
We conclude this section with two examples of knot complements and the combinatorics of their K = 3 triangulations.
To keep things simple, we will use minimal triangulations of the trefoil and the figure-eight knot complements, into two tetrahedra (and eight octahedra) each. These triangulations are not quite sufficiently refined to define theories T 3 [M ] due to a technical constraint discussed in [7,Sec. 4.1] and Appendix A: in order to construct superpotential operators O k corresponding to gluing constraints C k , the constraints must be "easy." This means that the functions C k never contain a sum of two non-commuting octahedron parameters, such as Z i + 2Z i . For K ≥ 4 this is never a problem, but for K = 2, 3 the triangulations must be further refined. Nevertheless, even the unrefined triangulations are good enough for calculating observables of the theories -such as L SUSY L K (M ), volumes, wavefunctions, etc.
-which is what we focus on here.

SL(2) invariants
Let us briefly review the structure of trefoil invariants for K = 2.
The moduli space of flat SL(2, C) connections on the trefoil knot complement M = S 3 \3 1 has two irreducible components of dimension one, corresponding (respectively) to flat connections whose holonomy is abelian and to flat connections that are genuinely nonabelian and irreducible. Each component projects to a one-dimensional Lagrangian submanifold in the boundary phase space P 2 (∂3 1 ). If we parameterize the meridian and longitude eigenvalues as The union of these two components is the well-known A-polynomial of the trefoil [52]. Notice that the Lagrangians have Weyl symmetry, i.e. they are invariant under ( , m) → ( −1 , m −1 ). However, if we think of P 2 (∂3 1 ) as a moduli space of framed flat connections we do not quotient out by the Weyl group.
Only the non-abelian flat connections can be parameterized by cross-ratio coordinates in an ideal triangulation. Indeed, the Lagrangian L 2 (3 1 ) obtained from an ideal triangulation agrees with L non-abelian .
In order to discuss P GL(2, C) flat connections rather than SL(2, C) flat connections, we would simply re-write the above equations in terms of the invariant squared eigenvalues m 2 and 2 . It is useful to note that the Lagrangians are already written in terms of m 2 .
Conversely, in order to lift from P GL(2, C) to SL(2, C), one only needs to take an appropriate square root of 2 , and not m 2 . The pattern for general K is that the equations for SL(K, C) Lagrangians involve the individual longitude eigenvalues but only the K-th powers of the meridian eigenvalues. This is true for any knot complement in a homology sphere. 20 Therefore, to lift from P GL(K, C) to SL(K, C) one only needs to "take a K-th root of the P GL(K, C) longitude." The full Lagrangian ( − 1)(m 6 + 1) has been quantized in the context of SU (2) Chern-Simons theory [18,53,54]. Using combinatorics of ideal triangulations, one can quantize L 3 1 (m, ζ; q) = ζ 3m . (7.11) in the conventions of [8]. This ultimately reflects the fact that the trefoil is not a hyperbolic knot, and we do not expect T 2 [3 1 ] (or for that matter T K [3 1 ]) to contain many interesting degrees of freedom in the infrared.

The SL(3) character variety
Now consider the full moduli space of flat SL(3, C) connections. A straightforward but extremely lengthy computation 21 shows that the moduli space has five irreducible components of dimension two on which the two meridian eigenvalues are allowed to vary freely. If we parametrize the boundary eigenvalues as µ : then the five components project to the Lagrangian submanifolds (1) : Branch (1) contains the SL(3, C) flat connections with abelian holonomy; branches (2 i ) contain the flat connections whose holonomy reduces to an SL(2, C)×U (1) subgroup, and branch (3) contains the connections whose holonomy is irreducible. Thus, using the combinatorics 20 It is true because for knot complements in homology sphere one can always tensor a flat C K bundle with a flat complex line bundle whose holonomy around the meridian is any K-th root of unity. of this paper, we expect to be able to reproduce (and a associate a 3d theory to) branch (3).
Branches (1) and (3) are invariant under the S 3 Weyl symmetry of SL(3, C), while the three branches (2 i ) are permuted among themselves. Note that each of these branches contains embeddings of SL(2, C) flat connections along one-dimensional slices. For example, if we set 1 = 2 and m 1 = m 2 in branch (3), we obtain the principal embedding (using the representation ρ [3] ) of the nonabelian SL(2, C) connections.
We may also observe that, as predicted, the Lagrangian equations only depend on the cubes of the meridian eigenvalues. To reduce to P GL(3, C) flat connections we could rewrite the equations in terms of the invariants 3 1 and 3 2 as well.

Symplectic gluing data
Let us see how we can extract symplectic gluing data from the trefoil triangulation at K = 3, in a (relatively) much more efficient manner. The complement of the trefoil knot can be decomposed into two tetrahedra, as shown in the Figure 64. There are eight gluing functions, corresponding to lattice points on internal faces and edges, which we write in exponentiated form as c 1 = z 3 y 3 , c 5 = z 1 z 4 z 3 y 2 y 3 y 4 , (7.14) c 2 = z 4 y 4 , c 6 = z 2 z 3 z 4 y 1 y 4 y 3 , (7.15) c 3 = z 1 z 1 z 2 z 4 z 4 y 1 y 1 y 2 y 4 y 4 , c 7 = z 3 z 2 z 1 y 4 y 1 y 2 , (7.16) c 4 = z 1 z 2 z 2 z 3 z 3 y 1 y 2 y 2 y 3 y 3 , c 8 = z 4 z 1 z 2 y 3 y 2 y 1 . (7.17) (In logarithmic form, each of these is a sum of octahedron parameters, minus 2πi; e.g., ) Notice that there are two automatic relations c 1 c 2 c 3 c 4 = 1 and c 5 c 6 c 7 c 8 = 1. Thus, as we just emphasized in Section 7.1, only six gluing constraints are independent. As explained in Section 5.2.4, one can obtain the U a and V a coordinates that parametrize meridian and longitude eigenvalues by taking two global slices parallel to the small torus boundary. The slices are drawn in Figure 65, along with meridian and longitude paths on Note that holonomy eigenvalues are now parametrized in several different ways. For the meridian, the cubes of the eigenvalues in (7.12) are related to the path-coordinates as while for the longitude the eigenvalues themselves are We obtain the classical Lagrangian submanifold corresponding to the space of flat, framed, irreducible SL(3, C) connections on the trefoil knot complement by rewriting the product in terms of the holonomy eigenvalues m a and a and making use of the classical gluing constraints c k = 1. The result is It is precisely branch (3) of (7.13). Finally, we can summarize the gluing data in the affine-symplectic ISp(16, Z) transformation (g, σ) that transforms the initial polarization with positions (Z 1 , We obtain  Taking the initial polarization with positions {Z 1 , Z 2 , Z 3 , Z 4 , Y 1 , Y 2 , Y 3 , Y 4 }, we find the following symplectic gluing matrix, with all integer coefficients:  A Symplectic data and class R Section 5 of this paper was devoted to describing how the K-triangulation of 3-manifolds defines symplectic gluing data (g, σ) ∈ ISp(2N, Z) or (g, σ) ∈ ISp(2N, Q) with certain properties. In this appendix we review how such abstract data (g, σ) -whether it arises from a 3-manifold or not -subsequently defines 3d SCFT's T (g,σ) in class R and various associated invariants. We follow [7,8,20,63].
Of course, multiple pairs (g, σ) can lead to the same SCFT T (g,σ) . Thus it will be natural to define a set IR of equivalence classes of symplectic data whose elements are in one-to-one correspondence with 3d theories. Conjecturally, all nontrivial equivalences (g, σ) ∼ (g , σ ) are generated by the algebraic analogues of 2-3 moves and octahedron rotations. (Physically, we would like to say that all non-trivial mirror symmetries of 3d abelian Chern-Simons matter theories are generated by the basic XYZ ↔ SQED duality.)

A.1 The symplectic data
To be more concrete, we recall that elements of the affine symplectic group 22 ISp(2N, Z) Sp(2N, Z) Z 2N can be represented as pairs (g, σ), where g ∈ Sp(2N, Z) and σ is a vector of 2N integers. We define a decoration for (g, σ) to be an integer 0 ≤ d ≤ N , and distinguish the first d rows of g (and the first d elements of σ). We then let IR be the set of such decorated elements (g, σ), for all d, N ≥ 0.
We further represent an element (g, σ) ∈ IR as a transformation on a complex symplectic where A, B, C, D are N × N blocks and σ X = (σ 1 , ..., σ N ) T and σ P = (σ N +1 , ..., σ 2N ) T are N -vectors of integers. The transformation preserves the complex symplectic form and can be thought of as a change of polarization. It sends Π × = (Z i ; Z i ) (with Z i as positions and Z i as conjugate momenta) to Π = (X j , C k ; P j , Γ k ), where X j , C k are positions and P j , Γ k are conjugate momenta. The positions X j label the d decorated rows. When (g, σ) comes from a K-triangulation of a 3-manifold M , as described in Section 5, the X j and P j are coordinates for a boundary phase space P K (∂M ); while the C k are the gluing functions.

A.2 Constraints on the data
We impose two constraints on the elements of IR, which seem to be necessary for defining 3d theories and other invariants.
The first constraint is satisfied by every decorated (g, σ) that arises from geometry. We call it the Angle Constraint. To describe it most symmetrically, we introduce N auxiliary coordinates on the phase space P × . The Angle Constraint requires that every undecorated coordinate C k can be written in the form where α ki , α ki , α ki (with 1 ≤ k ≤ N − d and 1 ≤ i ≤ N ) are three matrices of non-negative integers that satisfy (It is easy to see that geometric gluing functions C k all satisfy the Angle Constraint, since they are positive sums of octahedron parameters, minus 2πi, and every octahedron parameter occurs at most twice.) The Angle Constraint implies that the undecorated entries of the blocks A and B in (A.1) obey |A d+k,i | ≤ 2, |B d+k,i | ≤ 2, and |A d+k,i − B d+k,i | ≤ 2.
In order to define gauge theories, we need to supplement the Angle Constraint with a stronger Superpotential Constraint. It requires that the undecorated coordinates can be written in the form (A.4) where for each i and k only one of α ki , α ki , α ki is nonzero. Alternatively, we could say that for any fixed k there exist suitable cyclic rotations of the initial coordinates Z i → Z i → Z i → Z i (independent for each i) so that after these rotations This will ultimately allow a construction of chiral operators O k associated to the C k .

A.3 The gauge theory
Given an element (g, σ) ∈ IR that satisfies the Angle and Superpotential constraints, it is possible to define a 3d N = 2 gauge theory T (g,σ) in the ultraviolet -which then flows to a desired SCFT in the infrared. The theory preserves a U (1) R R-symmetry, and the data (g, σ) encodes a specific UV R-charge assignment, which can then be used to compactify T (g,σ) on curved manifolds. Moreover, the data (g, σ) encodes a specific choice of Chern-Simons couplings for the background gauge fields associated with U (1) flavor symmetries and with the R-symmetry. 23 The gauge theory T (g,σ) is built in the following steps.
0. Define T ≡ T 2 [ , Π Z ] to be the octahedron theory of Section 6.1 (a.k.a. the K = 2 tetrahedron theory). It is the theory of a free N = 2 chiral multiplet φ, with charge +1 under a background U (1) flavor symmetry and R-charge zero, and an additional level −1/2 Chern-Simons coupling for difference of flavor and R-charge gauge fields. The Chern-Simons level matrix can be represented as (A.7) 1. Form the product theory T × = T ∆ 1 ⊗ · · · ⊗ T ∆ N . It is a theory of N chirals φ i , and has maximal abelian flavor symmetry U (1) N . The real masses of the U (1)'s (scalars in the background gauge multiplets) can be associated to the real parts of the coordinates Z i on P × .
2. Apply the Sp(2N, Z) symplectic transformation g to the theory T × to obtain a theory T with a new U (1) N flavor symmetry. The Sp(2N, Z) action on 3d N = 2 gauge theories was defined in [23], and can be implemented (e.g.) by factoring g into generators. Then a. "U-type" generators of the form U 0 0 U −1T , where U ∈ GL(N, Z), act by changing the basis of U (1) N flavor currents. If V = (V 1 , ..., V N ) T is a vector of background gauge multiplets corresponding to the U (1) N symmetry, we send V → U −1 V .
b. "T-type" generators of the form I 0 k I , where I is the N × N identity and k is N × N symmetric, act by adding supersymmetric Chern-Simons terms for the background U (1) N flavor symmetry with (mixed) level matrix k.
c. "S-type" generators of the form In the end, this produces a theory T (g,σ) with manifest U (1) d flavor symmetry. The mass parameters of the d unbroken U (1)'s are associated with the coordinates X j (i.e. with the decorated rows of (g, σ)).
The rank of the gauge group of T (g,σ) depends on exactly how the symplectic transformation g is applied in Step 2. Different decompositions into generators lead to slightly different UV descriptions that flow to the same thing in the IR. (In the IR the relations of the symplectic group hold.) It is fairly easy to see that a lower bound on the rank of the UV gauge group is given by rank(B). Often the bound can be realizedi.e. there exists a decomposition of g that involves exactly rank(B) S-type generators.
Alternatively, if B has maximal rank and is unimodular, there exists a way to apply the affine-symplectic transformations of Steps 0-3 all at once. 24 We define a theory T by starting with N chirals φ i , each charged under an independent dynamical gauge symmetry U (1) i (and having zero R-charge). Thus the gauge group is U (1) N . The flavor group is also U (1) N , since each dynamical U (1) i has an associated topological U (1) J,i . We then specify the full Chern-Simons coupling matrix to be Here 'G' stands for the N dynamical gauge fields, 'J' for the N background flavor gauge fields, and 'R' for the background U (1) R field. For instance, the G-J blocks encode FI terms. The G-G blocks encodes dynamical CS terms that couple the otherwise independent gauge fields.) The N flavor symmetries of T correspond directly to the coordinates (X j , C k ). To obtain T (g,σ) from T we "simply" have to apply Step 4, adding appropriate operators to the superpotential to break the C k symmetries.

A.4 Equivalences
Two elements (g, σ), (g , σ ) ∈ IR can sometimes define theories that are equivalent after flowing to the IR, T (g,σ) T (g ,σ ) . There are three basic ways in which this can happen. (In the following, we will assume that both T (g,σ) and T (g ,σ ) possess the chiral operators needed to break flavor symmetries in Step 4 of the gauge theory construction; we return to this in Section A.5.) First, there are some trivial equivalences. We'll describe them in terms of initial and final coordinates on a phase space P × , as in (A.1). We can permute pairs of initial coordinates (Z i , Z i ) ↔ (Z i , Z i ) (which corresponds to permuting the N chirals of T (g,σ) ). Similarly, we can permute the final coordinates C k . Moreover, we can redefine the X j and P j coordinates by any integer linear combination of the C k , as long as we simultaneously redefine the Γ k so that g remains symplectic. We can also redefine the Γ k by integer linear combinations of the C k and any multiples of iπ. In gauge theory, these latter redefinitions of coordinates all correspond to redefining the flavor currents (or background CS levels) for flavor symmetries U (1) k that will ultimately be broken.
We might also allow ourselves redefine the P j by integer linear combinations of the X j and by multiples of iπ, while keeping g symplectic. This changes background Chern-Simons levels for the flavor and R-symmetries of T (g,σ) , which one is sometimes interested in keeping track of and sometimes not.
The second type of equivalence is an "octahedron rotation." In terms of phase-space coordinates, it corresponds to a cyclic permutation Z i → Z i → Z i → Z i for any fixed i ; in other words, This is an operation on two columns of g, and on σ. In terms of gauge theory, the cyclic rotation corresponds to taking a chiral φ i of T (g,σ) and replacing it by a U (1) gauge theory coupled to another chiral φ i to obtain T (g ,σ ) , as discussed in detail in Section 6.1. This should be an IR duality. 25 The third type of equivalence is the algebraic version of an elementary "2-3 move" on octahedra. It replaces (g, σ) of rank N and d decorated rows with (g , σ) of rank N = N + 1 and d = d. To implement it in the 2 → 3 direction, we select any two pairs of initial coordinates, say (Z 1 , Z 1 ) and (Z 2 , Z 2 ), and replace them with new initial coordinates as in Section 5.5.1, with W i = iπ − W i − W i . We also add a new undecorated pair of rows (C 0 , Γ 0 ) = (W 1 +W 2 +W 3 −2πi, W 1 ). The new (g , σ ) can be worked out in a straightforward manner. In the opposite direction, a 3 → 2 move can only be applied to an element (g , σ ) that is already the image of a 2 → 3 move. In particular, an undecorated row of (g , σ ) must already define a coordinate of the form The interpretation of the 2-3 move in gauge theory was reviewed in Section 6.2. To apply a 2 → 3 move, we take any pair of chirals φ 1 , φ 2 , think of them as an embedded hypermultiplet theory (6.7), and replace the hypermultiplet theory with a copy of N = 4 SQED (6.9). In the opposite direction, we isolate any three chirals coupled by a cubic superpotential, treat them as a copy of the XYZ model (6.13), and replace them with a copy of N = 2 SQED (6.12). We must be careful, though: these applications of a 2-3 move do not necessarily preserve all of the operators O k associated to additional broken symmetries. In order to hope that T (g,σ) 25 As usual, this statement must be taken with a grain of salt. We are assuming that the mirror symmetry between a free chiral T ,Π Z and a free "vortex" T ,Π Z , as in (6.2)-(6.3), implies IR duality between any gauge theories T (g,σ) , T (g ,σ ) in which the free chiral and the free vortex (respectively) are embedded. Arguing this carefully may require a subtle interchange of limits of IR flow. The same comments apply to the 2-3 moves below. and its putative image T (g ,σ ) are truly IR dual, both of them must independently contain all the necessary O k 's.
Algebraically, we note that the Angle Constraint (A.4) is preserved by all three types equivalences we have just described. In contrast, the Superpotential Constraint is preserved by the first and second types, but not by all 2-3 moves. A preliminary guess for a set that might be in one-to-one correspondence with duality classes of 3d N = 2 SCFT's (that flow from abelian theories in the UV) is IR := (g, σ) ∈ IR (g, σ) satisfy the Angle and Superpotential Constraints modulo equivalences ? (A.11) R := 3d N = 2 abelian Chern-Simons-matter theories with any U (1) R -preserving superpotentials modulo IR duality .
In defining IR, we only quotient out by equivalences (including 2-3 moves) that do preserve the Superpotential Constraint. The potential correspondence IR R deserves much further study.

A.5 The existence of operators O k
For completeness, let us briefly describe the construction of the operators O k . We assume that we have followed Steps 0-3 of the gauge theory construction to build a theory T , associated to symplectic data (g, σ), and we want to apply Step 4. If (g, σ) satisfies the Angle and Superpotential Constraints, then for every symmetry U (1) k that must be broken there is another pair (g, σ) k , related to (g, σ) by "octahedron rotations," such that the corresponding coordinate C k takes the form (A.6). The pair (g, σ) k defines a theory T k after Step 3 that is mirror symmetric to T . In T k one defines an operator a simple product of elementary chiral fields of the theory. (Recall that the α ki must be nonnegative integers!) Because of the affine term −2πi in (A.6), this operator is guaranteed to have UV R-charge 2. By using the mirror symmetry between T and T k , one can then "pull back" the operatorÔ k to an equivalent chiral operator O k in T , charged precisely under the desired U (1) k symmetry. This can be repeated for each of the N − d symmetries that must be broken. Then the final superpotential of T g,σ takes the form N −d k=1 O k .

A.6 Associated invariants
Finally, let us touch upon some mathematical objects associated to an element (g, σ) ∈ IR, and their physical significance. All of these objects are invariant under the first two types of equivalences presented in Section A.4. However, further restrictions are sometimes necessary to ensure invariance under 2-3 moves, such as the non-degeneracy discussed in Section 5.5.1.

Phase space and K 2 Lagrangian
We explained how to build phase spaces and classical Lagrangian submanifolds (and their geometric significance) in Section 5. The phase space is a symplectic reduction and has the holomorphic symplectic structure whereas the putative Lagrangian submanifold L (g,σ) ⊂ P (g,σ) is the image of the product under the reduction. Explicitly, this means inverting the transformation (A.1) to re-write z i , z i as Laurent monomials in the final coordinates x j = exp X j , c k = exp C k , p j = exp P j , γ k = exp Γ k ; then eliminating γ k from the equations and setting c j = 0. The result is a Lagrangian submanifold in the exponentiated phases space (with C * coordinates x j and p j ), so long as L × is transverse to the moment maps, and to slices of P (g,σ) at generic constant x j .
The Lagrangian submanifold is the supersymmetric parameter space for the theory T (g,σ) on R 2 × S 1 [7,69,91]. The effective N = (2, 2) theory obtained from compactifying on S 1 at finite radius is governed by a twisted superpotential W (X 1 , ..., X d ; σ). It is the function of complex twisted masses that correspond to the decorated position coordinates of P (g,σ) , as well as dynamical twisted-chiral fields σ. The Lagrangian equations are We saw in Section 5.5.1 that L (g,σ) is invariant under elementary 2-3 moves so long as the transversality condition is preserved. (In particular, it was necessary that at generic values of x j , the gluing conditions c k = 1 never forced z i , z i to take values 0, 1, or ∞.) In terms of gauge theory, transversality means that T (g,σ) has isolated massive vacua on R 2 × S 1 . The vacua correspond to the points p (α) (x) on L (g,σ) at fixed mass parameters x.

Volume
Suppose that the product Lagrangian L × is transverse to the gluing constraints and to slices at constant x, as above. Then by using the equations z i + z −1 i − 1 = 0 and the exponentiated form of (A.1) we can express z i and z i as rational functions on L (g,σ)i.e. rational functions of x, p. (Geometrically, we would be solving for octahedron parameters given fixed boundary coordinates on ∂M .) The real volume function associated to (g, σ) can be defined as Li 2 (z i ) , (A. 16) where Li 2 (z) = Im Li 2 (z) + arg(1 − z) log |z| is the Bloch-Wigner dilogarithm function [REF].
The volume is a function on L (g,σ) , and is invariant under algebraic 2-3 moves (that preserve transversality) due to the 5-term relation for Li 2 (z). The data (g, σ) ∈ ISp(2N, Z) actually allows us to promote (A.16) to a complex volume defined modulo π 2 6 Z using methods of [46] (or as in [63,Sec 5.2]). For the theory T (g,σ) , the volume Vol (g,σ) (x, p (α) (x)) is the free energy density (the value of W ) in the vacuum p (α) (x) on R 2 ×S 1 . As we already observed in Section 7.2.2, the volumes of particular solutions p (α) (x) dominate the asymptotics of various partition functions of T (g,σ) .

Quantum Lagrangian
We reviewed in Section 5.4 how to use the data (g, σ) to promote a classical Lagrangian L (g,σ) to a left ideal of quantum operatorsL (g,σ) . The basic idea is to promote all logarithmic coordinates to operators satisfying [Ẑ i ,Ẑ i ] = , etc., and to promote (A.1) to linear relations among quantum operators with a canonical correction iπσ → (iπ + /2)σ on the RHS. This then allows the left ideal ẑ i +ẑ −1 i −1 N i=1 to be rewritten in terms of exponentiated operatorŝ x = expX,p = expP ,ĉ = expĈ,γ = expΓ. Eliminatingγ and settingĉ = 1 should producê L (g,σ) . 26 The left idealL (g,σ) encodes the Ward identities for line operators satisfied by partition functions of T (g,σ) .

Quantum partition functions
The element (g, σ) gives rise to several closely related wavefunctions. Geometrically, they are versions of Chern-Simons partition functions on a 3-manifold M ; they are also partition functions of T (g,σ) on simple curved backgrounds.
• The supersymmetric index of T (g,σ) on S 2 × S 1 was described in [8] following [92][93][94]. As a wavefunction, it corresponds to quantizing the exponentiated phase space P (g,σ) (C * ) 2d with a real symplectic form ω = Im Ω. In a particular real polarization, it depends on d integers m j (magnetic fluxes) and d phases ζ j ∈ S 1 (electric fugacities) as well as a formal parameter q. The combinations q m j /2 ζ j are identified with the position coordinates x j . Geometrically, the index comes from P GL(K, C) Chern-Simons theory on a manifold M . The index is well-defined and invariant under 2-3 moves so long as the data (g, σ) admits a so-called semi-strict angle structure [64].
• The ellipsoid (S 3 b ) partition function of T (g,σ) corresponds to quantization of the real slice of the phase space P (g,σ) where X j , P j ∈ R [7,86,87]. Thus, geometrically, it looks like a P GL(K, R) Chern-Simons partition function. It depends analytically on d continuous real variables X j (masses). The ellipsoid partition function can be obtained from data (g, σ) using a symplectic-reduction approach [20] (cf. [63, App. C]) that 26 An alternative method of quantizing one-dimensional Lagrangians involves the topological recursion of [34], adapted to the current setting in [35,36]. It is expected that the topological recursion is equivalent to the algebraic approach outlined here. is still not fully rigorous; it is also expected to be equivalent to the "state integral" invariants of [19,22,37].
• By expanding the formal integrals for ellipsoid partition functions around complex critical points, it is possible to derive a series of perturbative invariants associated to classical solutions p (α) (x) on L (g,σ) (i.e., geometrically, to flat P GL(K, C) connections with fixed boundary conditions x) [63]. After the volume (A.16), the first subleading invariant is a Reidemeister-Ray-Singer torsion. In the geometric setting, these perturbative invariants are expected to match the asymptotic expansion of colored HOMFLY polynomials on M .
• The partition functions B α (x; q) of T (g,σ) on a twisted (spinning) geometry R 2 × q S 1 were recently discussed in [12]. These "holomorphic blocks" depend locally on a solution p (α) (x) to the classical Lagrangian equations, but are fully nonperturbative quantum objects. It was conjectured that both the index and the ellipsoid partition functions can be written as sums of products of the same holomorphic blocks. Geometrically, the holomorphic blocks seem to come from nonperturbative completions of analytically continued Chern-Simons theory on a manifold M , as in [73,90].

B The Poisson bracket for eigenvalues
Here we prove that the eigenvalues of holonomies around noncontractible cycles on small boundaries (small tori or annuli) have the expected Weil-Petersson Poisson brackets discussed in Sections 4.4 and 5.3. We consider an admissible 3-manifold M with an ideal triangulation and a subsequent K-decomposition. Let P × = P ∂ i be the linear product phase space of all the octahedra. We work with logarithmic coordinates, as in Section 5. For every internal and external point in the K-decomposition we define affine-linear functions C k , X j (respectively) on P × -the sums of octahedron parameters at vertices that touch those points. For any closed path γ on a small boundary, we choose K − 1 representative paths γ a on the slices parallel to that small boundary; then we use the rules of Section 5.2.1 to define K − 1 corresponding affine-linear path-coordinates U γ a . We already argued in Section 4.2.3 (using cancellation of arrows on octahedra) that is the Cartan matrix of SL(K). This justifies all of the brackets summarized in Section 5.3, and generalizes a central result of [21] for K = 2.
Our proof basically extends that of [21], using the framework of slices and path coordinates. There are two basic steps. First we show that the U γ a commute with all other coordinates. The fact that U γ a commutes with the C k immediately implies that the Poisson bracket of U γ a only depends on the homotopy class of the chosen path γ a on the a-th slice. In particular, it indicates that {U γ a , U λ b } should only depend on the intersection number γ, λ and some universal function of a, b. The second part of the proof fixes the normalization of {U γ a , U λ b }, through what is unfortunately a brute-force, case-by-case computation.
Let p be an internal or external point in the K-decomposition of M . Let X generically denote the sum of octahedron parameters at p. Let U be the coordinate for any closed path γ (we drop the subscript a in this subsection) on any global slice S in the K-decomposition. We want to show that {X , U } = 0.
5-sided wheel 5-spiked crown γ γ Figure 68. The wheel and crown arrangements that can occur on slices.
The approach will be to look at how the octahedron parameters contributing to X can appear on the slice S. There are two basic cases: either X contains a sum of parameters in a crown-shaped or wheel-shaped arrangement of small triangles on S. These two arrangements are shown in Figure 68, with the parameters contributing to X marked by red dots. Any path disjoint from these arrangements automatically commutes with X . Any path γ that enters and exits these arrangements (without stopping) also has a coordinate U that commutes with the sum of contributions to X , due to pairwise cancellations in {X , U }. For example, in Figure 68, X has contributions X = 5 i=1 Z i + .... The coordinate U for the path drawn through the wheel equals Z 1 − Z 2 + Z 3 + ..., and the coordinate for the path drawn through the crown equals Z 1 − Z 4 + .... In each case there is a pair of ±1 contributions to {X , U } that cancel, coming from the entry and exit points. Now let us go through the various options for locations of p more carefully, and verify that the crown and wheel arrangements arise.
p internal to ∆ p ∈ internal face p ∈ internal edge Figure 69. Slices in the neighborhood of a point p (blue dot), with octahedron parameters appearing in X marked by red dots.
First suppose that p is a point internal to the K-decomposition of a tetrahedron. Recall that there are four families of K − 1 slices through the octahedron (one family is centered around each tetrahedron vertex). In each family there are three slices that contain parameters contributing to p: the slice containing p and the slices directly above and below it. On the slice containing p, the parameters appear in a six-sided wheel; whereas on the slices above and below the parameters appear in three-spiked crowns (Figure 69, left).
If p is on a glued face shared by two tetrahedra, then there are five relevant families of slices -one centered around each vertex of the big bipyramid that contains p. In the three families centered around the vertices of the big glued face, the slices containing p and those above and below p have X parameters, in wheels or crowns (Figure 69, center). In the two families of slices parallel to the glued face, only the (K − 1)-st slice has X parameters, in a three-spiked crown.
If p is on an internal edge E of the triangulation shared by N tetrahedra (not necessarily distinct) in an N -gonal bipyramid, there are two types of families of slices to consider. The two families centered around the ends of E each have two slices with X parameters, in an N -sided wheel and an N -spiked crown (Figure 69, right). The N families centered around the "equatorial" vertices of the bipyramid each have the (K −1)-st slice containing X parameters, in a 2-spiked crown.
p ∈ external edge p ∈ external face Finally, suppose that p is on a big boundary of M . Then the slices containing X parameters are basically as described above, except some families of slices may get cut in half. For example, if p is on a face of a tetrahedron on the big boundary, the slices centered around the three vertices of that face look like the left side of Figure 70. If p is on an external edge, then the slices centered around the endpoints of the edge look like the right side of Figure 70. This does not affect the argument for cancellations above. Any closed path γ in one of these slices must both enter and exit the "half-crown" or "half-wheel" regions without stopping, and contributions to {X , U } will continue to cancel in pairs.
In the second part of the proof, we consider any two closed paths γ, λ on slices in the Kdecomposition of M . Again we suppress the subscripts (a, b) denoting the slice number. We want to show that the corresponding path-coordinates U γ , U λ have Poisson bracket proportional to the signed intersection number of the projection of the paths to the small boundary; and that the proportionality constant equals 2 if the paths are on the same slice, −1 if the paths are on immediately neighboring slices, and 0 otherwise. From Section B.1 we know that {U γ , U λ } only depends on the homotopy class of γ and λ (since closed paths commute with all gluing constraints C k ). Therefore, we may "uniformize" the paths, so that 1) they are smooth (have no bounces); 2) whenever they turn counterclockwise (left) inside a big tetrahedron they stay close to the edge they wind around; and 3) whenever they turn clockwise (right) they stay as far away from the edge as possible (Figure 71). (It may be useful to recall that slices are always viewed from above, from the perspective of a small boundary, in the 3-manifold M . Thus clockwise/right and counterclockwise/left orientations are well defined.) The goal now is to show that {U γ , U λ } gets contributions from points of intersection of the paths and nowhere else. We fix γ and assume it lies on the a-th global slice (parallel to some small boundary component). We will look at how octahedron parameters that contribute to U γ appear in other slices of M , and how they interact with other putative paths λ on some b-th slice. We simply go through an exhaustive case-by-case analysis.
Any putative contribution to {U γ , U λ } comes from segments of γ and λ that run along a common octahedron i -so that potentially non-commuting parameters Z i , Z i , Z i from that octahedron occur in both U γ and U λ . Moreover, in order for segments of γ and λ to share an octahedron, the segments must run along slices in a common big tetrahedron ∆. There are two basic cases to consider: these slices are in the same family within ∆ (i.e. they are parallel to each other); or they are in different families.

B.2.1 Parallel slices
Suppose that segments of γ and λ run on parallel slices within a single tetrahedron ∆. When exiting ∆ they may continue running on parallel slices in a second tetrahedron ∆ , and into a third, etc. As long as the paths stay together, they simultaneously turn left or right within each successive tetrahedron. We will see in a second that the contributions to {U γ , U λ } from such synchronous segments (where they turn together) vanish identically. Then, if the paths continue on this way for their entire length, it follows that {U γ , U λ } = 0, consistent with the fact that γ, λ = 0. Otherwise, there must exist a tetrahedron ∆ 0 in which the paths converge, starting their synchronous run, and a tetrahedron ∆ 1 in which the paths diverge, ending the synchronous run. We will show that if γ and λ cross during the run then the contribution to {U γ , U λ } = 0 equals ±κ ab , and otherwise vanishes. a · · · a + 1 · · · a · · · a − 1 · · · a + 1 · · · Figure 72. Paths turning together within a tetrahedron. γ and the octahedron parameters contributing to it are drawn in red, while possible options for λ are in green.
Thus, let us first consider slices of a tetrahedron ∆ in which the paths turn the same way, modulo orientation (which may be equal or opposite). The path γ, on the a-th slice, either turns left or right. If it turns left (making a small turn) then the octahedron parameter (call it Z i ) contributing to this segment of γ also appears on the (a + 1)-st slice. This is shown on the left of Figure 72 with a red '+' sign, indicating that the parameter contributes positively to U γ . We also draw possible locations for λ, in green. Depending on the precise value of K and whether λ is oriented equal or opposite to γ, the path can appear in several different positions. It can also appear on any slice. However, in any position that allows λ to pass through small triangles containing Z i (red +'s), the coordinate U λ only picks up ±Z i -never Z i or Z i . Thus, in these parallel slices of ∆, the contribution to {U γ , U λ } is zero.
Similarly, if γ turns right inside ∆, it picks up a series of (distinct) octahedron parameters with opposite signs, which also appear on the (a + 1)-st and (a − 1)-st slices, shown on the left of Figure 72. In any possible configuration, the path for λ at worst picks up these same octahedron parameters. So again the contribution to {U γ , U λ } is zero.
If the projections of γ and λ to the common small boundary do not have a net crossing during the run, there are two possible cases to analyze, depicted in Figure 73. On the right, γ turns left (making a small turn), and its octahedron parameters appear on two slices. Call the octahedron parameters Z 0 , Z 1 . If λ runs along these slices, it can be in several different positions, depending on K and its orientation. In each possible position, any parameter picked up by U λ in ∆ 0 that does not commute with Z 0 is paired with a parameter in ∆ 1 that does not commute with Z 1 , so that the total contribution to {Z 0 + Z 1 , U λ } cancels.
For example, one of the λ paths on the a slice picks up −Z 0 in ∆ 0 and −Z 1 in ∆ 1 , with Similarly, if γ turns to the left, its octahedron parameters appear in slices a, a + 1, and a − 1. Thus paths λ on these slices might have segments that don't commute with γ. But all non-commuting contributions from ∆ 0 cancel with those from ∆ 1 .
Altogether, with no net crossing, the total contribution to {U γ , U λ } from a full synchronous run of the paths vanishes.
· · · · · · · · · · · · · · · · · · · · · +1 +1 Finally, we consider the most interesting case: a nontrivial crossing of γ, λ going from ∆ 0 to ∆ 1 . There are two possible arrangements. This time we keep careful track of orientations of both γ and λ. The path γ must have segments turning both right and left, so in both cases its octahedron parameters appear on the (a ± 1)-st slices as well as the a-th. On the left (resp., right) of Figure 74 the intersection number of the projections γ, λ equals minus one (resp., plus one).
Correspondingly, on the left of Figure 74, we see that if λ is in the a-th slice then each of the two small triangles around the intersection point of γ and λ contributes −1 to {U γ , U λ }. If λ is on the (a + 1)-st or (a − 1)-st slices then U λ picks up a single parameter that doesn't commute with part of U γ , contributing +1 to {U γ , U λ }. On the right of Figure 74, the same observations hold, with opposite signs. Altogether, we find that the contribution to the bracket from these crossing segments of path is {U γ , U λ } = κ ab γ, λ , (B.6) when λ lies on the b-th slice.

B.2.2 Slices in different families
To complete the proof, we need to show that whenever γ and λ run through the same tetrahedron (or tetrahedra) but along two different families of slices (centered locally around two different tetrahedron vertices) the contribution to the Poisson bracket vanishes. As for parallel slices, is useful to begin with a single tetrahedron ∆ in which the two paths turn the same way -meaning that they enter and exit in the same two tetrahedron faces. This identifies an edge E of ∆ that both paths turn around. We depict this situation in Figure 75, choosing to place γ on the family of slices centered around the "top" vertex of E, and λ around the "bottom" vertex. There are two possible cases. If γ (on the a-th slice with respect to the top) turns to the left, then it picks up a single octahedron parameter Z i . This parameter appears on slices K − a and K − a + 1 with respect to the bottom. Any possible paths λ at worst pick up Z i itself, and so commute with this segment of γ. Alternatively, if γ turns to the right, then its octahedron parameters appear on the (K − 1)-st (i.e. the last) slice with respect to the bottom vertex. They appear in two horizontal rows -the position of these rows depending on a. Again, all possible paths λ at worst pick up the same octahedron parameters as in γ, so that the contribution to {U γ , U λ } vanishes. Now we consider the general situation. The paths γ and λ may run together through a collection of tetrahedra, moving on different families of slices the entire way. In some tetrahedron ∆ 0 they must enter on different faces and exit on the same face to start the run. In some other tetrahedron ∆ 1 they enter together and exit on different faces to end the run. We may skip intermediate tetrahedra where they move together (because we know the segments in these tetrahedra commute), and simply assume that ∆ 0 and ∆ 1 are immediately adjacent. There are four basic cases to analyze.
First, it is possible for ∆ 0 and ∆ 1 to coincidei.e. γ and λ both enter and exit a single tetrahedron separately. This is depicted in Figure 76. If γ turns to the left, then its single octahedron parameter appears on the last slice with respect to the bottom vertex (at a distance a away from the edge E). The only possible λ path crossing the small triangle with this parameter just picks up the parameter itself. If γ turns to the right, its 2a − 1 octahedron parameters appear on the first through the (K − a)-th slices with respect to the bottom vertex. On the first through the (K − a + 2)-th slice the octahedron parameters are arranged in two 2-spiked crowns (as in Section B.1, so every closed path commutes with them. On the (K − a)-th and (K − a + 1)-st slices the possible problematic λ paths just pick up the parameters themselves.
Otherwise, we may assume that ∆ 0 and ∆ 1 are distinct and adjacent. Then there are three remaining arrangements in which γ and λ may occur. They are depicted in Figures  77-79. Since γ and λ run along two different families of slices, they distinguish two different vertices common to ∆ 0 and ∆ 1 , which in turn distinguishes a common edge E. We choose to position γ on slices centered around the "top" vertex of E and λ on slices centered around the bottom. In each of these three cases, there are two options for orienting γ. It is then shown how its octahedron parameters appear on various slices with respect to the bottom vertex of E (the arrangements of +'s and −'s follow by combining the arrangements in Figures 75 and  76). Now the potential λ paths do pick up parameters that don't commute with those in U γ . However, the non-commuting contributions always cancel in pairs -either within ∆ 0 and top slice bottom slices a a · · · · · · −1 +1 · · · · · · +1 −1 +1 −1 · · · · · · · · · · · · · · · II +1 −1 Figure 78. Paths entering and exiting a pair of glued tetrahedra on four distinct faces: II top slice Figure 79. Paths entering and exiting a pair of glued tetrahedra on four distinct faces: III ∆ 1 independently, or between ∆ 0 and ∆ 1 . We let the figures speak for themselves.
This finally exhausts all possible ways in which the two paths γ and λ may come close enough to share an octahedron -and thus potentially have nontrivial contributions to their Poisson bracket. The only contributions that don't vanish identically or cancel in pairs are those that come from paths that cross on adjacent (or identical) parallel slices, as in Figure 74. The contribution (B.6) found there is therefore the full Poisson bracket {U γ , U λ }. This finishes the proof.