Teichmuller TQFT vs Chern-Simons Theory

Teichm\"uller TQFT is a unitary 3d topological theory whose Hilbert spaces are spanned by Liouville conformal blocks. It is related but not identical to PSL(2,R) Chern-Simons theory. To physicists, it is known in particular in the context of 3d-3d correspondence and also in the holographic description of Virasoro conformal blocks. We propose that this theory can be defined by an analytically-continued Chern-Simons path-integral with an unusual integration cycle. On hyperbolic three-manifolds, this cycle is singled out by the requirement of invertible vielbein. Mathematically, our proposal translates a known conjecture by Andersen and Kashaev into a conjecture about the Kapustin-Witten equations. We further explain that Teichm\"uller TQFT is dual to complex SL(2,C) Chern-Simons theory at integer level k=1, clarifying some puzzles previously encountered in the 3d-3d correspondence literature. We also present a new simple derivation of complex Chern-Simons theories from the 6d (2,0) theory on a lens space with a transversely-holomorphic foliation.


Introduction and summary
Chern-Simons theory in three dimensions was one of the first ever constructed topological quantum field theories in dimension greater than one [1]. Its version with a compact gauge group G is also among the best understood interacting quantum field theories. To a closed oriented two-manifold C it associates a finite-dimensional Hilbert space which is the space of conformal blocks of the WZW model with gauge group G. To a closed oriented threemanifold W it associates a partition function known as the Witten-Reshetikhin-Turaev invariant, which admits a rigorous mathematical definition [2]. Chern-Simons theories with non-compact gauge groups are less well understood. For the case of a complex gauge group, some early work includes [3,4]. Rather spectacular recent progress is summarized in [5]. Often an extremely useful way to study a quantum field theory is to embed it into string or M-theory. Chern-Simons theory can be engineered [6] by open topological strings, and its large-N limit is described by closed topological strings in the geometry, related to the original one by a geometric transition [7]. Via the relation between topological strings and string/Mtheory, Chern-Simons invariants become related to counting BPS states of membranes in M-theory [8][9][10]. This description is naturally amenable to categorification [11]. In a closely related more recent development, analytically-continued Chern-Simons theory [12] and theories with complex gauge groups were constructed by compactification of the M5brane theory, and thus appeared on one of the two sides of the 3d-3d correspondence. For a recent review and references, see [13].
Among gauge groups that are not compact or complex, the first example that one would like to understand is SL(2, R). In the first years of Chern-Simons theory it was realized [14,15] that SL(2, R) Chern-Simons theory must be related to quantization of Teichmüller spaces, and at least part of its Hilbert space is the space of Liouville conformal blocks. To avoid some unnecessary details, we will actually consider PSL(2, R) rather than SL(2, R).
Teichmüller space T of a two-manifold 1 C is the space of conformal or complex structures on C, modulo diffeomorphisms isotopic to the identity. For a closed surface of genus g ≥ 2, T is diffeomorphic to R 6g−6 . The reason that it makes appearance in PSL(2, R) Chern-Simons theory is simple. The classical phase space of this Chern-Simons theory is the moduli space M R of flat PSL(2, R) connections on C, which includes T as one of its connected components. Flat connections in T are precisely the ones that come from uniformization, that is, from representing C as a quotient of the hyperbolic upper half-plane by a subgroup of its group of isometries PSL(2, R). In a convenient real structure, an sl(2) R gauge field can be written as ia e e † −ia . (1.1) For the connections that belong to the component T ⊂ M R , there exists a gauge in which the one-form e is everywhere non-degenerate. Then it can be taken as a vielbein on C and defines a hyperbolic metric ds 2 = e † e, in which a is the Levi-Civita connection.
Chern-Simons action endows T with a symplectic form which is a multiple of the Weil-Petersson form ω WP . Quantization with this symplectic structure and with some real choice of polarization produces a Hilbert space H L 2 (R 3g−3 ). It has been argued in [14,15], based on a Ward identity, that H can be identified with the space of Liouville conformal blocks on C. For a quick check, let us count the parameters. A trivalent graph from which C can be obtained by thickening has 3g − 3 legs. A Liouville conformal block is labeled by the corresponding 3g − 3 real Liouville momenta, which are the variables in a wavefunction, belonging to L 2 (R 3g−3 ).
More recently, quantization of Teichmüller spaces was put on rigorous mathematical footing [16][17][18]. The Hilbert space H comes with a Hermitian product, an action of the mapping class group of C and an action of an algebra of Verlinde operators [18,19]. This structure depends on the coupling constant b 2 > 0, or equivalently on the central charge H is a part of the Hilbert space of PSL(2, R) Chern-Simons theory, but it is not the whole Hilbert space. Indeed, the moduli space M R has 4g − 3 components, of which T is only one. The other components include gauge fields, for which the vielbein e in (1.1) is not invertible. 2 Then a TQFT with Hilbert spaces H, if it exists, is distinct from PSL(2, R) Chern-Simons theory. This theory is sometimes called Teichmüller TQFT, and will be the main subject of this paper.
The first question is, why would Teichmüller TQFT exist? It is not true in general that one can throw out components from the phase space, and still get a quantum field theory that respects factorization. The reason one expects that Teichmüller TQFT exists is that the Hilbert spaces H define an analog of an extended modular functor [20]. It means that they carry representations of (central extensions of) the mapping class groups, which moreover agree with cutting and gluing punctured two-manifolds. It is known that having an extended modular functor is enough to construct a TQFT [21]. For Teichmüller TQFT, an important complication is that the Hilbert spaces are infinite-dimensional, and, to our knowledge, a mathematically rigorous construction of a TQFT from the modular functor of Liouville conformal blocks has not yet been completed.
There exists another mathematical approach [22,23] to Teichmüller TQFT, in which partition functions for a class of triangulated three-manifolds are constructed by gluing together wavefunctions associated to tetrahedra. The answer is then shown to be independent of the triangulation. A closely related construction appears in the physics literature [24][25][26]. For three-manifolds with boundaries, the partition function takes values in function spaces which can be naturally identified with H.
The first objective of our paper is to give a physicist's definition of Teichmüller TQFT on a three-manifold, which would clearly show that it exists as a unitary 3d TQFT, distinct from PSL(2, R) Chern-Simons theory. We will propose that it is equivalent to an analytically-continued [12,27] Chern-Simons theory with a particular unusual integration cycle. Our definition will depend on some conjectures about the Kapustin-Witten equations.
Recently, Teichmüller TQFT has reappeared in physics in the context of the 3d-3d correspondence [13,19,28]. Consider the 6d (2, 0) theory of type A 1 , put on a product manifold S 3 b × W . To preserve some supersymmetry, one turns on a suitable supergravity background, and the partition function of the theory depends on the squashing parameter b 2 of S 3 b . It is expected that the reduction on S 3 b produces some topological Chern-Simons theory on the three-manifold W . Consider the case that W is a product R×C, and view the direction R as time. The Hilbert space of the 6d (2, 0) theory in this geometry is what the Chern-Simons theory is supposed to associate to the two-manifold C. On the other hand, reversing the order of compactification, we obtain a 4d N = 2 S-class theory associated to C, and its Hilbert space on S 3 b is expected to be the space of Liouville conformal blocks, according to the AGT correspondence [29,30]. Thus, one expects that the Chern-Simons theory obtained by a three-sphere reduction from six dimensions is precisely Teichmüller TQFT. In [28], this proposal was tested for W being a mapping cylinder. This did not require a definition of Teichmüller TQFT on a general three-manifold, so it was sufficient to think of it as a subsector of PSL(2, R) Chern-Simons theory. In the present paper, we would like to understand the general situation.
After this initial work on the 3d-3d correspondence, three-sphere reduction from six dimensions was preformed explicitly in 3 [33]. The result was perhaps a little surprising. It was found that the Chern-Simons theory on W is not SL(2, R), but rather SL(2, C) at integer level k = 1 and complex level, determined by the parameter b 2 of the geometry.
The second objective of our paper is to explain the relation between Teichmüller TQFT and complex SL(2, C) Chern-Simons theory as a duality. In fact, we will show that there exist two different complex Chern-Simons theories, to which Teichmüller TQFT is equiva-lent.
Via the 3d-3d correspondence, partition function of Teichmüller TQFT on a threemanifold W is related to the S 3 b supersymmetric partition function of a 3d superconformal N = 2 theory T[W ], obtained from the 6d (2, 0) theory by reduction on W [13,25]. The definition of this supersymmetric partition function involves a supergravity background on the S 3 , designed so as to preserve some Killing spinor. Recently, a systematic understanding of such backgrounds was achieved in [34][35][36]. It was shown that the partition function does not depend on much of the details of the background, but only depends on a geometric structure known as the transversely holomorphic foliation.
The third objective of our paper is to apply this machinery to derive complex Chern-Simons theories from six dimensions. This can be done uniformly for supersymmetric backgrounds on S 1 × S 2 , S 3 or higher lens spaces, leading to Chern-Simons theories with k = 0, k = ±1 or |k| > 1. In the special case of S 3 , different orders of reduction give rise to two different complex Chern-Simons theories or to Teichmüller TQFT. We expect that this approach will eventually lead to a systematic understanding of integration cycles in Chern-Simons theories obtained from six dimensions, and will help to better understand the holomorphic blocks [37]. But in this paper, we only make first steps in this direction.
In the rest of this section, we provide a short summary of the paper.
In section 2, we make the first step towards defining Teichmüller TQFT. Using the approach to quantization via branes in the A-model [38], for a two-manifold C we construct a quantum mechanics, whose Hilbert space is obtained from quantization of the Teichmüller space of C. (This setup was previously considered in [19,30] in the same AGT context, and we add just a few minor details to this story.) Specifically, we consider an A-model on R × I with the target being the SO(3) Hitchin moduli space M H for C, with the boundary conditions at the two ends of the interval I set by a Lagrangian and a coisotropic brane. The Lagrangian brane is supported on the Hitchin section in M H , which is well-known to be isomorphic to the Teichmüller component T ⊂ M R .
In section 3, we observe that the Hitchin sigma-model on R × I with these branes can in fact be naturally lifted to a theory with three-dimensional covariance. This theory is the Kapustin-Witten twisted N = 4 super Yang-Mills on the geometry W × I, where W is an arbitrary three-manifold and I is an interval, which we take to be parameterized by y ∈ [0, y 0 ]. The boundary condition at y = 0 is a Nahm pole, or equivalently D5-brane type, while the boundary condition at y = y 0 is NS5-type, as defined in [39,40]. For W R × C, this theory reduces to the same Hitchin sigma-model setup that is defined in section 2, as follows from some well-known results [41,42].
The N = 4 super Yang-Mills theory on W × I with these boundary conditions is the unique natural 3d-covariant lift of the sigma-model of section 2. As we explain later, it can also be obtained by reduction from six dimensions. Hence we are led to propose that this setup gives precisely the definition of Teichmüller TQFT on a three-manifold W . To understand its meaning, we localize the path-integral onto solutions to the Kapustin-Witten equations. This allows to interpret the Teichmüller TQFT partition function as a path-integral in analytically-continued Chern-Simons theory [12], where the integration cycle S is the space of fields A = A + iφ at y = y 0 that can be reached by Kapustin-Witten flows on W × I that start with the Nahm pole at y = 0. (It is a non-trivial conjecture that the space S, for a suitable class of three-manifolds, is a meaningful integration cycle for the Chern-Simons path-integral. ) We also explain how this integration cycle, provided that it makes sense, can be expanded in Lefschetz thimbles.
In section 4, we turn specifically to the case that the three-manifold W is hyperbolic. It is a known conjecture by Andersen and Kashaev [22] that in the semiclassical limit b 2 → ∞, the Teichmüller partition function on a hyperbolic three-manifold decays as where vol(W ) is the hyperbolic volume. Some further support to this conjecture comes from holography [43]. On a hyperbolic three-manifold, there exist two special flat PSL(2, C) connections, the geometric A geom = ω + ie and the conjugate geometric A geom = ω − ie, constructed from the Levi-Civita connection ω and the vielbein e of the hyperbolic metric.
The behavior (1.3) is characteristic of the flat connection A geom . Moreover, it is known that the contribution of this critical point is the most subleading [44]. Therefore, one may conclude that the integration cycle S is precisely the Lefschetz thimble for the conjugate geometric flat connection A geom . (This implication of the Andersen-Kashaev conjecture for the Chern-Simons integration cycle has been previously proposed in [43,45].) Interestingly, we see that it is possible to have a consistent Chern-Simons theory where one restricts to vielbeins that are invertible, at least semiclassically. One may wonder if this teaches us something about 3d gravity and its relation to Chern-Simons theory.
Since we have a description of the integration cycle S in terms of the Kapustin-Witten equations, we are able to formulate a conjecture about counting their solutions on a fourmanifold W × R + , which would imply that S is indeed the Lefschetz thimble for A geom . So far we could not prove this statement, but we do perform some non-trivial tests that it successfully passes.
In section 5, we attempt to understand how S-duality of N = 4 super Yang-Mills acts on Teichmüller TQFT. First we discuss an issue that could potentially invalidate our proposal for the integration cycle. It is sometimes assumed that Chern-Simons path-integrals over Lefschetz thimbles are related by S-duality to half-space partition functions with a Nahm pole boundary condition. If it were true, it would imply that Teichmüller TQFT partition function is a Laurent series (possibly with some non-integer powers) in variable q = exp(2πi/b 2 ), which is known not to be the case experimentally. We explain that Lefschetz thimble integrals are not related by S-duality to anything with obvious definition. The reason is some peculiarity of the NS5-type boundary condition used in defining these path-integrals. On the way, we make contact with the recent work [46] that explains how to extract q-series from Chern-Simons partition functions.
The same issues with the NS5-type boundary condition make it difficult to apply Sduality to the Teichmüller TQFT partition function, and we have to make some assumptions about BRST-exact terms in the action before we can act with S-duality. With these assumptions made, we see that Teichmüller TQFT is invariant under the exchange b → b −1 , which of course is a known fact [19,22]. Two other elements of the SL(2, Z) S-duality group relate Teichmüller TQFT to complex SL(2, C) Chern-Simons theories. The most general form of the path-integral in a complex Chern-Simons theory is where k ∈ Z and v ∈ C are the coupling constants, and C is some suitable integration cycle. We find that Teichmüller TQFT is equivalent to two versions of complex Chern-Simons theory, with the coupling constants For CS-I, we make a proposal for the integration cycle, and it certainly is not the usual one. For CS-II, understanding the integration cycle seems to be more difficult. Note that CS-II is the theory obtained in [33] from six dimensions. We now understand the formula 4 for the coupling constant obtained in that paper as a consequence of S-duality. In section 6, we derive complex Chern-Simons theories from six dimensions. We put the 6d (2, 0) theory on a geometry W ×L k , where W is some three-manifold and L k is a lens space S 3 /Z k . First, for a moment replace L k with R 3 . To preserve some supersymmetry, we twist the theory along W , which leaves four unbroken supercharges that together with translations on R 3 form a 3d N = 2 superalgebra. Viewing the 6d theory on W × R 3 as a 3d N = 2 supersymmetric theory on R 3 , we propose that it is possible to use the backgrounds of [34] to supersymmetrically compactify on L k . Using the results of [35] we prove that it is possible to deform the metric on L k without affecting the partition function, so that the geometry becomes an arbitrarily small two-torus fibered over a finite interval I. Then we reduce on the torus fiber and obtain topologically twisted 4d N = 4 super Yang-Mills theory on W ×I. We explicitly identify the boundary conditions and the coupling constants in terms of the geometry of the background and verify that the effective theory on W is a complex Chern-Simons theory. We make some comments on the integration cycle in this theory, but we cannot yet derive it from the first principles.
Our approach takes as an input directly the background that can be used for localizing the 3d theory T[W ], and gives as an output a Chern-Simons theory engineered in terms of the twisted 4d super Yang-Mills, which is the natural framework to define analytically continued Chern-Simons theories. For these reasons, we hope optimistically that it will be possible to completely understand the question of integration cycles in the future.
In section 7, we return to Teichmüller TQFT and address some natural questions related to conformal blocks and the usual 2d-4d AGT correspondence. A useful representation for the wavefunctions in the Hilbert space H is by holomorphic wavefunctions in the Kähler quantization of T . We explain how to construct the basis of states q| of Kähler quantization in terms of brane corners. This essentially repeats the argument of Nekrasov and Witten [30] on the derivation of AGT, with some minor variations. As a natural extension of our conjectures of section 4, we propose that the wavefunction of Teichmüller TQFT on a threemanifold W with boundary, presented in the basis q|, is given by the path-integral with the dominant contribution coming from the complete hyperbolic metric on W , with the conformal structure at infinity fixed by q ∈ T . For the special case that the three-manifold W is a handlebody (or just a ball) with a network of defects, we make contact with the usual holographic setup for the Virasoro conformal blocks [47,48]. We also explain, mostly following [49], how a Liouville partition function on C can be obtained from Teichmüller TQFT on a hyperbolic three-manifold C × I with two asymptotic boundaries.
Section 8 contains an informal discussion of Teichmüller TQFT, PSL(2, R) Chern-Simons theory and modular functors. It aims to add a few technical details to the facts mentioned in this introduction, and is not meant to contain any new results.
In section 9, we list some open questions. Appendix A contains some computations for the Kapustin-Witten equations that support our conjectures of section 4. In appendix B, we review the transversely holomorphic foliations and the backgrounds of [34,35], and prove that for lens spaces, they can be deformed into a bundle of a small torus over a long interval. In appendix C, following [39], we consider N = 4 super Yang-Mills half-BPS boundary conditions that do not preserve Lorentz symmetry. We extend to finite values of parameters some results for the NS5-type boundary condition that in [39] were obtained to the first order in the Lorentz symmetry violating parameter. Then we specialize to the case of boundary conditions that preserve the 3d Lorentz symmetry of the twisted theory.

Branes and quantization of the Teichmüller space
The Teichmüller space T of a two-manifold C has a natural symplectic structure. Teichmüller TQFT, by its very definition, associates to C a quantum mechanics, whose Hilbert space is the quantization of the Teichmüller space of C. A natural way to construct such a quantum mechanics is to use the approach via branes in the A-model [38]. The target of the A-model should be a complexification of the phase space T , and for that one can naturally choose the SO(3) Hitchin moduli space. The corresponding setup has been explored in section 4.6 of [30] (see also [18]) in relation to the AGT correspondence. The goal of this section is to briefly recall this story. Throughout the paper, we follow the standard notations [41,50] for the Hitchin moduli space, its hyperkähler structure, the Hitchin topological sigma-model and branes.
Let M H be the moduli space of solutions to the Hitchin equations on a hyperbolic Riemann surface C of genus g. For simplicity, we mostly assume that there are no marked points on C (and therefore g ≥ 2), although at times we will lift this restriction. The gauge Figure 1. The worldsheet of a string, whose space of states is the quantization of the Teichmüller space. The brane B c on the right is coisotropic, and the brane B T on the left is Lagrangian, supported on the Hitchin section.
group G is chosen to be SO(3). The space M H is hyperkähler, with the Hitchin metric g H , a triplet of complex structures I, J and K, which generate the algebra of quaternions, and with symplectic forms ω I , ω J and ω K , which are Kähler forms in the respective complex structures. The cohomology class of ω I is non-trivial, while ω J and ω K are exact forms, in the absence of punctures.
Consider the two-dimensional sigma-model of maps into M H . We take the metric in the target to be b 2 g H , where b 2 > 0 is a real parameter. We also turn on a B-field B = −b 2 ω I . For the topological BRST operator we take the supercharge of the A-model in complex structure K, or, equivalently, we set the Kapustin-Witten parameter t to be −1. The Kähler form is then ω = b 2 ω K . The sigma-model is put on the worldsheet R×I, where I = [0, y 0 ] is an interval, parameterized by a variable y. The setup is shown on figure 1. At y = y 0 , we choose the boundary condition to be determined by a coisotropic brane B c of type (B, A, A). Its support is the whole of M H , the Chan-Paton bundle L c is trivial, and the connection has zero curvature F , but F +B is non-zero. The physics of this brane is governed by the complex structure ω −1 B = J. At y = 0 we put a Lagrangian brane B T , also of type (B, A, A). Its support is a section of the Hitchin fibration, which is defined as a component of the fixed point set of an involution of the Hitchin equations σ : (A, φ) → (A, −φ), isomorphic [50] to the Teichmüller space T of C. The isomorphism depends on a choice of a reference complex structure on C. The involution σ is holomorphic in complex structure I, which therefore induces a complex structure on the fixed point set. The submanifold T ⊂ M H is isomorphic to C 3g−3 in this complex structure. It is Lagrangian with respect to the holomorphic symplectic form Ω I = ω J + iω K . The brane B T is therefore the usual Lagrangian brane in our A-model. The connection on its Chan-Paton line bundle L T is chosen to have curvature F = b 2 ω I | T , so that the condition F + B = 0 for the Lagrangian brane is satisfied. We remark that often in the A-model approach to quantization one takes the B-field to be zero, the Chan-Paton bundle on the Lagrangian brane to be flat, and moves the curvature to the coisotropic brane. In our case that would not work. The reason is that for b 2 / ∈ Z, the cohomology class of the form b 2 ω I is not integral, and there can be no line bundle on M H with a connection of such curvature. The restriction of b 2 ω I to the Teichmüller brane, however, is trivial in the cohomology, as T is contractible. Thus, unless b 2 is an integer, we have to keep non-zero B-field and non-zero curvature on the Lagrangian brane.
Let us also remark that our gauge group SO(3) is not simply-connected, which brings in the possibility of some discrete theta-angles in the sigma-model, as explained in section 7 of [41]. However, for our purposes they all are irrelevant, because one end of the string is always bound to the Lagrangian brane B T , which is contractible.
The vector space H of (B T , B c ) string states in this A-model can be naturally regarded [38] as a quantization of the support of the Lagrangian brane, that is, the Teichmüller space T , in the symplectic structure F = b 2 ω I | T . The reason for that is simple: the effective theory of zero-modes of the string in this setting reduces to a quantum mechanics for the phase space T , the support of the Lagrangian brane, with prequantum line bundle L T ⊗L −1 c with a unitary connection of curvature F . The Hilbert space of this quantum mechanics is what one calls the quantization of T . Note that the symplectic form ω I reduces [50] on T to the Weil-Petersson form ω W P . Thus, the Hilbert space of our theory H is the quantization of the Teichmüller space of C with the symplectic form b 2 ω W P . By itself, this claim is rather vacuous, because T is symplectomorphic to R 6g−6 with its standard symplectic form. But there exists a lot of extra structure that makes the statement interesting.
Generally in the A-model, the space of (B 1 , B 2 ) open string states need not have a hermitian inner product. It only has a natural pairing with the space of (B 2 , B 1 ) strings, which comes from the two-point disc amplitude. However, in our case H does have a hermitian product, and thus is indeed a Hilbert space. As explained in [38], this follows from the fact that the support of the Lagrangian brane is a component of the fixed point set of the involution σ, which is antiholomorphic in complex structure K, used in the definition of the A-model.
The space H is naturally a module for the algebra of (B c , B c ) strings, which act by adjoining from the right. This algebra is a quantum deformation of the algebra of holomorphic functions on M H in the complex structure which appears in the definition of the coisotropic brane B c , that is, J. These holomorphic functions are generated by traces of holonomies of flat SL(2, C) connections around a basis of one-cycles on C. The quantum deformation is governed to the first order by the holomorphic symplectic form ω − iB = b 2 Ω J . The quantum algebra, to be denoted A q , actually depends 5 on the exponentiated parameter q = exp(2πi/b 2 ). Similarly, there is an action of (B T , B T ) strings on H from the left. As one can see from the mirror model, the algebra of such strings is similarly 6 the quantum-deformed algebra of traces of holonomies, now with the deformation parameter q = exp(2πib 2 ). One expects the space H to be an irreducible module of the algebra A q ⊗ A q . Another piece of structure comes from the fact that the Teichmüller space has an action of the mapping class group of C. Upon quantization, this gives rise to a projectiveunitary representation of the mapping class group on H. The corresponding operators act on the algebra A q ⊗A q by natural automorphisms. A mathematically-rigorous quantization of the Teichmüller space, exhibiting this rich structure, was first constructed in [17], [16], where the reader can find details and precise statements. (See also [18], [19] and references therein.) The vectors in the Hilbert space H can be identified with Liouville conformal blocks. This works as follows [18,51]. Choose a pants decomposition of C, to be labeled by σ. Cutting into pairs of pants goes along 3g − 3 circles c a which form a maximal set of nonisotopic simple circles on C. For a circle c a , a = 1, . . . , 3g − 3, one defines a function l a of a complex flat connection as twice the logarithm of an eigenvalue of the holonomy of the connection around c a . On a point in T ⊂ M H , that is, for a PSL(2, R) flat connection that comes from uniformization, l a is equal to the hyperbolic length of the geodesic, isotopic to the circle c a . The functions l a , a = 1, . . . , 3g − 3, all Poisson-commute in symplectic structure Ω J , and upon quantization give a maximal set of commuting hermitian operators l a on H. We denote by |σ, l the common eigenvector of these operators 7 with real nonnegative eigenvalues l = (l 1 , . . . , l 3g−3 ). Next, take the natural complex structure on T , with some choice of holomorphic coordinates q. The symplectic form ω W P in this complex structure is the Kähler form for the Weil-Petersson metric. With this data, one can quantize T with symplectic form b 2 ω W P in Kähler polarization. As a result, the state vector |σ, l gives a holomorphic function on T , It can be shown that this wavefunction is equal to the Liouville conformal block, associated to the pants decomposition σ, with the intermediate momenta in the corresponding 3g − 3 channels equal to l a . The parameter b 2 that appears as a coefficient in the symplectic form becomes the usual Liouville parameter with the same name. In particular, the central charge is equal to c = 6(b 2 + b −2 ) + 13 . (2. 2) The modular-invariant hermitian product on H is identified with the Liouville correlation function. More details as well as references can be found in section 6 of [18]. In physics literature, the idea that Virasoro conformal blocks arise from quantizing the Teichmüller space was first proposed by [14,15]. In those papers, T was also viewed as a component of the space of flat PSL(2, R) connections. The quantization was performed in a Kähler polarization. Wavefunctions were constructed as functionals on the infinitedimensional space of all PSL(2, R) connections, and the Gauss law constraint was imposed only after the quantization. The identification of the quantum wavefunction with the conformal block was based on the observation that the aforementioned constraint is identical to the Virasoro Ward identity.
In this paper, we mainly concentrate on the case of real positive b 2 , but, of course, Virasoro conformal blocks can be defined for complex b 2 . In the Hitchin sigma-model, one 7 One might think that the operators la can be defined purely in terms of quantized traces of holonomies, that is, elements of the algebra Aq, by somehow taking logarithms. In this case they would commute with the whole A q . These statements would be false. The model situation for this phenomenon is the modular double, see [52] or section 6 of [24]. We recall some of these matters in section 8. can consider a natural generalization of the setup that we used. On the right, we still put a coisotropic brane, whose physics is governed by the holomorphic symplectic form ω − iB = b 2 Ω J , except that b 2 now is not real, so where α is the phase of b 2 . On the left, we put a Lagrangian brane. It is supported on a submanifold which is holomorphic in the complex structure, in which the Kähler form is B. It is Lagrangian with respect to the forms ω and ω J . This submanifold is related by a Hitchin diffeomorphism C * to the submanifold of opers. The Lagrangian brane also supports a Chan-Paton bundle of curvature 8 −B, to cancel the B-field. The space of states is still a module for the algebra A q ⊗ A q , and therefore one expects that it can be naturally identified with the space of conformal blocks. By way of a digression, we point out that the case of b 2 ∈ iR is special. The B-field is trivial in the cohomology, and can be traded for a curvature on the coisotropic brane. We then have a simple setup with zero B-field, and Lagrangian and coisotropic branes both of type (A, A, B). They are a hyperkähler rotation of the usual brane of opers and the canonical coisotropic brane. It is easy to apply S-duality (or Hitchin mirror symmetry) to this configuration. The result is essentially the same configuration, with the two branes exchanged. This gives a simple realization of the b → b −1 symmetry of the Liouville theory. Understanding this symmetry for the brane setup with the general B-field is more tricky and lies beyond the scope of this paper.
Finally we point out that our setup for quantizing the Teichmüller space in the Amodel is not the only possible one. One can choose different branes and different symplectic structures in the A-model, but, as long as the Hilbert space is an irreducible module for A q ⊗ A q with q = exp(2πi/b 2 ) and q = exp(2πib 2 ), one expects it to be isomorphic to the space of the conformal blocks. For example, in [30] it was found that the brane setup in M H which arises by compactification from a four-dimensional Omega-deformed gauge theory in the context of the AGT correspondence [29] is different from what we have used here. Namely, the configuration in section 4 of that paper is almost what we have just described for b 2 ∈ iR, but with the Lagrangian brane being of type (A, B, A), which is the brane of opers itself and not its hyperkähler rotation. 9 We shall encounter these variations of the setup later in section 7. However, our main interest in this paper lies in three-dimensional quantum field theories. It turns out that of all obvious brane configurations for quantizing the Teichmüller space, with a coisotropic brane on the right and a Lagrangian brane on the left, the only setup (up to trivial equivalences) that can be lifted to a theory with three-dimensional covariance is the one that we considered 8 This bundle indeed exists, because the cohomology class [B] is trivial, when restricted to the brane.
Indeed, for α = 0, π, it is proportional to [ω], which vanishes on the Lagrangian brane, while for α = 0 or π we reduce to our usual Teichmüller case. 9 Interestingly, this setup does not fit into the paradigm of quantization via branes, because the would-be symplectic form vanishes, when restricted to the Lagrangian brane. Nevertheless, as explained in [30], the theory makes sense and is expected to produce the same Liouville conformal blocks.
initially, namely, the A-model in symplectic structure ω K with the branes B T and B c , with real b 2 . (We later return to this fact in section 5.1.1.) This is the setup that we will mostly focus on.

Teichmüller TQFT as a Chern-Simons theory
So far we understand our tentative TQFT for three-manifolds of the form R × C. To define the theory on a general three-manifold W , we recall that the Hitchin sigma-model can be obtained [41] by dimensional reduction from the four-dimensional N = 4 super Yang-Mills theory. Namely, taking the four-manifold to be a product Σ × C and compactifying on C, one can see that the Yang-Mills theory reduces to a sigma-model on the worldsheet Σ with the target space being the Hitchin moduli space for C. In our construction, the worldsheet was a product Σ R × I, and therefore the four-manifold was I × R × C. Then to put the quantum Teichmüller theory on a general three-manifold W , it should be enough to replace R × C by W . Now we will explain this in more detail.

The setup
The N = 4 Yang-Mills theory can be twisted and put on an arbitrary four-manifold. The twist that we need is the one used by Kapustin and Witten. On a general four-manifold, the twisted Lorentz group in this case preserves two supercharges, which square to zero on gauge-invariant quantities. A linear combination of these supercharges, parameterized by a P 1 -valued parameter t, can be taken as a BRST operator Q of the topological field theory. The unbroken subgroup of the R-symmetry group is U(1) gh , the charge under which defines the ghost number. Bosonic fields of the theory include a gauge field A, an adjoint-valued one-form φ of ghost number zero, and an adjoint-valued complex field σ of ghost number two. The bosonic part of the twisted super Yang-Mills action on a four-manifold V is 10 where R µν is the Ricci tensor of V . We have omitted terms involving the field σ, since their form will not be important for our purposes. To study the topological theory, it is useful to rewrite the action in a form, in which it is manifestly Q-invariant, This equality is correct up to some total derivative terms. We introduced the notation for the so-called canonical parameter, determined by the Yang-Mills couplings g YM , θ YM and the twisting parameter t. (The points t = ±i are special. For them, the formula above Figure 2. Teichmüller TQFT on a three-manifold W can be engineered by the four-dimensional N = 4 super Yang-Mills theory on W × I with the D5-type and the NS5-type boundary conditions at the two ends of the interval. is not valid.) The Q-exact terms in the action can be expressed as a linear combination of gauge-invariant squares of the following expressions, For real t, the super Yang-Mills path-integral can be localized onto the subspace of fields on which V + , V − and V 0 vanish. The BPS equations are known as the Kapustin-Witten equations. For our application, we take the N = 4 super Yang-Mills theory with gauge group SO(3) and put it on a four-manifold V W × I with the product metric ds 2 V = ds 2 W + dy 2 , see figure 2. We choose the twisting parameter to be t = −1, and the canonical parameter to be K = b 2 > 0. Then θ YM /2π = b 2 . The gauge coupling will also be set to 4π/g 2 YM = b 2 , although nothing really depends on it, since it appears in Q-exact terms only. It is necessary to specify the boundary conditions at the two ends of the interval I. At y = y 0 , we put an NS5-type boundary condition. It is called so, because it can be obtained [39,40] in a brane construction, where the Yang-Mills theory is engineered in the type IIB string theory on a stack of semi-infinite D3-branes which end on an NS5-brane. 11 The scalar field σ and the component φ y of the adjoint one-form, normal to the boundary, are required to vanish at y = y 0 . The three components φ i , tangent to the boundary W , as well as the gauge field A satisfy mixed boundary conditions which can be determined by setting to zero the boundary variation of the action. 12 The action, with boundary terms at y = y 0 included, is equal to (The wedges between differential forms are omitted, when this does not lead to ambiguity.) The fields in the integral over W are the restrictions of the bulk fields to y = y 0 . The same 11 To be completely precise, such brane construction would give a boundary condition which differs from ours by some Q-exact terms and field redefinitions, see section 5.1. 12 This is true in the physical super Yang-Mills theory. In topological theory, one introduces a set of auxiliary fields in order to have Q 2 = 0 off-shell. With these fields in the action, the fields φi and A have free boundary conditions at y = y0.
action can be rewritten intuitively as where we introduced a complexified gauge field A = A + iφ and also the notation for the Chern-Simons functional. Unless b 2 ∈ Z, this expression is not invariant under large gauge transformations, and so should be understood as a formal rewriting of the manifestly gauge-invariant action (3.8).
To complete the definition of the boundary condition at y = y 0 , one has to specify, what happens to the fermions. This is described e.g. in [27], but for our purposes no details are really needed. We will just mention that the fermion {Q, A} should certainly vanish at the boundary, to ensure that the action is Q-invariant.
The boundary condition at y = 0 is known as the D5-type, or the Nahm pole [53,54]. The fields φ y , σ and the gauge field satisfy the Dirichlet boundary condition, while the tangential components φ i are singular and diverge at y → 0 according to a model Nahm pole singularity. This boundary condition is perhaps familiar, when W is the flat space. The generalization to curved W was described in section 3.4 of [40]. On W , we choose a vielbein e for the Riemannian metric, and denote by ω the corresponding Riemannian connection. It is defined by the property (3.11) The boundary condition identifies the SO(3) gauge bundle at y = 0 with the frame bundle of W . Then it makes sense to require the fields at y → 0 to have the following asymptotics,

12)
A = ω + . . . , (3.13) where dots stay for less singular terms. (In fact, one can require the subleading terms to vanish at y → 0.) To verify that this is a good boundary condition, one needs at least to check that the singular terms in the fields do not make the action divergent. Using that d ω e = 0, d ω e = 0 and e ∧ e = e, it is easy to see that there are no divergent terms in V + , V − and V 0 , and therefore the Q-exact part of the action is well-defined. The non-Q-exact part of the action, apart from the terms supported at the other end of the interval, contains only the topological term, which is finite, since the gauge field in (3.13) has no singularity. An important subtlety in the definition of the boundary condition at y = 0 is explained in section 3.5 of [40]. With the behavior of the gauge field as in (3.13), the topological term in the action (3.8) depends on the metric on W . Indeed, its variation under changes of the metric is the same as that of the gravitational Chern-Simons term (3.14) (Here the trace is taken over the fundamental representation of su(2), as everywhere else in our formulas.) To cancel this metric dependence, one adds a counterterm −ib 2 CS(ω) to the action. However, this functional is not gauge invariant, and its value depends on a choice of the trivialization of the tangent bundle of W . This introduces a framing dependence in the topological field theory. Explicitly, under a unit change of framing, the counterterm produces the factor in the partition function. 13 The gravitational counterterm at y = 0 cannot be the only source of framing dependence. The D5 and the NS5 boundary conditions are related by an S-duality transformation. Therefore, one expects that the boundary condition at y = y 0 should also contribute to the framing dependence. 14 In this case, it is a quantum effect which should appear upon regularizing the path-integral. The S-duality acts on the canonical parameter b 2 in the same way as on the gauge coupling, that is, changes it into −b −2 . The elementary framing factor from the boundary at y = y 0 should then be (The minus sign in the coupling −b −2 was canceled by another sign which comes from the fact that, in order to map the D5NS5 system to itself, one needs to accompany the Sduality by a reflection.) In a three-dimensional topological field theory which is associated to a two-dimensional CFT of central charge c the factor produced by an elementary change of framing is [1] exp πic 12 . (3.17) From (3.15) and (3.16) we expect that our TQFT is related to a CFT with central charge This indeed is almost the Liouville central charge (2.2). What is missing is a b-independent constant 13, which one may expect to appear from the one-loop determinant. (For more details on such constant shifts in the context of analytically-continued Chern-Simons theory, see section 3.5.3 of [40].) For W R × C, our setup should reduce back to the sigma-model on Σ R × I, considered in section 2. How this works, has been explained in [41] and [42]. Since the four-dimensional theory is topological, we are free to rescale the metric to make the typical size of the Riemann surface C much smaller than the length of the interval I. The theory is then expected to reduce to a sigma-model on Σ, for which the target is the moduli space of vacuum field configurations. It can be shown that such configurations should solve the Kapustin-Witten equations (3.7) simultaneously for all values of t. On R × C × I, such solutions are given by pullbacks of solutions to the Hitchin equations on C. Thus, the low energy theory is indeed the Hitchin sigma-model. 15 Since we have set t = −1, the topological field theory in two dimensions is the A-model in complex structure K. It is easy to see this directly. Indeed, the action (3.8) contains a coupling b 2 2π W tr(φF ) at y = y 0 . It can be rewritten as a bulk integral − b 2 2π V tr(d A φ ∧ F ), which in two dimensions reduces to the integral of the pullback of the symplectic form (The disappearance of the minus sign in this formula is explained in footnote 15 in [41].) Similarly, the topological term in (3.8) together with the coupling ib 2 4π W tr(φd A φ) reduce in two dimensions to the B-field B = −b 2 ω I . The boundary condition at y = y 0 puts no restriction on the fields φ i and A i , and in the sigma-model gives rise to the coisotropic brane B c , whose support is the whole of M H . The BRST-invariant operators on B c are gauge-invariant functions of the complexified gauge field A which is annihilated by Q at y = y 0 . These give rise to algebraic functions on M H , holomorphic in complex structure J.
It is a bit more tricky to see that the D5-type boundary condition at y = 0 reduces in the sigma-model to the Lagrangian brane B T . To do this, one considers the Kapustin-Witten equations on R × C × R + , where the infinity in R + means just that we are very far from the D5-brane on the interval I, in the scale set by the size of the Riemann surface C. For very large y, the KW solutions are required to become y-independent and therefore approach solutions to the Hitchin equations. It is not hard to see that any solution that has the Nahm pole at y → 0, at large y will approach a point of the Hitchin section T ⊂ M H . Moreover, for each point of T there exists precisely one solution. This was explained in [42], with the rigorous mathematical proof completed in [55].

Chern-Simons theory with an exotic integration cycle
We have argued that Teichmüller TQFT is the four-dimensional topologically twisted N = 4 super Yang-Mills theory, put on an interval with particular boundary conditions. Following [12], we would like to explain, how to understand this setup as an analytically-continued Chern-Simons theory.
The Yang-Mills path-integral can be localized onto the space of solutions to the Kapustin-Witten equations on W × I. A slight simplification comes from the fact that the boundary conditions at both ends of the interval set φ y = 0. Then it is possible to show [12] by a simple integration-by-parts argument that φ y vanishes everywhere for any solution.
Let us denote by G and G C the groups of SO(3) and PSL(2, C) gauge transformations on W , respectively, and by G 0 and G 0 C the subgroups of gauge transformations, connected to the identity. We would like to gauge away the component A y of the gauge field, and to do so by a gauge transformation on W × I that is trivial at y = y 0 , the location of the NS5-type boundary. There is a price to pay for that. The boundary condition at y = 0 will now say that the fields may not approach the Nahm pole precisely in the form (3.12)-(3.13), but rather be conjugate to it by a G 0 gauge transformation. With φ y = A y = 0 and in the product metric on W × I, the Kapustin-Witten equations become (3.20) Here A and φ should be viewed as fields on W , which depend on a parameter y. The Hodge star and the differential are those on W .
Let Ω A be the space of PSL(2, C) gauge fields A on W , or equivalently, the space of pairs (A, φ). The first two equations (3.20) and (3.21) can be rewritten as where F is the field strength for A = A − iφ. They describe the downward gradient flow on Ω A for the functional h = −4π Im (CS(A)) .

(3.24)
The flow is defined using the natural Kähler metric on Ω A . The moment map for the action The equation (3.22) then is a sort of gauge-fixing condition. It is preserved by the flow and can be thought of as a part of the boundary condition. Consider the space S y 0 ⊂ Ω A of fields, obtained by restricting to y = y 0 solutions to the localization equations (3.20)-(3.22) which for y → 0 are conjugate to the Nahm pole (3.12)-(3.13) by a G 0 gauge transformation. One expects S y 0 to be, informally, a middledimensional real submanifold in the infinite-dimensional space Ω A . It is middle-dimensional, because the Nahm pole boundary condition, supplemented with a suitable gauge-fixing, is elliptic [56] and leaves free half of the modes. To make this argument completely explicit, one would need to compute the index of the linearization of the KW equations around the Nahm pole. Alternatively, just for illustration, we can perturbatively solve the KW equations for small y, and count the modes. The perturbative analysis was done in full generality in [56], and is reviewed in a special case in our appendix A.2. The space of perturbative solutions that approach the Nahm pole at y → 0 is parameterized by six real functions on W . This is a middle-dimensional subspace in Ω A /G 0 C . Our definition of S y 0 requires the fields to approach the Nahm pole only up to a G 0 gauge transformation. This adds three more functions and gives nine modes, which is indeed one-half the dimension of Ω A . It is also easy to see that S y 0 is a real subspace, that is, no non-zero tangent vector over any point of S y 0 is mapped to another tangent vector by the complex structure operator J: δA → iδA. Indeed, if δA is such a tangent vector at the solution A 0 , then it follows from the flow equations that ∂ y δA = 0 and d A 0 δA = 0, which is easily seen to be incompatible with the Nahm pole boundary condition.
Let us return to the Teichmüller TQFT partition function. The general construction [12,27] of analytically-continued Chern-Simons theory implies that our path-integral can be rewritten as follows, It is an integral over S y 0 with the measure induced by the nowhere-vanishing holomorphic G 0 C -invariant top-degree form DA on Ω A . To understand the origin of this formula, one can look at the non-exact terms in the action (3.9). The choice of framing of T W together with the boundary condition at y = 0 defines a choice of framing of the gauge bundle on W × I. Then we can rewrite the bulk topological term as The second term is canceled by the gravitational counterterm, introduced after (3.14).
The second term combines with the boundary action at y = y 0 to produce precisely the Chern-Simons action in (3.26). (For a detailed derivation of the relation between 4d super Yang-Mills and analytically-continued Chern-Simons, see [12,27].) The effective 3d theory (3.26) sitting at y = y 0 has gauge symmetry G 0 , which is a symmetry of S y 0 and the only part of the 4d gauge symmetry that we haven't used in fixing A y = 0.
The formula (3.26) may be slightly imprecise. The 4d path-integral is localized onto the space of solutions to the KW equations, which is fibered over the space of the boundary data S y 0 . For a given point in S y 0 , the bulk path-integral computes the Euler characteristic of the fiber over it, and this factor should be included into the path-integral, so we really have We hope that with a generic choice of the metric, each fiber is simply a point, so that the extra factor is not needed. (This, for example, is the case for the analogous problem in the 2d sigma-model: for every point on the Hitchin section T , there is one and precisely one time-independent solution to the KW equations on C × R × R + with the Nahm pole at y = 0, approaching the given point at large y.) For the rest of this subsection, we simply ignore this factor, and soon we will obtain eq. (3.33), which automatically takes it into account.
For the path-integral (3.26) to make sense, the space of fields S y 0 should be a suitable integration cycle. This means first of all that the functional h should be bounded from above on S y 0 , so that the integral doesn't obviously diverge. To get some flavor of what this bound can be, we can evaluate h on a given solution for small y 0 , where the solution is well approximated by the Nahm pole (3.12)- (3.13). In this case, where Vol(W ) = − 2 3 W tr(e 3 ) is the volume of W . We may hope optimistically that h is bounded on S y 0 by a constant C(y 0 ), which for small y 0 is of the order of Vol(W )/y 3 0 . It is also important that we are able to integrate by parts in the functional integral, which means that S y 0 should not have boundaries, except possibly for an asymptotic end in the directions, in which h goes to minus infinity. If we denote by Ω T A the subspace of Ω A , on which h < −T , then S y 0 being a good integration cycle is equivalent to it being an element of the middle-dimensional relative homology H(Ω A , Ω T A ), for T → ∞. A slightly uncustomary property of Teichmüller TQFT is that its Hilbert space is of infinite dimension. Then, in computing the partition function on a three-manifold by cutting and gluing, one may encounter problems with the convergence of wave function integrals. To some three-manifolds the theory simply does not assign a finite partition function. For example, if W is a product S 1 × C for a two-manifold C, then the partition function is infinite, since it is equal to the dimension of the Hilbert space on C. At the same time, for a class of three-manifolds a finite partition function has been constructed 16 [22,23]. Consistency of our proposed construction of the Teichmüller TQFT partition function requires Conjecture 1. Let W be a three-manifold to which Teichmüller TQFT assigns a finite partition function. Then for any y 0 > 0 the subspace S y 0 ⊂ Ω A defines an element of H(Ω A , Ω T A ), for arbitrarily large T > 0. In particular, there exists a function C(y 0 ) which provides a uniform bound on the functional h for all flows on W × R + y , defined by the equations (3.20)-(3.22) and the boundary condition (3.12)- (3.13).
(In fact, it would be sufficient to demand these properties to be true for some particular y 0 . The bound would then also hold for any larger values of y 0 .) The properties that this conjecture claims for the Kapustin-Witten equations are highly non-trivial. Let us again summarize the arguments which make us think that this is worth considering. There is ample mathematical evidence that Teichmüller TQFT does exist and assigns finite partition functions to some three-manifolds. The path-integral (3.26) is the unique 3d covariant lift of the two-dimensional construction of section 2. If Teichmüller TQFT possesses a path-integral definition, it must be (3.26). Furthermore, as we explain in section 6, the picture with N = 4 super Yang-Mills on W × I, with a D5-and an NS5type boundary conditions, can be obtained from six dimensions. The fact that this setup computes Teichmüller partition function is known from localization computations in the 3d-3d correspondence. Finally, in section 4, we will start directly with the definition of the integration cycle S y 0 , and see that this definition matches nicely with some facts that are expected to hold for Teichmüller TQFT. In particular, we will propose and test an explicit bound C(y 0 ) for h on S y 0 for a hyperbolic three-manifold W .
In our expectation, the most pessimistic scenario is that Conjecture 1 is false, but the functional integral (3.28) can still be somehow defined. Perhaps a slightly more robust definition is eq. (3.37), which will be explained later. The optimistic scenario is that Conjecture 1 is true, and we will assume this throughout the text, unless explicitly indicated otherwise.
Since one expects the integration cycles S y 0 to be homologous for any y 0 > 0, we will often omit the subscript.
As the last remark, let us show how unitarity of the theory manifests itself. For two closed oriented three-manifolds W and −W which differ by a choice of the orientation, partition functions of a unitary TQFT should differ by complex conjugation. One consequence of a change of the orientation is the change of sign of the Hodge star in the localization equations (3.20)-(3.21). The Nahm pole boundary condition was defined with the vielbein such that e ∧ e = e. Then, because of the Hodge star, the sign of e on −W should also be chosen to be the opposite. These two sign differences are equivalent to φ → −φ, that is, a complex conjugation of the integration cycle S → S. The orientation flip also causes the Chern-Simons action in the path-integral to change sign. As a result, we have which is indeed the complex conjugate of Z Teichm (W ), as long as b 2 is real.

Lefschetz thimbles
We recall that in the context of analytic continuation of complex integrals, the so-called Lefschetz thimbles are particular integration cycles which are indexed, roughly speaking, by critical points of the action, and provide a basis for the space of admissible integration cycles.
For an introduction to this machinery and for its application to analytically-continued Chern-Simons theory, see [27] and [12]. We will not review these matters here.
Let Ω flat A ⊂ Ω A be the space of flat PSL(2, C) connections on W . By a, b, . . . we denote elements of Ω flat A /G C , the moduli space of flat bundles. The critical points of the Chern-Simons action are labeled by the elements of Ω flat A /G 0 C , since we are working modulo gauge transformations, homotopic to the identity. Such a critical point is labeled by a pair (a, s) of a flat PSL(2, C) bundle a and an integer s which parametrizes a lift of a to Ω A /G 0 C . We often denote pairs (a, s), (b, s ), . . . by a, b, . . . . Let CS(a) ∈ C/2πZ be the Chern-Simons invariant of a flat bundle a and CS(a) ∈ C be the invariant of its lift. It is convenient to define so that it is not quite an integer, but takes values in 17 This orbit has points with zero moment map µ (3.25), if and only if the flat bundle a is semistable [57]. Since the requirement of zero moment map is a part of our localization equations, we will always restrict to semistable bundles. Then the subspace of O C a with µ = 0 is a G 0 -orbit, to be denoted O a , and in fact, We sometimes denote by A a some flat connection, belonging to O a .
A Lefschetz thimble C a , by definition, is obtained by downward gradient flows that originate from O a . To be precise, this definition needs a small modification, when flat bundle a is a part of a moduli space. To simplify matters, throughout the paper we will restrict to the case that all flat connections are isolated. Removing this restriction should not change anything essential in our arguments.
Assuming that S is an admissible integration cycle, it can be expanded in Lefschetz thimbles, S = a n S a C a . (3.32) The coefficients in this expansion are computed by intersecting S with a system of dual cycles C ∨ a , such that C a ∩ C ∨ b = δ a,b . As explained in [12], the cycle C ∨ a is constructed by upward gradient flows from an arbitrary fixed representative A a of the orbit O a . Then n S a is the signed count of flows in y ∈ [y 0 , ∞) that begin at S and approach the flat connection A a at infinity.
But S itself is obtained by flows on (0, y 0 ]. Then we can as well count flows for y ∈ (0, +∞) that are conjugate to the Nahm pole at y → 0 and approach the flat connection A a at infinity. The signed count of such flows will be called n a . We pedantically introduce this new notation just for the unlikely case that n a = n S a , which may happen if the factor χ fiber in the path-integral (3.28) is non-trivial. It is then obvious that the path-integral which is true whether χ fiber is equal to one or not, so we no longer need to worry about this factor. The partition function Z CS a (b 2 ) here is the Chern-Simons path integral with coupling constant b 2 ∈ R + over the Lefschetz thimble C a .
Let n a be the signed count of flows for y ∈ (0, +∞) that start with the Nahm pole (3.12)-(3.13) at y → 0 and approach the orbit O a for y → +∞. Superficially, this counting problem looks very similar to how we defined n a , but there is a difference in how the gauge invariance is treated. For n a , we required the flows to be conjugate to the Nahm pole at y → 0 and to approach precisely a fixed representative A a of the orbit O a for y → 0. When a is irreducible, a global G 0 -gauge transformation maps one counting problem into another, so n a = n a . But when a is reducible, with an isotropy group H a ⊂ SO(3), any flow that contributes to n a becomes a moduli space which is a copy of H a , when we count flows for n a . Since the Euler characteristic of a Lie group is zero, n a is zero for reducible critical points. (This is a direct analog of the fact that Lefschetz thimbles for irreducible critical points at Stokes walls cannot jump by thimbles, labeled by reducible critical points, see section 3.3.4 of [12].) Then we can rewrite eq. (3.33) as where the sum goes over stable critical points only. (Unstable critical points were excluded by the moment map condition, while strictly semistable ones are precisely the reducibles.) Note that if the three-manifold W has finite volume, then a critical point being reducible is equivalent to the corresponding flat bundle having holonomies in an abelian subgroup of PSL(2, C). If the volume of the three-manifold is infinite, such abelian connections should not be considered as reducible, but rather are parts of moduli spaces, generated by wouldbe-gauge transformations at infinity. In such a case, our argument above would not prove that such connections do not contribute to the Teichmüller TQFT partition function. In this paper, we mostly focus on three-manifolds of finite volume, with the exception of some examples in section 7. In those examples, however, the three-manifolds are such that there are no abelian flat connections. Thus, for the partition functions considered in the present paper, abelian connections never contribute.
There is a further minor point that has to be mentioned. Generically, a Lefschetz thimble C a is a nice integration cycle, but it may fail to be compact (even modulo its part that goes to infinity in the field space), when there are downward flows from a to another critical point. Usually, the possibility of such flows is prevented by the existence of an integral which is conserved by the flow equations and is generically different for all critical points. However, we have specialized the Kapustin-Witten parameter to t = −1, in which case the conserved integral is Re(CS(A)), and its value is the same for any two complex conjugate flat connections. Thus, any critical point with positive Chern-Simons volume −4π Im CS(A) has potentially non-compact Lefschetz thimble. Then in the expansion (3.34), we have to perturb slightly t from −1 and b 2 from being in R + , for the Lefschetz thimbles and the counts n a to make sense. We will argue however that in the case of hyperbolic three-manifolds, which is the most important example for the present paper, flat connections with positive Chern-Simons volume do not contribute, and we do not need to worry about these complications.
The fact that reducible connections do not contribute to the partition function is very important, so let us look at it from several different points of view.
First, we can stretch the interval I to make it very long, compared to any scale set by the three-manifold W . Then, intuitively, any flow that starts at the Nahm pole at y = 0 and ends at a finite point in the field space at y = y 0 is expected to spend most of the time y near some critical point. The space of flows, and therefore the integration cycle S, can accordingly be decomposed into subspaces, labeled by the critical points near which the flows tend to stay. This is shown on figure 3, and, of course, is just another way to view the decomposition coefficients n a . If the intermediate flat connection a has a non-trivial isotropy subgroup H a , then there is a symmetry on the space of flows that rotates the solution in the region y < y 0 /2 by elements of H a . (As usual, it is important that we are counting flows that are conjugate to the Nahm pole at y → 0.) This creates an H a -worth of solutions and sets the corresponding algebraic count n a to zero.  Let us introduce the following objects, Recall that a is a flat bundle modulo all gauge transformations G C , not necessarily topologically trivial. A pair (a, s) is the same thing as what was denoted by a. In the first line (3.35), we explicitly sum over s ∈ − 1 2π Re CS(a) + Z, while keeping a fixed. This is the reason that we had to revert back to the notations with a and s written our explicitly. The variable q = exp(2πib 2 ) has already been introduced in section 2. The right hand side of (3.35) is a Laurent series in q, up to an overall prefactor with a non-integer power of q.
In the second line (3.36), the function Z NS5,top a (b 2 ) is essentially the integral over a Lefschetz thimble C (a,s) , except that we have added a c-number ib 2 Re CS(A (a,s) ) to the action. What it gains us is that Z NS5,top a (b 2 ), unlike the Lefschetz thimble integral, depends on the flat bundle a ∈ Ω flat A /G C and not on the lift s.
The objects Z D5 a ( q) and Z NS5,top a (b 2 ) are nothing but the partition functions of the N = 4 super Yang-Mills in the half-spaces, as shown on figure (4). We will sometimes call them blocks. Note that they are labeled by flat bundles a modulo all gauge transformations, as it should be for the vacua of a quantum theory. (The theory in question is the quantum mechanics, obtained by compactifying the N = 4 super Yang-Mills on W .) In the D5block, the quantity −2πib 2 s is the contribution of the bulk topological term. The sum in (3.35) goes over the instanton number. In the NS5-block Z NS5,top a (b 2 ), the shift 2πib 2 s in the action comes from the fact that the bulk topological term, written in some gauge as a total derivative, gives a contribution not only at the location of the NS5 brane, but also at the infinite end. More details about these objects are given in section 5.1, where we also explain the notation "top" in Z NS5,top a (b 2 ). Using these half-space partition functions, we can rewrite the formula (3.34) for the Teichmüller TQFT partition function as In good circumstances, the sum here goes over a finite set. This formula may be taken as our most clear proposal for the Teichmüller partition function. Note that Z D5 a ( q) is generically a Laurent series. A substitute for Conjecture 1 could then be the requirement that Z D5 a ( q) is a finite polynomial, or at least can be naturally regularized, when a is stable and the three-manifold is such that the Teichmüller TQFT partition function is finite.
It may seem that there is something strange about eq. (3.37). The physical meaning of this formula is that we factorize the amplitude on W × I by cutting the interval. The vacua of the effective quantum mechanics on R y , obtained by compactifying the N = 4 super Yang-Mills on W , are labeled by semistable flat bundles a. Yet among the intermediate states in (3.37) we only see stable flat bundles, which makes it look that something is wrong with the factorization. The explanation of this puzzle is the following. The twisted super Yang-Mills theory has a so-far neglected complex field σ, which together with its conjugate σ is a part of a BRST multiplet (3.38) The localization equations for σ say that it has to be zero, if the solution for A and φ is irreducible. Equivalently, an irreducible complex connection A induces a mass for all components of σ in the Lagrangian. Irreducible flat connections a correspond to massive supersymmetric vacua of the quantum mechanics. But if a is invariant under a subgroup H of the gauge group, the field σ has zero modes, valued in the complexified Cartan t H C of H. It means that classically a corresponds not to a single vacuum, but to a moduli space, labeled by a t H C -valued expectation value of σ. With our assumption that W has finite volume, the corresponding zero modes are normalizable. Then they should be quantized, and, in particular, the blocks Z NS5,top a and Z D5 a are valued not in numbers, but in wavefunctions. This situation has been explored in great detail section 5 of [27]. In our case, let us denote by σ 0 , σ 0 and η 0 components of the fields, valued in t H C C. Then the BRST operator (3.38) becomes the Dolbeault differential ∂ σ 0 on C. Since C is non-compact, there exist two natural sorts of cohomology of Q. The first is the usual H ∂ , with a basis given by holomorphic polynomials σ k 0 , k ≥ 0. The second is the cohomology with compact support H c ∂ , spanned by classes ∂ k σ 0 δ (2) (σ 0 , σ 0 )η 0 , k ≥ 0. It is easy to see that the blocks Z D5 a and Z NS5 a both take values in H c ∂ . Indeed, we can act on them by inserting an operator tr σ 2 at y → ∞. This is a Q-invariant scalar operator, and the insertion point does not really matter. Thus, it can be moved to y → 0, where σ vanishes via the boundary condition. Therefore, the blocks take values in wavefunctions which are annihilated by tr σ 2 , and these must be elements of the cohomology with compact support. Whenever we encounter a reducible vacuum a in the decomposition of Z Teichm , we are instructed to pair two such wavefunctions. For two compactly-supported cohomology classes, the pairing is zero because of too many fermion insertions.
It is instructive to compare the spaces of solutions to the localization equations on a long stretched interval I and on the two intervals of figure 4. Let us call these setup I and setup II, respectively. Assume that we cut the interval at y = y 0 /2 and obtain two disjoint intervals I ∪ I r , and the connection at y = y 0 /2 belongs to the orbit O a . The difference between setups I and II is that in the second case, we have two flat connections A and A r in the orbit O a and two copies of the gauge group G, sitting at the point y = y 0 /2. If a is irreducible, then one copy of the gauge group G is eaten, when we align A and A r , and the problem becomes the same as for the single interval I. When a is reducible, setup II has more gauge symmetry than setup I precisely by a factor of the isotropy group H a . It means that the moduli space in setup I is larger by the same factor. This is the same factor of H a that we saw in the proof that n a = 0 for abelian a. The role of the multiplet (3.38) is precisely to ensure that factorization in quantum gauge theory is consistent with this "mismatch" in the classical configuration spaces.
The reason we went into so much detail with these explanations is that later we will use the same arguments to show, why reducible flat connections can be discarded in complex Chern-Simons theory.

Teichmüller TQFT on a hyperbolic three-manifold
Our definition of the integration cycle S was so far quite abstract. Now assume that W is a complete finite-volume hyperbolic three-manifold. It may either be closed or have cusps.
We would like to conjecture that, when W has a complete hyperbolic metric, the integration cycle S has a simple universal description. At first this may seem like a surprise. Indeed, the expansion coefficients n a or, equivalently, the blocks Z D5 a are expected to be nontrivial invariants of the three-manifold. They should contain much of the information about Chern-Simons partition functions for rank one real and complex gauge groups. However, we are interested not in all blocks, but only in the ones labeled by irreducible flat connections, 18 and those, we conjecture, are very simple for a complete hyperbolic W .
We recall a few basic facts about flat connections on a hyperbolic three-manifold. Let e and ω be the vielbein and the Levi-Civita connection for the hyperbolic metric. From them, we can construct two flat PSL(2, C) connections, the geometric A geom = ω + ie and the conjugate geometric A geom = ω − ie. Their flatness is equivalent to the defining equation of the Levi-Civita connection d ω e = 0 and the constant negative curvature condition dω + ω ∧ ω = e ∧ e. The flat bundle a geom corresponding to A geom comes from the geometric structure of W , that is, from the isomorphism with a quotient of the hyperbolic space H 3 by a subgroup of its isometry group PSL(2, C). According to the Mostow theorem, the geometric flat bundle is rigid. Note that 19 It is known [44] that for any flat bundle a on a hyperbolic three-manifold, We will assume that our three-manifold is generic, so that equality holds for a geom and a geom only.
The key to identifying the integration cycle S on a hyperbolic W is a conjecture by Andersen and Kashaev [22]. By studying examples of knot complements, they proposed that in the semiclassical limit, the Teichmüller TQFT partition function behaves as Although in this paper we only consider gauge group SO (3), it should be possible to construct analogs of Teichmüller TQFT for any compact simple Lie group. The corresponding higher Teichmüller spaces [59] are defined as particular Lagrangian subspaces in Hitchin moduli spaces for these gauge groups. We expect that all our statements should carry over to those cases, with the analog of the geometric flat connection defined using the principal embedding of su (2). In particular, it should be possible to play this game for PSU(N ), taking the limit N → ∞. The Teichmüller TQFT partition functions can alternatively be computed in 3d N = 2 superconformal theories, via the 3d-3d correspondence. In [43], these partition functions were analyzed in holography, and it was found that the leading large N asymptotics is precisely (4.2), provided that one uses the volume for the principally-embedded geometric flat connection. (The corresponding group-theoretical factor introduces an N 3 scaling.) What is nice about this argument is that it is valid universally for any hyperbolic W . In the papers of Andersen and Kashaev, the formula (4.2) was tested for N = 2, but only for a few knot complements.
In light of these experimental facts, we propose that the asymptotics (4.2) hold for the Teichmüller TQFT partition function on an arbitrary complete finite-volume hyperbolic three-manifold.
In the decomposition (3.34), the contribution of a critical point A a has leading semiclassical asymptotics Clearly, this agrees with (4.2) for A a being the conjugate geometric flat connection A geom . Moreover, the inequality (4.1) implies that the term for A geom is the most subleading in the expansion (3.34) over the Lefschetz thimbles. Since Z Teichm decays as fast as this term, no other flat connections can contribute in the expansion.
To be precise, the same flat bundle a geom corresponds to many Lefschetz thimbles, labeled by different lifts s. Chern-Simons partition functions on these thimbles differ by powers of q = exp(2πib 2 ), up to a framing factor. The integration cycle S must be the Lefschetz thimble for one particular lift of a geom , which we will continue to call A geom . Indeed, if it were a combination of Lefschetz thimbles for different lifts, the asymptotics (4.2) would involve the absolute value of a Laurent polynomial in q as a prefactor. This does not seem to agree with the experimental data. As will be clear from the following discussion, precisely which lift of a geom to Ω A /G 0 C to take is determined by the choice of framing.
These implications of the Andersen-Kashaev conjecture for the Chern-Simons integration cycle have been previously pointed out in [43] and [45]. We hope that our paper adds something to the understanding of the origin and the nature of this Chern-Simons theory, as well as the possible origin of these phenomena from the properties of the Kapustin-Witten equations, as will be pointed out soon.
Note that (4.2) is similar to the celebrated volume conjecture, except for the minus sign. But this sign makes the statement very powerful. The volume conjecture says that the Chern-Simons integration cycle, in appropriate setting, must contain the Lefschetz thimble for A geom . The formula (4.2) says that the Teichmüller TQFT integration cycle must contain the Lefschetz thimble for A geom , and nothing else.
We can now propose that the Andersen-Kashaev conjecture is equivalent to the following Conjecture 2. Let W be a complete hyperbolic three-manifold. Consider the Kapustin-Witten equations (3.7) for gauge group SO(3) and t = −1 on W × R + y . At y = 0, we impose the Nahm pole boundary condition (3.12)-(3.13). At y → ∞, we require the solution to approach an irreducible flat PSL(2, C) bundle a. Let n a,s be the signed count of solutions of instanton number s. Then n a,s is zero for all a, except for a geom , and for all instanton numbers, except for one particular s 0 . The number n geom,s 0 is non-zero.
A remark may be in order. The statement could have been equivalently formulated for the flow equations (3.20)-(3.22) which differ from the Kapustin-Witten equations by setting φ y to zero. Indeed, when the flat bundle a is irreducible, φ y has to vanish 20 for y → ∞. Since it also vanishes for y → 0, it will be automatically zero everywhere for any solution to the Kapustin-Witten equations.
Also, we did not require the hyperbolic manifold to be of finite volume. This condition was necessarily for all the examples that we used to motivate Conjecture 2, but some 20 The proof is a simple exercise in integration by parts, which we leave to the reader. experimentation in section 7 suggests that the conjecture may hold as well for more general complete hyperbolic three-manifolds.
Our conjecture may seem to be too strong a statement. Perhaps the mildest question that arises is, why n geom,s 0 is non-zero for any hyperbolic three-manifold. The following consideration gives a hint. We are free to choose any metric to define the D5 boundary condition (3.12)-(3.13). On a hyperbolic three-manifold, we may of course choose the hyperbolic metric 21 for that purpose. Then it is easy to see that the flow equations always have a model solution which satisfies the correct boundary condition at y = 0. At y → +∞, the complexified gauge field A + iφ approaches precisely the conjugate geometric connection! This is the first non-trivial sign that our definition of the integration cycle S may be on the right track. (Still, this does not quite prove even that n geom,s 0 = 0, since in the signed count of flows there may be other flows that cancel the contribution of the model solution above.) The most vexing question, of course, is why all the other coefficients n a,s are zero. We now propose and test a statement which, if true, would explain the mechanism behind Conjecture 2.   The following is a pure guess, for which we will try to build some mathematical evidence. Then for any y > 0, the value of the functional h, evaluated on the solution at flow time y, is no greater than h 0 (y), with the equality holding only for the model solution (4.4).

A stronger conjecture
This statement provides a bound C(y), whose existence was a big part of Conjecture 1. C(y) is equal to h 0 (y). It also implies Conjecture 2. Indeed, if any solution other than (4.4) would approach some flat connection at y → ∞, this flat connection would violate the bound (4.1), which is impossible. We also stress that Conjecture 3 concerns the flow equations (3.20)-(3.21) and not the Kapustin-Witten equations (3.7). Equivalently, it prohibits solutions to the Kapustin-Witten equations that would for y → ∞

A symmetric ansatz
For an illustration and a simple test, let us make the maximally-symmetric ansatz (inspired by [60]) where f and g are some functions of y. The functional h reduces to where we set Vol(W ) = 1/3 for convenience. The flow equations are the downward gradient flow for h, defined using the metric dy((δf ) 2 + (δg) 2 ). The boundary condition requires f to approach −1/y and g to vanish for y → 0. The profile of h is shown on figure 5. There are two critical points, A geom at (f, g) = (−1, 0) and A geom at (f, g) = (1, 0). The flows that we are interested in descend from the hill on the left of the figure. The model solution goes along the ridge of the hill and ends up at the critical point A geom . Conjecture 3 says essentially that any other flow slides down faster than the flow along the ridge. This claim may not be entirely obvious, but it is true, as we prove in appendixA.1.

Perturbative expansion
We can make a more stringent test of Conjecture 3 by solving the flow equations perturbatively for small y, and computing the functional h on the solution. A big part of the computation has already been done in [60] (see also [56]).
The Nahm pole boundary condition identifies the gauge bundle on W with the tangent bundle, and preserves the diagonal subgroup of SO(3) gauge × SO(3) spin . Under this diagonal subgroup, the space of adjoint-valued one-forms Ω 1 adj decomposes into subspaces of tensors of spin zero, one and two to be denoted by V − , V 0 and V + , respectively. We will denote the corresponding projections of an adjoint-valued one-form by subscripts, e.g. c = c − +c 0 +c + . In the orthonormal basis given by the vielbein, c 0 is the antisymmetric part of the threeby-three matrix c, c − is the trace part and c + is the symmetric traceless part. Let us parametrize the fields as where a and ϕ are adjoint-valued one-forms. For small y, the solution to the equations (3.20-3.22) can be expanded as One finds for the first non-trivial order, where c − ∈ V − and c + ∈ V + are the zero modes that are not constrained by the equations. All higher-order terms can be expressed in terms of c − and c + via the equations. (In particular, perturbative solutions are indeed parameterized by 1+5=6 real functions on W , as was claimed in section 3.2.) We would like to compute the functional h(y) − h 0 (y) for small y. It can be expanded as We introduce a notation (a, b) = − tr(a ∧ b) (4.14) for the symmetric positive-definite bilinear form on Ω 1 adj . We also denote |a| 2 ≡ (a, a). In appendix A.2, we perturbatively solve the equations to the order which is necessary to compute δ 1 and δ 2 . This gives the result Miraculously, all terms here are negative-definite, except for one. The last term in δ 2 is proportional to the integral of the determinant of the 3 × 3 matrix c + . It is a symmetric traceless matrix (in an orthonormal basis), and its determinant is generically non-zero and can have either sign. However, its contribution is beaten by − 2 5 |c + | 2 in δ 1 , as long as yδ 1 + y 3 δ 2 gives a reasonable approximation. We conclude that Conjecture 3 has passed the test. In appendix A.2, we also consider the general case of Kapustin-Witten equations, that is, the case when φ y = 0. Then there exists an extra mode that, it seems, violates the negativity of h − h 0 , although we do not quite prove this.

Dualities
It has been observed in the literature that Teichmüller TQFT should be somehow related to SL(2, C) complex Chern-Simons theory at integer level k = 1. We propose that there in fact exists a duality between the two theories, which is generated by a particular element of the SL(2, Z) S-duality group of the N = 4 super Yang-Mills.
One encounters a serious difficulty in applying dualities to the brane configuration that we have used for Teichmüler TQFT. As a result, the relation with complex Chern-Simons theory will be partly conjectural, and the integration cycle in the dual theory will be fixed by an indirect argument.
We start with a discussion of simple half-BPS boundary conditions in N = 4 super Yang-Mills and their S-duality. The motivation is two-fold. First, this will help to appreciate the problems in properly establishing the duality with complex Chern-Simons theory. Second, we would like to gain better understanding of the blocks that appear in the decomposition (3.37) of the Teichmüller TQFT partition function. More specifically, one might think that there is a clash between S-duality and our conjecture about the integration cycle for Teichmüller TQFT. We proposed that on a hyperbolic three-manifold, the whole partition function is equal to the path-integral on a particular Lefschetz thimble. Naively, S-duality suggests that this integral is a holomorphic block, that is, a power series in q = exp(2πi/b 2 ). However, the Teichmüller TQFT partition function in known examples does not seem to admit such a presentation. (Instead, it can be factorized into a sum of products of series in q and q.) We explain what is wrong with this argument, and on the way make contact with the results of [46] on resurgence in Chern-Simons theory.

Half-BPS boundary conditions, blocks and Lefschetz thimbles
In flat space, the physical 4d N = 4 theory has SO(4) Lorentz and SO(6) R R-symmetry group. The supercharges transform under these groups as (2, 1) ⊗ 4 ⊕ (1, 2) ⊗ 4. To put the theory on a product four-manifold W × R + , one does a twist by a subgroup SO(3) X ⊂ SO(6) R , embedded in the obvious way. This leaves unbroken another subgroup of the R-symmetry, which we denote SO(3) Y . Its Cartan subgroup is the U(1) gh ghost number where V 2 is an invariant two-dimensional vector space. We choose a 1/2-BPS boundary condition which preserves the bosonic symmetries SO(3) W × SO(3) Y of the twisted theory. Then it also preserves an SO(3) Y -doublet of scalar supercharges, of which we pick the element of ghost charge plus one and declare it to be the topological supercharge Q. The doublet is tensored with a fixed vector in V 2 , determined by the boundary condition. This vector can be parameterized projectively by a possibly infinite complex number t, which is precisely the Kapustin-Witten parameter. Similarly, the boundary condition preserves an SO(3) Y -doublet of vector supercharges, times a vector in V 2 , which we parameterize by some t . If the boundary condition preserves the Lorentz symmetry SO(3) W of the untwisted theory, then t = t, but in general this need not be so.
A class of half-BPS boundary conditions can be obtained (at least for classical gauge groups) from a brane construction, where a stack of D3-branes in the type IIB string theory ends on a (p, q)-fivebrane [39,61]. One can also turn on a flux of the fivebrane U(1) gauge field. In order to preserve the twisted Lorentz group, the field strength should be proportional to the symplectic form on T * W , and therefore depends on a single parameter. It is not hard to show, as we do in appendix C, that such (p, q)-fivebrane boundary condition preserves supersymmetries with where ϑ p,q = arg(pτ + q), τ is the complexified string or Yang-Mills coupling, and β is a 2π-periodic angle, related to the magnitude of the fivebrane field strength. A (−p, −q) boundary condition with angle β preserves the same supersymmetry as a (p, q) boundary condition with angle π − β, and the two are in fact equivalent. The boundary conditions with β = ±π/2 are expected to be pathological, as we will see in some examples. Then it is enough to restrict to β ∈ (−π/2, π/2). The S-duality group SL(2, Z) acts on the 1/2-BPS boundary conditions [62]. In our conventions, the generator T transforms a boundary condition of type (p, q) into the one of type (p, q − p), and shifts the gauge coupling τ and the canonical parameter K by one. It leaves the supersymmetry parameters t and t invariant. The generator S transforms type (p, q) into type (q, −p). It changes the gauge coupling τ to −1/τ and the canonical parameter K to −1/K, and multiplies the supersymmetry parameters t and t by a phase −τ /|τ |. The angle β is duality-invariant. These transformation rules are consistent with the formulas (5.2) and (5.3) and with the definition (3.3) of the canonical parameter.

D5-type boundary condition
In our notations, (p, q) = (0, 1) corresponds to a D5-brane. In (5.2)-(5.3) in this case ϑ p,q = 0, so t and t are real. We parameterize R + (perhaps we should better call it R − ) by y < 0. The boundary condition at y = 0 is the tilted Nahm pole. It prescribes the fields to approach at y → 0 a model singularity where β is the angle determined by the fivebrane gauge field flux. As before, ω and e are the Levi-Civita connection and the vielbein on W . It is straightforward to see that for these fields the singular terms in the Kapustin-Witten equations (3.7) vanish, if t is related to β as in (5.2), with ϑ p,q = 0. With some work, one can also verify that this model singularity is invariant under the vector supersymmetries with parameter t (5.3), see appendix C. Interestingly, there are three possible values of the Nahm pole angle β for each real value of the Kapustin-Witten parameter t.
Consider the theory in the half-space W × R + with the tilted Nahm pole at y = 0 and with the fields approaching a fixed flat bundle a at infinity. It requires some care to define the instanton number for a gauge field with a singularity (5.

4). Let us set
is a function with f (y) = 0 for y < −3 and f (y) = tan β for y > −2 . (By assumption, β = ±π/2, since for those values the boundary condition is not expected to make sense.) The instanton number is set to be where F is the field strength for A . Since A is non-singular, this instanton number is finite. Clearly, it is also gauge-invariant. Equivalently we can write it as The counterterm in the second line subtracts the singularity. With the boundary condition (5.4)-(5.5), the instanton number s is Q-invariant and independent of the metric on W , but does depend on the framing. It takes values in where a is the flat connection at infinity. The partition function on W × R + is the so-called holomorphic or homological block, which we will also call a D5-block. It is equal to where q = exp(2πiK) and n β a,s is the signed count of solutions 22 to the Kapustin-Witten equations with the Nahm pole of angle β and the twisting parameter t determined by β.
One can make several remarks on this formula. First, it is a Laurent series in q, up to an overall prefactor with a non-integer power of q, determined by (5.8). An equivalent way of saying this is that the partition function Z D5 a is invariant under the transformation T from the SL(2, Z) S-duality group, provided that T is defined to act on the boundary conditions diagonally with eigenvalues T a,a = exp(−i Re CS(a)) . (5.10) Second remark is that the counts of solutions n β a,s are expected to be independent of β away from the values of the parameter t (which is related to β by (5.2) with ϑ p,q = 0) when there are flows connecting different complex flat connections. Across these walls, the counts of solutions change according to the Stokes coefficients. The blocks thus depend on β through their dependence on the chamber where they are computed. Another, related remark is that the parameters q and β are not quite independent. The quantum field theory instructs us to take q = exp(2πiK), where K is given by (3.3), which means that Of course, the gauge coupling g 2 YM can be varied at will, but only with the constraint that it stays positive. Therefore, for |q| > 1 the theory instructs us to restrict to chambers with t 2 < 1 or sin 3β < 0, and vice versa for |q| < 1. This becomes important when the series in (5.9) is infinite. A necessary condition for its convergence is that for |q| > 1, there exists a bound on the instanton number s from above, and for |q| < 1 there exists a bound from below. One may hope that the corresponding bounds exist in chambers with t 2 < 1 and t 2 > 1 respectively, although this hasn't been proved. Interestingly, the holomorphic blocks for knot complements, as computed in the N = 2 superconformal gauge theory [37], come in two versions, with the instanton number bounded on one or the other side.
It may be instructive to reflect on another possible use of the tilted Nahm pole boundary condition. So far we considered Teichmüller TQFT for real values of the coupling b 2 , but one may expect that the theory exists for complex values as well, because Virasoro conformal blocks certainly do. Tiechmüller partition functions defined in [22] make sense for b 2 on the complex plane with a cut along b 2 < 0.
An obvious generalization of our path-integral definition is to take the usual action (3.9) on the interval, but now with b 2 a complex number with some phase α. One would guess that the twisting parameter t now should be set to so that the Kapustin-Witten equations are [12] the gradient flow equations for the real part of ib 2 times the Chern-Simons action. The boundary condition on the left end of the 22 A mathematically-rigorous definition of this counting problem is not yet available due to problems with compactness of the moduli spaces [63]. Physics provides some examples of q-series that are good candidates for Z D5 a , so one may hope that eventually it will be possible to make sense of the counting problem.
interval now is a tilted Nahm pole, with the value of β chosen out of three possible values that are compatible with the given value of t. This is a nice Q-invariant setup, and the only question is whether the analog of Conjecture 1 holds, that is, whether the action is bounded from below. The answer to this question is likely to be negative. Indeed, consider a product three-manifold W R × C. The tilted D5-brane then reduces to some brane in the Hitchin sigma-model. As follows from (5.4)-(5.5), its support is the variety of opers, where the holomorphic structure of the bundle is defined by the operator D w This is related by a diffeomorphism to the usual variety of opers which has w = i. Note that this statement does not make sense, if β = ±π/2, so that the Nahm pole is entirely in the gauge field. We expect that for these values of β, the tilted Nahm pole boundary condition is pathological. The support of the brane is holomorphic in complex structure I w and Lagrangian for the corresponding holomorphic symplectic form. Equivalently, it is Lagrangian for ω J and ω I sin 2β + ω K cos 2β . (5.14) On the other hand, symplectic form in the A-model determined by t = − tan(π/4 − 3β/2) is equal to ω I sin 3β + ω K cos 3β . Unless β = 0 or π, the support of the brane is not Lagrangian for the symplectic form! Since the action is Q-invariant by construction, it means that the brane supports a complex Chan-Paton gauge field, whose curvature cancels the symplectic form, restricted to the brane. 23 There seems to be no way to make the action bounded from below with such a brane, at least if the other end of the string is on a coisotropic brane.

NS5-type boundary condition
For an NS5-type 1/2-BPS boundary condition, we have (p, q) = (1, 0) and ϑ p,q = ϑ ≡ arg(τ ). The action of the theory on W × R + with this boundary condition put at y = 0 is where Chern-Simons functional is evaluated at y = 0 and should be understood in the sense explained after eq. (3.10). The complexified gauge field A u = A + uφ is defined with parameter This formula for u was obtained in [40] for the boundary condition with β = 0 and t = t, and the generalization is derived in our appendix C. Note that u becomes infinite and the action (5.16) makes no sense for β = ±π/2, which is also when in the S-dual theory 23 We see in particular that the usual brane of opers, or any brane related to it by Hitchin diffeomorphism C * , cannot be obtained by reduction from a brane with three-dimensional Lorentz symmetry.
the tilted Nahm pole is unlikely to be a good boundary condition. Quite curiously, for β = ±π/4 the imaginary part of u vanishes. These values must be special for the NS5 boundary condition, but seem completely regular on the dual D5 side. We do not know, how to interpret this.
In topological theory, one usually looks at a different, "topological" NS5-type boundary condition, which is not 1/2-BPS, but has the advantage of possessing a clear interpretation. There, u is set to i and t is chosen to be real and determined by the phase of the canonical parameter as in eq. (5.12). It is easy to see that this topological boundary condition does not belong to the 1/2-BPS family. The path-integral on a half-space in this setup, with the fields approaching a complex flat bundle a at infinity, is what in eq. (3.36) we introduced as Z NS5,top a (K). It is the Chern-Simons path-integral on a Lefschetz thimble, with some classical piece subtracted to make it independent of lifts of the flat bundle. We will call it a Lefschetz block.
The problem with the topological NS5-type boundary condition is that we do not have any useful description for its S-dual. To understand dualities, we have to work with 1/2-BPS boundary conditions. Hence we define Z NS5,β a (K) to be the partition function on W × R + with the 1/2-BPS NS5-type boundary condition with angle β. We call this an NS5-block. The question is, what is this quantity? The action (5.16) suggests that it must be Chern-Simons partition function 24 on W with some integration cycle which is determined by a and the couplings. The difference with the topological setup are the values of t and u, given by (5.2) and (5.17). One might assume that this difference is an inessential nuisance, and Z NS5,top a and Z NS5,β a are just equal. The factor u can be transformed into ±i by a y-dependent field redefinition, and the Q-exact terms perhaps can also be changed. One problem is that it would be hard to reconcile this with the Stokes phenomena on the two sides of S-duality. More practically, the problem is that, while deforming these terms, one has to ensure that the action stays bounded from below. Otherwise we may start with one admissible integration cycle and end with another. We propose that NS5-blocks and Lefschetz blocks are not identical, and the formulas (5.2) and (5.17), though admittedly a little obscure at first sight, have physical meaning. It would be interesting to verify, whether or for what three-manifolds the action of the theory on W × R + with these values of the parameters is bounded from below, so that the NS5-blocks are well-defined.
A basic fact that we know about the NS5-block is that it is related to D5-blocks by S-duality, where S a,b are matrix elements of the action of S-duality on the integration cycles. In this formula, q = exp(−2πi/K). (It is the same q as we defined in the S-dual theory, since −1/K here is equal to K there.) The S-duality matrix elements are expected to be some coupling-independent numbers. (For abelian flat connections, they were obtained in [58].) We learn that Z NS5,β a has an expansion in (not necessarily integer) powers of q. It is locally 24 Again, with some trivial classical piece subtracted.
independent of β, but jumps when β crosses chamber boundaries. The gauge coupling τ in the theory is determined 25 by K and β.
The twisting parameter t, as given by (5.2) for a supersymmetric NS5 boundary condition, generically is complex. It means that we cannot localize onto solutions of the BPS equations. (Indeed, the Q-exact terms are not a sum of positive squares.) Still, we can say something about the NS5-block by scaling both τ and K by the same large factor. In this semiclassical limit one expects on general grounds that fields in the path-integral will tend to stay near the values, specified by the classical vacuum a at infinity. 26 The Q-exact terms in the action (5.16) then vanish, since complex flat connections solve the KW equations for any t. Now, for our simple argument to work, these values of the fields better also be a critical point of the boundary Chern-Simons functional. Because u = i, this is not always true. Assume however that a is abelian. Then u does not matter, and we observe that the supersymmetric NS5-block includes a contribution from the Lefschetz thimble, corresponding to a. It may also have subleading contributions from lower-lying flat connections. For blocks labeled by non-abelian connections, we currently can say nothing about their decomposition in thimbles.
In fact, the formula (5.2) does allow values of t for which localization is possible, namely, t = 0 or t = ∞. For definiteness, we consider t = 0. To get the simplest interpretation in terms of Lefschetz thimbles, we also take K ∈ iR + , which is when the KW equations with t = 0 are gradient flow for the right functional. To have t = 0, one can take β = π/2, π/6 or 5π/6, which corresponds to u = ∞, i/ √ 3 and −i/ √ 3. The first choice is pathological, while the other two are equivalent up to an R-symmetry transformation, therefore we set β = π/6. The path-integral for Z NS5,π/6 a becomes the integral over the usual Lefschetz thimble for K ∈ iR + of the Chern-Simons functional, in which the imaginary part of the gauge field has been rescaled by 1/ √ 3. This integral must be well-defined, if we believe that the NS5-blocks make sense. Without the rescaling, it is also well-defined and is equal to the Lefschetz block. Then it is natural to expect that u can be deformed from i/ √ 3 to i, with the path-integral being well-defined all the way. Therefore, in the special case of β = π/6 and K ∈ iR + , NS5-blocks and Lefschetz blocks are the same thing. Actually, this statement needs a small correction. For t = 0, the integral preserved by the flows is the same for any two unitary flat connections. Thus, there will be many flows between critical points. (These flows are what one studies in the usual Floer theory.) This makes some Lefschetz thimbles non-compact and Lefschetz blocks not well-defined. However, for the NS5-block, taking t → 0 should not be a singular limit. The simplest guess about how to make sense of it is to replace Lefschetz blocks by a symmetric combination just to the left and to the right of the Stokes line. Thus we may expect that for It can be shown that τ lies on a semicircle in the upper half-plane, based at the points 0 and |K| 2 / Re K.
The point on the semicircle is determined by β and the phase α, except when K is real. In the latter case, τ can lie at any point of this semicircle [61]. 26 Provided that a is an isolated flat connection. This formula nicely matches some known facts. In [46] it was observed in examples that Chern-Simons integrals on Lefschetz thimbles in general do not possess presentation as series in q. However, a spectacular finding of that paper is that, if one forms the combination (5.19), it does have such a presentation, which can be then converted into a series in integer powers of q by making combinations with coefficients S a,b . (A string theory motivation and many examples of such series can be found in [58,64]) It was also found that to reproduce the partition function of the ordinary, unitary Chern-Simons theory, for the examples considered in [46,58,64] it is enough to consider (5.19) with abelian flat connections only. Our discussion seems to imply that NS5-blocks labeled by non-abelian flat connections also make sense, although for them it may be more difficult to find the S-duality transformations.
There certainly are lots of questions about the NS5-blocks that deserve better understanding. For the purposes of this paper, the takeaway of the discussion is that one should be careful with Q-exact terms, if one wishes to understand the integration cycles. S-duality works if one uses half-BPS boundary conditions, but it is unclear what is the dual of the topological NS5-type boundary condition. This will make it difficult to apply dualities to the brane setup for Teichmüller TQFT.
The blocks Z NS5,top a generally do not need to have presentation as power series in q. In particular, our conjectures of section 4 do not contradict S-duality.

Complex Chern-Simons theory from super Yang-Mills theory
Let us put the twisted super Yang-Mills theory on an interval with an NS5-, or equivalently (1, 0)-type boundary condition on one side and a (1, k)-type boundary condition on the other side, as shown on figure 6. The (1, k)-type boundary condition is the same as the NS5-type, except that there is an extra Chern-Simons term with a coupling constant k ∈ Z, supported at the boundary. The argument of the super Yang-Mills path-integral can be written as where K r = K + k, K = K, and K is the canonical parameter. Another useful parameterization is The complex gauge fields in the action are where the fields A and φ are the restrictions of the corresponding bulk fields onto the boundary, and u and u r are some complex parameters. We did not specify the boundary conditions precisely. They might be 1/2-BPS, in which case u and u r are determined by the formulas (5.17), or it may be that the two parameters are set by hand to ±i or some other values. We only require that their imaginary parts be non-zero. Any such boundary coupling can be made Q-invariant by a suitable choice of the boundary conditions for the fermions.
We do not specify exactly the Q-exact terms in the action either. All that is needed from them is that the path-integral (5.20) does not diverge, so the real part of the action in (5.20) better be bounded from below. Whenever it is possible to make sense of the path-integral, it defines a partition function in some analytically-continued complex Chern-Simons theory with the couplings (5.21) and some integration cycle C(K) which inevitably has to depend on the canonical parameter, because of the Stokes phenomena. (For a given K there may be more than one way to choose the Q-exact terms, which cannot be deformed into one another while keeping the action bounded from below. Then there will be several inequivalent versions of complex Chern-Simons theory with different integration cycles.) The integration cycle can be expanded as Previously, we only needed Lefschetz thimbles for α = 0, that is, t = −1.) The sum in (5.23) goes over lifts of the flat bundle a r , while the lift of a is some fixed s 0 . The reason is that, as long as k is an integer, the action (5.20) is invariant under simultaneous large gauge transformations of the right and the left gauge fields, and therefore summing over both lifts would be redundant.
We expect that the sum includes only stable critical points. Unstable flat connections do not contribute as a consequence of the moment map equation d * A φ = 0. Reducible connections should not contribute because of the vanishing phenomena related to the multiplet of the super Yang-Mills field σ, as was explained in section 3.3 for Teichmüller TQFT. To make this argument precise, we would need to show that the expansion (5.23) can be interpreted as coming from stretching the interval I. We cannot show this precisely without a good understanding of the Q-exact terms in the action, but the conclusion is very likely to be correct. In a special case, an alternative argument will be given later.
Let us make some general comments on complex Chern-Simons theories and their analytic continuation, following [24,26]. The space of states in such a theory is naturally a module for the algebra of quantized holonomies A q ⊗ A q of complex gauge fields A r and A . The parameters here are q = exp(2πi/K r ) , q = exp(−2πi/K ) . (5.25) This property seems to characterize the space of states uniquely. One can construct these modules, say, for real values of the coupling v, when the usual path-integral definition of complex Chern-Simons theory makes sense, and then continue the wavefunctions to complex v. In this sense, for any complex value of the coupling apart from the strong coupling singularities v = ±ik, Chern-Simons theory exists and is unique. (Something special might also happen when K is rational and q and q are roots of unity.) However, the space of states does not quite define a quantum field theory. For any orientation-reversing isomorphism of a pair of two-manifolds, we need a universal instruction on how to pair the states in the corresponding vector spaces. Since spaces of states in complex Chern-Simons theory are infinite-dimensional, one has to make sure that the corresponding integrals of products of wavefunctions do not diverge. An inner product on the states is a necessary part of a quantum field theory.
At the level of path-integrals, a quantum field theory is defined, once we have a universal rule to ascribe integration cycles (5.23) to three-manifolds, in a way consistent with factorization.
One obvious case is when v ∈ R and the usual Chern-Simons path-integral makes sense. We will construct this theory in the super Yang-Mills language in a moment. We do not know, if this definition can be continued to complex values of v. We will also propose that there exists another version of complex Chern-Simons, for which we know the integration cycle for imaginary v with |v| > k.

The usual complex Chern-Simons theory
Restrict for a moment to K ∈ − k 2 +iR, so that the coupling constant v in (5.21) is real. Also, set u r = i and u = −i. For the Q-exact terms, we take the usual squares of the Kapustin-Witten equations with the parameter t determined as in (5.12) in terms of α = arg(k + iv). Then it is easy to see that the action in (5.20) is bounded from below, and therefore we have a consistent quantum field theory.
The interval I can be taken to be very small, in which case the fields have no time to fluctuate between y = 0 and y = y 0 , and in the path-integral (5.20) we simply have A = A r . Upon reduction on the interval I, we obtain the usual complex Chern-Simons theory with real coupling v.
On the other hand, take the interval I to be very long. Then the path-integral decomposes into a sum of products Z NS5,top a Z NS5,top a , proving that the integration cycle is where α = arg(k + iv). Both left and right instanton numbers are fixed to some s 0 , on which nothing depends.
This formula is consistent with the Stokes phenomena. Indeed, looking at the flow equation (5.24) one observes that if there is a flow at angle α from a to b, then there is a flow at angle −α from b to a. At the corresponding Stokes wall, the jumps of the summands for a and b in (5.26) cancel out, and the cycle stays invariant. 27 For consistency of this argument it is important that a reducible critical point cannot attach to an irreducible one.
Let us comment further on the fact that reducible connections do not contribute to (5.26). One way to see it is the argument about wavefunctions for the multiplet of the field σ, as we explained in section 3.3. More intrinsically, in complex Chern-Simons theory it can be understood as follows. In general, in expanding a path-integral near a reducible connection in gauge theory, one has to divide 28 by the volume of its isotropy subgroup. In complex Chern-Simons theory, isotropy subgroups are complex and their volumes are infinite. Equivalently, in a formulation of the theory where the complex part of the gauge group was gauge-fixed, these 1/∞ = 0 factors appear from zero modes of the ghosts. To obtain explicitly the complex Chern-Simons theory from our Yang-Mills setup, one makes a reduction on the interval I. There is no complex gauge symmetry before the reduction, so it should automatically come as gauge-fixed after the reduction. One expects that the ghost multiplet would appear from the multiplet (3.38), making contact between the two arguments for why reducible connections do not contribute.
One may think that throwing out reducible connections might be at tension with factorization in Chern-Simons theory. We had a very similar problem in eq. (3.37), where we were cutting the interval I, and the solution was to keep track of the Hilbert space of the multiplet of σ. Similarly, one expects that to make factorization work in cutting the three-manifold W , one should be careful with the Hilbert spaces of the ghosts. Similar phenomena are important for supergroup Chern-Simons theory [65].
To define the quantum field theory away from v ∈ R, we would need to somehow pick the Q-exact terms in (5.20) to keep the action bounded from below for generic complex K. We currently do not know, how to do this.
For our following discussion it will be important that the analytic continuation of the partition functions of this ordinary complex Chern-Simons theory is expected to have at least three essential singularities in the plane of complex v. Two of them are the strong coupling singularities v = ±ik, where the coefficient of one of the Chern-Simons terms in the action vanishes. The third is the weak coupling singularity v → ∞. It is indeed an essential singularity, unless all complex flat connections on W are actually unitary.
The integration cycle generically has non-trivial Stokes monodromies around each of the singularities. Clearly, it must be impossible to choose the Q-exact terms in the Yang-Mills action universally and consistently for all complex values of the coupling. 27 To be precise, we need to keep track of the instanton numbers. The flow may connect, say (a, s0) to (b, s1). The argument still works, since we divide by simultaneous large gauge transformations on the left and on the right, and that identifies cycles C α (a 1 ,s 0 ) × C β (a 2 ,s 0 ) with different s0. 28 Provided that the manifold is such that global gauge transformations are actually gauge, and not a part of the global symmetry.

An unusual complex Chern-Simons theory
Let us answer the following question: does there exist an integration cycle for complex Chern-Simons theory, such that the partition function has no essential singularity in the weak coupling limit? (Everywhere by weak coupling limit we mean the limit of large coupling v. The integer level k is kept fixed.) There are plenty of integration cycles, such that the partition function is finite, say, for v → +∞. But the requirement that it does not blow up when v approaches the infinity from any direction is very restrictive. As explained in section 3.2.1 of [12], it implies that the integration cycle contains only critical points with zero action, for any phase of v. It means that the integration cycle (5.23) has to be for some numbers n a that possibly depend on arg(v). (We are assuming that the Chern-Simons action is different for all irreducible flat connections, so that no cancellations are possible.) Suppose that at a Stokes wall at some arg(v), there is a flow between critical points a and b, so that a Lefschetz thimble jumps, . (5.28) The thimbles with angles differing by π are dual, and therefore there is also a jump in the integration cycle, which violates the requirement of zero action. Therefore, for any value of arg(v), the coefficients n a must be equal for all a, and we may as well set them to one. The resulting integration cycle There is a gap in this argument. To equate all the coefficients n a , we need to assume that for each pair of the critical points there exists a Stokes line for some value of the phase arg(iv). This sounds like a plausible assumption generically, unless there is some special reason for the flows not to exist. Sometimes there is indeed a simple topological reason: flows cannot connect flat bundles of different topology. Thus in general, one may modify the expansion (5.31) by coefficients that depend on the topology of the bundle. Say, for gauge group SO(3), they may depend on the Stiefel-Whitney class.
Can we move away from infinity, while maintaining the cancellation of the Stokes jumps? The requirement for this is that arg(−K) = π + arg(k + K), or This means first of all that when finite, K should be real. 30 The inequality says that K can be moved from infinity along the real line, until we hit a strong coupling singularity. We cannot continue the integration cycle (5.31) to the interval between the two singularities. At present, we do not know, how to choose the Q-exact terms in the super Yang-Mills action (5.20), so as to construct complex Chern-Simons theory with this unusual integration cycle. We strongly believe that it should be possible, as follows from some duality arguments, to be presented in a moment, as well as a reduction from the sixdimensional (2, 0) theory, which is explained in section 6. If such construction is possible, it would mean that this Chern-Simons theory is an actual quantum field theory, and not just a set of partition functions.
Assuming optimistically that this is a quantum field theory, we may wonder, whether it can be unitary. Of course, this cannot be true for any complex coupling constants, but we can restrict to real K, which is when our integration cycle makes sense. A change of orientation of the manifold W should act on the partition function by complex conjugation. First, it flips the sign of the Chern-Simons action. Since the coupling constant is real, for this to be equivalent to complex conjugation the gauge fields should also get conjugated. The integration cycle (5.31) is invariant under the orientation flip, but it is also real, and therefore conjugating the gauge fields makes no difference. Our Chern-Simons theory, if it exists, would be an example of the "second unitary branch" [3].

Dualities of Teichmüller TQFT
Having a realization of Teichmüller TQFT in terms of the N = 4 super Yang-Mills theory, it is natural to try to act on it with elements of the S-duality group. In doing so, we would like to keep the boundary conditions simple. By that we mean that they should be of the D5-, NS5-or (±1, k)-type, which are the cases that do not involve strongly coupled boundary theories. There are, up to trivial equivalences, only three elements of SL(2, Z) that transform our D5-NS5 system into something with simple boundary conditions. The resulting brane configurations are shown on figure 7. These dualities have been used recently in [66] in the study of vertex algebras at the corner of some slightly more general brane configurations.
Unfortunately, applying S-dualities to our brane setup is not as straightforward as one might hope. The reason was explained in section 5.1: the "topological" NS5-brane, used in the definition of Teichmüller TQFT, is not 1/2-BPS, and it is not clear, what are its duals. We are not being overly pedantic: as it was explained, ignoring these subtleties, say, for NS5-blocks and Lefschetz thimbles would lead to manifestly wrong predictions. 30 A slight subtlety is that for real K there generically exist flows, connecting pairs of complex conjugate critical points. To define the integration cycle, we would need to displace infinitesimally from the Stokes wall. But since it is invariant under Stokes jumps, it does not actually change across the wall. However, some observations suggest that in the case of Teichmüller TQFT, the dualities should work. First, the Liouville theory has symmetry b → b −1 . In the mathematical construction of Teichmüller TQFT [22], this symmetry is maintained. (In physics literature, this duality in Teichmüller TQFT was considered in [19].) Second, it is an experimental fact that the partition function of Teichmüller TQFT admits expansions into holomorphic blocks [26,37,67] Z which are Laurent series in q and q. Based on these observations, we propose that it is possible to deform the super Yang-Mills configuration for Teichmüller TQFT to make the NS5 brane half-BPS. To do so, one first needs to rescale the field φ near the NS5-brane, in order to change the parameter u in the complexified gauge field A = A + uφ from u = i to u = i sin ϑ. Then one changes the Q-exact terms in the action, so that near the NS5-brane they correspond to the Kapustin-Witten parameter t given by (5.2) for the half-BPS (1, 0)-brane. The result is a Janus configuration, where t varies with y from t = −1 at the D5-brane to t = −|τ |/τ at the NS5brane, which now is a supersymmetric (1, 0)-brane with angle β = 0. The gauge coupling τ also varies, so that the canonical parameter K, as defined in (3.3), stays constant, which is needed for the Janus configuration to be Q-invariant. This is possible to achieve with real g 2 YM and θ YM , as long as t stays on the unit circle. We will call this super Yang-Mills setup the BPS setup for Teichmüller TQFT. It should be possible to make all these deformations, while keeping the action bounded from below. So far, we were not able to prove this directly.
The Janus configuration is not 31 half-BPS. However, there is an obvious proposal for how the S-dualities should act on it. One simply acts on the gauge coupling τ and the parameter t at each value of y according to the usual rules, valid for y-independent couplings. This should work at least when the couplings vary with y slowly, and hopefully also more 31 Indeed, a half-BPS Janus configuration preserves the same supersymmetry as a (p, q)-brane [61]. It is not possible to interpolate between two half-BPS branes of different types with a half-BPS Janus configuration. generally. 32 The experimental facts listed above can now be easily understood. Under the basic S-duality, the BPS setup for Teichmüller TQFT is mapped into itself, hence b 2 → b −2 indeed should be a symmetry of the theory. (To see this precisely, one has to combine the S-duality shown on figure 7 with a reflection in y.) The decomposition (5.33) is also evident: by stretching the interval, we decompose the partition function into blocks, which for supersymmetric branes are related by S-duality 33 to suitable versions of D5-blocks, and those are Laurent series in q or q.
Further support to the idea that Teichmüller TQFT can be engineered by the BPS setup comes from the 3d-3d correspondence. Teichmüller TQFT partition functions can be computed in 3d N = 2 superconformal theories on squashed three-sphere backgrounds. As we explain in section 6, reducing the 6d (2, 0) theory on these backgrounds very naturally produces our BPS setup with half-BPS boundary conditions and a Janus configuration. Unfortunately, in this story there exists an echo of the problems with the actions that are potentially unbounded from below, which is the fact that the squashed three-sphere backgrounds are complex. Now that we believe that S-dualities make sense, we can look at the two remaining arrows on figure 7. But before that, we have to make a small comment. We will not be careful with the global forms of the gauge group. In the basic S-duality that acts by b 2 → b −2 , the gauge group SO(3) changes into SU(2). (If there is a discrete theta-angle turned on before the duality, then the gauge group remains SO(3).) Whatever the gauge group in the dual theory is, the D5-type boundary condition fixes the gauge bundle to be 32 There may be subtleties in understanding duality transformation of Q-exact terms that involve yderivatives of the couplings. 33 A D5-block has an expansion in integer powers of q, multiplied by a prefactor with a non-integer power.
An NS5-block is a combination of such blocks with coefficients S a,b . Yet, in the cited papers it is found that both Ba(q) and Ba( q) are series in integer powers, up to an overall prefactor. The reason must be that for the class of examples considered in those papers, S-duality acts on flat connections diagonally.
topologically trivial, so the theories with different global forms of the gauge group should be essentially the same. Admittedly, a more careful argument is needed to fix factors like the volume of the center, and possible signs from discrete theta-angles. Unfortunately, we cannot consider these details here. In the following discussion, we will similarly not pay attention to the global form of the gauge group in the dual complex Chern-Simons theories. We hope to revisit these questions in the future. First, let us focus on the brane configuration on the lower left of figure 7. As was explained earlier in this section, it defines a complex Chern-Simons theory with the couplings We will call this theory CS-I. What is its integration cycle? Teichmüller TQFT was defined for b 2 > 0, but it is a mathematical fact [22] that its partition functions can be smoothly continued to the complex b 2 -plane with a cut along the negative real axis. (From the point of view of its path-integral definition, this is not at all surprising.) According to (5.35), the point b 2 = 1 should be the weak coupling singularity for CS-I, yet we see that the partition function is perfectly smooth at and around this point. This fixes CS-I to be the "unusual" theory of section 5. (3), there are additional choices in fixing the integration cycle, as well as some interesting subtleties related to the fact that k = 1 is not a properly quantized coupling for a Chern-Simons term.) On figure 8, we have drawn the complex b 2 -plane. Teichmüller TQFT with its usual integration cycle is defined on the ray b 2 > 0, or c > 25. The limits b 2 → +∞ and b 2 → 0, or equivalently c → +∞, are the weak/strong and strong/weak coupling limits for the two Sdual versions of Teichmüller TQFT. For CS-I, these two points are the strong coupling singularities. The theory with its integration cycle (5.31), according to the inequality (5.32), is defined precisely for b 2 > 0. Its weak coupling point b 2 = 1 corresponds to c = 25. Unitarity of Teichmüller TQFT for b 2 > 0 implies that CS-I is also unitary, which is consistent with the properties of its partition function, explained in section 5.2.2. Now we turn to the lower-right corner of figure 7. There, we have a Chern-Simons theory, to be called CS-II, with coupling constants

(If the gauge group is SO
or equivalently This is the formula 34 obtained by Cordova and Jafferis [33] by reduction of the 6d (2, 0) theory on a three-sphere. We see that there are in fact four different but dual Chern-Simons-like theories that can be obtained in this reduction, and the formula (5.37) is a 34 To be precise, in [33] a factor of i seems to be missing in v.
consequence of S-duality. We will present a new simple method to do reduction from six dimensions in section 6. CS-II has strong coupling singularities at b 2 = 0 and b 2 → ∞, and its weak coupling point would be at b 2 = −1, or c = 1. It must be some unitary complex Chern-Simons theory, defined for b 2 > 0, which on this ray is never weakly coupled. This makes it difficult to identify its integration cycle, and we can only speculate.
One possible guess is that it is the "unusual" Chern-Simons theory for b 2 < 0, analytically continued to positive b 2 . (Then one has to specify, whether it was continued through the upper or the lower half-plane.) The argument in favor of this guess is that, according to the definition of Teichmüller TQFT, it should be possible to continue its partition function to the left half-plane, and there seems to be no reason for it to be singular at b 2 = −1. The argument against this guess is that it would imply, via dualities, that analytic continuation of Teichmüller TQFT to negative b 2 is again (the complex-conjugate of) Teichmüller TQFT. This is a highly non-trivial constraint on the Stokes behavior of the integration cycle S, and we currently do not see any reason for it to be correct.
For |b 2 | = 1, the coupling constant v in both CS-I and CS-II is real, in which case the usual complex Chern-Simons integration cycle makes sense. Is it possible that CS-II, continued to the unit circle in the b 2 -plane, is the usual complex Chern-Simons theory? If so, it would mean that the analytically-continued Teichmüller partition function has an essential singularity at b 2 = −1, of the form dictated by the integration cycle (5.26). It is hard to imagine how this could happen, but to make a definite conclusion, we would need to look more carefully at Teichmüller partition functions in examples.
There clearly still is a lot to understand in this story. Let us mention just one particular point. For b 2 living on the unit circle, it makes sense to choose the usual real integration cycle for complex Chern-Simons theories with the coupling constants (5.35) or (5.37). Most likely, such theories are not related to Teichmüller TQFT by any simple analytic continuation. Yet, their Hilbert spaces are naturally the spaces of Liouville conformal blocks, in the sense that each of them is a module for A q ⊗ A q with the dual values of the parameters q = exp(2πi/b 2 ) and q = exp(2πib 2 ). The Hilbert space structures on these vector spaces however have no reason to be related to those in Teichmüller TQFT. By putting these Chern-Simons theories on an interval with suitable boundary conditions, 35 one may hope to obtain an analog of the Liouville theory which is well-defined in the region 1 < c < 25 and is weakly coupled for c → 1 or c → 25.

Reduction from six dimensions
Chern-Simons theories with complex gauge groups can be obtained by reduction from the six-dimensional (2, 0) theory. This fact was first understood in the context of 3d-3d correspondence [28] (see also [26]), and then was derived explicitly in [31][32][33]. Here we would like to exhibit, how one can obtain the same results using the approach via N = 4 super Yang-Mills theory, taken in the present paper, combined with some recent developments on rigid supersymmetric theories in curved backgrounds [34]. This will also clarify, how our story fits into the bigger context.

The geometry
To get Chern-Simons theory with a complex simply-laced gauge group G C on a threemanifold W , one starts with the corresponding ADE 6d (2, 0) theory on a product manifold W × L, where L is one of the lens spaces. The theory should be coupled to a suitable supergravity background, so as to preserve some supersymmetry. In the topological theory, the preserved supercharge would then become a BRST operator. The 6d (2, 0) theory has SO(6) Lorentz group and SO(5) R R-symmetry group, and supercharges transforming in the 4 + ⊗ 4 spinorial representation. We first put the theory on W , making a topological twist by identifying a subgroup SO(3) W ⊂ SO(6) of the Lorentz symmetry with a subgroup SO(3) X ⊂ SO(5) R of the R-symmetry, embedded in the obvious way. The twist preserves four supercharges, and we formally view the 6d theory on W × R 3 as a 3d N = 2 supersymmetric theory on R 3 . (The preserved R-symmetry group, to be denoted SO(2) Y or U(1) Y , is the commutant of SO(3) X in SO(5) R .) If we were to take the volume of W to zero, the compactified theory would flow to the three-dimensional N = 2 superconformal theory T [W ] [13,25], but we do not take this limit. The next step is to compactify the remaining three flat directions onto the lens space L.
A 3d N = 2 supersymmetric theory cannot be twisted so as to preserve some supersymmetry on a general curved three-manifold. However, it can be put in a supersymmetric way on some three-manifolds. This is done by coupling to a particular N = 2 supergravity background which is more complicated than just a flux of the R-symmetry gauge field. 36 For this background to exist, the three-manifold has to admit an extra geometric structure [34], known as the transversely-holomorphic foliation (THF), compatible with the metric. A detailed exposition on THFs and rigid supersymmetry in three dimensions can be found in the original papers [34,35]. A short summary is also given in our appendix B. Here we will need some basic statements.
A THF is a natural three-dimensional analog of an integrable complex structure. It is defined by an equivalence class of coordinate atlases, where the local coordinates are a real 37 t and a complex z, and the allowed coordinate transformations are t = t + f (z, z), z = g(z), with g(z) holomorphic. These are called the adapted coordinates. A metric is called compatible with the THF, if the vector ∂ t is unit and the metric is Hermitian when restricted onto planes, orthogonal to ∂ t . Having a THF on a three-manifold, very roughly speaking, allows to twist an N = 2 supersymmetric theory by turning on a U(1) R-symmetry flux that compensates for the spin-connection holonomies in the ∂ z -planes. This intuition is made precise in [36].
For our application, the curved three-manifold is a lens space L. It can be presented as two solid tori, glued together by a PSL(2, Z) transformation. Equivalently, it is a T 2 -bundle over an interval, where particular one-cycles of the torus shrink at the ends of the interval. 36 The systematic exploration of rigid supersymmetric theories in curved space was initiated in [68]. For a recent review, see [69]. 37 Not to be confused with the Kapustin-Witten parameter t.
We choose to work with a simple class of metrics on L which have two Killing vectors along the fibers, ds 2 = dy 2 + a Im τ (dϕ 1 + Re τ dϕ 2 ) 2 + (Im τ dϕ 2 ) 2 , (6.1) where y parameterizes the interval I [0, ], and ϕ 1 and ϕ 2 are angular coordinates on the torus fiber, both with period 2π. The torus area 4π 2 a > 0 and the modular parameter τ , Im τ > 0, are functions of y. Near y = 0 or y = , where some one-cycle shrinks, these functions should behave suitably to have a smooth metric.
As explained in [34], to define a THF, compatible with a given metric, it is sufficient to pick a real unit vector field ξ, satisfying a particular integrability condition. The adapted coordinates can then be introduced so that ξ = ∂ t . We will be interested in the case that the background preserves at least two supersymmetries ζ and ζ of opposite U(1) Y -charge. Their anticommutator generates a translation along some, possibly complex, Killing vector K. For the metric (6.1), Killing vectors, up to scaling, can be parameterized as where κ ∈ C ∪ {∞}. (A minus sign was introduced for future convenience.) A particularly simple case is when the two supersymmetry generators ζ and ζ are Hermitian conjugates of each other. Then κ ∈ R ∪ {∞}, and (as shown in [34]) the unit vector ξ which defines the THF is equal to K/|K|. The opposite is also true: if K is some real nowhere vanishing Killing vector, then the unit vector field ξ = K/|K| satisfies the integrability condition and defines a THF which preserves two conjugate supersymmetries. To avoid possible confusion, let us stress that the fibers of the THF are not the tori y = const. We remark that some combinations of ∂ ϕ 1 and ∂ ϕ 2 vanish at the ends of the interval. This excludes two (or one, if our lens space is S 1 × S 2 ) possible values of κ.
Importantly, the partition function (and supersymmetric observables) on a three-manifold depends holomorphically on the THF, but is independent of the details of the compatible metric [35]: the changes of the metric with fixed THF induce changes of the action, which are exact in preserved supersymmetries. In appendix B we apply this statement to our setup. We show that, at least for real κ, this fact implies that the partition function depends on κ, but is independent of τ (y) and a(y), as long as they behave well near the ends of the interval. We will assume, though we did not prove it, that this logic extends to complex κ as well: a general complex Killing vector (6.2) defines a THF, preserving two supersymmetries of opposite chirality, and the supersymmetric partition function is a holomorphic function of κ, independent of τ (y) and a(y).
Keeping κ fixed, we are allowed to deform the metric so that the typical size of the torus fiber is much smaller than the size of the base interval I, a(y) 2 . The functions τ (y) and a(y) can be taken to be slowly-varying, or even constant away from the ends of the interval. In this case the 6d (2, 0) theory can be reduced on the torus fiber, giving the topologically-twisted N = 4 super Yang-Mills theory on I × W , with some boundary conditions at y = 0 and y = . We choose the reduction to go first on ϕ 1 and then on ϕ 2 . Then the complexified four-dimensional gauge coupling is equal to τ . It may be a non-trivial function of y, which case in gauge theory is known as a Janus configuration [61].

Matching the parameters
The six-dimensional configuration on W × L has reduced to the four-dimensional twisted super Yang-Mills theory on W × I. Let us understand this reduction in more detail. First, suppose that the gauge coupling τ is constant. As we recalled in section 5.1, the topologically twisted Yang-Mills theory on W × I has four scalar supercharges, which transform as two doublets of the unbroken R-symmetry group SO(3) Y . In (5.1), we introduced the notation 2 ⊗ V 2 for the space of these supercharges, with V 2 being the multiplicity vector space. The BRST supercharge Q was chosen to be some vector in 2 (declared to be of ghost charge plus one) times a vector in V 2 , parameterized by the twisting parameter t. The action of the theory can be recast in the form (3.2), which we repeat here for convenience, Starting from this expression, it is easy to write a BRST-invariant action for a Janus configuration, that is, to make the coupling constant τ a function of the coordinate y on the interval I. One simply takes both τ and 38 t to be y-dependent, so that their combination (6.4) stays constant. The action is the same expression (6.3), where the gauge fermion, on which Q is acting, is now defined with y-dependent parameters. Because the action preserves the SO(3) Y symmetry, the Janus configuration constructed in this way is invariant under two supercharges of opposite ghost number, which are Q itself and its SO(3) Y transformation. This Janus configuration must be precisely what one obtains from six dimensions by reducing on a torus fiber in the lens space L. But how do we match the parameters? The partition function of the (2,0) theory on W × L depends holomorphically on the THF parameter κ, while its dependence on the modular parameter τ (y) of the torus fiber is Q-exact. Similarly, the twisted super Yang-Mills theory partition function is independent of the coupling constant τ (y), as long as one keeps fixed K, on which it depends holomorphically. We note that under large diffeomorphisms of the (ϕ 1 , ϕ 2 ) torus the THF parameter κ transforms by a Möbius transformation. In four dimensions, these diffeomorphisms become S-dualities, and the canonical parameter K transforms under them in the same way [41]. Thus, we are led to conjecture that K = κ. Let us verify this explicitly. Again, we restrict to the case that κ is real. It is convenient to use string theory language. The N = 4 super Yang-Mills theory can be obtained (for a unitary gauge group) on a stack of D3-branes wrapped on W × I in the type IIB string theory. For a moment, forget about the boundary conditions and the variation of τ . The space-time is T * W × R × R 3 with coordinates x 0 , x 1 , x 2 along W , x 4 , x 5 , x 6 along the fibers of the cotangent bundle, x 3 ≡ y along R and x 7 , x 8 , x 9 along 38 To be precise, one has to take care of a small subtlety. The BRST transformations of the fields depend on t, and therefore will start to depend on y, which is bad. Before making t y-dependent, one should redefine the fermions and rescale the supercharge so that the dependence on t does not appear in the BRST transformations. This is possible, as long as t = ±i. the remaining R 3 . The unbroken subgroup SO(3) Y of the R-symmetry group acts in the 789 directions. Rotations in the tangent planes to 012 and 456 subspaces are the Lorentz group SO(3) W and the R-symmetry subgroup SO(3) X , and the Lorentz group of the twisted theory is SO(3) W diag(SO(3) W × SO(3) X ), as was already introduced in section 5.1. In fact, it will be sufficient to take W just the flat space.
The space of preserved supercharges in the twisted theory is 2 ⊗ V 2 . Following [39], we introduce operators B 1 = Γ 3456 and B 2 = Γ 3789 , which commute with SO(3) W × SO(3) X × SO(3) Y and act in V 2 . The BRST charge is proportional to a particular vector in V 2 which can be singled out by a suitable projection operator, assembled from B 1 and B 2 . As shown in [40] (see section 2), the correct condition is where t is the generator of the BRST symmetry and t is the Kapustin-Witten twisting parameter.
Next we would like to find, which supersymmetry is preserved by the transverselyholomorphic foliation, and to match it to the formula above. A direct and complete treatment of the problem would require lifting the 3d N = 2 supergravity background of [34] to six dimensions and then finding, how it reduces to a background for N = 4 super Yang-Mills theory in four dimensions. We will not attempt to do that, but will instead take a shortcut. Suppose that the metric on the lens space L is such that the vector ξ which defines the THF is covariantly constant on some three-dimensional submanifold L 0 ⊂ L. Then the holonomy group on this submanifold naturally reduces to U(1) which acts in the planes orthogonal to ξ. The coupling to the supergravity background on this submanifold then reduces [34] simply to a twist by the U(1) Y R-symmetry of the 3d N = 2 supersymmetry, to compensate for the U(1) holonomies of the Levi-Civita connection. It is then easy to understand, what this twist means in terms of the four-dimensional Yang-Mills theory.
Let the parameters τ (y) and a(y) of the metric (6.1) be constant on some subinterval I 0 ⊂ I, and L 0 ⊂ L be the torus fibration over I 0 . Then vector ξ is covariantly constant on L 0 . As explained above, the supersymmetries preserved by the background 39 are the ones that on L 0 are invariant under the twisted rotation group in the plane, orthogonal to ξ, where ∂ 3 ≡ ∂ y and v are the two orthonormal vectors, orthogonal to ξ, and Γ 89 is the To understand what this equation means in four dimensions, we do a reduction and a T-duality from M-theory to type IIB string theory. We start with an M-theoretic setup on T * W × L × R 2 , with a stack of M5-branes wrapped on W × L. The group SO(2) Y acts on the R 2 which is the subspace 89. The three-manifold L 0 ⊂ L for now is just I 0 × T 2 , with I 0 along x 3 = y and T 2 in the 7, 10 subspace. The metric on L 0 is (6.1), with constant τ and a. We choose orthonormal coordinates on T 2 , a Im τ ϕ 2 , In the equation (6.6), is a Dirac spinor in eleven dimensions, and vector v is v = a 1 ∂ 10 + a 2 ∂ 7 , (6.8) with a 2 1 + a 2 2 = 1 , We reduce on a circle ∂ ϕ 1 , to obtain type IIA string theory in ten dimensions. The coordinate x 10 , which is periodic with period proportional to the radius of the M-theory circle, is dropped upon reduction. The gamma-matrix Γ 10 becomes the 10d chirality operator iΓ −1 , and the spinor decomposes into = + + − , with iΓ −1 ± = ± ± . The equation (6.6) decomposes into two equivalent ones, of which we keep one, Next, we do a T-duality on the circle x 7 to type IIB string theory. The type IIB supersymmetry generators are 1 = + and 2 = Γ 7 − . The branes that started their life as M-theory fivebranes are now D3-branes in directions 0123. Using the D3-brane supersymmetry condition iΓ 0123 1 = 2 and some gamma-matrix algebra, one can transform the equation (6.10) into Comparing with (6.5), we find that the supersymmetry in four dimensions is the same as the one preserved by the transversely-holomorphic foliation, provided that Therefore, from (6.4) and (6.9), κ = K , as was claimed.

The boundary condition
So far we stayed away from the ends of the interval I, where the torus fiber degenerates. Now let us understand the boundary conditions in the N = 4 super Yang-Mills at the ends of the interval. As usual, we restrict to real κ. We focus on the left end at y = 0 and assume for definiteness that the circle ϕ 1 shrinks there. As long as we keep away from the right end of I, we can use the freedom to change τ (y) and a(y) to set Re τ = κ, Im τ = R/f (y) and a = Rf (y). We choose R to be a constant and f (y) to be a function which vanishes as y for y → 0, is positive for y > 0 and approaches a constant for large y. The metric becomes where ψ = ϕ 1 + κϕ 2 . This is a twisted product of a cigar C and an S 1 , with the cigar rotating by 2πκ upon going around the S 1 . The holonomy of this metric is contained in U(1) that acts in the tangent planes to the cigar. The Killing vector K = −κ∂ ϕ 1 + ∂ ϕ 2 in the basis (∂ ψ , ∂ ϕ 2 , ∂ y ) is simply ∂ ϕ 2 , and the vector ξ defining the THF is R −1 ∂ ϕ 2 . Since ξ is covariantly constant, the supergravity background corresponding to the THF reduces to the usual R-symmetry twist which compensates for the U(1) Levi-Civita holonomy on the cigar.
In M-theory, we can realize this setup by taking the spacetime to be T * W × T * C × κ S 1 , with the Taub-NUT metric on T * C, and × κ being a twisted product, where the Taub-NUT is rotated by its isometry by an angle 2πκ in going around the S 1 . A number of M5-branes are wrapped on the supersymmetric cycle W × C × κ S 1 . After reducing on the Taub-NUT circle ϕ 1 and T-dualizing on S 1 , the M5-branes become D3-branes ending on a D5-brane in the type IIB theory. Thus, the boundary condition at y = 0 in the four-dimensional gauge theory is the one that comes from the usual 1/2-BPS D5-brane, that is, the (untilted) Nahm pole. Similarly, if a general (p, q)-cycle of the torus fiber shrinks at y = 0, the boundary condition is of the general 1/2-BPS fivebrane type.
If κ is not real, then ξ = K/|K| and our argument does not quite work. This is consistent with the four-dimensional gauge theory: the untilted D5-brane boundary condition, which has t 2 = 1, is compatible only 40 with real K = κ. For complex κ, the supergravity background near y = 0 should be more complicated than just an R-symmetry twist on the cigar. Upon reduction and T-duality to the type IIB theory, one expects again to find a D5-brane, but now with a non-trivial flux of the fivebrane U(1) gauge field. (Or, equivalently, a non-trivial background of the type IIB 2-form fields.) That would correspond to a non-trivial angle β of the Nahm pole, in the language of section 5.1. It would be interesting to generalize the present discussion to complex κ explicitly.

Putting things together
Let the Killing vector ∂ ϕ 2 vanish at y = 0 and ∂ ϕ 2 + k∂ ϕ 1 vanish at y = y 0 . Topologically, this torus fibration over the interval is the |k|-th lens space 41 L |k| . The THF parameter κ is a possibly infinite complex number, not equal to 0 or −k, for the Killing vector K to be everywhere non-vanishing. Upon reducing on the torus fiber, one gets a configuration in N = 4 Yang-Mills theory on an interval I.
It is fairly obvious that the boundary condition is of type (±1, 0) on the left and (±1, ±k) on the right of the interval. It takes a little more effort to fix the signs. Let us 40 Assuming the gauge theory parameters g 2 YM and θYM are real, which is the case in our geometric setup. 41 In our notations, L0 is S 1 × S 2 , while for k > 0 L k ≡ L k,1 , where Lp,q is the factor of the three-sphere |z1| 2 + |z2| 2 = 1 by (z1, z2) ∼ (e 2πi/p z1, e 2πiq/p z2). Reducing on lens spaces Lp,q with q = ±1 would lead to theories with no weakly coupled description, which we do not consider. Figure 9. These brane configurations are obtained from reducing on a lens space L k for real a THF parameter κ.
do this carefully, restricting as usual to real κ. A preliminary comment is that a change of coordinates is an S-duality transformation τ → (aτ − b)/(−cτ + d), which acts on the fivebrane charges by Another preliminary comment is that the local holomorphic coordinate in the fibers of the THF, as shown in appendix B, is Near y = 0, we go to coordinates ϕ 1 = ϕ 2 and ϕ 2 = −ϕ 1 , in which the vanishing Killing vector is ∂ ϕ 1 . The coupling constant can be chosen to be Re τ = κ = −1/κ, Im τ = R/f (y), with f (y) ≈ y for small y. The space near y = 0 is a twisted product of an S 1 with coordinate ϕ 2 and a cigar with coordinates y and ψ = ϕ 1 + κ ϕ 2 = ϕ 1 − κ −1 ϕ 2 . As discussed previously, in the duality frame associated to (ϕ 1 , ϕ 2 ), the fivebrane at y = 0 is a D5. More precisely, it is a D5 or a D5, but the two choices of the boundary condition are exchanged by an R-symmetry transformation in the N = 4 Yang-Mills, and thus we are free to choose the boundary condition to be precisely D5, or type (0, 1). According to (6.14) and (6.15), an S-duality back to the frame defined by (ϕ 1 , ϕ 2 ) produces an NS5, or a (1, 0)-type boundary condition. In a moment, we will need to know the THF holomorphic coordinate near y = 0, so let us compute it. One easily finds that the norm of the Killing vector for small y is |K| = |κ|R, and then, accordingly to (6.16), z = i|κ|(−iψ sign(κ) + log y) + const . (6.17) A good holomorphic coordinate w in the THF near y = 0 is a multiple of exp(−i|κ|z), w = y exp(−iψ sign(κ)) . (6.18) Now we turn to the neighborhood of y = y 0 . Here we choose coordinates ϕ 1 = ϕ 2 and ϕ 2 = kϕ 2 − ϕ 1 , so that the vanishing Killing vector becomes again ∂ ϕ 1 . The space near y = y 0 is again a twisted product of a circle and a cigar, with the coordinates on the cigar y 0 − y and ψ = ϕ 1 + κ ϕ 2 = ϕ 1 − 1 κ+k ϕ 2 . We need to decide, whether this defines a D5-or a D5-type boundary condition. This is a physically meaningful question, since the symmetry that exchanges the two types has already been used to fix the boundary condition at y = 0. Let us compute the THF holomorphic coordinate. For y close to y 0 , one finds that |K| = |κ + k|R, and then (6.16) gives z = −i|κ + k|(iψ sign(κ + k) + log(y 0 − y)) + const , (6.19) and the good holomorphic coordinate is w = exp(iz/|κ + k|), or w = (y 0 − y) exp(iψ sign(κ + k)) . (6.20) Reducing on a cigar with holomorphic coordinate y exp(−iψ) near y = 0 preserves the same supersymmetry as reducing on a cigar with holomorphic coordinate (y 0 − y) exp(iψ) near y = y 0 , because the two cigars can be glued together into a holomorphic P 1 in T * P 1 .
Making an S-duality transformation back to the original frame, we obtain the configurations shown on figure 9.
Let us restrict for a moment to the three-sphere, that is, k = 1. Just to keep the discussion very explicit, let us start with the popular background of the SU(2) × U(1)symmetric squashed sphere [70]. It has metric where h > 0 controls the radius of the Hopf fiber. Here θ ∈ [0, π], and the angles ϕ 1,2 are 2π-periodic. This metric falls into the class of torus fibrations (6.1) with the identification y = θ. The Killing vector ∂ ϕ 2 vanishes at θ = 0, and ∂ ϕ 2 + ∂ ϕ 1 vanishes at θ = π. To fix the rigid supersymmetric background, one has to also specify the values of other bosonic fields of the 3d new minimal supergravity, and for this background we use the values presented in section 5.2 of [34]. In appendix B.2 we show that these values correspond to We conclude this section with some general remarks. For any integer k, the brane configurations of figure 9 define complex Chern-Simons theories with levels k and v = −i(2κ + k), according to the equations of section 5.2. However, lens space rigid supersymmetric backgrounds in general are not real, and we did not keep track of the Q-exact terms. As always in this paper, this raises the question of what are the integration cycles in these Chern-Simons theories. Does this question have physical meaning? May be, we can just choose Chern-Simons integration cycle at will and declare it to be the reduction from six dimensions? To answer these questions, one first of all has to look at lens space partition functions of the 3d N = 2 superconformal theories T[W]. When they converge, they should define particular integration cycles for the Chern-Simons.
One may also desire that the Chern-Simons partition function does not have singularities, as long as the background is well-defined. As we have argued, the obvious bad values of κ for our backgrounds are where the Killing vector K becomes vanishing at one of the ends of the interval I. These correspond precisely to the strong coupling singularities in Chern-Simons. Then it is natural to declare that our Chern-Simons theory has no weak coupling singularity, so it must be the "unusual" Chern-Simons theory of section 5.2.2. This argument allows to define a smooth partition function for κ ∈ P 1 with a cut between the two strong coupling points.
Clearly, a more systematic understanding of integration cycles would be very desirable.

Conformal blocks, corners and Liouville
From the point of view of a physicist, a conformal block is not an element of some abstract vector space, but rather a particular function of Liouville momenta and the complex structure. The formula for this function in terms of Teichmüller TQFT states was given in eq. (2.1), which we repeat here for convenience, Ψ σ,l (q) = q|σ, l .
Here σ is a pants decomposition of the Riemann surface C, l ≡ {l 1 , . . . , l 3g−3 } is a set of Liouville momenta, and q ≡ {q 1 , . . . , q 3g−3 } are values of a set of holomorphic coordinates, parameterizing the complex structure. The state |σ, l belongs to the space of (B T , B c ) strings, the state q| belongs to the space of (B c , B T ) strings, and the conformal block is given by the natural pairing. 42 The question is, how to create the states q| and |σ, l in our setup for Teichmüller TQFT. The configurations that produce these states are shown on figure 10. For |σ, l , we take a handlebody C σ,l , with ∂C σ,l = C, decorated by a network of monodromy defects, according to the pants decomposition σ, labeled by hyperbolic conjugacy classes, corresponding to the length parameters l. The trivalent graph supporting the monodromy operators will be also called σ. The state produced by Teichmüller TQFT on the boundary C of C σ,l is an eigenstate of a maximal set of commuting length operators with eigenvalues l, and therefore is precisely |σ, l . In the 4d Yang-Mills picture, this geometry should be tensored with the usual interval with D5 and NS5 boundary conditions. To construct the state q|, we put the 4d Yang-Mills theory on the geometry which is shown in figure 10-a. It is the product of the Riemann surface C and a brane corner. The definition of the D5 42 We could have defined both states in the same Hilbert space and then used the Hermitian scalar product.
The result would be essentially the same. boundary condition depends on the metric on C, which determines some complex structure. The claim is that the brane corner configuration creates the state q|, with the complex structure q determined by the metric. Before proving this, we explain a subtlety involved in the definition of the brane corner.
In the super Yang-Mills configuration which defines Teichmüller TQFT with real coupling b 2 ∈ R + , at y = 0 we used a particular sort of D5-type boundary condition which requires the super Yang-Mills adjoint one-form field φ to have a Nahm pole, while the gauge field A is non-singular. In the Hitchin sigma-model, the support of the corresponding Lagrangian brane B T is the Hitchin section. This boundary condition preserves the topological supersymmetry Q with the Kapustin-Witten parameter t = −1, which we used in the definition of the model. Of course, the same supersymmetry is preserved by the NS5-type boundary condition at y = 1. However, it does not necessarily follow that it is possible to define a Q-invariant action with the two boundaries meeting at a corner. In fact, we will argue in a moment that it is not possible.
The D5-type boundary conditions come in a family, parameterized by the field strength of the fivebrane gauge field. They all can be called tilted Nahm pole boundary conditions, because they require some components of the fields A and φ to have the Nahm's singularity near the brane, and some combinations of the components of these fields to be non-singular. In section 5.1.1, we described a one-parametric subspace of such boundary conditions, singled out by the property of invariance under the 3d Lorentz symmetry group SO(3) W of the twisted theory. For the brane corner configuration, it is enough that the two-dimensional Lorentz symmetry along C is preserved. The boundary conditions with this property require that the combination A z − wφ z of the fields, for some complex w, is non-singular near the brane, and other components have appropriate Nahm pole behavior. The support of the corresponding brane in the Hitchin sigma-model is a Lagrangian submanifold, holomorphic in the complex structure I w . For w = 0, it is the Hitchin section, and the brane is B T , which we used for Teichmüller TQFT. For w = −i, the brane is B op with the support on the variety of opers, while for general w = 0, the support is a submanifold, diffeomorphic to the variety of opers. We claim that it is possible to define a corner for our NS5-brane and a D5-brane which corresponds to w = −i, but not to w = 0. Here are some supporting arguments, and the reader may choose the one they find the most convincing.
• On the NS5-brane, we effectively have an analytically-continued Chern-Simons theory with the Q-invariant complexified gauge field A = A + iφ. The corner with the D5brane should define a meaningful boundary condition in this Chern-Simons theory.
The tilted D5-brane with w = −i corresponds to the oper boundary condition, which certainly does make sense. The D5 boundary condition with w = 0 does not.
• Recently, brane corners like the one that we need here were studied in [66]. There, they were obtained by twisting brane corner configurations in the physical theory. The supersymmetric NS5-D5 corners considered there have the tilted D5-brane, imposing the oper boundary condition in Chern-Simons theory.
• In the Hitchin sigma-model, the coisotropic brane B c supports a Chan-Paton gauge field with non-trivial curvature. 43 For the corner with a Lagrangian brane B L to be Q-invariant, the curvature should vanish, when restricted to the support of B L , just like the symplectic form. Therefore, a corner configuration is possible, if the brane B L is complex Lagrangian for the holomorphic form Ω J which governs the physics of our coisotropic brane. The (A, B, A) brane of opers B op has this property. The variety of opers is holomorphic Lagrangian in complex structure J.
Let us make a digression. A part of the important paper [30] of Nekrasov and Witten addresses the question of why the Liouville conformal blocks appear in the context of the AGT correspondence. In that paper, the 6d (2, 0) theory is put on a four-ball B 4 1 , 2 with an Omega-background. Upon reduction on a torus fiber, one obtains the Hitchin sigma-model with the brane corner configuration, as in figure 10-a. The obvious brane setup to obtain the conformal blocks is the one that we used for quantization of the Teichmüller space, with the Lagrangian brane B T on the left and the coisotropic brane B c , governed by Ω J , on the right. Yet in [30], perhaps surprisingly, it was found that the Lagrangian brane obtained from the reduction is B op , not B T . In other words, this brane is Lagrangian not just for the symplectic form of the A-model, but for the holomorphic symplectic form Ω J , which appears in the definition of the coisotropic brane on the right. We have just explained that this must be a consequence of Q-invariance of the brane corner.
So, how do we define the state q| in Teichmüller TQFT? We propose that there exists a brane corner configuration as in figure10-a, where the NS5-brane on the right is the one that we used for Teichmüller TQFT, and the topological supercharge is the Kapustin-Witten supercharge Q with t = −1, but the angle of the Nahm pole of the D5-brane on the left rotates with time x 0 . At large time the Nahm pole becomes untilted, as needed for Teichmüller TQFT with 3d covariance. At small time, the Nahm pole is tilted, so that the brane corner configuration is supersymmetric. In the language of the Hitchin sigmamodel, the brane is holomorphic Lagrangian in complex structure I w with w(x 0 ) ∈ iR, interpolating between w = 0, corresponding to B T , and w = −i, corresponding to B op . It is easy to see that for any of these values of w, the brane is supersymmetric in the A-model in complex structure K, and we propose that it can be also made supersymmetric, when w varies with x 0 . This would produce an isomorphism between the spaces of (B T , B c ) strings and (B op , B c ) strings, needed to complete the derivation of the AGT correspondence in the approach of [30]. We will not try to understand the details of the sigma-model definition of this rotating brane here, but will optimistically assume that it makes sense.
In section 6 we analyzed, how the brane configuration needed for Teichmüller TQFT could arise from six dimensions. We started with a product geometry W × S 3 with a particular three-dimensional supergravity background on the three-sphere, and reduced on a torus fiber. A similar story could be repeated starting from the six-dimensional geometry C × B 4 . On the four-ball B 4 , we choose a supergravity background, such that a theory with 4d N = 2 supersymmetry can be put on it, preserving some supercharges. Such backgrounds are reviewed in [71], the Omega-background being a particular example. 44 It is expected that the supersymmetric observables do not depend on much of the details of the background. A four-ball is a bundle of a two-torus over a corner geometry. It should be possible to change the metric on B 4 , while affecting only the Q-exact terms, so as to make the torus fibers small. Upon reducing on them, one obtains the brane corner configuration of figure 10-a. For the Omega-background, this has been done by Nekrasov and Witten [30]. We believe that there exist more general backgrounds which near the center of B 4 reduce to the usual omega-background, while near its boundary reduce to a pullback of the supersymmetric S 3 background that we have used in this paper. Moreover, these backgrounds should differ from the usual omega-background by Q-exact terms only. Upon reducing on a torus fiber, one would obtain our brane corner with a D5-brane with a rotating Nahm pole. It would be interesting to understand these backgrounds and the corresponding reduction more explicitly. (Note that a generic background in 4d upon reduction would lead to branes with rotating Nahm pole angle, just like in 3d a generic background lead to Janus configurations with spatially varying parameter t. This supports the view that such branes should make sense and be supersymmetric.) After this long digression, we return to the state q| and its relation to the brane corner. We recall some standard facts, closely following [18]. The notion of an oper connection depends on a complex structure on the Riemann surface C. Fixing a particular complex structure defines a holomorphic Lagrangian subspace of opers in M H . Varying the complex structure, we get an affine bundle P of opers over T which is canonically isomorphic to T * T as holomorphic affine bundles. 45 Moreover, the map from P to M H , given by computing the Figure 11. A Liouville conformal block can be represented by a brane triangle. monodromy of an oper, is a local biholomorphism. In fact, upon identifying P and T * T , this map becomes a holomorphic symplectomorphism which pulls back the holomorphic symplectic form Ω J on M H to the standard symplectic form on T * T . Let q = {q a } and H = {H b } be the canonically conjugate holomorphic coordinates on the base and in the fiber of T * T . Upon quantization of the algebra of holomorphic functions on M H with the symplectic form b 2 Ω J , they become operators. The state q| is an eigenstate of the operators q a . (As usual, a wavefunction in the q-representation is given by the Hermitian product of a particular state with q|. The oper, or equivalently, the energy-momentum tensor T (z) acts on these wavefunctions by the familiar differential operator, given by substituting H b in the expansion of the oper in quadratic differentials by the operators ∂ q b . The conformal block (7.1) is an example of such wavefunction.) Now, the corner with an oper brane lands us in a fiber in P which lies above the complex structure q of C which is used in the definition of the brane. When acting with the operators q a on the state, produced by the quantum theory in the geometry of figure 10-a, we can move these operators right into the corner, which makes it clear that they act by multiplication by c-numbers q. The state produced by the corner must be the eigenstate q|.
The geometry of figure 10 can be usefully deformed into a brane triangle, 46 shown on figure 11. Here B c and B op are the familiar coisotropic brane and the brane of opers, while B σ,l is a Lagrangian brane, whose support are the complex flat connections that can be continued into the interior of the handlebody C σ,l . This brane picture for conformal blocks has been recently proposed in [73]. Note that it makes sense for any non-zero complex b 2 . Indeed, both Lagrangian branes are actually holomorphic Lagrangian for the symplectic form Ω J . Then it is possible to set the symplectic form and the B-field to be the real and the imaginary parts of b 2 Ω J , while taking the Chan-Paton connections on all branes to be flat.
We can also understand the Liouville partition function in the language of Teichmüller TQFT, making contact with some results in [49]. It is equal to the norm of the state q|, PSL(2, R) opers. The latter is not holomorphic. 46 The  or To make sense of this formula, we need to define the conjugate state |q = ( q|) † . In the branes and quantization setup, the appropriate antilinear map between the dual vector spaces H (B T ,Bc) and H (Bc,B T ) was described by Gukov and Witten [38]. First, one uses the antilinear map, to be called U , that defines the scalar product in the physical sigma-model. That, however, maps the topological supercharge Q into its conjugate. To bring it back, one also applies a symmetry that acts in the target space by an antiholomorphic 47 involution, preserving the Lagrangian brane. In our setting, this can be taken to be the symmetry that flips the sign of the Higgs field φ z . It was called σ in section 2. If the state q| is produced by the path-integral on a corner, shown on figure 10-a, then the state, obtained by acting with the antilinear involution U , is given by the path-integral on the same geometry, but with the opposite choice of the orientation. Further applying the involution σ leads to the brane corner configuration, shown in the bottom of figure 12. There, the D5-brane type interpolates from the untilted Nahm pole, corresponding to the Teichmüller brane B T , to the tilted Nahm pole, corresponding to the brane of antiopers B op . Our terminology here means the following. A complex connection is an oper, if it can locally be gauged into the form 3) 47 In the complex structure in which the A-model is defined.
By an antioper we mean a complex connection which can be locally gauged into the form Stacking the two corners on figure 12 together produces a geometry with two branes and two corners. It can be obtained from an S 4 geometry by reducing on a torus fiber. Note that the usual Pestun's S 4 background [74] approaches an Omega-background at one pole, with the BPS configurations being instantons, and an anti-Omega-background at the other pole, with the BPS configurations being anti-instantons. According to Nekrasov and Witten [30], reduction on a torus fiber should lead to a (B op , B c ) and a (B op , B c ) corner, correspondingly, and this is what is seen in our picture. It is also clear that, whatever the details of the supergravity background and the reduction are, the result will include branes with the supersymmetry (equivalently, the Nahm pole angle) varying with time.

Integration cycles and holography
Let us look back at the setup of figure 10 for the conformal block. So far we mostly focused on what is happening at the NS5-brane, with the conclusion that we have an analyticallycontinued Chern-Simons theory on the handlebody C σ,l with the oper boundary condition on ∂C σ,l . What is the correct integration cycle in this theory? What integration cycles are possible in principle?
Critical points of the action are complex flat connections on the handlebody C σ,l which have an oper structure on ∂C σ,l . In other words, they are points of intersection of the Lagrangian branes B op and B σ,l . Explicitly, we need to solve a Riemann-Hilbert type problem and fix 3g − 3 accessory parameters of an energy-momentum tensor T from the prescribed conjugacy classes of monodromies of the equation (∂ 2 z + T )ψ = 0 along 3g − 3 cycles on C. Solutions to this problem are expected to exist generically. For example, in the simple case when C is P 1 with four punctures, 48 the solution exists and is unique, see e.g. appendix D of [49].
We remind that even if the flat connection is unique modulo gauge transformations, the number of possible integration cycles is infinite, because we do not divide by large gauge transformations. An elementary topologically non-trivial gauge transformation, corresponding to π 3 of the gauge group, multiplies the path-integral by q = exp(2πib 2 ). In the presence of monodromy defects, the gauge group is reduced along these defects to its maximal torus. Then there are also topologically non-trivial gauge transformations, corresponding to π 1 of the maximal torus. The factors produced by these gauge transformations are exp(2πib 2 l a ), where l a are parameters of the monodromy operators, see e.g. [49]. Let C 0 be the Lefschetz thimble, corresponding to some oper flat connection a 0 , taken in some particular gauge. Let C be some other integration cycle which is obtained from C 0 by making large gauge transformations and taking sums with integer coefficients. From what we have just said, it is clear that the path-integral over C differs from the integral over C 0 by multiplication by some Laurent series P in exp(2πib 2 ) and exp(2πib 2 l a ) with integer coefficients.
As always in Teichmüller TQFT, the correct integration cycle should be obtained as the locus of endpoints of the Kapustin-Witten flows in y. In our figure 10, the D5-brane is drawn in a suggestive way: its horizontal part is meant to impose the oper boundary condition for the complex gauge field A along ∂C σ,l , while its vertical part imposes the Nahm pole initial condition for the Kapustin-Witten flows. 49 It is natural to speculate that the conjectures of section 4 still apply in this setting. Let us see, how this could possibly work. First we explain, what is the analog of the conjugate geometric flat connection here.
Let ds 2 C = e 2ϕ dz dz be a metric on C, Hermitian in the complex structure q. Suppose we want to construct a complete hyperbolic metric on the handlebody C σ,l which near the boundary is locally asymptotic to the hyperbolic space H 3 and conformal to ds 2 C . In other words, asymptotically, the metric should look like To solve the Einstein equations, we are supposed to find a flat gauge field with these asymptotics, modulo complex gauge transformations that are trivial at x → 0. The behavior (7.7) is precisely the tilted Nahm pole, and the solution [42] to the problem is precisely that the flat connection is an oper. (This is a well-known fact in the 3d gravity context, see e.g. [75].) Inside C σ,l , there is a network of defects along the graph σ, and we want our geometric connection A = ω − ie to have the corresponding monodromies. When the parameters l are real, the conjugacy classes of the monodromies are hyperbolic. The graph σ is the world-history of a number of colliding BTZ black holes inside C σ,l . To make sense of this statement and to obtain a complete hyperbolic metric, we would need to cut out a neighborhood of σ from C σ,l and to glue in some appropriate smooth manifold to represent the black hole geometry. It is not clear what is the right way to do this, so let us instead 49 We could perhaps deform this D5-brane into a brane corner with a vertical BT and a horizontal Boper.
The supports of these two Lagrangian branes intersect at a single point, so there is only one possible boundary changing operator.
continue the Liouville conformal block to purely imaginary values of the Liouville momenta l, and moreover, restrict them to be rational. Then the monodromy defects along σ define orbifold singularities of the metric.
Suppose that C σ,l has a complete hyperbolic metric, as described: its conformal structure at infinity agrees with the complex structure q, and in the bulk it has orbifold singularities along the graph σ, with the deficit angles determined by l. From what we have just said, it is clear that the corresponding flat connection ω − ie belongs to the intersection of B op and B σ,l . The converse need not be true: a point in the intersection B op ∩ B σ,l may not define a complete hyperbolic structure on C σ,l . Explicitly, any oper flat connection can be gauged into the form where T is a holomorphic stress tensor, and ρ = − log x + ϕ. (Note that ρ has to transform non-trivially between the patches on C, while x does not.) This defines a metric which is a non-degenerate hyperbolic metric for x < min C e ϕ |T | −1/2 . (7.10) If C has no punctures, this metric makes sense in a finite neighborhood of the boundary of the handlebody, yet it is not obvious that it can be continued as a complete non-degenerate hyperbolic metric onto the whole C σ,l . In fact, a theorem due to Sullivan [76,77] implies that for "nice" hyperbolic threemanifolds, the hyperbolic structure is unique, once the conformal structure at infinity is fixed. This theorem is an extension of Mostow rigidity to non-compact hyperbolic threemanifolds. For an example of its application in physics, see [78]. To honestly apply it to our case, we would need to check one technical condition (that our tentative hyperbolic three-manifolds are geometrically finite), and to understand, how to deal with the orbifold singularities. We will not try to do this, but will just optimistically hope that the theorem does apply. Thus, by our natural assumptions, the intersection B op ∩ B σ,l contains one and precisely one point that defines a complete hyperbolic structure on C σ,l . The corresponding flat connection will be called the conjugate geometric flat connection A geom . Of course, there may be any number of other flat connections in B op ∩ B σ,l .
Conjecture 3 of section 4, applied to this situation, 50 says that the dominant contribution to the Teichmüller TQFT path-integral for the Liouville conformal block comes 50 Explicitly, we use the hyperbolic metric on the handlebody to define the N = 4 super Yang-Mills path-integral on C σ,l × I. Two differences with the setup of figure 10 -as obtained by reduction from six dimensions, -is that the boundary of C σ,l is now at infinite distance, and the Gukov-Witten surface operators for the monodromy defects on σ × I are replaced by an orbifold singularity. This should not affect the path-integral of the topological theory. Also, in section 4 it was important that the reducible connections do not appear, but our argument used the fact that the volume of the three-manifold was finite. In the present section, reducible connections do not appear because of the oper boundary condition. from the Lefschetz thimble for the conjugate geometric flat connection. Thus, the setup of figure 10 can be loosely understood as a chiral gravitational path-integral on C σ,l with an asymptotically AdS metric. We obtain something that is well-known in the context of holography.
There exists a vast literature on holographic computations of semiclassical Virasoro conformal blocks, see e.g. [47], [48] and references therein. (Note that in the semi-classical limit, the fact that the gravity on AdS 3 computes Virasoro conformal blocks is essentially a consequence of the Ward identities [47].) It mainly focuses on the case of P 1 with four punctures, at most two of which carry operators that are heavy in the semi-classical limit c → ∞. There is a beautiful story on how to incorporate light operators by geodesic Witten diagrams and how to actually compute the expansions of the blocks and to compare them to the known CFT results. We have nothing to say about this. Our goal was to explain that this holographic picture can be naturally obtained in Teichmüller TQFT, which in particular implies that it should work not only semi-classically, but also quantum-mechanically.
We made an assumption about the existence of an appropriate hyperbolic metric on C σ,l . This was necessary both for our argument to work, and for the holographic picture to make sense. It would be interesting to construct this hyperbolic metric explicitly, by identifying the corresponding subgroup of the isometries of H 3 . Also, in eq. (4.1) of section 4, we stated a bound on the Chern-Simons action in terms of the hyperbolic volume. It was saying essentially that the conjugate geometric flat connection was the most low-lying critical point. If an analog of this statement holds as well for suitably regularized volumes in the non-compact setting of the present section, then the integration cycle for the pathintegral for the conformal block is precisely the Lefschetz thimble for the hyperbolic flat connection on C σ,l . In this case, the degrees of freedom in the bulk of the holographic setup are truly gravitational. If the statement above is not true, the conformal block may receive subleading contributions from lower-lying flat connections, which have no geometric meaning.
On a further philosophical note, it may be questionable if the holographic setup for the conformal blocks deserves to be called "true holography". Indeed, the hallmark of holography is that on one side of the duality, we have gravity. In the present context, even if local degrees of freedom in the bulk are components of an invertible metric, the theory there is a QFT and not quantum gravity. We do not sum over possible topologies, but instead explicitly prescribe what should be happening in the bulk according to the parameters (σ, l) of the conformal block.
We have to admit that in our derivation, we were not careful about the overall normalization of the states q| and |σ, l . The function Ψ σ,l (q) could differ from the conformal block in the standard normalization by a b 2 -dependent prefactor, which would make pointless much of the above discussion of integration cycles. E.g., for the four-point conformal block on P 1 , there exists up to gauge transformations only one complex flat connection, and possible integration cycles differ just by Laurent series P, which could be missed with improper normalization. However, the brane picture of figure 10 could have been derived from six dimensions, and therefore, via the AGT correspondence, our conformal blocks are expected to be normalized in the standard way.
Finally, we point out that Kähler quantization basis of states q| is useful not only for conformal blocks. For any three-manifold W with boundary, we can choose conformal structures on each component of ∂W and use the oper boundary conditions to write the state Z Teicm (W ) in this basis. The advantage of doing so is that, if W is hyperbolic, the Teichmüller TQFT integration cycle is simple. From the point of view of hyperbolic geometry, it is very natural to consider hyperbolic three-manifolds with fixed conformal structures at the boundary. It is well-known in mathematics, how to glue them together to produce new hyperbolic manifolds. In this sense, the basis q| is very natural geometrically. We hope to discuss elsewhere, how to glue Teichmüller wavefunctions in this basis.

The Liouville partition function
According to figure 12, the Liouville partition function on a Riemann surface C is computed by analytically-continued Chern-Simons theory on C × I , with the oper and the antioper boundary conditions at the two ends of the interval I . This picture was first obtained in the paper [49], which was actually the motivation for our discussion.
Let us look at the possible integration cycles. The flat connections on C × I , satisfying the boundary conditions, are points of the intersection of the Lagrangian branes B op and B op . One such point is the real, or "geometric" oper which defines the hyperbolic structure on C, compatible with the chosen complex structure. Explicitly, if ds 2 C = e 2ϕ dzdz is the hyperbolic metric on C, so that ∂∂ϕ = e 2ϕ , then the real oper is Perhaps, this fact could be used to prove that there are no other points, but we will not assume that.
The real oper defines a complete hyperbolic metric on C × I . Explicitly, the flat connection is obtained from (7.11) by a gauge transformation diag(e ρ/2 , e −ρ/2 ), and the metric is with the two asymptotic ends at ρ → ±∞. A more geometric way to view this is the following. Let Γ ⊂ PSL(2, R) be the Fuchsian subgroup by which we quotient the upper half-plane to obtain C with its chosen complex structure. The hyperbolic three-space H 3 is topologically a ball, and its boundary is an S 2 . Γ is naturally a subgroup of the isometry group PSL(2, C) of H 3 . The quotient H 3 /Γ is precisely C × I with the hyperbolic metric (7.12). In particular, Γ acts properly discontinuously on the boundary S 2 of H 3 away from a great circle. The quotients of the two hemispheres in S 2 become the two asymptotic ends of C × I . The theorem due to Sullivan, mentioned in the previous subsection, implies that this hyperbolic structure on C × I is unique [77]. In this particular geometry, it is a special case of the Bers simultaneous uniformization theorem [79]. Thus, the real oper is the only point in B op ∩ B op that defines a complete hyperbolic metric on C × I . As figure 12 suggests, the correct integration cycle for the Teichmüller TQFT on C × I should be obtained by solving the Kapustin-Witten equations on C × I × I with the Nahm pole initial condition. Assuming that Conjecture 3 of section 4 holds in this setting, the dominant contribution to the functional integral comes from the Lefschetz thimble for the conjugate geometric flat connection, that is, for the real oper (7.11). If B op ∩ B op contains any lower-lying critical points, there can be additional contributions, and if not, then the geometric Lefschetz thimble is all that there is.
Did we learn anything new about the Liouville partition function? Certainly not. Just from the definition of the usual Liouville path-integral, it is obvious that the dominant contribution in it comes from the real critical point, that is, from the Lefschetz thimble for the real oper (7.11). What we did obtain is a non-trivial consistency check of the conjectures of section 4. Note that this is true, even if the flat connection on C × I with the oper and the antioper boundary conditions is unique. Indeed, even in this case, there is an infinite number of possible integration cycles for Chern-Simons due to the fact that we do not divide by large gauge transformations. A generic integration cycle would differ from the correct one my multiplying the partition function by a Laurent series P in q = exp(2πib 2 ). Our conjectures assure that such a prefactor does not appear. We remind the reader that all this applies to the regime, when the Liouville coupling constant b is real. When it is not, our conjectures say nothing about the integration cycle. A beautiful analysis in [49] has shown that a prefactor of the form P does appear, when b becomes imaginary.
The setup for computing the Liouville partition function that we have just considered is holographic in spirit, but we should again stress that the bulk theory is a QFT rather than gravity, even though its dynamical fields have a metric interpretation. Moreover, instead of a non-chiral theory in a geometry with one asymptotic region, we have a chiral theory in a geometry with two asymptotic regions. This is quite unusual.
Note that the existence and uniqueness of a hyperbolic structure on C × I continue to hold, if we independently vary the complex structures at the two asymptotic ends. This is the content of the simultaneous uniformization theorem. Then there is a natural continuation of the integration cycle to the situation when q and q are independent variables, so that the Liouville partition function becomes a function on T × T .
That such a continuation should be possible is clear from the decomposition into conformal blocks. In the 4d N = 2 class-S gauge theory, related to this setup via the AGT correspondence, this quantity must be the S 4 -partition function with a 1/2-BPS Janus interface inserted near the equator.

Remarks on PSL(2, R) Chern-Simons theory and other matters
Here we present an informal discussion on the relations between Teichmüller TQFT, PSL(2, R) Chern-Simons theory, as well as on some other matters. This section is not meant to contain any essentially new results, but may help in putting our story in broader context.

PSL(2, R) Chern-Simons theory
Since ancient times [14,15], Teichmüller TQFT is viewed as a sort of PSL(2, R) Chern-Simons theory. We recall the reason for this, and highlight important differences between the two theories. As usual, let C be an oriented Riemann surface of genus g ≥ 2.
The classical phase space of PSL(2, R) Chern-Simons theory on C is the moduli space of flat PSL(2, R) connections. It decomposes as  51 It consists of flat PSL(2, R) bundles that come from uniformization of C. In PSL(2, R) Chern-Simons theory, we are supposed to quantize M R with the symplectic form that descends from where A is the PSL(2, R) gauge field and k is the Chern-Simons level. The subspaces in (8.1) with |d| < 2g − 2 are topologically non-trivial, and the restriction of the symplectic form to them is non-trivial in the cohomology. This is one way to see that some appropriate multiple of the level k has to be an integer, for quantization to make sense. This is the most obvious difference with Teichmüller TQFT: there, one quantizes only the topologicallytrivial component M R 2g−2 , and the level b 2 need not be an integer. As long as we are concerned with Hilbert spaces only, we can consider PSL(2, R) Chern-Simons theory on a geometry, say, R + × C, and place a suitable boundary condition at the 51 Similarly, M−2g+2 is isomorphic to the conjugate Teichmüller space, that is, parametrizes complex structures which induce the orientation on C, opposite to the chosen. origin of R + that would pick flat bundles on C with the maximal Euler number. In this way we can project to the component H 2g−2 of the Hilbert space which we would see in Teichmüller TQFT. (The boundary condition breaks all gauge symmetry at the origin of R + . It is easy to see that this makes it impossible to make large PSL(2, R) gauge transformations on R + × C. Therefore, we can also continue the level k away from integers, as is appropriate for Teichmüller TQFT.) This is what was done in [14,15]. But there is more to a 3d TQFT than its Hilbert spaces and MCG representations. Its amplitudes should be defined for any oriented three-manifold with boundary, and should respect factorization under arbitrary cuttings of the manifold. The PSL(2, R) Chern-Simons theory has the usual path-integral definition with 3d covariance, but there seems to be no natural way to project it down to Teichmüller TQFT. By projecting we mean doing something with the path-integral, so that in cutting along an arbitrary embedded Riemann surface, the intermediate state would live in the component H 2g−2 . (One obvious thing that can be done with Chern-Simons theory is choosing a different global form of the gauge group, that is SL(2, R) or further covers. It is easy to see that this wouldn't help.) Thus, PSL(2, R) Chern-Simons theory and Teichmüller TQFT are two different quantum field theories in three dimensions, even though they have a relation at the level of Hilbert spaces. To further highlight the difference, we point out that, for a hyperbolic three-manifold, the Teichmüller partition function is dominated by the PSL(2, C) flat connection A geom , which is not even a PSL(2, R) connection. (If it were possible to conjugate it into a PSL(2, R) subgroup, the hyperbolic volume would be zero.)

Observables
Let us next comment on the algebra of observables in Teichmüller TQFT and Chern-Simons theory. We go back to the geometry R × C and see, what operators act on the Hilbert space. In PSL(2, R) Chern-Simons theory, for any non-self-intersecting cycle γ on C we can consider a Wilson loop labeled by a representation of the gauge group. The algebra of Wilson operators corresponding to the finite-dimensional representations is what we called the operator algebra A q in section 2. It is unlikely that the Hilbert space H CS is an irreducible module of this algebra. One would rather expect that Wilson loops for some classes of infinite-dimensional unitary representations must be included to make the operator algebra act irreducibly. For Teichmüller TQFT, the action of A q on its Hilbert space H 2g−2 is reducible as well. To understand what operators have to be added in this case, one can again look at the moduli space of flat connections on C. For simplicity, for now think of SL(2, R) instead of PSL(2, R), and consider a Wilson line W γ in the fundamental representation. Let U be the two-by-two matrix of the SL(2, R) holonomy around the cycle γ. Then where exp(±l γ /2) are the eigenvalues of the matrix U γ . If U γ belongs to a hyperbolic conjugacy class, which is the case in particular if our flat connection lies in the Teichmüller component M R d , then W γ ≥ 2 and l γ is a real positive number, equal to the length of the closed geodesic, homotopic to γ. If the conjugacy class of U γ is elliptic, l γ is an imaginary number, which moreover is not uniquely defined. In Teichmüller theory, we restrict to the Teichmüller component M R d of the moduli space, and l γ is a good observable. Upon quantization, it becomes an operator l γ acting on the Hilbert space H 2g−2 . In PSL(2, R) Chern-Simons theory, where we keep all components of the moduli space of flat connections, the length l γ is not well-defined, and there is no corresponding operator in the quantum theory. We only have the Wilson lines W γ , which generate the algebra A q acting on H CS . (Of course, there are also Wilson lines for infinite dimensional representations.) With length operators included, the algebra acting on H 2g−2 is larger 52 It is instructive to recall some further details on this enhancement of the operator algebra, following e.g. [24]. Let us go to the Fock-Goncharov coordinates on the moduli space of flat connections. This set of coordinates is defined for a choice of an ideal triangulation of the surface C. (This requires the surface to have punctures, which we so far did not consider.) There is a coordinate function z a for each edge a of the triangulation, and there are some relations imposed, see e.g. [24,59,80]. Note that if we restrict to the Teichmüller component in the moduli space, the logarithms Z a = log z a of the coordinates are equal to some linear combinations of lengths of geodesics, connecting the punctures [59]. In Fock-Goncharov coordinates, the symplectic form on the moduli space takes a simple form. Upon quantization, the coordinates become operators z a with the commutation relation where a, b is the signed count of faces that the edges a and b share, and q = exp(2πi/b 2 ), as usual. The operator algebra with generators z a is the same as the algebra of Wilson loop operators, and was previously denoted by A q . Again, it does not contain the length operators Z a . However, we can define another algebra A q , where q = exp(2πib 2 ), with generators z a = exp(b 2 Z a ). One easily sees that it commutes with A q . Moreover, the algebra generated by z a and z a together is equivalent [52] to the algebra generated by the length operators Z a , after suitable completion. Thus, having the length operators in Teichmüller TQFT means that the algebra A q of Wilson loops is effectively doubled. In section 2 we recalled how this doubling occurs from the point of view of the Hitchin sigmamodel, following [30]. One may ask similar questions about observables on a general three-manifold W . Suppose that W is hyperbolic. Then semiclassically, in Teichmüller TQFT we are expanding near the (conjugate) geometric flat connection, and it makes sense to compute expectation values of length operators. If we work in the 4d Yang-Mills picture, the natural observables are two sets of line operators, the usual supersymmetric Wilson lines, supported at the NS5-type boundary, as well as 't Hooft operators, supported at the D5-type boundary. It would be interesting to see if, after localizing on the BPS equations, one can relate these two sets of line operators and length observables.

Modular functors
There is one more point to be made regarding the construction of Teichmüller TQFT. Our path-integral definition via the 4d N = 4 super Yang-Mills theory may be the most direct physical way of seeing that Teichmüller TQFT exists as a 3d quantum field theory. But there is another way that starts from two dimensions. A 3d TQFT with line operators defines what is called a C-extended modular functor, where C is the category of line operators. An extended modular functor associates vector spaces with MCG actions to two-manifolds with punctures. Importantly, these data have prescribed behavior under cutting the twomanifolds along closed non-intersecting curves. If C is a punctured Riemann surface and γ is a simple closed curve on C, we can cut along γ to produce a (possibly disconnected) Riemann surface C with two more punctures. Then there exists a canonical isomorphism of Hilbert spaces respecting the MCG action. Here the sum goes over the objects R of C, and H C ,R,R ∨ is the Hilbert space for C with the two punctures labeled by R and its dual. This axiom is a manifestation of locality and allows to construct Hilbert spaces with MCG actions by gluing the Riemann surface from pairs of pants. (For details and precise definitions, see e.g. [21].) It is fairly obvious that a TQFT produces an extended modular functor. What one may find more surprising is that having an extended modular functor is enough to reconstruct the 3d TQFT 53 Quantizing the moduli spaces M 2g−2 produces a modular functor which can be made into an extended modular functor, as we recall in a moment. (A rigorous construction of an analog of an extended modular functor for Teichmüller TQFT can be found in [20]. Some references on the category C that appears in this context can be found in section 6.1 of [82].) From this data, it should be possible to reconstruct a TQFT. This gives an alternative view on why Teichmüller TQFT exists and how to define it. An important caveat in this argumentation is that the machinery of modular functors and TQFTs, as described in [21], applies to the situation with finite dimensional Hilbert spaces, while in our case the spaces of states are infinite dimensional. Extending these results to our situation is a non-trivial problem. Let us also mention that instead of a TQFT, we should more precisely call our theory a restricted TQFT, since the partition function is finite only for some subclass of closed three-manifolds. (As we proposed in section 3, what characterizes this nice subclass for Teichmüller TQFT may be a particular property of the Kapustin-Witten equations.) Consider the Teichmüller space T C for a (possibly punctured) Riemann surface C, and let as before C be a surface, obtained from C by cutting along a simple curve γ. Let the PSL(2, R) conjugacy classes at the two extra punctures on C be hyperbolic, corresponding to some fixed length l. The Teichmüller space for C with these punctures is isomorphic to the Hamiltonian reduction of T C in which we quotient by the flow, generated by the length function l γ , and impose the moment map constraint l γ = l. (The isomorphism is obvious if one uses the Fenchel-Nielsen coordinates.) This statement is the classical precursor of the 53 An extended modular functor is equivalent to a modular tensor category [21,81], which in turn produces a TQFT by Reshetikhin-Turaev construction. For details, other approaches and references, see [21]. factorization axiom (8.6) and the reason, why the modular functor obtained by quantizing Teichmüller spaces can be promoted to an extended modular functor. Since l is real, the index R in (8.6) runs over the real numbers and is nothing but the Liouville momentum. Note that we had to allow punctures labeled by hyperbolic conjugacy classes. In Chern-Simons theory, one expects that they correspond to Wilson lines in representations, obtained by quantizing the hyperbolic coadjoint orbits. These representations are the ones belonging to the principal series. 54 We note finally that a similar factorization argument for the full moduli space of PSL(2, R) flat connections would show that the emerging punctures are labeled by arbitrary PSL(2, R) conjugacy classes, not only the hyperbolic ones. Thus, in the full PSL(2, R) Chern-Simons theory, the category C has more objects than in Teichmüller TQFT. One has to allow Wilson lines for representations not belonging to the principal series. 55

Outlook
There are a lot of important questions that we were not able to answer in this paper. Let us list some of them, as well as some general open directions.
We worked with gauge group of rank one. A generalization to other gauge groups should be straightforward, and then one could check the perturbative expansions of section 4.1.2 in this more general case. The global aspects like discrete theta-angle related to the topology of the gauge group were largely ignored in our paper. It would be interesting to keep track of them more carefully.
We formulated three conjectures about the Kapustin-Witten equations. In the absence of general proofs, it would be interesting at least to further test them. Since we understand well time-independent solutions of the Kapustin-Witten equations on R × C × R + , one could try to use this knowledge to test our conjectures for hyperbolic three-manifolds that are mapping tori of pseudo-Anosov maps.
In section 5, we pointed out that the relation between supersymmetric blocks and Lefschetz thimble integrals is unclear. It would be interesting to understand it explicitly and generally by methods of N = 4 super Yang-Mills. This question is a part of the more general problem of writing bounded actions with 1/2-BPS NS5-brane boundary condition. If we learn how to do that, we would also better understand the definition of the "unusual" complex Chern-Simons theory of section 5.2.2, as well as the integration cycles for the duals of Teichmüller TQFT.
Simpler versions of these questions can be asked purely in two dimensions. We have a well-defined setup for quantization of the Teichmüller space in the Hitchin sigma-model. Appropriate elements of the T-duality group should relate it to brane configurations that describe the Hilbert spaces of Chern-Simons theories CS-I and CS-II of section 5.3. What 54 For PSL(2, R), there is one principal series of representations, parameterized by a real number. Had we worked with SL(2, R) instead of PSL(2, R), we would have to make a choice of a spin structure on the cutting circle γ. For the emerging puncture, this Z2 label would correspond to choosing between the two families of principal series representations that exist for SL(2, R). 55 It would be interesting to find a relation between the grading (8.3) and the classes of representations, used to label the legs of a conformal block. are these configurations, and what do we learn from them about the Hilbert spaces of these Chern-Simons theories? Can we apply our dualities to the holographic setup for the Liouville conformal blocks? Is it possible to see any traces of semiclassical complex Chern-Simons theories in the behavior of the conformal blocks near c = 1 or c = 25?
In section 6, our proofs and derivations are literally valid only for real values of the canonical parameter κ. It would be interesting to explicitly extend this story to complex κ. One would expect this generalization to be rather straightforward.
In this paper, we mostly focused on Chern-Simons theories at integer level k = 1. The case of level k = 0, related to supersymmetric indices of theories T[W ], is also interesting and was explored in the literature [83]. It is possible that some of our questions may be answered more easily in that setting. Also, note that these indices have some nice structural properties, see [5] and references therein. One may wonder if these properties can be observed from the counting problem for the Kapustin-Witten equations on W × I with two Nahm poles.
Recently, the elements of the SL(2, Z) S-duality group that we used in section 5 were applied in [66] to produce dualities of chiral algebras. The brane corners studied in that paper are a generalization of our brane corner of section 7. They would arise if we wished to study the state q| in a Chern-Simons theory engineered by a brane triangle of figure 13. It would be interesting to better understand these Chern-Simons theories, if they are welldefined.
It acts in each of the subspaces V − , V 0 , V + diagonally with eigenvalues 2, 1 and −1, respectively. We also need a differential operator d ω , which acts from the space Ω 1 adj to itself. It has the property (A.8) We will also need the fact that for any adjoint-valued one-forms a and b, tr(e ∧ a ∧ b + e ∧ b ∧ a) = 1 2 tr(a ∧ (Lb) + b ∧ (La)) . where P a ≡ (a ∧ e − e ∧ a) = a a µ e µ b abc t c is a projector onto V 0 . Note that [e, P a 0 ] = 2a 0 . The equations have a Z 2 symmetry y → −y, a → a, ϕ → −ϕ, φ y → φ y . Only modes invariant under this symmetry survive [56], thus, we can make an ansatz ϕ = ∞ k=1 ϕ k y 2k−1 , a = ∞ k=1 a k y 2k , φ y = ∞ k=1 φ y,k y 2k . (A.11) (On a general three-manifold, the expansion will also contain logarithms. They are absent for an Einstein manifold.) The first two KW equations become Here we defined the numbers b p as coth y = ∞ p=0 b p y 2p−1 . The third equation ∂ y φ y −d A φ = 0 at order y 2k−1 , k ≥ 1, is 57 −P a k + 2kφ y,k = p+q=k p,q≥1 b p P a q + d ω ϕ k − p+q=k p,q≥1 (a p ∧ ϕ q − ϕ q ∧ a p ) . (A.14)

B Transversely holomorphic foliations
First we give a very brief review of transversely holomorphic foliations and their deformations, following the papers [34,35], where the reader can find all the details. In three dimensions, the analog of a complex structure operator is a tensor Φ, which is a section of T L ⊗ T * L satisfying where ξ is a nowhere vanishing vector field and η is a one-form with the property η(ξ) = 1. This data defines a THF, if it satisfies an extra integrability condition, an analog of vanishing of the Nijenhuis tensor. A metric g is called compatible, if which is a natural analog of the Hermiticity condition in even dimensions. Given a compatible metric and a nowhere vanishing vector field ξ, the rest of the data can be restored, up to an ambiguity Φ → −Φ. (As a consequence of the first equation, we will often not distinguish η and ξ.) The integrability condition ensures that there exist so-called adapted coordinates t, z and z, in which ξ = ∂ t , and dz is a holomorphic one-form, in the sense that Φ T dz = idz. One has η = dt + hdz + hdz, and for the compatible metric where h, h and g in general are functions of all the coordinates. Complex differential one-forms can be split according to the eigenvalues of Φ, ω = ω + dz + ω − dz + ω 0 η , (B.5) with Φ T dz = idz, Φ T dz = −idz and Φ T η = 0. We write this decomposition as T * C L T * + L ⊕ T * − L ⊕ T * 0 L. It is convenient to treat dz and η together, and correspondingly to denote by Ω p,q (L) the space of sections of ⊕ m+n=q (∧ p T * + L)(∧ m T * − L)(∧ n T * 0 L). For vectors, the analogous decomposition since Φ(∂ z −h∂ t ) = i(∂ z −h∂ t ), Φ(∂ z −h∂ t ) = −i(∂ z −h∂ t ) and Φξ = 0. Vectors in T + L, just like differential forms in T * + L, transform with a holomorphic factor under allowed changes of the adapted coordinates.
For a three-manifold with a THF, there exists a Dolbeault-like operator ∂. On Ω p,q (L) it is defined by projecting the image of the de Rahm operator d onto Ω p,q+1 (L). The Dolbeault operator squares to zero, and the corresponding cohomology can be decomposed with respect to the (p, q)-grading. On functions, ∂f = 0 if and only if f is a holomorphic function of the adapted coordinate z, independent of t. This allows to define cohomology on differential forms, valued in a holomorphic line bundle, for example, in T + L.
Suppose one makes a deformation of the THF and the compatible metric. Out of variations δξ and δΦ one can construct a T + L-valued (0, 1)-form Here various components are defined in the basis of the undeformed THF. In [35] the following has been shown: for an integrable deformation, Θ has to be ∂-closed, and all the components of the variations δξ and δΦ can be found from the ones that appear in (B.7); ∂-exact tensors Θ correspond to trivial deformations, induced by diffeomorphisms. It has been also shown that the supersymmetric partition function of the 3d N = 2 theory on the three-manifold L depends on the geometry only through the THF, that is, through the ∂-cohomology class of Θ.

(B.15)
With suitable periodic identifications, the adapted coordinates are good everywhere on L, away from the ends of the interval I. Various line bundles in the decomposition of T C L and T * C L have trivial gluing functions. Using (B.11), (B.14) and (B.15), one finds the deformation tensor Θ in terms of the variations of those components of ξ and Φ which can be non-zero for our family of THFs, where numerical indices on the components are in the coordinates x 1 = ϕ 1 , x 2 = ϕ 2 , x 3 = y. For a variation of τ (y), a(y) and κ, the tensor Θ is automatically ∂-closed, since the deformation of the THF is integrable. Then locally Θ is ∂-exact, as follows from the analog of the Poincaré lemma. We look for a locally-defined vector v = v + (∂ z − h∂ t ) in T + L, such that Θ = ∂v. (Any two such vectors differ by a shift of v + by a holomorphic function.) The deformation is trivial, if and only if such a v also exists globally.
First, suppose that τ (y) and a(y) are varied, while κ is kept fixed. Then we find  which is good at least away from the ends of the interval I. Let us show that it is welldefined everywhere. We look at the end of the interval at y → 0, and with no loss of generality assume that the shrinking circle is ϕ 1 . (In this case κ is allowed to be any finite number.) For the metric to be smooth, we need Im τ R/y + . . . , Re τ const + . . . , a Ry + . . . , (B.20) where dots stay for terms of lower order in y, and R is the radius of the circle ϕ 2 at y = 0. First, assume that the variation δ(s/a) vanishes at y = 0 (or at least is integrable), so that v z at y = 0 is a finite number. Then the vector v is well-defined globally, if the basis vector where the omitted terms are non-singular at y = 0, and in fact go to zero. Then the variation of s/a is vanishing at y = 0, and is certainly integrable. We have proved that the THF is independent of the functions τ (y) and a(y). Now assume that τ (y) and a(y) are fixed, and κ is varied. Then we find Θ + 0 = 2is −1 δκ , Θ + − = 0 , (B.23) and the equations for v + become The first equation gives v + = 2iδκ(ϕ 2 + f (ϕ 1 + κϕ 2 , y)) , (B.25) where f should satisfy f (x + 2π, y) = f (x, y) , f (x + 2πκ, y) = f (x, y) − 2π , (B.26) which is impossible for a continuous function. Thus, v doesn't exist globally, and κ parameterizes non-trivial deformations of the THF.

B.2 An example
Here we find the Killing vector parameter κ for the squashed three-sphere background (6.21). The background supergravity fields include the B-field, an R-symmetry gauge field A (R) , and another gauge field C that couples to the central charge. For the squashed sphere that we are considering, explicit values of these fields can be found in section 5.2 of [34]. For our purposes it is sufficient to know that in this background V µ , which is the dual of the field strength for C, is a Killing vector, proportional to ∂ ϕ 1 . Given the supergravity fields, we would like to know which THF they correspond to. In general, the formula for V µ is [34] where λ is some function that satisfies K µ ∂ µ λ = 0. As before, K = −κ∂ ϕ 1 + ∂ ϕ 2 and we use notation s ≡ |K|. The equation for λ implies that it is a function of θ only. We assume that κ is real, in which case ξ = K/s. We substitute this ξ into (B.27). The condition that V ∝ ∂ ϕ 1 fixes λ, and we get For V to be a Killing vector, the coefficient in front of ∂ ϕ 1 must be constant. After a small computation, this translates into an equation for κ in terms of the parameter h of the metric, which commute with SO(3) 3 and satisfy the algebra of sigma matrices. When acting on positive chirality 10d spinors, we have B 0 = Γ 0123 . Under SO(3) 3 , the spinors transform as (2, 2, 2) × V 2 , where V 2 is a two-dimensional multiplicity space, acted on by the matrices B 0,1,2 . It is convenient to choose a basis of vectors in V 2 , and decompose all spinors accordingly. One natural choice for the basis would be the eigenvectors of the 4d chirality operator B 0 . But instead, following [39], we choose the basis to be the eigenvectors of B 2 . The advantage of this choice is that B 2 commutes with the group SO(6), acting in directions 012456, and we can work covariantly with respect to SO(6) × SO(3) Y . Correspondingly we decompose Ψ = Ψ + + Ψ − , B 2 Ψ ± = ±Ψ ± , (C. 3) and similarly for the supersymmetry generator . Note that on chiral 10d spinors, B 2 = −iΓ 012456 , and therefore Ψ + and Ψ − transform in 4 × 2 and 4 × 2 of SO(6) × SO(3) Y , with appropriate definition of 4 and 4. If we restrict to SO(3) 3 transformations, we can write Ψ + as Ψ αAȦ + v + , and similarly Ψ − as Ψ αAȦ − v − , where v ± are the ±1 eigenvectors of B 2 , which we choose to be related by v − = B 1 v + .
In the special case that SO(3) W invariance is preserved, we have 59 m ia = m 1 δ ia for some constant m 1 . Then the preserved supersymmetries are From the identity (6.5) we find (C.14) In particular, the parameterization (C.5), (C.9) breaks down on the subspaces t = −i and t = −i. 58 By self-dual here we mean i 6 q = q, where 6 is the Hodge star in six Euclidean dimensions. 59 The Kronecker symbol here identifies 0, 1, 2 with 4, 5, 6.

C.3 Simple half-BPS boundary conditions
The boundary condition necessarily requires δYȧ = 0. Taking the variation of this condition by the preserved supersymmetries gives the boundary condition for the fermions, Taking a supersymmetry variation of this equation should give the Neumann boundary conditions for the bosonic fields. Explicitly, F 3p (Γ 3p + / qΓ 3p/ q) + 1 2 F pq (Γ pq/ q + / qΓ pq ) + = 0 . (C.25)