Solving the AdS/CFT Y-system

Using integrability and analyticity properties of the AdS5/CFT4 Y-system we reduce it to a finite set of nonlinear integral equations. The Z4 symmetry of the underlying coset sigma model, in its quantum version, allows for a deeper insight into the analyticity structure of the underlying Y-functions and T-functions, as well as for their analyticity friendly parameterization in terms of Wronskian determinants of Q-functions. As a check for the new equations, we reproduce the numerical results for the Konishi operator previously obtained from the original infinite Y-system.


Introduction
It is well known that the spectra of integrable two dimensional QFT's in finite volume can be studied by the thermodynamic Bethe ansatz (TBA) approach [1]. TBA results in a system of non-linear integral equations which can be always "miraculously" recast into the universal Y-system -a system of functional equations on Y-functions, looking simpler than TBA, but at the price of loss of a certain analyticity input. Apart from some exceptional cases (Lee-Yang model, SS-model, Wess-Zumino cosets) both the TBA system and the Y-system are infinite. However, Destri and de Vega noticed [2] that the infinite TBA system for the vacuum of the Sine-Gordon model can be reduced to only one non-linear integral equation, and this was later generalized to excited states [3]. For the models with higher rank groups of symmetries a similar reduction to a few integral equations is usually possible. DdV-type equations often make possible a systematic study of IR and UV limits. In general this is the best one can do with the spectral problem of a finite volume integrable QFT. This reduction, still not very well studied and understood, can be traced down to the fact [4,5] that the Y-system itself is a gauge invariant version (see (2.3)) of the integrable finite difference bilinear Hirota equation, or T-system: T a,s (u + i 2 )T a,s (u − i 2 ) = T a+1,s (u)T a−1,s (u) + T a,s+1 (u)T a,s−1 (u) . (1.1) The equation is essentially the same for all known integrable 2D QFT's 1 , and what differs from one model to another is its boundary conditions w.r.t. the "representational" variables a, s and the analyticity properties w.r.t. the spectral parameter. In practice, the Hirota equation is often a very good starting point for attacking the finite volume spectrum problem in any integrable 2D QFT's (e.g. for an important case of the principal chiral field [4,6]): even the analyticity properties of T-functions appear to be considerably constrained by the structure of Hirota equation. All these observations should hold for the AdS/CFT Y-systems [7], and in particular for the most studied AdS 5 /CFT 4 case, solving the problem of planar spectrum of anomalous dimensions in N=4 SYM theory (see for the recent review [8], and in particular the chapters [9,10] therein). The AdS 5 /CFT 4 Y-and T-systems with T-hook boundary conditions proposed in [7] and summarized in figure 1 were later shown to be equivalent, with certain analyticity requirements [11][12][13], to the TBA equations [14][15][16]. It was shown in [17,18] (see also [19,20]) that the T-system, and hence the Y-system, in T-hook can be formally solved in terms of Wronskian determinants of a finite number of Qfunctions -a generalization of Baxter's Q-function. But the corresponding finite system of nonlinear integral equations (FiNLIE), a remote analogue of Destri-de Vega equations, was still missing. In this paper we propose such a FiNLIE for the planar AdS/CFT spectrum.
The difficulty of finding FiNLIE -possibly the ultimate step in simplifying the spectral problem in AdS/CFT -resides in its formidably complicated analytic structure w.r.t. the spectral parameter u: the Y-functions live on a Riemann surface with infinitely many sheets connected by an infinite system of Zhukovsky cuts (we will call them Z-cuts) parallel to the real axis, with the fixed branch points at u = ±2g + i 2 Z. This cut structure can be already seen in the asymptotic, infinite length solution of the Y-system [7] deduced from the asymptotic Bethe ansatz equations [21] describing the infinite volume spectrum. This analytic structure is also visible from the dispersion relation of elementary excitations and their bound states in the string sigma-model in the light-cone gauge, when the energy and momentum are parameterized by the spectral parameter u (see eqs.(2.7)-(2.8)).
One way to overcome these difficulties with analyticity is to work in the TBA formulation of the Y-system which implicitly includes all the information about the analyticity properties of the Yfunctions. This approach made possible the first numerical computation of the anomalous dimension of the lowest lying, Konishi state in planar N = 4 SYM [22].
However, to write FiNLIE we need to explicitly understand the missing analyticity properties of all Y-functions or T-functions. In the papers [11,13] the basic analytic properties of Y-functions were decrypted from TBA. Alternatively, together with the Y-system equations, these properties were shown to be equivalent to the TBA equations. This was an important progress though the resulting formulation of the problem contained the same infinite number of Y-functions and it still remained quite complex.
We find in this paper that the analytic properties become considerably simpler and more natural when formulated in terms of T-functions. We managed to formulate here a simple and sufficient set of analyticity properties of T-functions, mostly following from the symmetries of the model. In order to formulate these properties in a simple way we also have to make a good choice of labeling of the sheets of the Riemann surface. In this paper, we describe a choice which we call "magic", additional to the "physical" and "mirror" labeling already extensively used in the literature. The magic sheet has, unlike the mirror sheet, "short" cuts between the pairs of branch points u = ±2g + i 2 Z and coinciding with the mirror sheet in the vicinity of the real axis. On this sheet, we discover a new quantum symmetry (already mentioned in [18]), which generalizes the classical Z 4 symmetry of the string sigma model on the PSU(2,2|4) SO(1,5)×SO (6) coset [23,24]. Using this symmetry, we identified certain Q-functions having one single short Z-cut, which means that they can be written in terms of a density with a finite support [−2g, 2g].
These observations allow us to formulate the first (probably still perfectible) version of FiNLIE and even to perform its numerical study for the Konishi dimension. The results of this numerical study are in perfect correspondence with the results obtained in [22,25] from TBA and thus confirm the validity of our FiNLIE. We also prove the equivalence between FiNLIE and TBA analytically.  This paper is composed as follows: section 2 introduces the Y-system and our notations. The readers familiar with the subject can go directly to section 3 where the analytic properties of Tfunctions are described and the Z 4 symmetry of the classical string is generalized to a new symmetry of the full quantum T-functions. In section 4, the Wronskian solution of T-system in terms of a finite set of Q-functions is introduced. We work out here a compact and general representation of such solutions in terms of exterior forms. In section 5, the equations constraining these Q-functions are obtained with the use of the analyticity and symmetry constraints identified in section 3. Finally, section 6 summarizes our construction and the resulting FiNLIE, while section 7 presents the results of our first numerical implementation of this FiNLIE. A systematic study of the analyticity properties, as well as a recasting of the spectral problem into the FiNLIE form, are performed explicitly for the sl(2) sector's symmetric states, and in particular having only two magnons, containing a relatively large class of operators including Konishi operator.

Y-system generalities
For the detailed description of the Y-system for AdS/CFT we refer to [8][9][10]. In this section we list the main results and general facts about Y-systems and Hirota equation. The reader familiar with the basics of Y-systems can skip this section.

AdS/CFT Y-system
The AdS/CFT Y-system belongs to a class of functional equations arising in spectral problems of many integrable models Y a,s (u + i/2)Y a,s (u − i/2) = (1 + Y a,s+1 (u))(1 + Y a,s−1 (u)) (1 + 1/Y a+1,s (u))(1 + 1/Y a−1,s (u)) . (2.1) In particular, the same equations are used to compute the spectrum of SU (N ) principal chiral model [4,6] which is an important source of inspiration for the AdS/CFT case. Y-functions are associated with certain nodes on a two-dimensional (a, s) lattice. The main difference from model to model is the shape of the domain on this lattice where the Y-functions are defined. In the present AdS 5 /CFT 4 it is the T-shaped hook [7] depicted in figure 1b. 2 In addition to the shape of the (a, s) domain one should also specify the analyticity properties of the Y-functions. These properties can be deduced from the TBA equations [14][15][16] and were explicitly written in [9,11,13].
Y-functions are natural objects in the TBA approach, however not the most elementary ones. More fundamental quantities are the T-functions defined by Y a,s = T a,s+1 T a,s−1 T a+1,s T a−1,s .
As it is the case for many relativistic sigma models, T-functions can sometimes be identified with eigenvalues of the transfer matrices of an underlying spin chain-type discretization. A similar scenario may exist in the AdS/CFT case, however the physical interpretation of the AdS/CFT T-functions and their operatorial realization is not yet established. In the strong coupling limit the T-functions were identified with the psu(2, 2|4) characters of the monodromy matrix [17]. This classical monodromy matrix was perturbatively quantized, up to two loops on the world sheet, in [29,30] and the Hirota functional equation (1.1) was shown to hold at least in this approximation.
It was noticed for the AdS/CFT system that T-functions are much simpler objects than the Yfunctions in all limiting cases where the general solution of the Y-system was obtained explicitly, i.e. in the asymptotic large volume limit [7] and in the strong coupling limit [17]. It is very natural to assume that the formulation of analytic properties at the level of T-functions should be also more revealing and simple. Indeed this is the case, as described in the next sections.
As one can see from (1.1), the T-functions live in an enlarged T-hook depicted on figure 1b. The meaning of the shape of the (a, s) domain in this case also becomes clear in terms of the T-functions: the super-Young diagrams of the unitary highest weight representations of psu(2, 2|4) should be entirely contained inside this domain [17,27]. Furthermore, as we explain in this paper, an important Z 4 symmetry of the super-coset model noticed in [18] has a transparent realization in terms of the analyticity of T-functions w.r.t. both the spectral parameter u and the representational variables (a, s).
It is easy to see that the definition of T-functions by (2.2) is ambiguous. This ambiguity is expressed in the "gauge" transformation T a,s → g which does not affect Y's and the Hirota equation. Here and everywhere in the text we use a short-hand notation for the shift of the spectral parameter: It is also useful to notice that due to the Hirota equation (1.1) there are several equivalent ways for the Y-functions to be expressed in terms of the T-functions (2.5)

Notations
Let us introduce some important notations used through the text. We define the Zhukovsky variable 4π is related to the 't Hooft coupling λ, choosing two different branches 3 The first choice x(u) will be referred to as the mirror branch, whereasx(u) will be called either "physical" or equivalently 4 "magic". x(u) has a long cut, called from now on theŽ-cut, connecting the branch points ±2g through the infinity, whereasx(u) has a short cut [−2g, 2g] called Z-cut (see figure 2). The asymptotic energy of a single magnon (or of a bound state of a magnons) is given by [31][32][33] Similarly, the asymptotic magnon momentum iŝ (2.8) The energy and the momentum of a state are given by The anomalous dimension is defined as γ ≡ E − M . The shift of the spectral parameter is always defined by a path which avoids the fixed Z-andŽ-cuts of the functions 5 . For instance, the path in the shift u → u + ia/2 ofx [a] never crosses the Z-cut, while the path in the shift of x [a] never crosses theŽ-cut. As a consequence, figure 2) and thus the choice of the cuts affects the functional relations. The "hat" symbol over a function of the spectral parameter u (for instance in the definition (2.6) ofx(u)) means that we choose a Riemann sheet with only short Z-cuts. When the "hat" appears over a function of u and of the (a, s) labels, as on figure 1, then it denotes also the analytic continuation in the labels (a, s) performed on the sheet having only Z-cuts. This will be introduced in more detail in section 3.4 and section 3.5 (see for instance (3.17)). We will also use in this paper a short-hand notation for long cuts shifted by the distance in/2 from the real axis asŽ n and similarly for the short cuts as Z n . Another important notation which we will frequently use is A n , denoting the class of functions analytic 6 inside the strip |Im u| < n 2 . The The functions x(u) and 1/x(u).x The functionsx(u) and 1/x(u). Figure 2: Riemann sheets of the multivalued function x(u). The subfigure 2a represents the function u → x(u) (upper sheet) and u → 1/x(u) (lower sheet), whereas the subfigure 2b represents the function u →x(u) (upper sheet) and u → 1/x(u) (lower sheet). When u is real, x [±1] is defined by an analytic continuation from the real axis, along the red path which avoids the cutŽ 0 , whereasx [±1] is defined by a continuation along the green path which avoids the cut Z 0 . We see that

class of functions analytic in the interval
n . Usually it means that we have a pair ofŽ-cuts or Z-cuts at the boundaries of the corresponding analyticity strip.
In addition to the shift operation we will use the fused product for a function: 3] . . . f [1−s] . (2.10) This definition comes from the q-number notation: Finally, for the functions with cuts we define the discontinuity on the cut as follows In this paper we use the following Baxter-type polynomials and "Z-polynomials" 7 : For convenience we chose a normalization which assures the following simple relations: The roots u j of the Baxter polynomials in (2.12) are called "Bethe roots". They are related to x j by x j =x(u j ). Their number and positions completely define different states of the sl(2) sector of the theory to which we restrict our analysis in this paper.
In the integral equations that we will write we use the following kernels: .
The convolution is denoted, for arbitrary kernels K and function f , by

Fundamental properties of T-functions
The purpose of this section is to find T-functions in a gauge with good analyticity properties, different for each of three bands of the T-hook (see figure 1), and then to relate the three bands by transition functions (gauge transformations). We describe and motivate a new structure in AdS/CFT Y-and Tsystems which we call Z 4 symmetry. It is tightly related to the analytic properties of T-functions which we consider first. We will also introduce a concept of the "magic" sheet. Although some analyticity requirements of this section look a bit speculative, they are verified in appendix C from the TBA form of the Y-system. It is important to stress that one cannot find a global gauge with good analyticity properties for all T-functions in the whole T-hook. Therefor we rather describe three different, "physical" gauges with a good analyticity for, respectively, the right, left and upper bands of the T-hook, which are then related by the transitional gauge functions. Then we show that the analyticity requirements to the functions of these gauge transformations appear to be strong enough 8 to fix the system of FiNLIE and the corresponding physical solutions of the Y-system.

Analyticity strips
Whereas the Y-system itself follows to a large extent from the symmetry of the integrable theory the analytic properties of the Y-functions only partially are constrained by the consistency with the Y-system. However, they cannot be easily obtained from general properties of the theory. For the integrable theories for which the integrable lattice formulation is known the analytic properties can be read off from the underlying microscopic Bethe ansatz equations. However, in the present case such a formulation is unknown. Nevertheless, one can make reasonable assumptions based on the asymptotic solution of the Y-system proposed for an arbitrary state in [7] and from the integral TBA form of the Y-system for a subclass of sl(2) operators written in [15,22].
The analyticity properties of Y-functions which are expected to be satisfied by the physical solutions of the Y-system are written in table 1, in the notations of the previous section.These Y-functions Table 1: Analyticity properties of the Y-functions of the Y-system for AdS/CFT are considered on the mirror sheet which means that we have chosen the long Z-cuts [16]. Moreover, Y 1,±1 , Y 2,±2 have aŽ-cut on the real axis and are related on this cut by The last property was discovered from the TBA form of the Y-system in [15] but it will be considered here as one of the basic analyticity assumptions for our construction of FiNLIE. It means that Y 2,±2 and Y 1,±1 are not independent functions but rather the analytic continuation of one into another through theŽ 0 -cut. The above list of analytic properties for Y-functions also imposes certain analytic properties for Tfunctions. Most of them can be inferred from the definition of T 's (2.2), the analyticity of Y-functions, and the consequences of Hirota equation (2.5). Recall that the T-functions are not uniquely defined given the Y-functions, due to the gauge freedom (2.3). This makes the statement about the analyticity of T 's a bit more complicated and gauge dependent. A natural assumption, which will be later demonstrated, is that, in a certain gauge which we denote by the bold font, T a,s has good analyticity properties for the upper band, whether as in another gauge, denoted by the "blackboard" font, T a,s has good analyticity properties for the right band of the T-hook. 9 These analyticity properties are explicitly written in table 2.
Let us notice that there exists still some residual gauge freedom which will not spoil the analyticity properties. We will fix the remaining gauge ambiguity in the definition of T a,s and T a,s later on. In particular, we choose T 0,s = 1 .
(3.2) Now, with this knowledge of the analyticity strips, we will proceed with fixing the details of the analytic structure of T-functions in each strip.

Group theoretical constraints
Let us remind that there is some evidence [17,30] for interpretation of the T-functions as transfer matrices. In particular, at strong coupling the T-functions are reduced to the characters of classical monodromy matrix, in such a way that each pair of indices (a, s) corresponds to a unitary representation of the symmetry group PSU(2, 2|4) having a rectangular a × s Young tableau. This interpretation itself singles out a particular gauge. Indeed, according to [17] the pairs (n, 2) and (2, n), or (n, −2) and (2, −n), correspond for any n ≥ 2 to the same typical representation and should have equal characters. For the transfer matrices this also suggests a natural gauge where T n,2 = T 2,n , T n,−2 = T 2,−n , n ≥ 2 . This is indeed the gauge in which the Wronskian solution for the T-hook was written in [18].
if a ≥ |s|, if s ≥ a, T a,0 ∈ A a+1 T 1,±s ∈ A s T a,±1 ∈ A a T 2,±s ∈ A s−1 T a,±2 ∈ A a−1 T a,s , T a,s are real functions. Table 2: Analyticity properties of the T-function of the T-hook for AdS/CFT. Another constraint which we will impose is Q ∅ = 1. In the rational (super)-spin chains Q ∅ is the Baxter Q-function on the final step of the Bäcklund procedure [35,36], where it corresponds to the trivial gl(0|0) sub-algebra and therefore it is naturally represented by a constant that does not depend on the spectral parameter. The same observation holds when Q-functions are constructed from the first principles, i.e. as eigenvalues of Q-operators [37][38][39]. Even though the construction of Q-and T-operators in AdS/CFT is still in a preliminary stage (see [30] for the first nontrivial quantum computation with T-operators), we believe that Q ∅ will play the same role, i.e. it will be an identity operator.
The quantum super-determinant should be also set to 1. In [18] 10 the quantum determinant was identified with the following combination of the Q-functions: Setting it to 1 and recalling that gives the following "unimodularity" constraint 11 This tells that T 0,0 should be an i−periodic function 12 . Due to the importance of this quantity, in what follows we introduce a special notation We expect T to be a kind of a physical gauge. In this gauge the T-functions exhibit all natural symmetries of the characters, and for the left-right wing symmetric states (in particular, the sl(2) or su(2) states; we will call them LR-symmetric from now on) it can be shown to be essentially unique when supplemented by a set of analyticity conditions summarized in (3.44) (see Appendix E.1). Moreover, we will show that in addition to the properties listed above there is one more very important symmetry of the T-gauge which we call Z 4 symmetry.
Finally, let us define T in terms of T. A natural candidate for that is the following, very particular gauge transformation (2.3) from one to another: This transformation does not change indeed the gauge invariant Y-functions. The relation (3.6) can be considered as a minimal gauge transformation from T (where T 0,s , for instance, has an infinite number 10 see the eq.(4.6) and the beginning of sec.5.3 there 11 A closer look reveals an intimate connection of T 0,0 with the dressing kernel in TBA. This is similar to the case of relativistic sigma models with rational S-matrices, where the scalar factor of R-matrix needed to set the quantum determinant to one is equal to the dressing factor of the factorized S-matrix in the integrable field theory with the same symmetry group [40]. 12 We recall that since the original Y-system is defined on the mirror sheet, the corresponding Ta,s are defined as functions with long cuts. The periodicity condition is sensible to the choice of cuts. Periodicity of T 0,0 can be also obtained from the TBA equations, see appendix C.2. of branch points) to a gauge with the analyticity bands of table 2. Indeed, we see that T 0,s = 1. The property T 2,±s ∈ A s−1 is also obviously true since T 2,a = T 2,a . Then T 1,s = ±T 1,s /F [1+s] seems to be a natural choice since both T 1,1 and T 1,1 should be regular functions 13 with the same analyticity strip, according to table 2, and the factor 1/F will not spoil it. Moreover, as it is shown in appendix C.2, the property T 1,s ∈ A s and (3.6) itself, for which we gave a motivation above, rigorously follow from the TBA equations. The overall sign (−1) a(s+1) does not affect the analyticity strips and can be chosen arbitrarily, by adjusting definition of the T-gauge. Our choice will eventually provide a simpler behavior of Q-functions at u → ∞.

Magic sheet
Let us consider T-functions in the right band of the T-hook, i.e. for T a,s with s ≥ a. In this case the T-functions satisfy precisely the same Hirota equations as for the su(2) principal chiral model in [4]. Moreover, at least for the sl(2) states the Y-functions obey a similar asymptotics Y 1,s → s 2 −1, u → ∞. This property is well seen in the ABA limit, see app. B.1, and also holds at finite size, see app. B.2. Therefore, to construct the T-functions with a good analyticity in this band we choose a gauge 14 T with T 1,s → s, u → ∞ (i.e. it tends to the dimension of representation in this limit), preserving the analyticity strip A s and the property T 0,s = 1.
Following the logic of [4,6] we find the general solution of Hirota equation satisfying all these properties in the right band of the T-hook in terms of the Q-functions 15 namely, where we introduced two mutually complex conjugate resolvents: The function G (functionḠ) is analytic everywhere above(below) the real axis and should be defined by analytic continuation in the lower(upper) half-plane. In general, one would expect G to have infinitely manyŽ-cutsŽ 0 ,Ž −2 ,Ž −4 , . . .. Also notice that G [+0] +Ḡ [−0] = ρ. In these notations we get In this way we write all T-functions, and thus Y-functions of the right band in terms of one single real function ρ. This result was first time presented at the talk [41]. Later an alternative way to reduce the right band to a finite set of functions was proposed in [42]. The function ρ can be fixed by gluing this right band of the T-hook to the rest of it, into the single T-system. A gauge-invariant way of doing this is to consider the following combination of Y 1,1 and Y 2,2 : A nice feature of this combination is that it can be expressed entirely in terms of T-functions from the right band: (3.12) Using (3.10) we find Due to the property (3.1) we should get Since on the real axis the r.h.s. of (3.13) has branch points due to G andḠ, whereas G [+2] and G [−2] are regular there, the relation (3.14) can be satisfied by imposing the following simple condition: This simple observation has some dramatic consequences. First, due to ρ = G [+0] +Ḡ [−0] we see that the density ρ has a finite support on the cut [−2g, 2g]. This allows us to clarify the definition of the resolvent as follows:Ĝ We clearly see the advantage of the choice of the Riemann sheet with only "short" Z-cuts Z n over the "long" cutsŽ n : the same function G(u), when being defined as a function with the short cuts, appears to beĜ(u) -a function with only one single cut! We can go further and convert any function with longŽ-cuts into a function with short cuts by the appropriate choice of the section of the Riemann surface (a priori of an infinite genus). As we shall see, this strategy leads indeed to an essential simplification of analytic properties of various functions involved in the TBA equations. By this reason we call this section of the Riemann surface the "magic" sheet. We systematically denote various functions defined on that sheet by a hat over them leaving the same quantities on the mirror sheet without the hat.

Z 4 symmetry
In this subsection we study the properties of the magic version of T-functions in the right band of the T-hook which we denote byT a,s . To produce this function we should simply systematically replace all G andḠ in (3.10) byĜ:T 0,s = 1 , Secondly, although the initial parameterization (3.10) of T a,s (and thus ofT a,s ) makes sense 16 only for s ≥ a, we can formally defineT a,s for any −∞ < s < ∞ by (3.17). Interestingly, for s = 1 we get thenT which is consistent withT In fact, it is easy to see thatT a,s defined by (3.17) satisfy Hirota equation for any s if we define it for −∞ < s ≤ 1 as an analytic continuation in s. 17 Finally, the magic T-functions for the right band defined in this way satisfŷ T a,−s = (−1) aT a,s . We call this new symmetry of the AdS/CFT T-functions the Z 4 -symmetry. In the appendix A we motivate its relation to the Z 4 symmetry of the classical monodromy matrix of the string sigma model (inherited from Z 4 symmetry in the super coset action construction). It is evident that T is related to T by a gauge transformation. Since in both gauges T 0,s = T 0,s = 1 and T-functions are real we have to take in (2.3) g 4 = 1/g 1 , g 3 = 1/g 2 , in both gauges the analyticity strips are the same and given by table 2, h should be analytic in the upper half-plane. In addition, in appendix C.4 we show that h should be real on the magic sheet 18 . Therefore T's can be found from the relation (3.17) as from were it follows thatT a,s also obeys Z 4 symmetry property given by (3.21).
Note that reality ofĥ together with its analyticity in the upper half-plane means thatĥ has only one single cut Z 0 , similarly toĜ. Therefore T-gauge inherits another "magic" property of the T -gauge -finite number of short Z-cuts. In particular,T 1,s has only two of them: Z s and Z −s .

Z 4 invariance of the upper band
In this section we argue that the Z 4 symmetry also leads to an additional symmetry transformation in the T-gauge having good analyticity properties in the upper band. In order to see it we have to pass to the magic sheet and then analytically continue the solution of Hirota equation in the variable a from a ≥ |s| to a < |s|, defining in this wayT a,s for an arbitrary integer a, positive or negative, providing that −2 ≤ s ≤ 2. Our claim, stemming from the Z 4 symmetry, is thatT a,s defined in this way obeys the property similar to (3.21) of the right band: Let us demonstrate it. Consider a combination of Y-functions Y 1,1 Y 2,2 which reads in terms of Tfunctions as follows: Here we use that, by definition of the bold gauge, T 2,3 = T 3,2 and T 0,1 = T + 0,0 = T − 0,0 . Next, from (3.1) we notice that Y 1,1 Y 2,2 gets inverted when passing through the cut Z 0 : If we simply substitute expression (3.24) into (3.25) we get 19 On the other hand, Hirota equation on the magic sheet reads as follows: To give some more evidence to these results let us consider a bit more complicated example. Take another expression built from Y 1,1 and Y 2,2 which is rewritten entirely in terms of the T-functions of the upper band of the T-hook (a ≥ |s|) (3.31) 19 we use a natural notation From the property (3.1) of Y -functions it follows again that If we calculate s slightly bellow the mirrorŽ 0 cut we can represent it as a product of the following two ratios: , for |u| > 2g. (3.33) Now we notice that the second multiplier is simply 1 if Z 4 symmetry holds. Indeed, the magic Hirota relations giveT + 2,2T and we see that (3.32) is satisfied assuming, as usual for the AdS/CFT integrability, that all branch points are of a square root type (in fact only Z-cuts are present). This is an additional argument for the hypothesis thatT 0,1 = 0 .
In appendix C the Z 4 -symmetry of the upper band is derived rigorously from the TBA equations. However, from our point of view, the Z 4 -symmetry should be rather included into the list of fundamental properties of the AdS/CFT Y-system, out of which the TBA equations can be derived.

Bethe equations
In the study of integrable spin chains a very convenient way of writing the Bethe equations is the Baxter equation supplemented with the condition that the eigenvalues of transfer matrices are analytic. Analyticity is an obvious fact from the very definition of the transfer matrix, but it is not immediately clear from the explicit expression for its eigenvalues in terms of the Bethe roots and is only true once the Bethe equations are satisfied.
Provided that the interpretation of [20] is correct and the T-functions of AdS/CFT are indeed the transfer matrix eigenvalues one should expect that the auxiliary Bethe roots (carrying no momentum and energy) can be found by requiring some good analytic properties for the physical transfer matrices. In this paper we restrict ourselves to the sl(2) sector, which has no auxiliary roots, and thus the analyticity should be simpler.
As it is shown in appendix E.1, one can make gauge transformations by means of i-periodic functions without Z-cuts preserving all the properties of T-and T-gauge mentioned before in this section. We claim that it is possible to show that the requirement of absence of poles in the Tfunctions in T-and T-gauges, at least in their analyticity strips, together with the requirement that T 0,0 has the minimal possible number of zeroes in its analyticity strip, removes the residual gauge ambiguity. This fixes the T-and T-gauges completely up to an inessential constant factor. Now suppose that T 0,0 has some number of zeroes in the strip −1/2 < Im (u) < 1/2. Since F = T 0,0 defines the gauge transformation between T-and T-gauges, the only possibility to avoid the appearance of branch points different of those of standard Z-cuts, is to have only the double zeroes in T 0,0 , so that F has only simple zeroes. We denote these zeros as u j and assume that there are M such zeroes.
Comparison with the TBA equations shows that u j are nothing but the Bethe roots and thus we should also satisfy To get the Bethe equations used in the TBA approach, we continue Y 1,0 using the path γ (on the left). Alternatively we can formulate Bethe equations using T 1,1 continued over γ + and γ − (on the right).
where Y γ 1,0 denotes the analytic continuation along the contour γ defined on figure 4. Let us mention a curious observation. Since T 1,2 = T 1,2 /F + , the absence of poles in T 1,2 is only possible if T 1,2 has zeroes at positions u j ± i/2. Assuming that T 2,1 does not have zeroes at u j ± i/2, Y 2,2 = T 2,1 /T 1,2 should have poles at u j ± i/2. On the other hand, let us consider analytic continuation along the contour γ of the Y-system equation at a = 1, s = 1. Using (3.1), one gets On the l.h.s., the poles of the Y − 2,2 at zeroes of the Bethe roots are conveniently canceled with zeroes of (1 + Y γ 1,0 ), due to (3.35). Therefore we see that the exact Bethe equations (3.35) can be replaced by the condition that the r.h.s. should be regular at u = u j . We believe that it reduces to the condition of regularity of (Y + 1,1 ) γ at u = u j . This is an interesting statement deserving a further study. In appendix E.2 we show that the Bethe equations (3.35) can be alternatively written aŝ where the analytic continuation along the contours γ ± is defined on the right of figure 4. Eq. (3.36) looks more natural than (3.35) since T 1,1 has only one Z-cut in each of the half-planes of the magic sheet, therefore the analytic continuation along γ + or γ − is uniquely defined. On the contrary, Y 1,0 has infinitely manyŽ-cuts in the mirror sheet and one should impose an additional condition in (3.35) that the contour γ goes only through the closest cut. In appendix E.2 we analyze (3.36) and represent it in terms of the quantities suitable for numerics.

Expression for the energy
The transfer matrices of integrable models form a commutative set of operators. Their expansion with respect to the spectral parameter produces a family of conserved charges, one of them being energy. Hence we expect the energy to be encoded into certain asymptotics of the T-functions. To see how it happens in AdS/CFT case let us first consider the TBA equation for Y 1,1 Y 2,2 given in [15] (the sum of eqs.(40-41) therein) The kernel Z a is defined in section 2.2 and for u → ∞ + i0 can be written as 20 The product in the pre-exponent has a similar expansion: Therefore the exact finite volume expression for Y 1,1 Y 2,2 has the following large u expansion: where we used (2.9). Note that for all physical states P = 0. Now let us recall that . Since T 1,0 is regular on the real axis we get due to (3.1) This important property essentially defines the function T 0,0 in terms of the product of Y-functions (see appendix E.3), and it will be often used in this paper. Since T 0,0 is an i-periodic function, one gets: so that both T 0,0 's are inside the analyticity strip. We can see that this expression implies Thus T 0,0 renders indeed the value of energy of the state when being expanded in u.

Summary of properties of T a,s and T a,s
In this subsection, for convenience of the reader we summarize the properties of the T-functions encountered above. First, the T-functions satisfy the following analyticity properties: T's are real functions analytic in the upper band: T's satisfy "group-theoretical" properties: They satisfy the properties: T's are real functions analytic in the right(left) band: In this paper, restricted to the states of sl 2 sector, the symmetry between the right and left wing implies an extra relation T a,s = T a,−s .
All the listed properties of T-functions can be derived from the TBA equations, as we show in appendix C. However, in this paper we take a different point of view and consider them to be fundamental. Below we fix the solution using only these properties and taking some extra information about the large u behavior of various functions from the large volume asymptotic solution.
In appendix E we show that the conditions (3.44) assure that the T-gauge is unique up to a normalization constant.

Wronskian solution
In section 3.3 we managed to express all T-functions T a,s in the right band of the T-hook in terms of a single function -the spectral density ρ. In this section we will find a similar representation for the upper band of the T-hook by using the so-called Wronskian determinant solution of Hirota equation in the infinite band −2 ≤ s ≤ 2, −∞ ≤ a ≤ ∞. The right (left) and upper bands of the T-hook will be represented by 2 × 2 and 4 × 4 Wronskian determinants, respectively. In the next section, the full finite set of equations, FiNLIE, will be found by gluing these three bands together into the full T-hook. Each of these steps has to be done by respecting the structure of analyticity strips of T-functions.
The Wronskian solution allows to parameterize the infinite set of T-functions satisfying Hirota equation in a band, in terms of a finite number of Q-functions. It is thus important to understand the analyticity properties of the underlying Q-functions in virtue of the analyticity conditions and the symmetries, such as Z 4 symmetry, established in the previous section. The representation in terms of Q-functions will be the base for construction of the FiNLIE system for AdS 5 /CFT 4 formulated in sections 5,6 and solved then numerically in section 7.

General Wronskian solution
Here we describe the Wronskian solution for Hirota equation (1.1) on an arbitrary infinite band of width n shown in figure 5. Let us denote this band as B (n) . This kind of Wronskian solutions was used in [35] for the analysis of the su(n) quantum spin chains and in [6] for the solution of the su(n) principal chiral field (PCF) model in a finite volume. 21 At this point, we do not specify any particular boundary conditions at the end (s = 0) of the band (we need three semi-infinite bands, one B (4) and two B (2) , for the construction of the T-hook).
A possible basis of the Wronskian ansatz is a set 2n + 2 Q-functions: q ∅ , q i and p ∅ , p i where i = 1, 2, . . . , n. To get rid of numerous indices it is very convenient to use the formalism of exterior forms. Namely, introducing an auxiliary basis of n vectors e i we define the 1-forms: Then, introducing the k-forms 22 (and similar definitions for p (k) ), we write the general Wronskian solution for the B (n) band [35] simply as follows where we identify the exterior n-form with a scalar, e 1 ∧ · · · ∧ e n ≡ 1. One can easily check that for arbitrary q's and p's, T a,s defined in this way satisfy indeed Hirota equation with T a,s = 0 outside the band B (n) . Notice however, that there is a certain freedom in choosing different sets of q ∅ , q i and p ∅ , p i for the same solution of Hirota equation. Indeed, the construction possesses the following sl(n) symmetry: which leaves T a,s invariant for an arbitrary non-degenerate i-periodic matrix H(u). There are also two scalar symmetries: with arbitrary i-periodic functions C and F . Eqs.(4.3) and (4.4) form the complete set of transformations of the Wronskian solution which leave T's invariant. Indeed, q 1 , q 2 , . . . q n should be n independent solutions of the Baxter equation (see for instance [35]). Any other solution of the Baxter equation should be a linear combination of these n solutions with coefficients being i-periodic functions, i.e. it should be related to those n solutions by a combination of transformations (4.3) and (4.4). The same is true for p 1 , p 2 . . . , p n . We have also an additional freedom in rescaling p ∅ and q ∅ which explains why there are two scalar symmetries (4.4) and not one.

Right band
In this subsection, to demonstrate to the reader the method of Wronskians, we rewrite the results of section 3 for the right band in Wronskian notations. Also we will discuss rigorously the analyticity properties of Q-functions of the right band previously assumed in section 3 as being just natural. All this will be very helpful when we generalize these methods, in the next couple of subsections and in appendix D, to the considerably more complicated case of the upper band.
Using Eq. (4.1) we can write the T-functions in the right band in terms of 6, so far arbitrary This is the most general solution of Hirota equation in the infinite horizontal B (2) in (a, s) plane, without any analyticity assumptions. Let us show how Z 4 symmetry constrains the form of this solution and its analyticity properties.
• FromT 1,0 = 0, which is a consequence of Z 4 property (3.46c), we conclude that the formsp and q are linearly dependent:p = αq, where α is a function of the spectral parameter.
From all these properties we get the solution which depends only onq 1 andq 2 : The solution (4.7) literally coincides with the parameterization of su(2) XXX spin chain transfer matrices in terms of the Baxter Q-functions 24 [35] . This implies that the following system of Baxter equations should be satisfied:q which is easy to check explicitly by substitution of (4.7). The equations (4.8) are very useful for the analysis of analytic properties of Q-functions induced by the analyticity of T-functions. Using them we can prove that the analyticity of T 1,s inside the strip A s and ofT 1,1 everywhere except Z ±1 , implies the existence of such a symmetry transformation H from (4.3) thatq 1 andq 2 are analytic everywhere except a single cut Z 0 on the real axis. In particular, this shows that allT 1,s have only two magic cuts.
Here is the idea of the proof. From the analyticity properties of T-functions and (4.8) it follows: In other words, the discontinuities ofq's on the cuts Z −2 and Z −4 define all discontinuities on Z 2r , r > 0. We see that if a solution is regular at Z −2 and Z −4 , it is then automatically regular in the upper half-plane. The conjugate of equation (4.9) expressing the discontinuities ofq's on Z −2r in terms of the discontinuities on Z 2 , Z 4 implies the analyticity in the lower half-plane. It is enough to find such a symmetry transformation (4.3) that which represents a Riemann-Hilbert problem. Assuming that it has a solution we can prove the abovementioned statement. In order to argue that the solution exists let us recast Eq. (4.10) into a linear integral equation where P j i are some i-periodic functions without cuts. It is convenient first to relax the condition detH = 1. Then (4.11) is a linear equation for four independent matrix elements of H. Suppose we found a solution of (4.11) which means that there is indeed a linear combinationsq i of the initialq i with periodic coefficients without cuts Z −2 and Z −4 . As it is easy to see,q i also satisfy (4.8) and, as a consequence, (4.9) which then implies thatq i could have only one single cut Z 0 . We should remember, however, that the expression for T 1,s in terms ofq i will also contain detH in denominator. This denominator is easy to get rid of since it is a periodic function and cannot contain any cuts.
and so we can absorb detH intoq [+s] keeping the nice analyticity properties ofq [+s] . It is important to mention that the explicitly found in [18] large volume asymptotics of Q-functions has indeed only one cut.
We still have some freedom in the H-transformations for H i j being regular i-periodic functions. A part of this freedom can be used to makeq 1 real andq 2 purely imaginary. Both functions have only one cut and thus can be very efficiently written in terms of a spectral representation (i.e. from the discontinuities on the cuts).
We finish the discussion of the right band by relating theq's to the quantities introduced in section 3. One can easily identifyq 1 = (−iu +Ĝ)ĥ andq 2 =ĥ, whereĜ was defined in (3.16).

Upper band
For the upper band we can perform a similar procedure, but now in the T-gauge. The following 10 functions can be used as a basis: q ∅ , p ∅ and q i ,p i , i = 1, . . . , 4. 25 The multi-indexed Q-functions q ij , q ijk and q ijkl can be determined from the Plücker determinant formulae (4.1) in the vertical B (4) band of the T-hook: 26 (4.13) 25 In the notations of [18] they are 26 There exists a Wronskian parameterization of the general solution in the full T-hook [18,28] and it can be also represented in terms of exterior forms (we postpone it to future publications). But in this paper we prefer to build our physical solution from three Z 4 -symmetric bands.
Wronskian solution of the vertical band is then written in an extremely compact form 27 : (4.14) The Wronskian ansatz (4.14) gives the formal general solution of Hirota equation in the vertical B (4) shown in figure 7. Further restrictions on the underlying q's are needed to ensure that the Z 4 properties are satisfied, as well as the other analyticity properties listed in section 3.8. Moreover, for simplicity we consider the LR-symmetric states only 28 and hence an additional, LR wing exchange symmetry is imposed:T a,−s =T a,s .
(4. 15) In appendix D we study all these conditions in detail. For the moment let us notice that from 1,1 andT a,2 =T a,−2 . Therefore we can set by making appropriate transformations (4.4).
After that we still have a residual sl(4) symmetry (4.3). As we prove in appendix D.8, this symmetry can be partially used to choose q-s and p-s satisfying the following relations: As a consequence of (4.17) we also get With these identifications, we obtain from (4.14) an explicitly real and LR-symmetric parameterization [18]:T One may wonder whether the Wronskian solution (4.14) possesses a finite cut structure for the Q-functions, as it was the case for the right band. We performed a detailed analysis of this question in appendix D and came to the conclusion that unfortunately at least some of Q-functions should have infinite number of cuts. However, we were able to show that there is a choice of Q-functions such that q (k) is analytic in the upper half-plane above Z −1+|k−2| and p (k) is analytic in the lower half-plane below Z 1−|k−2| , where the Z-cuts are absent. This analyticity condition fixes a part of the sl(4) symmetry. It can be shown that the transformations (4.3, 4.4a, 4.4b) used to enforce (4.17) do not spoil this analyticity condition, so that we can impose that (4.17) holds for Q-functions such that q (k) is analytic in the upper half-plane above Z −1+|k−2| . In the rest of the paper we stick to this analytic choice of the Q-functions.
A nice property of the relations (4.17), especially important for the numerical applications, is that for the large volume L the terms in the Wronskian formulas (4.19) are well distinguished by their magnitude: the first two terms in T a,±1 are of the order one whether as the other two are exponentially 27 In this section we systematically remove hats over q-s and p-s for convenience, however we consider them as functions with short cuts. 28 This includes in particular all sl(2) and su(2) states, and many more.
small w.r.t. the length L. Similarly, the first term in T a,0 is of the order 1 whether as the other are exponentially suppressed. Let us show that it is enough to know q 1 , q 2 , q 12 to restore unambiguously all the q-functions of the upper band. For that we use the Plücker relations which follow from (4.14) and are explicitly given in [18,20,36]: Reconstruction of the rest of q functions goes as follows: • From (4.20) with ij = 12 one finds • Relations (4.21) for ijk = 123, 124, 213 and 214 can be explicitly written in view of (4.17) as We can unambiguously and explicitly define q 13 , q 14 , q 23 and q 24 through q 1 , q 2 , q 12 using their regularity above Z −1 , by inverting the linear difference operators in these Plücker relations. Note that q 14 = q 23 .
Let us summarize the analyticity properties of the Q-functions introduced in the previous section: q 1 , q 2 are regular above Z 0 and q 12 is regular above Z −1 . A simple inspection of relations (4.20) and (4.21) shows that this automatically ensures the correct analyticity of all the rest of q-functions, and, consequently, of all T-functions of the upper band: q ∅ is regular above Z 1 , q i are regular above Z 0 and q ij are regular above Z −1 .

Finite set of equations
In the previous section we managed to parameterize the T-functions of all three bands of the Thook by Wronskian determinants of the Q-functions and establish their symmetry and analyticity properties. Here we will derive yet missing equations of the system FiNLIE gluing all three bands together into the single T-hook by means of a few transition functions and constraining these functions by their analyticity properties. The method will not appeal to the TBA equations but rather will be based on the properties listed in section 3.8, from which the TBA equations also follow (as is shown in appendix C). They look more fundamental and simple then the set of analyticity properties for the construction of TBA from the Y-system given in [11] but their equivalence is demonstrated in appendix C.

Density parameterization of the upper band
In section 4.3 we explained how all the T-functions of the upper band can be written in terms of only three independent functions: q 1 , q 2 and q 12 . Let us now introduce a suitable parameterization for them: defined by so that: 3) The T -functions and the T-functions are related as follows In particular, one can see that the LR symmetry of T a,s implies that Knowing the analytic structure of the functions (5.1) we can parameterize them in terms of spectral densities with the support on R. Not only it is conceptually important for the reformulation of the whole Y-system as a finite Riemann-Hilbert problem but it is also very convenient for the numerics.
First, as we see from (5.1) W = q1 q2 and thus it should be regular in the upper half-plane. This allows us to introduce the spectral representation for W . Defining a real functioñ for the states with two symmetric magnons we can write This function W used for parameterization of the upper band is a direct analog of the function Q 1 parameterizing the right band and defined before in eqs.(3.7),(3.9) aŝ (5.11) In the large volume limit, the densities ρ andρ 2 become semi-circle distributions with a finite support on Z 0 . At a finite volume ρ still has the same finite support whereasρ 2 becomes non-zero everywhere on the real axis. However, if we define ρ 2 ≡ρ 2 + q [+0] 3q then the Z 4 constraintT 0,1 = 0 implies 30 that ρ 2 has a finite support, in complete analogy with ρ. In terms of this density W is parameterized as follows: Contribution from q 3 and q 4 vanishes for large volume and thus the parameterization (5.12) is very handy for numerics. Similar spectral representation can be written for f and U and thus we conclude that the spectral problem reduces to a problem of finding a few densities as well as a few additional parameters, such as the Bethe roots. In the next subsection we show however that the function f can be explicitly excluded from the final FiNLIE. The further restrictions on the densities are due to the symmetries, analyticity properties and the condition that the Hirota equation is satisfied not only inside the bands but also in all nodes of the T-hook. In other words one should sew the three bands of the T-hook together to close FiNLIE.

Closing the system of FiNLIE
In this subsection we show how the system of equations can be closed by sewing the T-hook from three bands and imposing the analyticity properties discussed earlier.

Equation for f
The regularity of the Q-functions in a half-plane allowed us to write a spectral representation of W in terms of a single density ρ 2 (5.12). Here we will exploit the analyticity properties of U and f , which follow from their relation to the Q-functions (5.1), to write the equations for fermionic Y-functions Y 1,±1 , Y 2,±2 . Namely, we will use the fact that the functions U, f − ,ĥ are regular in the upper halfplane. Moreover, for a sufficiently large L (or sufficiently small coupling constant) these functions do not have poles and zeroes in the upper half-plane and behave as a power of u at u → ∞, as one can see from the asymptotic limit (see appendix B).
Considering a function f − f + 2 we see from (5.4) that it can be written through T-functions of the upper band and the fermionic Y-functions as follows: (5.13) Moreover, due to the analyticity properties of f this function is analytic in the upper half-plane and goes to 1 at infinity there. Also we assume (and our numerics seems to confirm it) that it has neither zeros nor poles there. Thus one can construct a spectral representation for log B in the upper half-plane log B = K * ρ b , Im u > 0, (5.14) 30 One can define ρ 2 (u) ≡ lim →+0T ,1 (u). For u ∈Ž 0 the limit is zero since it is equal toT 0,1 which must vanish due to Z 4 . From (5.6) we get ρ 2 =ρ 2 + q [+0] 3q from its real part on the real axis Alternatively, one can also reconstruct B log B = K * η b , Im u > 0 (5.16) from its imaginary part (5.17) Notice that in both representations (5.14),(5.16) the term log B(v − i0) does not contribute in the r.h.s. We also used the fact that due to (3.1) log(Y 1,1 Y 2,2 ) is real between the branch points ±2g and is purely imaginary outside that interval.
The former representation has an advantage with respect to the latter one since ρ b (v) tends to zero faster than η b when v → ±∞. This is because at large v B is asymptotically a phase 31 as can be seen from (5.13).
Since B is a simple combination of f 's, one can determine f from the following finite difference equation: Keeping in mind that f should be regular in the upper half-plane we write the solution as follows The sum in the r.h.s. is divergent, however the divergence is just an infinite constant which can be regularized, as in (2.16), so that log Again we will use the fact that due to (3.1) log(Y 1,1 Y 2,2 ) is real between the branch points ±2g and is purely imaginary outside that interval. Together with the square root the product Y 1,1 Y 2,2 drops out from the imaginary part Im (logB) and therefore does not appear in the r.h.s. of the spectral representation Inserting the definition ofB (5.13,5.21) into the l.h.s of (5.22) and shifting the contours of integration in the integrals involving log T ± 0,0 we obtain an equation for Y 11 Y 22 expressing it through T 1,0 and T 0,0 and the polynomial Q(u) = M j=1 (u − u j ) encoding the Bethe roots of the state: Next, writing the ratio of the Y-functions in terms of T, 26) and using that, according to (3.45) and (3.22), T − 1,1 /T 1,2 = −ĥ h [2] T − 1,1 /T 1,2 we construct from here the quantity which is written completely in terms of functions analytic in the upper half-plane and approaching 1 at infinity. Its spectral representation is again straightforward: with the spectral density given by Here we use the reality of T-functions as well as the reality of log Y 1,1 /Y 2,2 so that the Y-functions again drop out from the density. Furthermore, we can get rid of the shift in arguments of the functions in the definition of the density by shifting the integration contours in (5.28). As before, one should be careful with the singularities at the positions of Bethe roots. This gives log This equation is also equivalent to the corresponding combination of TBA equations for fermionic nodes as it is shown in appendix C.2. Note however that, as we see from (3.1), the functions Y 1,1 and 1/Y 2,2 are not independent but rather they are the values of the same function on two consecutive Riemann sheets. So the ratio or the product of (5.24) and (5.30) are enough to fix any of them (up to a sign).
Equation for U : One can find U from the left equality in (5.27). Again we get a finite difference equation which can be solved up to a constant Λ as follows: Similarly to (5.20), (5.31) is not sensitive to the choice between η c = log C(u+i0) C(u−i0) and ρ c = log C(u + i0)C(u − i0) which differ by a function holomorphic in the lower half-plane. Numerically, it is more convenient to use ρ c in (5.31) because it quickly decreases to zero when u → ∞. We fix the constant Λ in (E. 21). The yet unknown functionĥ is determined below.

Equations for ρ and ρ 2
From (3.13) and (3.16) we get an equation expressing the resolventĜ, or equivalently, the density ρ through the Y-functions Y 11 and Y 22 where / K + 1 * ρ denotes the principal part of the convolution along the interval [−2g, 2g]. Expressing ρ from the terms without convolution in the r.h.s. of (5.32) we can easily determine ρ numerically, by iterations, as a function of 1+1/Y2,2 1+Y1,1 .
To fix ρ 2 we use a similar ratio of Y-functions which can be expressed only through the T-functions of the upper band, namely where each T-function can be expressed through q-functions according to (5.6) 32 . The explicit expression for the r.h.s. of (5.33) is similar to the r.h.s. of (5.32), up to the substitution ρ → ρ 2 and to a number of additional terms involving q 3 and q 4 . As a consequence, ρ 2 is expressed as a function of 1+Y2,2 1+1/Y1,1 and q 3 ,q 4 . Note that q 3 and q 4 are relatively small and vanish in the large volume -the fact which is important for our numerical iterative procedure described below. 32 For instance, one gets T + 1,

Equation forĥ
To obtain this last equation needed to complete our FiNLIE, we employ a couple of Hirota equations in the T-gauge: We notice that in this gauge T 0,1 = 1,T 2,s =T [+s] 1,1T [−s] 1,1 , T 3,2 = −F + T 2,3 , T 1,0 = −Y 1,1 Y 2,2 F + and the magic and mirror functions are related for u ∈ Z 0 by T 2,3 =T 2,3 , . Using all these properties and excluding T 2,1 from both equations we getT We know thatĥ has only one Z 0 -cut. Asymptotically, for large volumeĥ 2 behaves at large u as u −L−2 (see appendix B), and hence the monodromy ofĥ 2 should be trivial for the closed paths surrounding its single Z-cut. This topological property is unlikely to be changed for a finite size and therefore the large u behavior ofĥ should be the same as in the asymptotic limit. Moreover, since in the asymptotic limitĥ has no poles or zeroes we conclude that at least for sufficiently large but finite L (or small but finite g) the discontinuity equation (5.37) uniquely fixes it as follows: We remind that the function F = T 0,0 can be written in terms of Q-functions. Alternatively we can use (3.41) to write it in terms of the Y-functions Y 1,1 , Y 2,2 which is a very convenient equation for numerics (see appendix E).
This concludes the derivation of FiNLIE for the exact anomalous dimensions of the sl(2) sector's symmetric states in AdS 5 /CFT 4 . Our derivation uses only the properties of T-and T-functions summarized in section 3.8, which can be either derived from TBA integral equations or postulated, from the explicit knowledge of large volume solution given in appendix B (weak coupling solution is enough as well), and an assumption, which can be verified in every explicit computation, that qualitative structure of poles and zeroes does not change if to compare with large volume expressions.

List of FiNLIEs
In this section we will collect together the results of previous sections into the full list of FiNLIE. To make the formulas a bit more compact we will employ here exponential notations for the convolutions. Namely, by definition, for any kernel Ξ and a function f we will define the exponential of convolution as f * Ξ ≡ exp(Ξ * log f ). (6.1) The equation for Y 1,1 ( obtained as a sum of (5.24) and (5.30)) now reads 33 The equation for Y 2,2 is essentially the same since Y 2,2 is simply the analytic continuation of Y 1,1 under the Z-cut: The T -functions in the r.h.s. of (6.2) are given bŷ and the equation for ρ in terms of Y 1,1 and Y 2,2 is The upper band T -functions are expressed through the q-functions and the LR wing exchange "gauge" function U (u) using (5.6) and (5.5): with all the q-functions being parameterized through a base of 5 of them: where for the Konishi state we introduce two polynomialsQ = (u −ũ 1 )(u +ũ 1 ), P = −iu. 34 The value ofũ 1 is determined by the condition that T + 1,0 should have zeroes at position of the Bethe roots. The other q's can be found through the set of Plücker relations [20,36] The densityρ 2 in (6.8) is represented asρ 2 , where ρ 2 has a finite support on Z 0 and the remainder is a small correction fixed from the consistency with (6.9) and (6.10). ρ 2 is then expressed through Y 1,1 and Y 2,2 as follows: where T a,2 = q , Im u > 0 (6.12) 33 The overall minus sign in (6.2) is not visible from Y 1,1 Y 2,2 and Y 1,1 /Y 2,2 . It is chosen so that Y 1,1 and Y 2,2 are positive on [−2g, 2g]. The square root 4g 2 − v 2 in Z(u, v) * is evaluated slightly above real axis. 34 For the case of more than two symmetric roots we expect these polynomials to beQ(u) = M j=1 (u −ũ j ),  The M Bethe roots are fixed by the exact Bethe equations which can be written as: at u = u j . (6.13) In (6.12) and (6.13), F is obtained from (E.16) as where Λ F is just a constant expressed as (E.18) in appendix E.4. Finally, the energy of the state can be then found from the large u asymptotics of the product of fermionic Y-functions:

Numerical implementation of FiNLIEs
Using the system of FiNLIE derived in the last two sections, the spectral problem can be solved iteratively for the densities of the parameterization (3.16,5.1). We performed the numerical computations for the Konishi operator characterized by two symmetric Bethe roots u 1 = −u 2 . We expect the generalization to the other operators, with a larger number of roots, to be straightforward.
Let us denote as X = (ρ, U, W, {ũ j }, {u j }) the set of parameters characterizing a solution which we want to find numerically. It consists of two densities on a short Z-cut (the density ρ defined in (3.9) and the density ρ 2 which parameterizes W as in (5.12)), one function U (which can be parameterized from knowing only its value on the real axis 35 ), a set of Bethe roots {u i }, and another set of roots {ũ i } of the polynomialQ from (5.1) ( for the Konishi state i = 1 or 2, u 1 = u 2 andũ 1 = −ũ 2 ).
The numerical solution of the FiNLIE system is achieved using the fixed point approach: first, the equations are put into a form X = F (X) which allows us to build a sequence of approximations X n+1 = F (X n ) converging to the exact solution. The solution is then reached by a large number of iterations, each of them consisting of two main steps (see figure 8): • On the first step, the T-functions and the fermionic Y-functions Y 11 , Y 22 are computed for given densities and Bethe roots: 1. The upper-band Q-functions are expressed in terms of U , W andQ using the Plücker relations (6.9,6.10). It is clear indeed that (6.9,6.10) allow us to write all the Q-functions in terms of the five functions given in (6.8), (by essentially the same steps as at the end of section 4.3). Numerically, the main tricky point is to invert the difference equations: for instance q 13 is obtained from , where the sum converges very fast. It is also possible to rewrite this equation as an integral equation, similarly to (5.19). At the end of this first step, once all these Q-functions are obtained, one computes T 's using the equations (6.5-6.7); 2. The right band T -functions are expressed in terms of ρ, using (6.3); 3. Then it is possible to compute Y 1,1 and Y 2,2 using equations (5.24,5.30). To do this, we use the T -functions, the T -functions, and the position of Bethe roots.
• On the second step, the set of parameters X is expressed from these T-functions and the fermionic Y-functions: 4. First,ũ j is obtained by the requirement that T 1,0 (u j + i/2) = 0; 5. Then the density ρ is extracted from Y 11 and Y 22 using (6.4). In the same way W is extracted from Y 11 and Y 22 using (6.11); 6. The function U is then found from (6.12), with F fixed from (6.14); 7. Eq. (6.13) is used to express the positions of the Bethe roots {u j }.
Finally, for the initialization point X 0 one can either use the asymptotic solution, which works perfectly for small g's, or extrapolate X from smaller values of g.
Numerical results: Our, rather preliminary, numerical realization of FiNLIE's gives for the Konishi state the results written in table 3. 35 The large-u behavior of U is given by U ∼ u (−L−γ)/2 (see (B.18) and the discussion at the end of appendix B), allows us to write a Cauchy-kernel representation for it as follows  (7) 10 −3 0.5 5.7362 5.7120 5.712 (9) 10 −3 1 7.7285 7.6044 7.60 (53) 10 −3 1.6 9.5749 9.3874 9.38 (23) 5 · 10 −3 Table 3: Numerical energy of the Konishi state, for a few values of the coupling constant g. The outcome of our FiNLIE iterations is compared to the previous TBA-iterations [22] and to the prediction of the Asymptotic Bethe Ansatz (ABA).
These results are in perfect agreement with earlier numerical study, using TBA approach, of the Konishi state [22] (confirmed by a similar numerical study of TBA in [25]): when g ≤ 1, the numerical precision is essentially the same as in [22].
For a given state which we take as Konishi state here, our numerics showed the convergence of the algorithm 36 to the exact solution of all the above-written equations, and this solution coincides with the previous numerical studies from the original TBA equations. We notice however that numerically it is more efficient to use the old exact Bethe equation derived in [7] rather then (6.13).
In figure 9 we can see that the Y-functions Y a,0 , Y 1,1 and Y 2,2 obtained from FiNLIE iterations (dots) coincide with a good precision with the data of TBA-iterations (solid curve). We can also see a sensible deviation from the asymptotic limit of these Y-functions (dashed curve).
For Konishi state, the plots of various densities resulting from the iteration procedure are presented in figure 10. The densities ρ, ρ 2 and ρ U (black curve) are compared to their asymptotic values (B.5), (B.13), (B.20) (dashed gray curve). We see that at g = 1.6, the densities are already quite different from their asymptotic value. In particular, figure 10b shows that the density ρ 2 sensibly deviates from its asymptotic semi-circle shape.
In conclusion, our preliminary numerical results confirm the validity of our FiNLIE system. We plan to improve the precision and speed of our numerical procedure in the near future.

Conclusions
In this paper we have shown that using the integrable Hirota dynamics, together with a few relatively simple and natural assumptions about the analyticity properties of T-functions (parameterizing the Yfunctions) we can transform the AdS 5 /CFT 4 Y-system into a finite set of non-linear integral equations (FiNLIE).
Our FiNLIE remotely resembles, at least in spirit, the famous Destri-de Vega equations known in the literature for some other 2D QFT's. But the method of derivation, first proposed in the context of the SU (N ) principal chiral field (PCF) in [4], is conceptually very much different from the original approach of Destri and de Vega 37 . The relation between two approaches still needs to be clarified, though some interesting results on this way are obtained for the principal chiral field model in [43]. It is relatively easy to formally solve the integrable Hirota equations in T-hook in terms of a few "boundary" functions, which is done by means of the Wronskian determinant formulas [18,35]. However, it is much  more difficult to establish the right analyticity properties of those functions: asymptotic conditions, analyticity strips, analytic continuation through Z-cuts present in all T-functions, etc., and thus fix the full physical solution.
As for the case of the PCF, we observe that the analytic properties of T-functions can be reasonably simple (i.e. exhibiting well established analyticity strips) only in a well chosen gauge which is different for right, left and upper bands of the T-hook.
Our fundamental observation, mentioned already in [18] but clearly understood and employed only in the current paper, is the fact that the Z 4 symmetry of the string coset model, explicit in the classical system, can be promoted to the quantum level as a symmetry under the analytic continuation of the T-functions w.r.t. their representational indices (a, s). For a given T-function, this is only possible on a certain sheet of the Riemann surface having only short Z-cuts. We call it the magic sheet. The Z 4 symmetry, the quantum analogue of unimodularity (quantum determinant = 1), and a few other natural assumptions allow us to fix the analytic properties of each T-function in the appropriate gauge, as well as the transitional gauge functions relating T's for three different bands of the T-hook.
Only then, knowing the whole structure of all T-functions, we have enough of analyticity input not only to parameterize all T-functions and the gauge transition functions but also to constrain them by additional Riemann-Hilbert-type equations, thus closing the whole system of FiNLIE.
Our system of FiNLIE (summarized in section 6) shows that we achieved our conceptual goal of getting a finite system of equations out of a set of analyticity properties of T-functions. Probably the actual realization is still perfectible and we only begin to see the hidden "simplicity" of the whole problem. It is even conceivable that there exists a "quantum spectral curve" of an infinite genus, with infinite number of sheets connected by Z-cuts, uniformizing the analytic structure of all basic functions (presumably Q-functions) of the model at once.
We also demonstrated here that our FiNLIE is a useful tool for the computation of the spectrum. Our first, preliminary numerical implementation of the FiNLIE (which, with a certain effort, can be certainly improved in efficiency and precision) allows to check that, within reasonable error margins, our numerics reproduces the known results [22], thus perfectly confirming the correctness of our FiNLIE. We also proved here the equivalence of our FiNLIE to the TBA equations of [14][15][16]22] analytically (the paper [11] was especially useful for that).
Our method rendering a finite system of equations for the AdS/CFT spectrum can be certainly generalized to any state of the model but the details for the other states still have to be worked out. We also hope that our FiNLIE will allow in the nearest future an efficient way for constructing the systematic weak coupling expansion. It will be more difficult to do the same for the strong coupling, thus making it possible an efficient higher loop calculation in the string sigma model, but our FiNLIE could hopefully provide us with some clues also for that. It is especially important in view of recent analytic results obtained by a very different method at strong coupling [44][45][46][47][48]. Indeed FiNLIE, unlike the TBA, provides an extensive knowledge about the analytic properties of underlying functions on the whole magic sheet. It should be also easier now to attack another important limit of the theory -the BFKL approximation. Hopefully FiNLIE will allow to re-derive the known leading [49] and next-to-leading [50] BFKL approximation for N=4 SYM and to attempt a systematic study of this expansion in N=4 SYM. Another important quantity which would be interesting to compute is the "slope function", the exact form of which was conjectured recently in [51].
Finally, we hope that our result will bring us closer to the understanding of the mystery of the AdS/CFT correspondence. At least in technical terms, due to FiNLIE the gap between two sides of duality seems to be much narrower now than before. But an important ingredient -a derivation of the Y-system and of FiNLIE from the first principles, i.e. directly from both the string sigma-model and the N=4 SYM theory -is still missing.

A Z 4 symmetry and strong coupling limit
In this appendix we remind the classical Z 4 symmetry of the string coset at strong coupling and motivate its quantum generalization given in the main text.
We know from the group theoretical analysis of finite gap solutions for the superstring on P SU (2,2|4) Sp(2,2)×Sp(4) coset [17,52] that in the classical limit our T-functions become characters, explicitly written in [18] (see eqs. (4.12-21) there), in the highest weight unitary irreps a s of P SU (2, 2|4): T a,s = tr a,s Ω(u) , where Ω(u) is the classical monodromy matrix with the eigenvalues (µ 1 , µ 2 , µ 3 , µ 4 |λ 1 , λ 2 , λ 3 , λ 4 ). Note that this identification was made in [18] in the mirror sheet and the expression (A.1) should be considered in the mirror kinematics. The classical monodromy matrix as a function of spectral parameter u has only one large cut (−∞, −2g] ∪ [+2g, +∞) with an essential singularity at the branch points u = ±2g. The Z 4 -symmetry of the coset sigma model [24] imposes the following relations among the eigenvalues [23]: Here we denote by f (u γ ) the result of the analytic continuation of a function f following the full circle around the branch point u = 2g along a path avoiding square root cuts of a finite gap solution which are present in the eigenvalues but are absent in the monodromy matrix 38 . For classical T-functions, or characters, given by the formula (2.19) of [17] the property (A.2) implies the following symmetry is also simply the analytic continuation of T a,s (u) from a > |s| to negative a.
The classical limit has a rather degenerate analytic structure w.r.t. the full quantum case, with the eigenvalues (and hence the T-functions) having only two branch points at ±2g. In the full quantum case, we have, a priori, an infinite system of branch points, at u = ±2g ± i( |a−|s||+1 2 + n), n = 0, 1, 2, 3, . . .. At strong coupling g → ∞ there is no way to distinguish between the branch points with different n's. Hence, the quantum version of (A.3) is potentially ambiguous. However, discussed in this paper analytic properties of Q-functions give a natural suggestion how the proper quantum version should look like.
Let us consider the right-band T-functions and use the Wronskian parameterization for them, e.g.
. The transformation T a,s → T a,− s simply becomes the shift of the spectral parameter 39 u in the mirror kinematics: q . Now we consider only q-s and note that combination of the shift with analytical continuation u γ clockwise is nothing but the shift q avoiding the short cut [−2g, 2g], see figure 11. The same observation holds for p-s if the 38 these cuts may be interpreted as a condensate of Bethe roots. 39 Note that for q-functions such a shift is not negligible, even in the character limit. Figure  whereT a,−s is defined by the Wronskian ansatz for the right band considered at −s and with all shifts of q-and p-functions avoiding the short cut. Generically, Q-functions on the quantum level have infinite number of cuts, which makes the above arguments very ambiguous. However, in the T-gauge we know that the Q-functions can be chosen to have only one short cut. This makes the T-gauge (and any other gauge with only two short cuts) more suitable for the generalization of (A.4) to the quantum case. That is probably why one gets (3.46c). A similar analysis for the upper band is more tricky. However, in appendix C.4 we show that upper-band Z 4 symmetry can be derived from the right-band Z 4 symmetry.
The outcome of our observations is that the quantum Z 4 symmetry (3.44c) and (3.46c) is the most natural generalization of the classical Z 4 symmetry of the string sigma model on P SU (2,2|4) SO(1,5)×S) (6) coset. However, we should note that it still remains to be proven that the generalization we propose actually reduces to the classical Z 4 symmetry in the strong coupling limit. One should carefully analyze the possibility of interchanging the order of making analytical continuation and taking the strong coupling limit. Also note that in the quantum version we use two different gauges for the upper and the right band to formulate the Z 4 invariance, whereas in the classical case they should coincide up to a constant for |Re (u)| < 2g. This effect is accounted by the i-periodic function F relating two gauges which in the scaling regime used for the classical approximation is indeed approximated by a constant for |Re (u)| < 2g.

B Large volume asymptotics
The asymptotic large L solution of the Y-system is used in this work as a starting point for the iterative numerical solution of FiNLIE. The positions of cuts/poles/zeroes and the large u expansion for the asymptotic solution are explicitly known. We use this information to deduce the qualitative structure of cuts/poles/zeroes and to derive the large u expansion of the exact solution.
We consider only the sl(2) sector, hence all the Bethe roots are expected to be real. We also study here for simplicity only symmetric configurations of these roots, i.e u k = −u M −k with an even number of roots M . Some of the formulae written below are simplified by using these assumptions. In particular, the vanishing of the total momentum is already satisfied due to the relation 41 It is useful to define the following functions Note that P = u M + . . . is a polynomial in u, and S is a polynomial times pure square root.

B.1 Right band
An expression for the large volume limit of T-functions was presented in [7]. On can check that up to a gauge transformation this expression for the case of the right band is equivalent to: where γ as is the asymptotic value of the anomalous dimension andΦ = (−1) M/2B (+) B (−) is defined as a function with short Z-cut. The normalization constant C T is chosen so thatT 1,s → s, u → ∞. For configurations of the Bethe roots without poles in the analyticity strip ofT 1,s one can write a spectral representation forT 1,s :T The density ρ is given by: The above expressions give indeed the large volume limit in the T -gauge introduced in section 3. One can see that the denominator in the rightmost expression of (B.4) is a polynomial of degree M − 2.

B.2 Upper band
For two symmetric magnons there is an expression for the T-functions in the T -gauge which is very similar to (B.6):T (B.7) 41 In the generic case the momentum is given by (2.9).
In this form it is easy to see that T 1,1 (u j ) = 0. For general M the asymptotic expressions for the T -gauge can be read off from the Wronskian parameterization in [18]. The explicit asymptotic values of our basis of Q-functions look as follows: Here C T = 4 γas(γas+2) and M is a polynomial solution of the following equation: The additive constant cannot be fixed from (B.9) but it is irrelevant due to the H-symmetry (4.3). A convenient choice for this constant is given below.
In the leading large volume approximation the T-functions in the T -gauge are given bŷ (B.10) One can see thatT to the asymptotic expression for Y a,0 in [7] we find where Λ U is a real number and V is a solution to the equation The function σ mirr first time appeared in [15,53] and was later identified in [34,54] with solution of the mirror crossing equation. It has a particularly nice behavior under fusion: σ(u, v) [a]D as a function of u has only two cuts,Ž a andŽ −a , on the mirror sheet. As a consequence, V has only one cut,Ž 0 , on the mirror sheet. From integral representations for σ mirr given in [15] or [34] one derives the following explicit expression for V : Note that log V is a purely imaginary function in the mirror kinematics (which is consistent with (B.15)). The large u behavior of V is defined solely by χ 0 . One gets log V − γ 2 log u which implies Asymptotics ofĥ: The large volume expression forĥ is rather complicated. However, we would need only the large u asymptotics of this expression. From the condition T a,2 = T 2,a one can relatê h to the other, already known functions: where C is some real number. One can see from (B.23) and (5.18) that f ∼ u γ/2 and thus from the previous relation one hasĥ We expect that in a finite volume this asymptotic behavior remains unchanged, see discussion after (5.37).
Some useful expressions: It is known that the product of fermionic Y-functions is very simple so that from (5.13) one can easily determine the large volume expression for B : The function F can be determined by its discontinuities and zeroes. By applying arguments of appendix E.3 to the large volume expression (B.22) one gets: (B.24) The exponential numerical factor in the numerator is needed to ensure the convergence and Λ F is a normalization constant.
Large u behavior of exact quantities: Above we derived the large u behavior of different quantities in the large volume approximation. The result however remains the same at finite volume provided that we use the exact value for the energy (2.9) and anomalous dimension. This was already shown for Y 1,1 Y 2,2 (see Eq. (3.40)) and forĥ. Finite volume corrections also do not change the leading large u term of T a,s≥0 and T a,s . Indeed, the magnitude of corrections in these quantities is defined by U αŪ −α for some positive integer α which is smaller than (x

C Equivalence of FiNLIE to the TBA equations
The finite volume AdS/CFT spectrum problem was previously analyzed in the literature using an infinite set of the TBA equations. These equations were proposed in [14][15][16], following the discovery of the Y-system [7], and passed a number of important checks [17, 22, 25, 44-46, 52, 55-57]. It is important to verify that FiNLIE is equivalent to the TBA equations and this is the goal of this appendix. The TBA equations can be also viewed as a departing point to derive the properties of the transfer matrices which we summarized in section 3.8. Alternatively, these properties were considered there as the initial assumptions for the derivation of FiNLIE.
The TBA equations and the notations we use are the ones from [15,22]. The papers [14,16] contain an equivalent set of TBA equations in different notations, but without the driving terms for the excited states.
C.1 TBA for Y 1,s and Y a, 1 We start our analysis by the TBA equations for the right band: The fusion operator [s] D is defined in section 2.2. Now one replaces the Y-functions with a combination of the T-functions using 1 + 1/Y 1,m = T + 1,m T − 1,m T1,m+1T1,m−1 . This leads to the chain cancellations of an infinite number of terms in the sums leaving us only with a finite number of terms in the r.h.s of (C.1). We call this procedure "telescoping" 42 .
Indeed, after the substitution of T-functions and the shifts of the contours of integration in the terms containing log T ± 1,m one gets: , all the terms in the infinite sums above cancel out except the boundary ones. We therefore get: ). (C.5) The formal manipulations that we made are valid only if the integration and summation can be interchanged and only if the contours of integration do not hit poles or branch points when being shifted.
The T -gauge given by (6.3) enjoys these nice properties and that is why we used it for the derivation of (C.5). Note that the r.h.s of (C.5) is not invariant under an arbitrary gauge transformation while the l.h.s is; that is so because the telescoping procedure can be performed only in a specially chosen gauge. One can substitute Y 1,n+1 = T1,n+2T1,n T2,n+1 at the l.h.s of the TBA equation (C.1). The numerator is cancelled against log(T 1,n+2 T 1,n ) term in the telescoped expression (C.5). Therefore this TBA equation is reduced to Using the representation (3.10) for T 2,n+1 we get: Note that the expression in the argument of the log is equal toT 2,1 for u > 2g and for u < 2g so that (C.7) reduces to: We thus derived from the TBA equations the statement (3.15). The derivation presented here can be reversed. Hence the set of TBA equations for Y 1,s≥2 is equivalent to the conditionT 1,0 = 0, with an additional assumption that T 1,s ∈ A s and with a large volume asymptotics T 1,s ∼ s + O(1/u). The condition of the absence of poles and zeroes in the "telescoping strip" 44 −1/2 < Im(u) < 1/2 is also needed, however it is relevant only because we consider here the sl(2) sector. In case of a general state zeroes may be present in these T-functions and they should lead to the appearance of additional driving terms in the TBA equation (C.1).
Equations for "pyramids": Let us now consider the TBA equations for {a, 1} nodes of the T-hook: Here and below the summation sign over the doubly repeated m from 1 to ∞ is systematically omitted. We want to perform the telescoping procedure similar to the one for the right band. For that it is natural to use the T -gauge which has the simplest possible large u behavior. One should be especially careful with the terms containing Y m,0 in the r.h.s. which have a complicated kernel 45 . Moreover the term with fermions does not have a form, which is easily expressible in terms of the T-functions of the upper band. Both complications can be overcome at once by subtracting from (C.11) the TBA equation for Y 1,1 after applying to it K n * : The result of subtraction reads: Now one can perform the same steps as for the right band. The difference is that T a,s functions do contain zeroes inside the telescoping strip. However, the only fate of the residues coming from these zeroes is to cancel the driving term log Q [n+1] Q [n −1] . Note that the driving term is definitely such only for Konishi-like states at a sufficiently small coupling. In general this term may be more complicated [22,58]. In any case this term is constructed precisely in the way to cancel residues coming from the contour shifts. Therefore the result of telescoping procedure is not sensible to the structure of the 43 The property (C.10) can be equivalently reformulated in terms of Y-functions asŶ + 1,2Ŷ − 1,2 = (1 + Y 1,3 ). The latter equation was first time derived from the TBA system in [16], however the magic properties of the T -gauge following from (C.10) were not discovered there. 44 This is the strip in which the contours are shifted. 45 we use the notations from [7] driving term and in this sense it is more universal than the TBA equations. In complete analogy with the right band, the final equation we get for the upper band is: Again, the equivalence works in both directions: one can derive the set of TBA equations for Y a,1 , a > 1 from (C.13). The required assumption, in addition to (C.13), is the existence of the T -gauge with T a,s ∈ A a−|s|+1 and a polynomial behavior at infinity.
C.2 TBA for Y 1,1 and Y 2,2 One can make the telescoping procedure for the TBA equations for Y 1,1 Y 2,2 and Y 1,1 /Y 2,2 and get precisely the integral equations (5.24) and (5.25). We leave this exercise to a curious reader, while here we will use the results of [11] for the derivation of equivalence between (5.24), (5.25) and the TBA equations. In [11] it was shown that the fermionic vacuum TBA equations are a consequences of the discontinuity conditions: TBA for Y 1,1 Y 2,2 is equivalent to the discontinuity condition (1.7) of [11] and the TBA for Y 1,1 /Y 2,2 is equivalent to the discontinuity condition (F.5) in that paper 46 . The discontinuity conditions are proved to be correct also when the excited states are considered [13].
We will show now that these discontinuity conditions are equivalent to the analyticity of B and C functions, in the upper half-plane -the essential property needed for the derivation of (5.24) and (5.25), respectively.
TBA for the product of Y 1,1 and Y 2,2 : The condition (1.7) of [11] is written in our notations as We express 1+Y a,0 through the T-functions using 1+Y a,0 = n+1,0 does not have a cut on the real axis we conclude that (C.15) is precisely the condition of analyticity of B, defined in (5.13), in the upper half-plane. As we know, the analyticity of B allows the construction of the gauge transformation f via (5.20), which then implies existence of T as we show below. Let us consider then the LR-symmetric gauge T a,s = T a,s T a,−s and perform the following gauge transformation: Since f by construction is regular above Z −1 , T-functions have the same analyticity strips as Tfunctions. Moreover from (C.16) one can show that 46 Though (F.5) is claimed in [11] to be a consequence of other discontinuity relations and Y-system equations, we found that the derivation of this claim contains a logical gap, at least in the way it is presented. Therefore we consider (F.5) as an independent requirement on the discontinuities of the Y-functions.
This immediately implies T + 0,0 = T − 0,0 and T 3,2 = T 2,3 , and thus the T-gauge is indeed the gauge introduced in section 3 (Z 4 -symmetry in this gauge is shown below). We therefore arrive at the initial assumptions that we used in the main text for derivation of regularity of B in the upper half-plane.
TBA for the ratio of Y 1,1 and Y 2,2 : The TBA equation for the ratio can be reformulated as a discontinuity equation (F.5) of [11]. In our notations it reads as = 0 .
After the substitutions 1 + Y a,s = T1,a+1T1,a−1 and the telescoping of the sums we get disc 2 log It easy to see that this equation is equivalent to the condition of regularity of C (5.27) in the upper half-plane. Again, the only assumption we used is the existence of a T -gauge with T a,s ∈ A s−a , s > a. Let us show now that the T-gauge defined by (3.45) has the same analyticity strips as the T -gauge. For that it is enough to show that the function h relating T-and T -gauges by is analytic in the upper half-plane. To show this, we note that from analyticity of C in the upper halfplane and (5.27) it follows that h ++ /h is analytic in the upper half-plane. Therefore discontinuities δ = ∆(log h [2n] ), if non-zero, are the same for arbitrary n ≥ 1. Let us introduce an i-periodic function P with ∆(log P) = δ. It is again useful to start from the discontinuity condition (1.6) of [11,13] instead of the equivalent TBA equation for Y a,0 . This condition reads in our notations as follows: T2,0 and T 2,0 ∈ A 3 . Then disc log Y + 1,0 = 2 disc log T + 1,1 = 2 log T + 1,1 /T + 1,1 , whereT 1,1 is defined as follows: It coincides with T 1,1 below i/2 and has a short Z 1 cut; all other cuts ofT 1,1 above Z 1 are of theŽ-type (long).
After telescoping we get disc log T + 1,1 Now we use T 0,1 /T + 1,1 = F + /T + 1,1 . Since the analyticity strips for T-gauge and the periodicity of T 0,0 ≡ F 2 were already established (from TBA for Y 1,1 Y 2,2 ) one can use (3.41), which is derived indeed from the periodicity of T 0,0 and the analyticity of T 1,0 . It states: disc F [2n+1] = − log Y 1,1 Y 2,2 . Therefore (C.20) simplifies to disc logT This means thatT 1,1 has only two short cuts Z ±1 , and is regular otherwise. This condition is also in our list in section 2.2. In the previous subsection we showed thatĥ is analytic in the upper half-plane. SinceT 1,1 =ĥ +h−T 1,1 we see thatĥ has only oneẐ 0 -cut and is regular elsewhere in the complex plane.
Let us now show thatĥ can be chosen to be a real function. For that we use equation (5.37). It was derived for realĥ but this assumption can be relaxed in the derivation: 2,2 ), the numerator of the r.h.s also behaves as a pure square root on the real axis. Therefore we conclude thatĥ +0] . Henceh/ĥ is a function analytic everywhere. Its large u behavior should be at most polynomial as it follows from the asymptotic solution, see (B.20). For the asymptotic solution one can check the absence of poles/zeroes inh/ĥ and we assume that this is also the case for the exactĥ. Thereforeh/ĥ should be a constant. It is always possible to redefine the normalization of the T-gauge so that this constant is equal to one. Henceĥ can be indeed chosen as a real function. and hence it has only four magic Z-cuts. Using the reality ofĥ we see that Since T-and T -gauges are related by (3.22), the Z 4 symmetry of the T-gauge follows from the Z 4 symmetry of the T -gauge. Sinceĥ has only one cut, the magic cut structure of the T -gauge is also preserved in the T-gauge. Z 4 invariance of the T-gauge: The simplest is to derive Z 4 symmetry on the border. Since T a,2 = T 2,a = T 2,a and T-gauge is Z 4 -symmetric, we get: Moreover the TBA equations Y 1,a imply (see (C.13)) Then, the followings equalitiesT Finally, consider u slightly above real axis with Re (u) > 2g, so thatF − = F − = F + . Then:

D Details of the Wronskian solution for the upper band
In this appendix, the Wronskian formalism of section 4 is applied to derive the analyticity properties in the upper band. We also derive here the relation between various p-and q-functions and find a basis of these functions where all the q-functions are analytic in the upper half-plane. We also show that, unfortunately, there is no basis in which all q-functions of the upper band have a finite number of Z-cuts.

D.2 Periodic 2-forms
The sum and the difference of the 1/2-Baxter equations read These are the second order difference equations and thus the Wronskians τ ± = (q±p) + ∧(q±p) − /T 1,1 should be i-periodic functions (playing the same role as constants for the differential equations). To see this one can for instance multiply the first equation in (D.5) by (q + p)∧. The l.h.s. gives zero whereas the r.h.s. gives precisely the condition of i-periodicity of τ + . It is convenient to introduce instead of τ ± their linear combinations ω = τ++τ− 2 and χ = τ+−τ− 2 : ω = 1 These periodic 2-forms allow to relate p (3) , q (3) and q, p: The derivation is straightforward. For example, using (D.1): . 47 We remind here that, as discussed in section 4.3, the relation q ∅ = q (4) = p ∅ = p (4) =T 1,1 holds.

D.3 Expressions for T
Using the relations from the previous section we can exclude p from the expressions for T-functions to get:T Here is the derivation of the last, the most complicated formula. First, we notice that the Z 4 symmetric Hirota equationT + 0,1T − 0,1 =T 0,0T0,2 −T 2 1,1 = 0 allows to substituteT 1,1 withq 0 T 0,0 = F q 0 . This allows to rewrite the first equality in (D.6) as Explicit calculation then gives: (2) ∧ q

D.4 Relation between p and q
Both q i and p i satisfy the same 4 th order finite difference equation and thus each p should be a linear combination of q's with i-periodic coefficients. It is easy to see from (D.7a) that in fact these coefficients are: where χ ij ≡ 1 2 ijkl χ kl . For that we use that the Pfaffian of χ ij is −1: where we used (4.16). Similarly, the Pfaffian of ω ij can be shown to be 1 and so As a consequence V 2 = 1 which implies that the inverse relation has precisely the same form q i = V i j p j and thus it ensures the LR symmetry. In addition one can check that Tr V = 0. Hence the eigenvalues of V are (+1, +1, −1, −1).

D.5 Darboux basis
Let us now use the freedom (4.3) in the choice of Q-functions to simplify the relation among p, q, p (3) and q (3) (D.7,D.11). In order to preserve q ∅ = q∅ = p ∅ = p∅ = T 1,1 we restrict ourselves to the transformations with detH = 1. Under the transformation (4.3) ω ij and χ ij transform covariantly while V j i transforms by the adjoint action: (D.14) Note that V by itself is an H-transformation. In addition, since V just interchanges p and q, it leaves ω and χ invariant.
Since ω ij is a skew-symmetric matrix, it is always possible to choose an H-transformation that brings ω ij to the Darboux form, i.e. to the matrix with ω 12 = −ω 21 = ω 34 = −ω 43 = 1 and with all other matrix elements being zero. The remaining freedom in H-transformation is the sp(4) subgroup, and V is its particular element. The action of H on V generates an adjoint orbit which always passes through a Cartan element, hence V can be brought to the form diag(1, 1, −1, −1). Therefore it is possible to find a Q-basis in which: Notice that we still have a residual symmetry sp(2) × sp(2) preserving both ω and χ. The Darboux basis is a direct analog of the 1-cut basis for the horizontal su(2)-band of the section 4.2. It is tempting to ask whether it is possible also to find a basis of q-functions all having a finite number of cuts. Unfortunately, as we shell show later this appears to be not possible.

D.6 Existence of a basis regular in a half-plane
In this subsection we generalize the analyticity arguments, given for the right band in the main text, to the upper band. The situation in the upper band is a little bit more complicated and in particular we will see in the subsequent section that it is not possible to choose a basis with just a single cut. However, we will prove that there exists a basis in which q (k) -forms are regular everywhere abovê Z |k−2|−1 cut and p (k) -forms are regular everywhere belowẐ −|k−2|+1 cut.
We start by writing an analog of (4.8). The idea of derivation is simple: we want to write q [2a−1] i in terms of T functions with a shift ∼ a and of the other q i or p i functions with shifts independent of a. This is straightforward to achieve using (4.14) which we copy here for convenience:  with coefficients containing only a-independent shifts. Therefore q (3) can be written as certain linear combinations of these functions. Explicitly: Note that we can reverse all shifts and interchange q (3) with * p 49 in (D. 18). From that equation we can say that in the basis where q does not have the cuts Z +2 , Z +4 , Z +6 , Z +8 , p must be regular everywhere in the lower half-plane.
Using the argument from the main text we can argue that the cuts Z 2 , Z 4 , Z 6 , Z 8 in q (3) can be always canceled by an appropriate H-transformation. Then in this basis we see that q (3) will be in fact free of all cuts above the real axis and p will have no cuts below the real axis. Note that in this basis p (3) , as a certain combination of p [−2] , p, p [2] , should be regular at least starting from −i and below.
To complete our proof let us make two further observations. First, due to the LR symmetry T a,1 = T a,−1 we can also make a replacement q → * q (3) and p → * p (3) in (D.18). Second, we notice that the regularity argument also works when in p (3) there are no cuts Z −4 , Z −6 , Z −8 , Z −10 instead. For that one should shift (D.18) by −6i/2 and use it for a ≥ 5. Thus we conclude that in the same basis q and q (3) are regular in the upper half-plane and p and p (3) are regular in the lower half-plane. It remains to show that q (2) and p (2) are also regular in their half-planes. It is immediately obvious that, say, q (2) is regular starting from Z 1 . In fact we can prove that the cut Z 1 is absent and the function is regular everywhere above Z −1 .
Indeed, let us rewrite the Plücker relation (4.21) in the following form: The l.h.s of this relation is regular everywhere above the real axis. In particular, the discontinuity at Z 2 should be trivial, which gives for the r.h.s.: o ≡ disc (q We see that o is some universal function which should be the same for any pair of indexes, since q ij is an antisymmetric tensor. Consider now kl . (D.20) Since disc (T − 2,0 ) = 0, one gets We see therefore that o = 0 and hence disc (q + ij ) = 0, i.e. we proved that q (2) is regular above Z −1 -cut. The same logic applies to p (2) which is thus regular below the Z 1 -cut. This accomplishes the proof about the possibility to construct a basis which is regular in a half-plane announced in the beginning of this subsection. D.7 No-go theorem: There is no q-basis with a finite number of short cuts Proof: Suppose there exists such a basis. Then by considerations from the previous subsection q (2) should be analytic in the upper half-plane up to Z −1 and in the lower half-plane up to Z 1 , i.e. it should be analytic in the whole plane. The same is true for p (2) . Therefore T a,0 in (4.14) and hence Ta+1,0Ta−1,0 − 1 should not have any cuts at all which leads to an obvious contradiction with the basic properties of the Y-system, starting from the large L asymptotics.
This no-go theorem shows that the Darboux basis cannot be in this respect as nice as the 1-cut basis of the right(left) band. It even cannot be a half-plane regular one. Indeed, in the Darboux basis p 12 = q 34 and hence, due to (D.9) F = Fω 12 = q (2) + p (2) = q 12 + q 34 . F definitely has a Z 1 cut, hence q (2) cannot be regular at Z 1 . However, the existence of a periodic form ω, with the periodic structure of short Z-cuts, may potentially allow to deform the Darboux basis in a way to parameterize the upper band in terms of densities with the finite [−2g, 2g] support only.

D.8 Basis used for computations
In this subsection we show existence of the basis which is used for explicit computations 50 . This basis is regular in a half-plane and posses particularly chosen relations (4.17) among p-s and q-s.
In addition to LR and Z 4 symmetries which manifest themselves in existence of respectively 2forms χ and ω there is also a reality property of T-functions which we will now encode into the properties of an i-periodic 4 × 4 matrix S defined by: Note that once q's are chosen to be regular in the upper half-plane (and p's are chosen to be regular in the lower half-plane), χ and S become also regular. Hence all the transformations discussed in the previous paragraph are done by the regular H-matrices and thus do not spoil analyticity properties of the q-basis.

E.1 Uniqueness of the physical gauge
We are going to show that conditions (3.44) completely constrain the T-gauge, up to an overall constant. First, let us note that the gauge transformations that preserve the LR symmetry T a,−s = T a,s , reality T a,s = T a,s , and analyticity T a,s ∈ A 1+|a−s| are of the following form: where the function g is analytic in the upper half-plane above Z −1 andḡ is the complex conjugate of g.
To preserve the T 2,3 = T 3,2 condition g/ḡ should be a periodic function. To preserve the T + 0,0 = T − 0,0 condition gḡ should be also a periodic function. Hence g = gḡ × g/ḡ is periodic by itself. Then, since g is analytic in the upper half-plane and periodic, it is analytic everywhere. Such periodic analytic function should not have poles, due to the condition of absence of singularities, and no zeroes, due to the condition of a minimal possible number of zeroes. Therefore this gauge transformation can be only a constant. 51 Since S is an element of SP (4) (see (D.24c)) it can be written as e iR where R is an element of the algebra sp (4) and R =R due to (D.24b). We define √ S = e iR/2 . One can see that √ S √ S = 1 and also (D.24c) holds for √ S. In the same way we define √ S 0 .

(E.2)
It is allowed to replace γ with γ + because the branch points are of the square root type and analytic continuation along γ and γ + leads to the same results. To find explicitly the analytically continued function T γ+ 1,1 one uses T 1,1 =ĥ +ĥ− T 1,1 and the density representation (6.3) T 1,1 = 1 + K 1 * ρ. For the latter the continuation picks a pole in the Cauchy kernel leading to Analytic continuation ofĥ can be found from the discontinuity property (5.37) which gives At the last step we used that Y − 2,2 has a pole at the Bethe root. Note that F has a zero at the same position, therefore the whole expression is regular.
The function ρ − can be found from equation (6.4) shifted by −i/2. Again, at the Bethe root Y − 2,2 is singular, therefore we can simplify the l.h.s of (6.4) just to (1 + Y − 1,1 ) −1 . Explicitly, we get after some algebra: Applying Hirota equations on the magic sheet and using the relation between T-and T-gauges one can get: The first term on the r.h.s. can be further transformed, using the i-periodicity of F in the mirror, the relation (3.41), and the Y-system equation (2.1) for Y 1,1 , to: Note that at the last step we used that 1 + 1/Y 2,1 = 1 at the Bethe root.
On the other hand, it follows from (E.6) and its complex conjugate: The difference of (E.9) and (E.10) gives: which indeed assures (E.7). The property (E.7) in particular implies that if (E.2) holds then the conjugated equation (T γ− 1,1 (u j )) 2 = −T 2,0 (u j ) also holds, i.e. the Bethe roots always come in the conjugated pairs. For the sl(2) sector all the Bethe roots are expected to be real and the eq.(E.7) follows from (E.2) up to a sign. We hence checked what sign should be chosen.
The ratio of (E.2) and (E.7) leads to:T

BES
(E.14) in the large volume limit. This is nothing but the asymptotic Bethe Ansatz equations for the sl (2) sector, as it should be.

E.3 An alternative equation on F
The i-periodic function F = T 0,0 plays the key role in our constructions since it is the function that relates the right band with the upper band. In this section we derive a simple expression for F in terms of the product Y 1,1 Y 2,2 which allows for a better understanding of the properties of F. For that we depart from (3.41) which can be considered as the Riemann-Hilbert equation on F. It is not hard to solve this equation. One of the possible solutions is 52 where sign(v) is added for the convergence of the integral. In general one can multiply F 0 (u) by an arbitrary periodic function analytic in the whole complex plane. The remaining function can be fixed from the knowledge that F has simple zeros at the positions of Bethe roots: sinh(π(u − u i )) , (E. 16) where Λ F is a constant. One should be careful with the 2πiZ ambiguity of log(Y 1,1 Y 2,2 ) in the definition of F 0 . This ambiguity is however uniquely fixed by the requirement that log F 0 should not have any logarithmic poles at u = i 2 ± 2g. This is only possible if the integrand is zero at v = ±2g which uniquely fixes the branch.
Let us now analyze the large u behavior of F 0 (u). Expansion (3.40) implies that log(Y 1,1 Y 2,2 ) → 2πim ± at u → ±∞ + i0. In order to determine the integers m ± we analytically continue the logarithm from u = 2g, where we already fixed log(Y 1,1 Y 2,2 ) = 0, to ±∞ + i0 along the real axis. At weak coupling the Y-functions are known explicitly, see (B.22), and we get: from where we find m − − m + = M . By the continuity argument, since m ± are integers, this relation should hold for a finite coupling 53 . For the case of symmetric roots m − = −m + = M/2. One can check that the exponential factor from F 0 (u) cancels against the one from the product of sinh in F(u) and we get a simple power-law asymptotics F ∼ u E , in complete agreement with (3.43).

E.4 Fixing the normalization constants
A freedom in the overall scale of the T-gauge was used to choose the normalization for f in (5.20). There is no further freedom and the integration constants Λ and Λ F appearing in this article are fixed once the normalization for f is chosen.
Λ F appearing in (E.16) is found from the comparison of the large u asymptotics of F = ff T 0,0 and (E.16) and is given by where the branch of log Y 1,1 Y 2,2 is the same as in (E.15). The comparison of (E.16) and ff T 0,0 at large u reveals also a practical expression for the energy, which is suitable for the numerical computation of E. Λ appearing in (6.12) is fixed in two steps. First, we demand that 54 q ∅ =T 1,1 is a real function on the magic sheet which allows us to fix the phase of Λ. Indeed, by studying the equality q ∅ = 53 unless there is a critical point at some value of the coupling -the possibility which we ignore since it was not realized so far for explicit examples. 54 q ∅ is regular in the upper half-plane aboveẐ 1 . This is the region where q ∅ on mirror and magic sheets are identified. In contrary, mirror T 1,1 and magicT 1,1 are identified inside their analyticity strip A 1 . Hence q ∅ and T 1,1 are equal in magic but not in mirror.
q ∅ f ++ f −− U + U − at large u we see that q ∅ is a real function, at least at large u, if Λ 2 e Ψ * ρc is a real function at large u. Hence: The absolute value of Λ is fixed from which should be valid for −2g < u < 2g. This relation is an upper band analog of (5.37) and it is derived similarly. Note that (E.21) fixes UŪ onẐ 0 essentially from the knowledge of ρ 2 . Hence the nontrivial information about U is contained in the complementary region: (−∞, −2g] ∪ [2g, ∞).