1 Introduction

1.1   Let \(\mathfrak {g}\) be an affine Kac–Moody algebra. Let \(\varLambda \) be a dominant integral weight of \(\mathfrak {g}\) and \(L(\varLambda )\) the corresponding irreducible highest weight representation. A weight \(\lambda \) of \(L(\varLambda )\) is said to be maximal if \(\lambda + \delta \) is not a weight of this module, where \(\delta \) is the null root of \(\mathfrak {g}\). To understand the structure of the module \(L(\varLambda )\), one studies the generating functions

$$\begin{aligned} a^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(q) := \sum _{k \ge 0} \dim (L(\varLambda )_{\lambda - k\delta })\; q^k \end{aligned}$$

of weight space dimensions (weight multiplicities) along the \(\delta \)-string \(\{\lambda - k \delta : k \ge 0\}\), where \(\lambda \) ranges over the maximal dominant weights of \(L(\varLambda )\). The corresponding string function \(c^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(\tau )\) is defined to be

$$\begin{aligned} c^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(\tau ) = q^{s_\Lambda (\lambda )} \, a^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(q) \end{aligned}$$

where \(q=e^{2\pi i \tau }\) with \(\tau \) in the complex upper half plane, and \(s_\Lambda (\lambda )\) is a rational number (see Eq. (2.6)) which gives the leading power of q in the expansion. String functions are modular forms for certain congruence subgroups of \(\mathrm {SL}_2(\mathbb {Z})\) and play an important role in the theory of characters of representations of affine Kac–Moody algebras [9, chapter 13].

Next, we consider Lusztig’s t-analog of weight multiplicities \(m^{\varLambda }_{\lambda }(t)\) (affine Kostka-Foulkes polynomials). Here \(\varLambda \) is a dominant integral weight of \(\mathfrak {g}\), and \(\lambda \) is a dominant weight of \(L(\varLambda )\). The \(m^{\varLambda }_{\lambda }(t)\) are polynomials in the indeterminate t which interpolate between the affine Hall–Littlewood functions and the Weyl characters [16]. Further, \(m^{\varLambda }_{\lambda }(t)\) coincides with the Poincaré polynomial of (the associated graded space of) the affine Brylinski–Kostant filtration on the weight space \(L(\varLambda )_\lambda \) [15]. Thus they have non-negative integer coefficients and reduce to the usual weight multiplicities at \(t=1\), i.e., \(m^{\varLambda }_{\lambda }(1) = \dim (L(\varLambda )_{\lambda })\). It is therefore natural to consider the generating functions

$$\begin{aligned} a^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t,q):= \sum _{k \ge 0} m^{\varLambda }_{\lambda - k\delta }(t)\; q^k \end{aligned}$$

for maximal dominant weights \(\lambda \) of \(L(\varLambda )\). The t-analog of the corresponding string function is defined by \(c^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t,\tau ) = q^{s_\Lambda (\lambda )} \, a^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t,q)\), with \(q= e^{2\pi i \tau }\) as before.

In this paper, we restrict attention to the simplest affine algebra \(\mathfrak {g}= A_1^{(1)}\) (affine \(\mathfrak {sl}_2\)). This is the only case for which an explicit description of all string functions is known [10, 11]:

Theorem 1

(Kac–Peterson) Let \(\mathfrak {g}= A_1^{(1)}\). Let \(\varLambda \) be a dominant integral weight of \(\mathfrak {g}\), and \(\lambda \) a maximal dominant weight of \(L(\varLambda )\). Then

$$\begin{aligned} c^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(\tau ) = \theta _L(\tau ) \, \eta (\tau )^{\scriptstyle -3}. \end{aligned}$$
(1.1)

Here \(L=L(\varLambda ,\lambda )\) is a certain translate of an even rank 2 lattice of signature (1, 1), \(\theta _L(\tau )\) is the corresponding Hecke indefinite modular form, and \(\eta (\tau )\) is the Dedekind eta function.

We elaborate on these notions in the next subsection. We remark here that the first results on string functions of \(A_1^{(1)}\) were obtained by Feingold–Lepowsky in [5]. They computed the string functions of small level and, in some cases, obtained formulas different from those in the later work of Kac–Peterson. Still different formulas for all of the string functions of \(A_1^{(1)}\) were given later by Lepowsky–Primc [12].

The main result of this paper is a description of the t-string functions \(c^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t,\tau )\) of \( A_1^{(1)}\) that extends (1.1). We show that \(\theta _L(\tau )\) and \(\eta (\tau )^{\scriptstyle -3}\) in (1.1) admit deformations \(\varTheta _L(\tau , t, z)\) and \(\eta ^{(-3)}(\tau , t, z)\) such that \(c^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t, \tau )\) can be obtained as the constant term of the product of these two functions with the Poisson kernel.

1.2   In order to state our main theorem, we recall some background from [11]. Let \(\mathfrak {g}= A_1^{(1)}\). Fix a dominant integral weight \(\varLambda \) of \(\mathfrak {g}\) of level \(m \ge 1\), and let \(\lambda \) be a maximal dominant weight of \(L(\varLambda )\). For \(v = (x,y) \in \mathbb {R}^2\), define

$$\begin{aligned} N(v)= 2 (m+2)x^2 - 2m y^2. \end{aligned}$$

This defines a quadratic form on \(\mathbb {R}^2\). We also define \(\mathrm {sign}(v) = 1\) for \(x \ge 0\) and \(-1\) for \(x<0\). Let \(M:=\mathbb {Z}^2\) and let \(M^*\) denote the lattice dual to M with respect to this form.

Let O(N) denote the group of invertible linear operators on \(\mathbb {R}^2\) preserving N, and \(SO_0(N)\) be the connected component of O(N) containing the identity. Consider its subgroups \(G := \{g \in SO_0(N): g M =M \}\) and \(G_0 := \{g \in G: g \text { fixes } M^*/M \text { pointwise}\}\). The set

$$\begin{aligned} U^+:=\big \{(x,y) \in \mathbb {R}^2: N(x,y) >0\big \} \end{aligned}$$

is preserved under the action of O(N) on \(\mathbb {R}^2\). We let \(x_0:=\frac{( \varLambda + \rho | \alpha _{1}^{\scriptscriptstyle \vee })}{2(m+2)}\) and \(y_0:= \frac{( \lambda | \alpha _{1}^{\scriptscriptstyle \vee })}{2m}\), where \(\alpha _{1}^{\scriptscriptstyle \vee }\) is the simple coroot corresponding to the underlying finite Dynkin diagram of type \(\mathfrak {sl}_2\), and \(\rho \) is the Weyl vector. We have \(0 < x_0 < \frac{1}{2}\) and \(0 \le y_0 \le \frac{1}{2}\). If \(x_0 \ge y_0\), define \((A,B) = (x_0, y_0)\), else \((A,B) = (\frac{1}{2} - x_0, \frac{1}{2} - y_0)\). Then, \((A,B) \in M^*\), and we set \(L= L(\varLambda , \lambda ) :=(A,B) + M\). The Hecke indefinite modular form that occurs in Theorem 1 is the following sum over \(G_0\)-orbits in \(L \cap U^+\):

$$\begin{aligned} \theta _L(\tau ) := \sum _{\begin{array}{c} v \in \, L \,\cap \, U^+\\ v \text { mod } G_0 \end{array}} \mathrm {sign}(v) \, e^{\pi i \tau N(v)}. \end{aligned}$$
(1.2)

This is an absolutely convergent sum for \(\tau \) in the upper half plane \(\mathbb {H}\) and defines a cusp form of weight 1 [6]. An equivalent expression for the sum in (1.2) can be obtained by restricting v to lie in a fundamental domain for the action of \(G_0\) on \(U^+\). The sum then takes the form

$$\begin{aligned} \sum _{v \in D} (\pm ) e^{\pi i \tau (N(v) + l(v))}, \end{aligned}$$

where l is a linear function of v and D is a subset of \(\mathbb {Z}^2\) on which N is non-negative. Such sums appeared in earlier work of Rogers [14] but were first studied systematically by Hecke in [6], where he established their modularity properties. Kac and Peterson used Theorem 1, together with their computation of string functions of low level, to obtain interesting identities expressing Hecke modular forms as eta products. Andrews’ attempt to understand some of these new identities using q-series methods [1] (see also Bressoud [4]) eventually led him to consider other series of Hecke type and apply them to the study of Ramanujan’s mock theta functions [2, 3]. Since then, such series have featured prominently in the vast body of work surrounding the mock theta functions (see for instance [7, 8, 18]).

1.3    Now let \(t, z \in \mathbb {C}\). We first define a deformation \(\varTheta _L(\tau , t, z)\) of the Hecke modular form \(\theta _L(\tau )\) by

$$\begin{aligned} \varTheta _L(\tau , t, z) = \sum _{\begin{array}{c} v \in \, L \,\cap \, U^+\\ v \text { mod } G_0 \end{array}} \mathrm {sign}(v) \, e^{\pi i \tau N(v)}\, \varOmega (v, t, z), \end{aligned}$$
(1.3)

where \(\varOmega \) is a weighting factor. To define \(\varOmega \), we need the following subgroup of O(N):

$$\begin{aligned} \widetilde{G}:= \langle \zeta \rangle \ltimes G, \end{aligned}$$

where \(\zeta \) is the reflection about the Y-axis, i.e., \(\zeta (x,y):=(-x,y)\). Then, \(\widetilde{G}\) contains \(G_0\) and

$$\begin{aligned} \widetilde{F}:=\big \{(x, y) \in \mathbb {R}^2: x > 0 \text { and } 0 \leqslant y \leqslant x\} \cup \{(x,y) \in \mathbb {R}^2: 0 > y > x\big \} \end{aligned}$$

is a fundamental domain for the action of \(\widetilde{G}\) on \(U^+\) (see Sect. 3). Given \(v = (x,y) \in U^+\), we define \(v^\dag = (x^\dag ,y^\dag )\) to be the unique element of \(\widetilde{F}\) which is in the \(\widetilde{G}\)-orbit of v. Then, \(\varOmega \) is defined by

$$\begin{aligned} \varOmega (v, t, z) = t^{2(y^\dag -B)} \, z^{((m+2) x^\dag - my^\dag - \frac{1}{2})}. \end{aligned}$$
(1.4)

It will turn out that \(2(y^\dag -B)\) and \((m+2) x^\dag - my^\dag - 1/2\) are both integer-valued, piecewise linear functions of \((x,y) \in L\). The sum in (1.3) is absolutely convergent for \(\tau \in \mathbb {H}, |t| >0, |z|>0\) and satisfies \(\varTheta _L(\tau ,1,1) = \theta _L(\tau )\).

Next, consider the factor involving the Dedekind eta function in (1.1):

$$\begin{aligned} \eta (\tau )^{-3} = e^{-i \pi \tau /4} \prod _{n=1}^\infty \frac{1}{(1-e^{2 \pi i n \tau })^3}\;\;. \end{aligned}$$

We deform this to the function

$$\begin{aligned} \eta ^{(-3)}(\tau , t, z)=e^{-i \pi \tau /4} \prod _{n=1}^\infty \frac{1}{(1-te^{2 \pi i n \tau })(1-tze^{2 \pi i n \tau }) (1-tz^{-1}e^{2 \pi i n \tau })}. \end{aligned}$$
(1.5)

This converges absolutely for \((\tau ,t,z)\) in the region

$$\begin{aligned} \left\{ \tau \in \mathbb {H}, \;\; |te^{2 \pi i \tau }| < 1, \;\; |te^{2 \pi i \tau }|< |z|< |te^{2 \pi i \tau }|^{-1}\right\} \end{aligned}$$

and satisfies \(\eta ^{(-3)}(\tau , 1, 1) = \eta (\tau )^{-3}\). Our final ingredient is the function

$$\begin{aligned} P(t,z) = \frac{1-t^2}{(1-tz)(1-tz^{-1})} = \sum _{n \in \mathbb {Z}} t^{|n|} z^n. \end{aligned}$$

The series converges for \(|t|<1\) and \(|t|<|z|<|t|^{-1}\). We note that for t real and \(|z|=1\), this is just the Poisson kernel of the unit disk. Observe that the three functions \(\varTheta _L, \eta ^{(-3)}\) and P have a common domain of definition

$$\begin{aligned} \big \{ (\tau ,t,z): \tau \in \mathbb {H}, \;\; 0 <|t|<1, \;\; |t| < |z| < |t|^{-1}\big \}. \end{aligned}$$

The series/product defining these functions are in fact uniformly convergent on compact subsets of this domain. Thus \(\varTheta _L, \eta ^{(-3)}\) and P are holomorphic in each variable \(\tau , t, z\). We view them as functions of z and consider their Laurent series in the annulus \(|t| < |z| < |t|^{-1}\). We are now in a position to state our main theorem:

Theorem 2

Let \(\tau \in \mathbb {H}, \;0 < |t|<1\). Then, \(c^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t,\tau )\) is the constant term (i.e., the coefficient of \(z^0\) in the Laurent series in the annulus \(|t| < |z| < |t|^{-1}\)) of the product

$$\begin{aligned} \varTheta _L(\tau , t, z) \, \eta ^{(-3)}(\tau , t, z) \, P(t,z). \end{aligned}$$

The proof of this theorem appears in Sects. 2 and 3. In the course of the proof, we will derive t-analogs of the results of Kac and Peterson [11, Sect. 5].

1.4   Given a holomorphic function f(z) in the annulus \(|t| < |z| < |t|^{-1}\), the coefficient of \(z^0\) in its Laurent series is just the integral \( \int _{0}^1 f(e^{2\pi i u}) \, du.\) Thus, theorem 2 implies that

$$\begin{aligned} c^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t, \tau ) = \int _{0}^1 \varTheta _L(\tau , t, e^{2\pi i u}) \; \eta ^{(-3)}(\tau , t, e^{2 \pi i u}) \; P(t,e^{2 \pi i u})\, \mathrm{d}u. \end{aligned}$$

Now, if \(0<t<1\), then as observed earlier, \(P(t,e^{2 \pi i u})\) is the Poisson kernel of the unit disk. The classical fact that the Poisson kernel is an approximate identity now implies that \(\lim _{t \rightarrow 1^-} c^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t, \tau ) = \varTheta _L(\tau , 1,1) \; \eta ^{(-3)}(\tau ,1,1)\). Thus, Theorem 2 reduces to Theorem 1 as \(t \rightarrow 1^-\).

1.5   We point out that a very different constant term expression for the t-string function was obtained in [16, equation (5.8)] for all affine Lie algebras. Using this and classical summation identities for q-series, the \(t\)-string functionsof levels 1, 2, 4 for \(\mathfrak {g}= A_1^{(1)}\) were obtained in closed form in [17]. One can combine the results of [17] with Theorem 2 to obtain t-analogs of the Kac–Peterson identities (for levels 1, 2, 4) relating Hecke modular forms to eta products. But these would now be constant term identities and thus not as explicit as in the \(t=1\) case.

2 Preliminary lemmas

2.1   We assume throughout that \(\mathfrak {g}= A_{1}^{(1)}\), the rank 2 affine Lie algebra with generalized Cartan matrix \(\left( \begin{matrix} 2 &{} -2 \\ -2 &{} 2 \end{matrix}\right) \). Let \(\mathfrak {h}\) denote the Cartan subalgebra of \(\mathfrak {g}\). We let \(\alpha _{0}, \alpha _{1} \in \mathfrak {h}^*\) denote the simple roots, \(\delta = \alpha _{0} + \alpha _{1}\) the null root, and \(\varDelta _+= \{\alpha _{1} + (n-1)\delta , \; -\alpha _{1} + n\delta , \; n \delta : n \ge 1\}\) the set of positive roots of \(\mathfrak {g}\). Let \(Q = \mathbb {Z}\varDelta _+\) be the root lattice of \(\mathfrak {g}\) and \(Q_+ := \mathbb {Z}_{\ge 0}\, \varDelta _+\). Similarly, let P denote the weight lattice of \(\mathfrak {g}\), and \(P_+\) the set of dominant integral weights. The standard basis [9, chapter 6] of \(\mathfrak {h}^*\) is \(\{\alpha _1, \delta , \varLambda _0\}\), where \(\varLambda _0\) is a fundamental weight corresponding to the extended node of the Dynkin diagram.

Let W denote the Weyl group of \(\mathfrak {g}\); this is generated by the two simple reflections \(r_0, r_1\). There is a non-degenerate, W-invariant, symmetric bilinear form \(( \cdot | \cdot )\) on \(\mathfrak {h}^*\) defined by the relations \(( \alpha _{1} | \alpha _{1}) = 2\), \(( \varLambda _0 | \delta ) =1\), and \(( \alpha _{1} | \delta ) = ( \alpha _{1} | \varLambda _0) = ( \delta | \delta ) = ( \varLambda _0 | \varLambda _0) =0 \). Given \(\lambda \in \mathfrak {h}^*\), its level is defined to be \(( \lambda | \delta )\). For \(\lambda \) of level m, we have

$$\begin{aligned} \lambda = b(\lambda ) \, \alpha _1 + d(\lambda ) \, \delta + m \varLambda _0, \end{aligned}$$

where \(b(\lambda ) = ( \lambda | \alpha _{1})/2\) and \(d(\lambda ) = ( \lambda | \varLambda _0)\). We also note that if \(\lambda \in Q\), then its level is zero, and \(b(\lambda ), d(\lambda )\) are both integers. Let \(\rho \) denote the Weyl vector of \(\mathfrak {g}\), defined by the relations \(( \rho | \varLambda _0)=0, ( \rho | \alpha _{1})=1, ( \rho | \delta )=2\).

Next, recall that the t-Kostant partition function \(K(\beta , \,t)\) of \(\mathfrak {g}\) is defined by the relation:

$$\begin{aligned} \prod _{\alpha \in \varDelta _+} \frac{1}{1-te(-\alpha )} = \sum _{ \beta \in Q_+} K(\beta , \,t) \,e(-\beta ). \end{aligned}$$
(2.1)

For a general affine Lie algebra, the positive roots must be counted with multiplicities on the product side of (2.1); however, all root multiplicities are 1 for \(\mathfrak {g}= A_1^{(1)}\). The t-Kostant partition function reduces to the Kostant partition function at \(t=1\).

Now, for \(\varLambda \in P_+\), let \(L(\varLambda )\) denote the corresponding irreducible highest weight representation of \(\mathfrak {g}\), with weight space decomposition \(L(\varLambda ) = \oplus _{\gamma \in P} L(\varLambda )_\gamma \). Given \(\lambda \in P_+\), Lusztig’s t-analog of weight multiplicity or (affine) Kostka-Foulkes polynomial \(m^{\varLambda }_{\lambda }(t)\) is defined by

$$\begin{aligned} m^{\varLambda }_{\lambda }(t) := \sum _{w \in W} \epsilon (w) \, K(w(\varLambda + \rho ) - (\lambda + \rho ), \,t). \end{aligned}$$

Here \(\epsilon \) is the sign character of the Weyl group W, given by \(\epsilon (w) = (-1)^{\ell (w)}\), where \(\ell (w)\) is the minimum number of factors in an expression for w as a product of simple reflections.

By Kostant’s weight multiplicity formula, we have \(m^{\varLambda }_{\lambda }(1) = \dim (L(\varLambda )_{\lambda })\).

2.2   We recall the dot action of W on \(\mathfrak {h}^*\). Given \(w \in W\) and \(\gamma \in \mathfrak {h}^*\), we define

$$\begin{aligned} w \cdot \gamma := w(\gamma + \rho ) - \rho . \end{aligned}$$

This action leaves Q and P invariant. Next, following Kac and Peterson [11], we introduce an auxiliary function \(K^\prime (\beta , \,t)\) which has better properties than \(K(\beta , \,t)\).

Definition 1

Given \(\beta \in Q\), define \(K^\prime (\beta , \,t)\) as follows:

$$\begin{aligned} K^\prime (\beta , \,t) := K(\beta , \,t) + t \,K(r_1 \cdot \beta , \,t). \end{aligned}$$

This function reduces to that of Kac and Peterson [11, Eq. (5.1)] at \(t=1\). We also make the following simple observations: if \(\beta \in Q\), then (i) \(K(\beta , \,t) =0 \Leftrightarrow \beta \not \in Q_+\), and (ii) \(K^\prime (\beta , \,t) =0 \Leftrightarrow \beta \not \in Q_+ \cup r_1 \cdot Q_+ \Leftrightarrow d(\beta ) \le -1\).

In the following sections, we will study the generating functions of \(K, K^\prime \) and \(m^{\varLambda }_\lambda \) along \(\delta \)-strings. These are defined for \(\beta \in Q\), \(\varLambda , \lambda \in P_+\) by

$$\begin{aligned} K_{\beta }&:= \sum _{n \ge 0} K(\beta + n\delta , \,t) \, q^{n},\end{aligned}$$
(2.2)
$$\begin{aligned} K_{\beta }^\prime&:= \sum _{n \ge 0} K^\prime (\beta + n\delta , \,t) \, q^{n},\end{aligned}$$
(2.3)
$$\begin{aligned} a^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t,q)&:= \sum _{n \ge 0} m^{\varLambda }_{\lambda -n\delta }(t) \, q^n. \end{aligned}$$
(2.4)

Here, and in the rest of the paper, we will define \(q:=e(-\delta )\) and \(z:=e(\alpha _1)\). The following is our main object of interest:

Definition 2

Let \(\varLambda \in P_+\) be of level \(m \ge 1\), and let \(\lambda \) be a maximal dominant weight of \(L(\varLambda )\). The \(t\)-string function\(c^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t,q)\) is defined by

$$\begin{aligned} c^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t,q):= q^{s_\Lambda (\lambda )} \, a^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t,q), \end{aligned}$$
(2.5)

where

$$\begin{aligned} s_\Lambda (\lambda )= \frac{|\varLambda + \rho |^2}{2(m+2)} - \frac{|\lambda |^2}{2m} - \frac{|\rho |^2}{4}. \end{aligned}$$
(2.6)

Here, we have used the usual notation \(|\gamma |^2\) to denote \(( \gamma | \gamma )\). In our case, this simplifies to [9, 11]

$$\begin{aligned} s_\Lambda (\lambda )= d(\varLambda - \lambda ) + \frac{b(\varLambda +\rho )^2}{m+2} - \frac{b(\lambda )^2}{m} - \frac{1}{8}. \end{aligned}$$

2.3    We recall the definition of the constant term map from [13].

Definition 3

The constant term map \({{\mathrm{ct}}}(\cdot )\) is defined on formal sums \(\sum _{\gamma \in Q} {c_{\gamma }\, e (\gamma )}\) by

$$\begin{aligned} {{\mathrm{ct}}}\left( \,\sum _{\gamma \in Q} c_{\gamma }\, e (\gamma )\,\right) := \sum _{n \in \mathbb {Z}} c_{n\delta }\, e (n\delta ). \end{aligned}$$

It will be convenient to introduce some more notations. Let \(\varGamma _t\) denote the infinite product in Eq. (2.1); thus

$$\begin{aligned} \Gamma _{t} = \prod _{n \ge 1}\left[ \,(1 -t q^n)(1-t q^{n-1} e(-\alpha _{1}))(1-t q^n e (\alpha _{1}))\, \right] ^{-1}. \end{aligned}$$

Next, let \(\xi _t = \Gamma _t \,(1 - t e(-\alpha _{1}))\), i.e.,

$$\begin{aligned} \xi _t = \prod _{n\ge 1}\left[ \,(1 -t q^n)(1-t q^n e(-\alpha _{1}))(1-t q^n e (\alpha _{1}))\,\right] ^{-1}. \end{aligned}$$

We also define \(P_t := \sum _{n\in \mathbb {Z}} t^{|n|} \,e (n\alpha _{1})\); this can be viewed as the formal Poisson kernel of the unit disk. Finally, let \(\mathcal {L}:=\{ \beta \in Q: d(\beta ) \le 0\}\). With these definitions in place, we can now state our first lemma, which describes the generating function of \(K^\prime \).

Lemma 1

If \(\beta \in \mathcal {L}\), then

$$\begin{aligned} K_{\beta }^\prime = {{\mathrm{ct}}}\left( \,P_t \; \xi _{t} \;e (\beta ) \right) . \end{aligned}$$
(2.7)

Proof

Let \(\beta \in \mathcal {L}\). Observe that in this case \(r_1 \cdot \beta \in \mathcal {L}\), and the sums on the right-hand sides of Eqs. (2.2) and (2.3) can be replaced by \(\sum _{n \in \mathbb {Z}}\). It then follows from definitions that (i) \(K_{\beta }^\prime = K_{\beta } + t \,K_{r_1 \cdot \beta }\), (ii) \(K_{\beta } = {{\mathrm{ct}}}\left( \,\Gamma _t \, e(\beta )\,\right) \), and (iii) \(K_{r_1 \cdot \beta } = {{\mathrm{ct}}}\left( \,\Gamma _t \, e(r_1 \cdot \beta )\,\right) \).

For \(f = \sum _{\lambda \in \mathfrak {h}^{*}} c_{\lambda }(t)\,e(\lambda )\), define \(\overline{f} := \sum _{\lambda \in \mathfrak {h}^{*}} c_{\lambda }(t) \, e(r_1(\lambda ))\). Note that \({{\mathrm{ct}}}(f) = {{\mathrm{ct}}}(\overline{f})\). For \(f= \Gamma _t \, e(r_1 \cdot \beta )\), we have \(\overline{f} = \overline{\Gamma }_t \, e(\beta + \alpha _{1})\). Further, it is easy to see that \( \Gamma _t + t\,e(\alpha _{1}) \, \overline{\Gamma }_t = P_t \; \xi _t\). Putting these facts together, the proof follows. \(\square \)

2.4    The Weyl group W of \(\mathfrak {g}\) can be written as \(W = T \rtimes \overset{\circ }{W}\) where T is the group of translations by elements of the finite type root lattice \(\overset{\circ }{Q}= \mathbb {Z}\alpha _{1}\), and \(\overset{\circ }{W}= \{1, r_1\}\) is the Weyl group of the underlying finite type Dynkin diagram (of type \(\mathfrak {sl}_2\) in this case). The extended affine Weyl group is \(\widehat{W}:= \widehat{T} \rtimes \overset{\circ }{W}\), where \(\widehat{T}\) is the set of translations by elements of the finite type weight lattice \(\overset{\circ }{P}= \frac{1}{2} \overset{\circ }{Q}\). Letting \(\tau \) denote the translation by the generator \(\alpha _{1}/2\) of \(\overset{\circ }{P}\), we have \(\widehat{T}=\{\tau ^{n}:n \in \mathbb {Z}\}\) and \(T=\{\tau ^{2n}:n \in \mathbb {Z}\}\). We also have the following formula for the linear action of \(\tau \) on \(\mathfrak {h}^*\) [9]:

$$\begin{aligned} \tau (\lambda ) = \lambda + \frac{1}{2} \left( \,( \lambda | \delta )\,\alpha _{1} - ( \lambda | \alpha _{1}) \,\delta - ( \lambda | \delta )\, \frac{\delta }{2}\,\right) . \end{aligned}$$
(2.8)

We also define the element \(\sigma :=\tau r_1\). The element \(\sigma \in \widehat{W}\) permutes the simple roots of \(\mathfrak {g}\), i.e., \(\sigma (\alpha _0) = \alpha _{1}\), \(\sigma (\alpha _{1}) = \alpha _0\), and fixes the Weyl vector \(\rho \).

Note that our notation conflicts with the introduction, where \(\tau \) was a complex number in the upper half plane. But this should cause no confusion, especially since we will henceforth exclusively work in the formal setting, where \(q = e(-\delta )\) rather than \(e^{2\pi i \tau }\).

2.5   Next, we will obtain an expression for the generating function of \(K_{}\). For this purpose, define a function \(I : Q \times \mathbb {Z}\rightarrow \{0, \pm 1\}\) by

$$\begin{aligned} I(\beta , j) := {\left\{ \begin{array}{ll} 1 &{}\quad \text { if }\, b(\beta ) \ge 0, j \ge 0, \\ -1 &{}\quad \text { if }\, b(\beta ) < 0, j < 0, \\ 0 &{}\quad \text { otherwise}. \end{array}\right. } \end{aligned}$$
(2.9)

Our second lemma relates the generating functions of \(K_{}\) and \(K_{}^\prime \), and can be viewed as a t-analog of [11, Theorem C].

Lemma 2

Let \(\beta \in Q\). Then

$$\begin{aligned} K_{\beta } = \sum _{j \in \mathbb {Z}} (-1)^j \; I(\beta , j) \; t^j \; K_{\tau ^{j}\cdot \beta }^\prime . \end{aligned}$$
(2.10)

Proof

Since \(\sigma \) interchanges the simple roots \(\alpha _0, \alpha _{1}\) and fixes \(\rho \), it is clear that \(K(\beta , \,t) = K(\sigma \beta , \,t) = K(\sigma \cdot \beta , \,t)\) for all \(\beta \in Q\). Now, this implies that

$$\begin{aligned} K(\beta , \,t) = K^\prime (\beta , \,t) - t\, K(r_1 \cdot \beta , \,t) = K^\prime (\beta , \,t) - t\, K(\tau \cdot \beta , \,t). \end{aligned}$$

Iterating the last expression gives

$$\begin{aligned} K(\beta , \,t) = \sum _{j \ge 0} (-1)^j \, t^j \, K^\prime (\tau ^{j}\cdot \beta , \,t). \end{aligned}$$
(2.11)

Similary, replacing \(\beta \) by \(\sigma \beta \), one obtains the relations \(K(\beta , \,t) = t^{-1} \, K^\prime (\beta , \,t) - t^{-1}\, K(\tau ^{-1}\, \cdot \beta , \,t)\) and hence

$$\begin{aligned} K(\beta , \,t) = - \sum _{j < 0} (-1)^j \, t^j \, K^\prime (\tau ^{j}\cdot \beta , \,t). \end{aligned}$$
(2.12)

The sums in Eqs. (2.11) and (2.12) are in fact finite (as can be seen from Eq. (2.14) below) and either expression can be used for a given \(\beta \in Q\). But choosing the expression (2.11) (resp. (2.12)) when \(b(\beta ) \ge 0\) (resp. \(b(\beta ) < 0\)), we obtain

$$\begin{aligned} K(\beta , \,t) = \sum _{j \in \mathbb {Z}} (-1)^j \, I(\beta ,j) \, t^j \, K^\prime (\tau ^{j}\cdot \beta , \,t). \end{aligned}$$
(2.13)

To complete the proof, it only remains to replace \(\beta \) by \(\beta + n\delta \) (\(n \ge 0\)) in (2.13) and observe that (i) \( I(\beta + n\delta ,j) = I(\beta ,j)\) and (ii) \(\tau ^{j}\cdot (\beta + n\delta ) = (\tau ^{j}\cdot \beta ) + n\delta \). \(\square \)

We also make the following observation about the “support” of the sum in (2.10).

Lemma 3

Let \(\beta \in Q\). Then

  1. (1)

    \(\{j \in \mathbb {Z}: I(\beta ,j) \ne 0\} \subset \{ j \in \mathbb {Z}: d(\tau ^j \cdot \beta ) \le d(\beta ) \}\),

  2. (2)

    If \(I(\beta ,j) \ne 0\) and \(\beta \in \mathcal {L}\), then \(\tau ^j \cdot \beta \in \mathcal {L}\).

Proof

The second assertion clearly follows from the first. To prove (1), we use Eq. (2.8) to obtain

$$\begin{aligned} \tau ^{j}\cdot \beta - \beta = \tau ^{j}(\beta + \rho ) - (\beta + \rho ) = j \alpha _{1} - \left( j\, b(\beta ) + \frac{j(j+1)}{2} \right) \, \delta . \end{aligned}$$
(2.14)

Thus \( d(\tau ^{j}\cdot \beta - \beta ) = - j\, b(\beta ) - \frac{j(j+1)}{2}\). It is clear from Eq. (2.9) that this is non-positive for all pairs \((\beta ,j)\) for which \(I(\beta ,j) \ne 0\). \(\square \)

2.6   Let \(\varLambda \) be a dominant integral weight of \(\mathfrak {g}\) of level \(m \ge 1\) and \(\lambda \) be a maximal dominant weight of \(L(\varLambda )\). Thus, \(( \varLambda | \delta ) = m =( \lambda | \delta )\), and \(\lambda + \delta \) is not a weight of \(L(\lambda )\). This implies in particular that \(\varLambda - \lambda \) is a non-negative integer multiple of \(\alpha _{0}\) or \(\alpha _{1}\).

Now, it is clear from the symmetry of the Dynkin diagram that \(c^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t,q)= c^{\scriptstyle \sigma \varLambda }_{\scriptstyle \sigma \lambda }(t,q)\). If (i) \(\varLambda - \lambda \in \mathbb {Z}_{>0} \alpha _{0}\) or if (ii) \(\varLambda = \lambda \) and \(( \varLambda | \alpha _{1}) > \frac{m}{2}\), we replace \((\varLambda , \lambda )\) by \((\sigma \varLambda , \sigma \lambda )\). Let \(A:=\frac{b(\varLambda + \rho )}{m+2}\) and \(B:= \frac{b(\lambda )}{m}\). It is now easy to see (after this replacement if necessary) that \(\varLambda - \lambda \in \mathbb {Z}_{\ge 0} \alpha _{1}\) and \(0 \le B \le A < \frac{1}{2}\). We also observe [11, pp 259] that if \(A^\prime =\frac{b(\sigma \varLambda + \rho )}{m+2}\) and \(B^\prime := \frac{b(\sigma \lambda )}{m}\), then \((A^\prime , B^\prime ) = (\frac{1}{2}-A, \frac{1}{2} - B)\).

For \(w \in W\), define

$$\begin{aligned} s(w) := w(\varLambda + \rho ) - (\lambda + \rho ) = w \cdot \varLambda - \lambda \in Q. \end{aligned}$$

We record the following two elementary facts.

Lemma 4

\(s(w) \in \mathcal {L}\) for all \(w \in W\).

Proof

We have \(d(\beta ) = ( \beta | \varLambda _0)\) for all \(\beta \in Q\). Thus \(d(s(w)) = ( w(\varLambda + \rho ) - (\varLambda + \rho ) | \varLambda _0) + ( \varLambda - \lambda | \varLambda _0)\). The second term is zero since \(\varLambda - \lambda \in \mathbb {Z}\alpha _{1}\), while the first term equals \(( \varLambda + \rho | w^{-1} \varLambda _0 - \varLambda _0)\) which is non-positive since \(\varLambda _0\) is a dominant weight.

\(\square \)

Lemma 5

\(a^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t,q)= \sum _{w \in W} (-1)^{\ell (w)} \, K_{s(w)}.\)

Proof

This follows from the definitions. \(\square \)

2.7   We now put the results of the preceding lemmas together to obtain an expression for the generating function \(a^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t,q)\). First, Lemmas 2 and 5 imply

$$\begin{aligned} a^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t,q)= \sum _{w \in W} \sum _{j \in \mathbb {Z}} (-1)^{\ell (w) + j} \; I(s(w), j) \; t^j \; K_{\tau ^{j}\cdot s(w)}^\prime . \end{aligned}$$

Now, from Lemmas 3 and 4 it is clear that \(\tau ^{j}\cdot s(w) \in \mathcal {L}\) for all pairs \((w,j) \in W \times \mathbb {Z}\) for which \(I(s(w), j) \ne 0\); in this case, we can apply Lemma 1 to obtain

$$\begin{aligned} K_{\tau ^{j}\cdot s(w)}^\prime = {{\mathrm{ct}}}(P_t \;\xi _t \;e(\tau ^{j}\cdot s(w))). \end{aligned}$$

Now, letting \(\bar{\epsilon }(w,j) := (-1)^{\ell (w) + j} \,I(s(w), j)\), and

$$\begin{aligned} \mathcal {H}:=\sum _{(w,j) \in W\times \mathbb {Z}} \bar{\epsilon }(w,j) \; t^j \; e(\tau ^{j}\cdot s(w)), \end{aligned}$$
(2.15)

we conclude that

$$\begin{aligned} a^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t,q)= {{\mathrm{ct}}}\left( \,P_t \; \xi _t \; \mathcal {H}\,\right) . \end{aligned}$$
(2.16)

3 The indefinite quadratic form

In this section, we analyze \(\mathcal {H}\) more closely. First, observe that the sum over \((w,j) \in W \times \mathbb {Z}\) in (2.15) should really be thought of as a sum over \((w, \tau ^{j}) \in W \times \widehat{T}\). Now, T is a normal subgroup of index 2 in both W and \(\widehat{T}\); thus the group \(W \times \widehat{T}\) contains \(T \times T\) as a normal subgroup, with the quotient group isomorphic to \(\frac{\mathbb {Z}}{2\mathbb {Z}} \oplus \frac{\mathbb {Z}}{2\mathbb {Z}}\). We will show below that on each coset of \(T \times T\), the sum defining \(\mathcal {H}\) has a particularly nice expression in terms of an indefinite quadratic form on \(\mathbb {Z}^2 \cong T \times T\).

3.1   Let \(U:= \mathbb {R}\alpha _{1} \oplus \mathbb {R}\alpha _{1}\) and \(M:= \mathbb {Z}\alpha _{1} \oplus \mathbb {Z}\alpha _{1}\). We identify U with \(\mathbb {R}^2\) and M with \(\mathbb {Z}^2\). Define a quadratic form N on U by

$$\begin{aligned} N(x,y):= 2 (m+2)x^2 - 2m y^2 \quad (x,y \in \mathbb {R}). \end{aligned}$$

We observe that \(N(\nu )\) is a non-zero even integer for \(\nu \in M \backslash \{0\}\). Let \(M^*\) denote the lattice dual to M with respect to the bilinear form induced by N. We then have

$$\begin{aligned} M^* = \frac{1}{2(m+2)} \mathbb {Z}\oplus \frac{1}{2m} \mathbb {Z}. \end{aligned}$$

Given elements \(\mu _1, \mu _2 \in P\) of levels \(m+2\) and m, respectively, observe that \((\frac{b(\mu _1)}{m+2}, \frac{b(\mu _2)}{m}) \in M^*\), since \(b(\mu _i) = \frac{( \mu _i | \alpha _{1})}{2} \in \frac{1}{2} \mathbb {Z}\).

Lemma 6

For \((w,j) \in W \times \mathbb {Z}\), we have

$$\begin{aligned} \tau ^{j}\cdot s(w) = \left( (m+2) x - my - \frac{1}{2}\right) \alpha _{1} - \frac{1}{2} N(x,y) \, \delta + \left( s_\Lambda (\lambda )+ \frac{1}{8}\right) \, \delta \end{aligned}$$
(3.1)

where \(x := \frac{j}{2} + \frac{b(w(\varLambda + \rho ))}{m+2}\) and \(y := \frac{j}{2} + \frac{b(\lambda )}{m}\).

Proof

This is an easy calculation. The coefficient of \(\delta \) was computed in [11, (5.13)] for \(w \in T\). \(\square \)

It is now easy to see that Eqs. (2.15), (2.16), and (3.1) together imply the following:

Corollary 1

\(c^{\scriptstyle \Lambda }_{\scriptstyle \lambda }(t,q)= {{\mathrm{ct}}}\left( P_t \; (q^{-\frac{1}{8}} \xi _t) \; \varTheta \right) \) where

$$\begin{aligned} \varTheta := \sum _{(w,j) \in W\times \mathbb {Z}} \bar{\epsilon }(w,j) \, t^j \, q^{\frac{1}{2} N(x,y)} z^{(m+2) x - my - 1/2}. \end{aligned}$$
(3.2)

Here \(z:=e(\alpha _{1})\), and \(x, y \in M^*\) are the functions of (wj) defined in Lemma 6.

We remark that \(q^{-\frac{1}{8}} \xi _t\) is exactly the function \(\eta ^{(-3)}\) of (1.5).

3.2    We now turn to the map \(\phi : W \times \mathbb {Z}\rightarrow M^*\) given by \((w,j) \mapsto (x,y)\) where

$$\begin{aligned} x := \frac{j}{2} + \frac{b(w(\varLambda + \rho ))}{m+2}\,\, \text { and }\,\, y := \frac{j}{2} + \frac{b(\lambda )}{m} \end{aligned}$$

as in Lemma 6. Letting e denote the identity element of W, observe that \(\phi (e,0) = (A,B)\) where \(A=\frac{b(\varLambda + \rho )}{m+2}\) and \(B= \frac{b(\lambda )}{m}\) as in Sect. 2.6. As pointed out there, our choice of \((\varLambda , \lambda )\) ensures that \(0 \le B \le A < \frac{1}{2}\). The properties of \(\phi \) are given by the following lemma.

Lemma 7

The map \(\phi \) is injective, and its image is a union of translates of M. More precisely, we have Im \(\phi = \bigsqcup _{i=1}^4 L_i\), where

$$\begin{aligned} L_1&= (A,B) + M, \end{aligned}$$
(3.3)
$$\begin{aligned} L_2&= \left( A+\frac{1}{2}, B + \frac{1}{2}\right) + M, \end{aligned}$$
(3.4)
$$\begin{aligned} L_3&=(-A,B) + M,\end{aligned}$$
(3.5)
$$\begin{aligned} L_4&= \left( -A + \frac{1}{2}, B + \frac{1}{2}\right) + M. \end{aligned}$$
(3.6)

Proof

Using Lemma 6, it is clear that \(\phi (w_1,j_1) = \phi (w_2,j_2)\) implies \(j_1 = j_2\) and \(\tau ^{j_1} \cdot s(w_1) = \tau ^{j_2} \cdot s(w_2)\). In turn, this means \(s(w_1) = s(w_2)\), and hence \(w_1 = w_2\), since \(\varLambda + \rho \) is regular dominant. This proves the injectivity.

Next, let \((w,j) \in W \times \mathbb {Z}\). Recall that since \(W = T \rtimes \overset{\circ }{W}\), w can be uniquely written as \(\tau ^{2n}\omega \) for some \(n \in \mathbb {Z}, \omega \in \overset{\circ }{W}=\{1,r_1\}\). Now, Eq. (2.8) implies that

$$\begin{aligned} x = \frac{j}{2} + n + (\mathrm {sgn} \, \omega )A, \;\; y = \frac{j}{2} + B \end{aligned}$$
(3.7)

where \(\mathrm {sgn}\) is the sign character of \(\overset{\circ }{W}\). It is now clear that if \(W \times \mathbb {Z}\) is written as the disjoint union of the four subsets

$$\begin{aligned} S_1=T \times 2\mathbb {Z},\; S_2=T \times (2\mathbb {Z}+1), \; S_3=Tr_1 \times 2\mathbb {Z}, \; S_4=Tr_1 \times (2\mathbb {Z}+1), \end{aligned}$$

then \(\phi (S_i) = L_i\) for \(1 \le i \le 4\). \(\square \)

We observe that since \(0 \le B \le A < \frac{1}{2}\), the \(L_i\) are pairwise disjoint. From Lemma 7, we see that \(\varTheta \) has the following equivalent expression:

$$\begin{aligned} \varTheta = \sum _{(x,y) \in \bigsqcup _{i=1}^4 L_i} \epsilon (x,y)\, t^{2(y-B)} q^{\frac{1}{2} N(x,y)} z^{(m+2) x - my - 1/2}, \end{aligned}$$
(3.8)

where \(\epsilon (x,y) :=\bar{\epsilon }(\phi ^{-1}(x,y))\) for \((x,y) \in \bigsqcup _{i=1}^4 L_i\).

3.3   Let O(UN) denote the group of invertible linear operators on U preserving the quadratic form N, and let \(SO_0(U,N)\) be the connected component of O(UN) containing the identity. Let \(a \in GL(U)\) be defined by

$$\begin{aligned} a(u,v) := ((m+1) u + mv, (m+2)u + (m+1)v). \end{aligned}$$

Let G be the subgroup of GL(U) generated by a, and \(G_0\) be the subgroup of G generated by \(a^2\). It is known that

$$\begin{aligned} G = \{g \in SO_0(U,N): g M =M \}. \end{aligned}$$

We note that elements of G also leave \(M^*\) invariant, and thus G has a natural action on \(M^*/M\). It is known that

$$\begin{aligned} G_0 = \{g \in G: g \text { fixes } M^*/M \text { pointwise}\}. \end{aligned}$$

Define \(\zeta \in O(U,N)\) by \(\zeta (u,v):=(-u,v)\), and let

$$\begin{aligned} \widetilde{G}:= \langle \zeta \rangle \ltimes G \text { and } \widetilde{G}_0:= \langle \zeta \rangle \ltimes G_0. \end{aligned}$$

We have the following easy properties: (i) \(\zeta ^2\) is the identity, (ii) \(\zeta a \zeta ^{-1} = a^{-1}\), (iii) \(\widetilde{G}\) is an infinite dihedral group. We have the following diagram of inclusions between the four groups. Each inclusion is as an index 2 subgroup.

Observe that \(\widetilde{G}\) leaves M and \(M^*\) invariant; we now show that the \(\widetilde{G}\)-orbit of \(L_1\) is \(\{L_i: 1 \leqslant i \leqslant 4\}\).

Lemma 8

  1. (1)

    If \(g \in G_0\) then \(g L_i = L_i\) for \(1 \leqslant i \leqslant 4\).

  2. (2)

    \(L_1 = aL_4 = \zeta L_3 = a \zeta L_2\).

Proof

The first statement follows from the fact that \(G_0\) fixes \(M^*/M\) pointwise. To show \(L_1 = aL_4\), observe using Lemma 6 that \(a^{-1}(A,B) = (-A+\frac{1}{2},B+\frac{1}{2}) + b(s(e)) (1,-1)\). Since \(s(e) = \varLambda - \lambda \in Q\), \(b(s(e)) \in \mathbb {Z}\) and we are done. The remaining two equalities are obvious. \(\square \)

3.4   We now define the following subsets of U:

  1. (1)

    \(U^+=\{(u,v): N(u,v) >0\}\),

  2. (2)

    \(\widetilde{F}= \{(u, v): u > 0 \text { and } 0 \leqslant v \leqslant u\} \cup \{(u,v): 0 > v > u\}\),

  3. (3)

    \( F_0= \widetilde{F}\cup a\widetilde{F}\cup \zeta \widetilde{F}\cup a \zeta \widetilde{F}\).

Clearly, \(\widetilde{F}\subset F_0\subset U^+\).

Lemma 9

  1. (1)

    \(U^+\) is \(\widetilde{G}\)-invariant.

  2. (2)

    \( F_0\) is a fundamental domain for the action of \(G_0\) on \(U^+\).

  3. (3)

    \(\widetilde{F}\) is a fundamental domain for the action of \(\widetilde{G}\) on \(U^+\).

Proof

The first assertion follows from the fact that \(\widetilde{G}\subset O(U,N)\). Now, \(F:=\widetilde{F}\cup \zeta \widetilde{F}\) and \(F_0= F\cup aF\) are known to be fundamental domains for the actions of G and \(G_0\) (respectively) on \(U^+\) [11]. It follows that \(\widetilde{F}\) is a fundamental domain for the action of \(\widetilde{G}\) on \(U^+\). \(\square \)

The region \(\widetilde{F}\) arises naturally when one considers the “support” of the sum in Eq. (3.8). More precisely

Lemma 10

For \(1 \le i \le 4\), we have

$$\begin{aligned} \{(x,y) \in L_i: \epsilon (x,y) \ne 0\} = L_i \cap \widetilde{F}. \end{aligned}$$

Proof

We prove this only for \(i=1\), the rest of the cases being similar. Fix \((x,y) \in L_1\); by Lemma 7, we have \((x,y) = \phi (w,j)\) where \(w = \tau ^{2n}\), \(n \in \mathbb {Z}\), \(j \in 2 \mathbb {Z}\). Now \(\epsilon (x,y) \ne 0\) iff \(I(s(w),j) \ne 0\) iff either (i) \(n, j \ge 0\) or (ii) \(n, j <0\). From Eq. (3.7) and our assumption that \(0 \le B \le A < \frac{1}{2}\), it follows that (i) is equivalent to \(0 \le y \le x\) and (ii) is equivalent to \(0 > y > x\). \(\square \)

Lemmas 8 and 9 allow us to identify the sets \(\bigsqcup _{i=1}^4 L_i \cap \widetilde{F}\) and \(L_1 \cap F_0\). More precisely, define the map \( \psi : \bigsqcup _{i=1}^4 L_i \cap \widetilde{F}\rightarrow L_1 \cap F_0\) by

$$\begin{aligned} \psi (x,y) := {\left\{ \begin{array}{ll} (x,y) &{}\quad \text { if } (x,y) \in L_1 \cap \widetilde{F},\\ a\zeta (x,y) &{}\quad \text { if } (x,y) \in L_2 \cap \widetilde{F},\\ \zeta (x,y) &{}\quad \text { if } (x,y) \in L_3 \cap \widetilde{F},\\ a (x,y) &{}\quad \text { if } (x,y) \in L_4 \cap \widetilde{F}. \end{array}\right. } \end{aligned}$$
(3.9)

By Lemmas 8 and 9, it is clear that \(\psi \) is well defined and is a bijection. The inverse map \(\psi ^{-1}\) is piecewise linear on \( L_1 \cap F_0\) and is easy to describe: given \((x,y) \in L_1 \cap F_0\), \(\psi ^{-1}(x,y)\) is the unique element in the \(\widetilde{G}\)-orbit of (xy) which lies in \(\widetilde{F}\). We will denote \(\psi ^{-1}(x,y) =(x^\dag , y^\dag )\).

3.5   We now return to \(\varTheta \) in Eq. (3.8):

$$\begin{aligned} \varTheta = \sum _{(x,y) \in \bigsqcup _{i=1}^4 L_i} \epsilon (x,y) \,t^{2(y-B)} \,q^{\frac{1}{2} N(x,y)} \,z^{(m+2) x - my - 1/2}, \end{aligned}$$

where \(z:=e(\alpha _{1})\). Using Lemma 10, we can split this into four sums, one over each \(L_i \cap \widetilde{F}\). We then perform a change of variables, replacing \((x,y) \in \bigsqcup _{i=1}^4 L_i\) by \(\psi (x,y) \in L_1 \cap F_0\). Since \(N(x,y) = N(x^\dag ,y^\dag )\), the resulting sum becomes:

$$\begin{aligned} \varTheta = \sum _{(x,y) \in L_1 \cap F_0} \epsilon (x^\dag ,y^\dag )\; t^{2(y^\dag -B)} \,q^{\frac{1}{2} N(x,y)}\, z^{(m+2) x^\dag - my^\dag - 1/2}. \end{aligned}$$

For \((x,y) \in U^+\), define \(\mathrm {sign}(x,y):= 1\) if \(x>0\) and \(-1\) if \(x <0\). We then have:

Lemma 11

For \((x,y) \in L_1 \cap F_0\), \(\epsilon (x^\dag ,y^\dag ) = \mathrm {sign}(x,y)\).

Proof

As in the above discussion, we split this into the four cases \((x,y) \in L_1 \cap g \widetilde{F}\) for (i) \(g = e\), (ii) \(g = a\zeta \), (iii) \(g = \zeta \), and (iv) \(g = a\). We only consider case (ii), which is representative of the calculation needed for the other cases. For \((x,y) \in L_1 \cap a\zeta \widetilde{F}\), we have \( (x^\dag ,y^\dag ) = (a\zeta )^{-1}(x,y) \in L_2 \cap \widetilde{F}\). Let \((x^\dag ,y^\dag ) = \phi (w,j)\) where \(w = \tau ^{2n}\), \(n \in \mathbb {Z}\), \(j \in 2 \mathbb {Z}+1\). Now \(\epsilon (x^\dag ,y^\dag ) = \bar{\epsilon }(w,j) = - I(s(w),j)\). Now, \(\epsilon (x^\dag ,y^\dag )\) equals \(-1\) if \(n, j \ge 0\) and 1 if \(n, j <0\). In other words \(\epsilon (x^\dag ,y^\dag ) = - \mathrm {sign}(x^\dag ,y^\dag ) = \mathrm {sign}(x,y)\). The last equality follows from the fact that a leaves sign invariant, while \(\zeta \) reverses it. \(\square \)

Since \(\mathrm {sign}(x,y)\) and N(xy) are constant on \(G_0\)-orbits, we have

$$\begin{aligned} \varTheta = t^{-2B} z^{-\frac{1}{2}} \sum _{\begin{array}{c} (x,y) \in L_1 \cap U^+\\ (x,y) \text { mod } G_0 \end{array}} \mathrm {sign}(x,y) \; q^{\frac{1}{2} N(x,y)}\; t^{2y^\dag } \, z^{(m+2) x^\dag - my^\dag } \end{aligned}$$
(3.10)

Finally, putting together Corollary 1, Eq. (3.10), and our choice of the pair \((\varLambda , \lambda )\) in Sect. 2.6, we deduce Theorem 2. \(\square \)