1 Introduction

Let q be a complex number where \(q:=e^{2\pi i \tau }\) and \(\tau \in \mathfrak {H}:=\{z\in \mathbb {C} | \text{ Im }{z}>0\}\). The goal of this paper is to find new symmetries for string functions for affine Kac–Moody algebras and then use the new symmetries to give new proofs of classical string function identities. We do so by putting the string functions into the setting of Hecke-type double-sums as studied by the first author and Hickerson [15]. Let us start with a brief reminder of what a string function is in this case. For details, see [17, 18].

For the affine Kac–Moody algebra \(\mathfrak {g}=A_1^{(1)}\) the simple roots are \(\alpha _0=\delta -\alpha \) and \(\alpha _1=\alpha \), where \(\alpha \) is the root of \(A_1\) Lie subalgebra and \(\delta \) is the imaginary root. Denote by \(\Lambda _0\) and \(\Lambda _1\) corresponding fundamental weights. Denote by \(P_+\) the subset of integral dominant weights in the weight lattice \(\mathbb {Z}\Lambda _0\bigoplus \mathbb {Z}\Lambda _1,\;\; P_+=\{a\Lambda _0+b\Lambda _1, a,b\in \mathbb {Z}_{\ge 0}\}\).

Let \(L(\Lambda ), \Lambda \in P_+\) be an irreducible \(\mathfrak {g}\)-module with highest weight \(\Lambda \in P_+\) of level N:

$$\begin{aligned} \Lambda =(N-\ell )\Lambda _0+\ell \Lambda _1. \end{aligned}$$

Define the character of \(L(\Lambda )\) as a function

$$\begin{aligned} \textrm{ch}_{L(\Lambda )}(z,q)=\sum _{\lambda \in P(\Lambda )\subset \mathfrak {h}^{*}}\textrm{mult}_{\Lambda }(\lambda )q^Az^{A-B}, \end{aligned}$$

Here a sum is taken over all weights of a module; these are weights that occur in \(L(\lambda )\), i.e., \(\lambda =\Lambda -A\alpha _0-B\alpha _1\), where \(A,B\in \mathbb {Z}_{\ge 0}\).

It is possible to express the character via the subset of weights of a module called maximal weights. A weight \(\lambda \in P(\Lambda )\) is called maximal if \(\lambda +\delta \not \in P(\Lambda )\). We will parametrize maximal weights of the module as

$$\begin{aligned} \lambda =(N-m)\Lambda _0+m\Lambda _1. \end{aligned}$$

For a maximal weight \(\lambda \in P(\Lambda )\) the string function of \(\lambda \) is defined as

$$\begin{aligned} c^\Lambda _{\lambda }(q)=c^{N-\ell ,\ell }_{N-m,m}(q):=q^{ s_{\Lambda }(\lambda )}\sum _{n\ge 0} \textrm{mult}_{\Lambda }(\lambda -n\delta )q^{n}=: C_{m,\ell }^N(q), \end{aligned}$$
(1.1)

where

$$\begin{aligned} s_{\Lambda }(\lambda ):=s(m,\ell ,N)=-\frac{1}{8}+\frac{(\ell +1)^2}{4(N+2)}-\frac{m^2}{4N}. \end{aligned}$$
(1.2)

The character of \(L(\Lambda )\) can be expressed in terms of theta functions and string functions as (See ([17, 18, 25] for details and for how to extend it to other Kac–Moody algebras)

$$\begin{aligned} \textrm{ch}_{L(\Lambda )}(z,q)=\sum _{\begin{array}{c} 0\le m <2N\\ m+\ell \text {even} \end{array}} C_{m,\ell }^{N}(q)\Theta _{m,N}(z,q), \end{aligned}$$

where \(\Theta _{n,m}(z,q)\) is a Jacobi theta function of degree m and characteristic n

$$\begin{aligned} \Theta _{n,m}(z,q)=\sum _{j\in \mathbb {Z}+n/2m} q^{mj^2}z^{-mj}. \end{aligned}$$

The \(C_{m,\ell }^N(q)\) are level-N A\(_1^{(1)}\) string functions, see (1.1).

We recall the definition of Dedkind’s eta-function:

$$\begin{aligned} \eta (\tau ):=q^{\tfrac{1}{24}}\prod _{n=1}^{\infty }(1-q^{n}). \end{aligned}$$

The character can be computed as (see [25, 26] and references therein)

$$\begin{aligned} \textrm{ch}_{L(\Lambda )}(z,q)=\frac{1}{\eta ^3(\tau )} \sum _{m\in 2\mathbb {Z}+\ell } \sum _{j\in \mathbb {Z}}\sum _{i\in \mathbb {N}} (-1)^i q^{\frac{1}{2}i(i+m)+ (N+2)(j+(\ell +1)/(2(N+2)))^2} \\ \times \Bigl \{q^{\frac{1}{2}i(2(N+2)j+\ell +1)} -q^{-\frac{1}{2}i(2(N+2)j+\ell +1)}\Bigr \}z^{-\frac{1}{2}m}, \end{aligned}$$

which gives the expression for string functions as

$$\begin{aligned} C_{m,\ell }^N(q)=\frac{q^{\frac{(\ell +1)^2}{4(N+2)}-\frac{m^2}{4N}}}{\eta ^3(\tau )}\sum _{j\in \mathbb {Z}} \sum _{i\in \mathbb {N}} (-1)^i q^{\frac{1}{2}i(i+m)+j((N+2)j+\ell +1)} \nonumber \\ \times \Bigl \{q^{\frac{1}{2}i(2(N+2)j+\ell +1)}-q^{-\frac{1}{2}i(2(N+2)j+\ell +1)}\Bigr \}. \end{aligned}$$
(1.3)

This is our starting point.

2 Main results

To state our main results, we define Hecke-type double-sum as follows. Let \(x,y\in \mathbb {C}\backslash \{ 0 \}\), and set

$$\begin{aligned} \text {sg}(r):={\left\{ \begin{array}{ll} 1 &{} if \ r\ge 0,\\ -1 &{} if \ r<0, \end{array}\right. } \end{aligned}$$

then

$$\begin{aligned} f_{a,b,c}(x,y,q):=\sum _{\begin{array}{c} r,s\in \mathbb {Z}\\ \text {sg}(r)=\text {sg}(s) \end{array}}\text {sg}(r)(-1)^{r+s}x^ry^sq^{a\left( {\begin{array}{c}r\\ 2\end{array}}\right) +brs+c\left( {\begin{array}{c}s\\ 2\end{array}}\right) }. \end{aligned}$$
(2.1)

We also recall notation for infinite products and theta functions. We have

$$\begin{aligned} (x)_{\infty }=(x;q)_{\infty }:=\prod _{i= 0}^{\infty }(1-q^ix) {\text { and }} j(x;q):=\sum _{n=-\infty }^{\infty }(-1)^nq^{\left( {\begin{array}{c}n\\ 2\end{array}}\right) }x^n=(x)_{\infty }(q/x)_{\infty }(q)_{\infty }, \end{aligned}$$

where in the last line the equivalence of product and sum follows from Jacobi’s triple product identity. We note that \(j(q^n;q)=0\) for \(n\in \mathbb {Z}.\) Let a and m be integers with m positive. Define

$$\begin{aligned} J_{a,m}:=j(q^a;q^m), \ \ {\overline{J}}_{a,m}:=j(-q^a;q^m), \ J_m:=J_{m,3m}=\prod _{i= 1}^{\infty }(1-q^{mi}). \end{aligned}$$

Before we state our main results, we recall the classic symmetries for string functions. They are

$$\begin{aligned} C_{m,\ell }^{N}(q)&=C_{-m,\ell }^{N}(q),\\ C_{m,\ell }^{N}(q)&=C_{2N-m,\ell }^{N}(q),\\ C_{m,\ell }^{N}(q)&=C_{N-m,N-\ell }^{N}(q). \end{aligned}$$

We also remind the reader of our definition for \(s_{\Lambda }(\lambda )\) (1.2). Our new symmetries read

Theorem 2.1

We have

$$\begin{aligned} C_{m,\ell }^{2K}(q)\pm C_{2K-m,\ell }^{2K}(q)&=\frac{q^{s(m,\ell ,2K)}}{J_{1}^3}\Big ( f_{K+1,K+1,1}(\pm q^{1+\frac{1}{2}(K+\ell )},q^{1+\frac{1}{2}(m+\ell )},q) \nonumber \\&\ \ \ \ \ \pm q^{\frac{1}{2}(K-\ell )}f_{K+1,K+1,1}(\pm q^{1+\frac{1}{2}(3K-\ell )},q^{1+K+\frac{1}{2}(m-\ell )},q)\Big ). \end{aligned}$$
(2.2)

Corollary 2.2

We have

$$\begin{aligned} C_{m,K}^{2K}(q)&=\frac{q^{s(m,K,2K)}}{J_{1}^3}f_{K+1,K+1,1}(q^{K+1},q^{1+\frac{1}{2}(m+K)},q). \end{aligned}$$
(2.3)

Corollary 2.3

For \(K\equiv \ell \pmod 2\), we have

$$\begin{aligned} C_{K,\ell }^{2K}(q)&=\frac{q^{s(K,\ell ,2K)}}{J_{1}^3} f_{K+1,K+1,1}(q^{1+\frac{1}{2}(K+\ell )},q^{1-\frac{1}{2}(K-\ell )},q). \end{aligned}$$
(2.4)

Theorem 2.1 and its two corollaries provide an alternative way for interpreting and proving the string function expressions for affine Lie algebras of type \(A_{1}^{(1)}\) found in Kac and Peterson [18]. In [18, pp. 219–220], Kac and Peterson give several examples of string functions for affine Lie algebras of type \(A_{1}^{(1)}\) that have beautiful evaluations in terms of theta functions. See also [19, 20]. If we fix a positive integer m, their string functions are of the form [18, p. 260]:

$$\begin{aligned} c_{\lambda }^{\Lambda }(\tau ) =\frac{1}{\eta (\tau )^3}\cdot \sum _{\begin{array}{c} (x,y)\in \mathbb {R}^2\\ -|x|<y\le |x|\\ (x,y) \ or \ (1/2-x,1/2+y)\in ((N+1)/2(m+2),n/2m)+\mathbb {Z}^2 \end{array}} \text {sg}(x)q^{(m+2)x^2-my^2}, \end{aligned}$$
(2.5)

where N and n are integers with \(n\equiv N \pmod 2\). The string functions \(c_{\lambda }^{\Lambda }(\tau )\) are closely related to the real quadratic fields \(\mathbb {Q}(\sqrt{m(m+2)})\) and to Hecke indefinite modular forms. We have replaced Kac and Peterson’s notation (nNm) with \((m,\ell ,N)\) of [25]. Here our focus will be on double-sum evaluations. A partial list of string functions from [18, pp. 219–220] reads

Level 1:

$$\begin{aligned} c_{10}^{10}= & {} \eta (\tau )^{-1}, \end{aligned}$$
(2.6a)

Level 2:

$$\begin{aligned} c_{11}^{11}= & {} \eta (\tau )^{-2}\eta (2\tau ), \end{aligned}$$
(2.7a)

Level 4:

$$\begin{aligned} c_{22}^{40}= & {} \eta (\tau )^{-2}\eta (6\tau )^{-1}\eta (12\tau )^2, \end{aligned}$$
(2.8a)
$$\begin{aligned} c_{40}^{40}-c_{04}^{40}= & {} \eta (2\tau )^{-1}, \end{aligned}$$
(2.8b)

Level 6:

$$\begin{aligned} c_{51}^{33}= & {} \eta (\tau )^{-3}\eta (2\tau )\eta (3\tau )\eta (6\tau )^{-1}\eta (12\tau ), \end{aligned}$$
(2.9a)
$$\begin{aligned} c_{51}^{51}+c_{15}^{51}= & {} \eta (\tau )^{-3}\eta (2\tau )\eta (6\tau )^2\eta (12\tau )^{-1}, \end{aligned}$$
(2.9b)
$$\begin{aligned} c_{51}^{51}-c_{15}^{51}= & {} \eta (\tau )^{-1}, \end{aligned}$$
(2.9c)

Level 8:

$$\begin{aligned} c_{62}^{44}= & {} \eta (\tau )^{-3}\eta (2\tau )\eta (10\tau ), \end{aligned}$$
(2.10a)
$$\begin{aligned} c_{62}^{62}-c_{26}^{62}= & {} \eta (\tau )^{-1}\eta (2\tau )^{-1}q^{1/10} \prod _{n \not \equiv \pm 1 \pmod {5}}(1-q^{4n}), \end{aligned}$$
(2.10b)

Level 10:

$$\begin{aligned} c_{55}^{73}= & {} \eta (\tau )^{-3}\eta (2\tau )\eta (5\tau )^{-1}\eta (10\tau )^{2}, \end{aligned}$$
(2.11a)
$$\begin{aligned} c_{91}^{55}= & {} \eta (\tau )^{-3}q^{29/40}\prod _{n \not \equiv \pm 1 \pmod {5}}(1-q^{2n}) \prod _{n \not \equiv \pm 2 \pmod {5}}(1-q^{3n}), \end{aligned}$$
(2.11b)
$$\begin{aligned} c_{91}^{91}-c_{19}^{91}= & {} \eta (\tau )^{-2}\eta (2\tau )q^{-1/15}\prod _{n \equiv \pm 1 \pmod {5}}(1-q^{4n})^{-1}. \end{aligned}$$
(2.11c)

In this paper we rewrite the double-sum form of string functions (2.5) using an expression found in [25], where from [25] and [18, p. 260] we have that

$$\begin{aligned} \eta ^{3}(\tau )c_{N-m,m}^{N-\ell ,\ell } =q^{\frac{(\ell +1)^2}{4(N+2)}-\frac{m^2}{4N}} \cdot f_{1,1+N,1}\bigg (q^{1+\tfrac{1}{2}(m+\ell )},q^{1-\tfrac{1}{2}(m-\ell )},q\bigg ). \end{aligned}$$
(2.12)

Kac and Peterson appeal to modularity to prove the string function identities [18, p. 220]. Specifically, they use the transformation law for string functions under the full modular group, together with the calculation of the first few terms in the Fourier expansions of the string functions. They also take advantage of the fact that a modular form vanishing at cusps to sufficiently high order is zero. There are many methods to compute string functions, see [18, pp. 222–223] for a brief outline. In our present work, we will take a different approach.

Once string function identities (2.6a)–(2.11c) have been written in terms of suitable Hecke-type double-sums, see (2.15)–(2.22c), their modularity can be determined using results of [15], see in particular the formulas found in Sect. 3.3.

We recall a simple example of more general results found in [15]. For generic \(x,z\in \mathbb {C} \backslash \{ 0\}\) we define our Appell–Lerch function as

$$\begin{aligned} m(x,q,z):=\frac{1}{j(z;q)}\sum _r\frac{(-1)^rq^{\left( {\begin{array}{c}r\\ 2\end{array}}\right) }z^r}{1-q^{r-1}xz}. \end{aligned}$$
(2.13)

One of the simplest results from [15] then reads

$$\begin{aligned} f_{1,2,1}(x,y,q)&=j(y;q)m\big (\frac{q^2x}{y^2},q^3,-1\big )+j(x;q)m\big (\frac{q^2y}{x^2},q^3,-1\big )\nonumber \\&\ \ \ \ \ \ \ - \frac{yJ_3^3j(-x/y;q)j(q^2xy;q^3)}{{\overline{J}}_{0,3}j(-qy^2/x;q^3)j(-qx^2/y;q^3)}. \end{aligned}$$
(2.14)

Such formulas were found by using a heuristic that relates Appell–Lerch functions to divergent partial theta functions, see [15, Section 3] and [23, Section 4].

For an easy demonstration of (2.14), we consider the case level \(N=1\). It is straightforward to see from (2.5) that (2.6a) is equivalent to showing:

$$\begin{aligned} f_{1,2,1}(q,q,q)=J_1^2. \end{aligned}$$
(2.15)

One sees from (2.14) that

$$\begin{aligned} f_{1,2,1}(q,q,q)&=j(q;q)m(q,q^3,-1)+j(q;q)m(q,q^3,-1) -\frac{1}{{\overline{J}}_{0,3}}\cdot \frac{qJ_{3}^3{\overline{J}}_{0,1}J_{4,3}}{{\overline{J}}_{2,3}^2}\\&=0+0+J_1^2=J_1^2, \end{aligned}$$

where we used the fact that \(j(x;q)=0\) if and only if x is an integral power of q and elementary product rearrangements. On the other hand, if we make a slight variation in the inputs, we have

$$\begin{aligned} f_{1,2,1}(q,-q,q)=j(-q;q)m(q,q^3,-1)+0+0=2{\overline{J}}_{1,4}m(q,q^3,-1)= {\overline{J}}_{1,4}\cdot \phi (q), \end{aligned}$$

where \(\phi (q)\) is a sixth-order mock theta function [4].

In general, one needs to be aware of the number of theta quotients that must be dealt with in simplifying the results. Double-sums of the form \(f_{1,n+1,1}\) require computing \(n^2\) theta quotients, see in particular Theorem 3.8. For example, one sees from (2.5) that (2.11b) is equivalent to showing

$$\begin{aligned} f_{1,11,1}(q^4,q^3,q)=J_{4,10}J_{3,15}, \end{aligned}$$
(2.16)

which requires working with one-hundred theta quotients!

Looking for ways to reduce the number of theta quotients in Theorem 3.8 or for better ways to write Theorem 3.8 is an important question. Many of Ramanujan’s mock theta function identities involve a single quotient of theta functions. One wants to somehow understand how he was led to these single quotient identities. As an example, we can revisit the four tenth-order mock theta functions [8, 24]. Three of them read

$$\begin{aligned} {\phi }_{10}(q)&:=\sum _{n\ge 0}\frac{q^{\left( {\begin{array}{c}n+1\\ 2\end{array}}\right) }}{(q;q^2)_{n+1}}, \ \ {\psi }_{10}(q):=\sum _{n\ge 0}\frac{q^{\left( {\begin{array}{c}n+2\\ 2\end{array}}\right) }}{(q;q^2)_{n+1}}, \ \ {\chi }_{10}(q):=\sum _{n\ge 0}\frac{(-1)^nq^{(n+1)^2}}{(-q;q)_{2n+1}}, \end{aligned}$$

and they can all be expressed in terms of Hecke-type double-sums [6, 7, 15]. The four functions also satisfy six single-quotient theta function identities [6,7,8, 24]. For one of them, we have [8, 24]

$$\begin{aligned} \phi _{10}(q)-q^{-1}\psi _{10}(-q^4)+q^{-2}\chi _{10}(q^8)&=\frac{{\overline{J}}_{1,2}j(-q^2;-q^{10})}{J_{2,8}}. \end{aligned}$$
(2.17)

The six identities were originally found in Ramanjuan’s lost notebook [24]. What led Ramanujan to these identities is a mystery. In fact, in Andrews and Berndt’s final volume on Ramanujan’s lost notebook [3, p. 396], they state

It is inconceivable that an identity such as (2.17) could be stumbled upon by a mindless search algorithm without any overarching theoretical insight.

A proof of (2.17) using Theorem 3.8 is involved [22], so one would like to know if there is a better form of Theorem 3.8 which sheds light on what guided Ramanujan to so many single-quotient that function identities.

Double-sums of the form \(f_{K+1,K+1,1}\) that appear in Theorem 2.1 only have \(K+1\) theta quotients that need to be summed. Using our main theorem and its corollaries, string function identities (2.7a)–(2.11c) are equivalent to the respective double-sum evaluations:

Level 2:

$$\begin{aligned} f_{2,2,1}(q^2,q,q)=J_1J_2, \end{aligned}$$
(2.18a)

Level 4:

$$\begin{aligned} q^{-1}f_{3,3,1}(q^2,1,q)=J_1{\overline{J}}_{6,24}, \end{aligned}$$
(2.19a)
$$\begin{aligned} f_{3,3,1}(-q^2,q,q)-qf_{3,3,1}(-q^4,q^3,q)=J_1J_{1,2}, \end{aligned}$$
(2.19b)

Level 6:

$$\begin{aligned} f_{4,4,1}(q^4,q^3,q)=J_2J_{3,12}, \end{aligned}$$
(2.20a)
$$\begin{aligned} f_{4,4,1}(q^3,q^2,q)+qf_{4,4,1}(q^5,q^4,q)=J_2J_{6,12}, \end{aligned}$$
(2.20b)
$$\begin{aligned} f_{4,4,1}(-q^3,q^2,q)-qf_{4,4,1}(-q^5,q^4,q)=J_1^2, \end{aligned}$$
(2.20c)

Level 8:

$$\begin{aligned} f_{5,5,1}(q^5,q^4,q)=J_2J_{10}, \end{aligned}$$
(2.21a)
$$\begin{aligned} f_{5,5,1}(-q^4,q^3,q)-qf_{5,5,1}(-q^6,q^5,q)=J_{1,2}J_{8,20}, \end{aligned}$$
(2.21b)

Level 10:

$$\begin{aligned} q^{-1}f_{6,6,1}(q^5,1,q)=J_2{\overline{J}}_{5,20}, \end{aligned}$$
(2.22a)
$$\begin{aligned} f_{6,6,1}(q^6,q^4,q)=J_{4,10}J_{3,15}, \end{aligned}$$
(2.22b)
$$\begin{aligned} f_{6,6,1}(-q^4,q^2,q)-q^2f_{6,6,1}(-q^8,q^6,q)=\frac{J_2J_{20}}{J_{1}^2J_{4,20}}. \end{aligned}$$
(2.22c)

In particular our example in (2.16) becomes (2.22b), which only requires working with six theta quotients, see Theorem 3.10.

In [15] we demonstrated that the double-sum formulas give straightforward proofs of the classical mock theta function identities, and in particular the formulas give new proofs of the mock theta conjectures [13, 14]. The focus here is to demonstrate the robustness of our approach in application to string functions. We evaluate eight string functions using double-sum formulas. Four double-sum computations are pieced together from previous results, and four double-sum computations are new.

In Sect. 3, we recall background information on theta functions, Appell–Lerch functions, and Hecke-type double-sums. In Sect. 4, we discuss classical string function relations in the environment of Hecke-type double-sums. In Sect. 5, we obtain (2.12), where the corrected proof comes from a sketch found in [15, Example 1.3]. In Sect. 6, we prove our main result: Theorem 2.1 and its two corollaries, which one could consider to be new string function relations. In the remaining sections, we use Theorem 2.1 to prove even-level string function identities.

In Sect. 7, we evaluate the level \(N=2\) string function \(c_{11}^{11}\) (2.7a). In Sect. 8, we evaluate the level \(N=4\) string function \(c_{40}^{40}-c_{04}^{40}\) (2.8b), where the proof is essentially from [23]. In Sect. 9, we evaluate the level \(N=6\) string functions \(c_{51}^{33}\) (2.9a) and \(c_{51}^{51}+c_{15}^{51}\) (2.9b). In Sect. 9, we also evaluate the level \(N=6\) string function \(c_{51}^{51}-c_{15}^{51}\) (2.9c), where the proof is essentially from [23]. In Sect. 10, we evaluate the level \(N=8\) string function \(c_{62}^{44}\) (2.10a), where the proof is essentially from [15]. In Sect. 11, we evaluate the level \(N=10\) string function \(c_{91}^{55}\) (2.11b).

For a brief historical perspective, around same time as [18], Lepowsky and Primc gave q-hypergeometric expressions for the \(sl_2\) string functions [21]. There have been many types of proofs of identities (2.18a)–(2.22c) over the years since they were first announced. For example, in [1, 2] Andrews proves many of the identities using the constant term method and Bailey pair method, respectively. There have been string functions which generalize \(C_{m,\ell }^{N}(q)\) [12, 16]. There have also been numerous further developments concerning generalized modularity of string functions such as a recent result by Dong, Kac, Ren [9] using algebraic methods. Placing string functions into the double-sum setting [15, Example 1.3] has recently led to Dousse and Osburn’s resolution [10] of a problem of Byrne et al [5].

3 Preliminaries

3.1 Theta functions

We collect some frequently encountered product rearrangements:

$$\begin{aligned} {\overline{J}}_{0,1}=2{\overline{J}}_{1,4}=\frac{2J_2^2}{J_1}, {\overline{J}}_{1,2}=\frac{J_2^5}{J_1^2J_4^2}, J_{1,2}=\frac{J_1^2}{J_2}, {\overline{J}}_{1,3}=\frac{J_2J_3^2}{J_1J_6}, \\ J_{1,4}=\frac{J_1J_4}{J_2}, J_{1,6}=\frac{J_1J_6^2}{J_2J_3}, {\overline{J}}_{1,6}=\frac{J_2^2J_3J_{12}}{J_1J_4J_6}. \end{aligned}$$

Following from the definitions are the following general identities:

$$\begin{aligned} j(z;q)= & {} \sum _{k=0}^{m-1}(-1)^k q^{\left( {\begin{array}{c}k\\ 2\end{array}}\right) }z^k j\big ((-1)^{m+1}q^{\left( {\begin{array}{c}m\\ 2\end{array}}\right) +mk}z^m;q^{m^2}\big ), \end{aligned}$$
(3.2a)
$$\begin{aligned} j(q^n x;q)= & {} (-1)^nq^{-\left( {\begin{array}{c}n\\ 2\end{array}}\right) }x^{-n}j(x;q), \ \ n\in \mathbb {Z}, \end{aligned}$$
(3.2b)
$$\begin{aligned} j(x;q)= & {} j(q/x;q), \end{aligned}$$
(3.2c)
$$\begin{aligned} j(x;q)= & {} {J_1}j(x;q^n)j(qx;q^n)\cdots j(q^{n-1}x;q^n)/{J_n^n} \ \ {\text {if }\, n\, \ge 1,} \end{aligned}$$
(3.2d)
$$\begin{aligned} j(x;-q)= & {} {j(x;q^2)j(-qx;q^2)}/{J_{1,4}}, \end{aligned}$$
(3.2e)
$$\begin{aligned} j(x^n;q^n)= & {} {J_n}j(x;q)j(\zeta _nx;q)\cdots j(\zeta _n^{n-1}x;q^n)/{J_1^n}, \end{aligned}$$
(3.2f)

if \(n\ge 1\), \(\zeta _n\) is a primitive n-th root of unity.

A convenient form of the Weierstrass three-term relation for theta functions is,

Proposition 3.1

For generic \(a,b,c,d\in \mathbb {C} \backslash \{0 \}\)

$$\begin{aligned} j(ac;q)&j(a/c;q)j(bd;q)j(b/d;q)\\&=j(ad;q)j(a/d;q)j(bc;q)j(b/c;q)+b/c \cdot j(ab;q)j(a/b;q)j(cd;q)j(c/d;q). \end{aligned}$$

We collect several useful results about theta functions in terms of a proposition [13, 14]:

Proposition 3.2

For generic \(x,y,z\in \mathbb {C} \backslash \{0\}\)

$$\begin{aligned} j(-x;q)j(y;q)-j(x;q)j(-y;q)=2xj(x^{-1}y;q^2)j(qxy;q^2), \end{aligned}$$
(3.3a)
$$\begin{aligned} j(-x;q)j(y;q)+j(x;q)j(-y;q)=2j(xy;q^2)j(qx^{-1}y;q^2). \end{aligned}$$
(3.3b)

We finish the subsection by giving a few examples of elementary theta function identities and product rearrangements in action.

Lemma 3.3

We have

$$\begin{aligned} \frac{J_{30}^3}{{\overline{J}}_{0,5}} \frac{J_{3,6}}{J_{3,30}} - 2\cdot \frac{J_{6,60}{\overline{J}}_{5,30}{\overline{J}}_{10,30}}{{\overline{J}}_{0,5}{\overline{J}}_{0,30}{\overline{J}}_{3,30}}\cdot \frac{J_{6}J_{60}}{J_{30}^4} \cdot J_{9,30}J_{21,30}J_{15,30}J_{5,30} =0, \end{aligned}$$
(3.4)

and

$$\begin{aligned} 4\cdot \frac{J_{6,60}{\overline{J}}_{5,30}{\overline{J}}_{10,30}}{{\overline{J}}_{0,5}{\overline{J}}_{0,30}{\overline{J}}_{3,30}} \cdot \frac{J_{6}J_{60}}{J_{30}^4} \cdot J_{16,30}J_{20,30}J_{26,30} J_{10,30} =J_{4,10}J_{3,15}. \end{aligned}$$
(3.5)

Proof of Lemma 3.3

For the first summand in (3.4), we apply (3.2d) to \(J_{3,6}\) to obtain

$$\begin{aligned} \frac{J_{30}^3J_{3,6}}{{\overline{J}}_{0,5}J_{3,30}}&=\frac{J_{30}^3}{{\overline{J}}_{0,5}J_{3,30}} \cdot J_{3,30}J_{9,30}J_{15,30}J_{21,30}J_{27,30} \cdot \frac{J_6}{J_{30}^5}\\&=\frac{J_{3,30}J_{9,30}J_{15,30}J_{21,30}J_6}{{\overline{J}}_{0,5}J_{30}^2}. \end{aligned}$$

For the second summand, we begin by applying (3.2f) to \(J_{6,60}\) to have

$$\begin{aligned} 2\cdot&\frac{J_{6,60}{\overline{J}}_{5,30}{\overline{J}}_{10,30}}{{\overline{J}}_{0,5}{\overline{J}}_{0,30}{\overline{J}}_{3,30}}\cdot \frac{J_{6}J_{60}}{J_{30}^4} \cdot J_{9,30}J_{21,30}J_{15,30}J_{5,30}\\&=2\cdot \frac{{\overline{J}}_{5,30}{\overline{J}}_{10,30}}{{\overline{J}}_{0,5}{\overline{J}}_{0,30}{\overline{J}}_{3,30}}\cdot J_{3,30}{\overline{J}}_{3,30}\cdot \frac{J_{60}}{J_{30}^2}\cdot \frac{J_{6}J_{60}}{J_{30}^4} \cdot J_{9,30}J_{21,30}J_{15,30}J_{5,30}\\&=\frac{{\overline{J}}_{5,30}{\overline{J}}_{10,30}}{{\overline{J}}_{0,5}}\cdot J_{3,30}\cdot \frac{J_{6}}{J_{30}^5} \cdot J_{9,30}J_{21,30}J_{15,30}J_{5,30}, \end{aligned}$$

where we have used the product rearrangement \({\overline{J}}_{0,1}=2J_2^2/J_1\) and simplified. Applying (3.2f) to the product \(J_{5,30}{\overline{J}}_{5,30}\) yields

$$\begin{aligned} 2\cdot&\frac{J_{6,60}{\overline{J}}_{5,30}{\overline{J}}_{10,30}}{{\overline{J}}_{0,5} {\overline{J}}_{0,30}{\overline{J}}_{3,30}}\cdot \frac{J_{6}J_{60}}{J_{30}^4} \cdot J_{9,30}J_{21,30}J_{15,30}J_{5,30}\\&= \frac{{\overline{J}}_{10,30}}{{\overline{J}}_{0,5}}\cdot J_{3,30}\cdot \frac{J_{6}}{J_{30}^5} \cdot J_{9,30}J_{21,30}J_{15,30}J_{10,60}\cdot \frac{J_{30}^2}{J_{60}}\\&= \frac{J_{3,30}}{{\overline{J}}_{0,5}} \cdot \frac{J_{6}}{J_{30}^5} \cdot J_{9,30}J_{21,30}J_{15,30} \cdot \frac{J_{10}J_{60}^2}{J_{20}J_{30}} \cdot \frac{J_{30}^2}{J_{60}}\cdot \frac{J_{20}J_{30}^2}{J_{10}J_{60}}\\&=\frac{J_{3,30}J_{9,30}J_{15,30}J_{21,30}J_{6}}{{\overline{J}}_{0,5}J_{30}^2}, \end{aligned}$$

where for the second equality we used the product rearrangements for \({\overline{J}}_{1,3}\) and \(J_{1,6}\), and for the third equality we simplified.

For second identity (3.5), we use the product rearrangements for \({\overline{J}}_{0,1}\), \({\overline{J}}_{1,6}\), and \({\overline{J}}_{1,3}\) and simplify to have

$$\begin{aligned} 4\cdot&\frac{J_{6,60}{\overline{J}}_{5,30}{\overline{J}}_{10,30}}{{\overline{J}}_{0,5}{\overline{J}}_{0,30}{\overline{J}}_{3,30}} \cdot \frac{J_{6}J_{60}}{J_{30}^4} \cdot J_{16,30}J_{20,30}J_{26,30} J_{10,30}\\&= \frac{J_{6,60}{\overline{J}}_{5,30}{\overline{J}}_{10,30}}{{\overline{J}}_{3,30}} \cdot \frac{J_{6}}{J_{30}^3} \cdot J_{16,30}J_{26,30} \cdot \frac{J_{5}}{J_{60}}\\&= \frac{J_{6,60}}{{\overline{J}}_{3,30}} \cdot \frac{J_{6}}{J_{30}^2} \cdot J_{16,30}J_{26,30} \cdot \frac{J_{10}J_{15}}{J_{60}}\\&=J_{3,30} \cdot \frac{J_{6}}{J_{30}^4} \cdot J_{16,30}J_{26,30} \cdot J_{10}J_{15}, \end{aligned}$$

where for the last equality we used (3.2f). Identity (3.2d) gives us

$$\begin{aligned} J_{6,10}=J_{6,30}J_{16,30}J_{26,30}\cdot \frac{J_{10}}{J_{30}^3} and J_{3,15}=J_{3,30}J_{18,30}\cdot \frac{J_{15}}{J_{30}^2}. \end{aligned}$$

Hence we can rewrite the right-hand side as

$$\begin{aligned} J_{3,30} \cdot \frac{J_{6}}{J_{30}^4} \cdot J_{16,30}J_{26,30} \cdot J_{10}J_{15} =J_{6,10}J_{3,15}\cdot \frac{J_6J_{30}}{J_{6,30}J_{18,30}} =J_{4,10}J_{3,15}, \end{aligned}$$

where we have used the product rearrangement \(J_{1,5}J_{2,5}=J_{1}J_{5}\) and (3.2c). \(\square \)

3.2 Appell–Lerch functions

The Appell–Lerch function satisfies several functional equations and identities [15, 27]:

Proposition 3.4

For generic \(x,z\in \mathbb {C} \backslash \{0\}\)

$$\begin{aligned} m(x,q,z)= & {} m(x,q,qz), \end{aligned}$$
(3.6a)
$$\begin{aligned} m(x,q,z)= & {} x^{-1}m(x^{-1},q,z^{-1}), \end{aligned}$$
(3.6b)
$$\begin{aligned} m(qx,q,z)= & {} 1-xm(x,q,z), \end{aligned}$$
(3.6c)
$$\begin{aligned} m(x,q,z)= & {} m(x,q,x^{-1}z^{-1}), \end{aligned}$$
(3.6d)
$$\begin{aligned} m(x,q,z_1)-m(x,q,z_0)= & {} \frac{z_0J_1^3j(z_1/z_0;q)j(xz_0z_1;q)}{j(z_0;q)j(z_1;q)j(xz_0;q)j(xz_1;q)}. \end{aligned}$$
(3.6e)

Some simple evaluations of the Appell–Lerch function follow.

Corollary 3.5

We have

$$\begin{aligned} m(q,q^2,-1)&=1/2, \end{aligned}$$
(3.7)
$$\begin{aligned} m(-1,q^2,q)&=0. \end{aligned}$$
(3.8)

3.3 Hecke-type double-sums

We recall a few basic properties of Hecke-type double-sums. We have a proposition and a corollary

Proposition 3.6

[15, Proposition 6.3] For \(x,y\in \mathbb {C}\backslash \{0\}\) and \(R,S\in \mathbb {Z}\)

$$\begin{aligned} f_{a,b,c}(x,y,q)&=(-x)^{R}(-y)^Sq^{a\left( {\begin{array}{c}R\\ 2\end{array}}\right) +bRS+c\left( {\begin{array}{c}S\\ 2\end{array}}\right) }f_{a,b,c}(q^{aR+bS}x,q^{bR+cS}y,q) \nonumber \\&\ \ \ \ +\sum _{m=0}^{R-1}(-x)^mq^{a\left( {\begin{array}{c}m\\ 2\end{array}}\right) }j(q^{mb}y;q^c)+\sum _{m=0}^{S-1}(-y)^mq^{c\left( {\begin{array}{c}m\\ 2\end{array}}\right) }j(q^{mb}x;q^a). \end{aligned}$$
(3.9)

When \(b<a\) we adopt the summation convention that

$$\begin{aligned} \sum _{n=a}^{b}c_{n}:=-\sum _{n=b+1}^{a-1}c_{n}, \end{aligned}$$
(3.10)

which has the useful consequence

$$\begin{aligned} \sum _{n=0}^{-1}c_{n}=-\sum _{n=0}^{-1}c_{n}=0. \end{aligned}$$
(3.11)

Usually when (3.9) is used in this paper, the two summands of theta functions in the second row are always equal to zero. In such cases, it is due to the fact that \(j(x;q)=0\) if and only if x is an integral power of q. The only exception occurs in the last subsection of Sect. 9.

Corollary 3.7

[15, Corollary 6.4] We have two simple specializations:

$$\begin{aligned} f_{a,b,c}(x,y,q) =&-yf_{a,b,c}(q^bx,q^cy,q)+j(x;q^a), \end{aligned}$$
(3.12)
$$\begin{aligned} f_{a,b,c}(x,y,q) =&-xf_{a,b,c}(q^ax,q^by,q)+j(y;q^c). \end{aligned}$$
(3.13)

We also have the property [15, (6.2)]:

$$\begin{aligned} f_{a,b,c}(x,y,q)=-\frac{q^{a+b+c}}{xy}f_{a,b,c}(q^{2a+b}/x,q^{2c+b}/y,q). \end{aligned}$$
(3.14)

One can determine the theta function expressions of string functions using results of [15]. However, there are two recurring issues that must be kept in mind. The first issue is the number of theta quotients that must be computed, and the second issue is potential singularities.

To state our results, we introduce the useful

$$\begin{aligned} g_{1,b,1}(x,y,q,z_1,z_0)&:=j(y;q)m\Big (q^{\left( {\begin{array}{c}b+1\\ 2\end{array}}\right) -1}x(-y)^{-b},q^{b^2-1},z_1\Big )\nonumber \\&\ \ \ \ \ + j(x;q)m\Big (q^{\left( {\begin{array}{c}b+1\\ 2\end{array}}\right) -1}y(-x)^{-b},q^{b^2-1},z_0\Big ). \end{aligned}$$
(3.15)

In [15, Theorem 1.3], we specialize \(n=1\), to have

Theorem 3.8

Let p be a positive integer. For generic \(x,y\in \mathbb {C} \backslash \{0\}\)

$$\begin{aligned} f_{1,p+1,1}(x,y,q)=g_{1,p+1,1}(x,y,q,-1,-1)+\frac{1}{{\overline{J}}_{0,p(2+p)}}\cdot \theta _{p}(x,y,q), \end{aligned}$$

where

$$\begin{aligned}&\theta _{p}(x,y,q):=\sum _{r=0}^{p-1}\sum _{s=0}^{p-1}q^{\left( {\begin{array}{c}r\\ 2\end{array}}\right) +(1+p) (r) (s+1 )+\left( {\begin{array}{c}s+1\\ 2\end{array}}\right) } (-x)^{r}(-y)^{s+1}\nonumber \\&\cdot \frac{J_{p^2(2+p)}^3j(-q^{p(s-r)}x/y;q^{p^2})j(q^{p(2+p)(r+s)+p(1+p)}x^py^p;q^{p^2(2+p)})}{j(q^{p(2+p)r+p(1+p)/2}(-y)^{1+p}/(-x);q^{p^2(2+p)})j(q^{p(2+p)s+p(1+p)/2}(-x)^{1+p}/(-y);q^{p^2(2+p)})}. \end{aligned}$$

The specialization for \(p=1\) will be of importance. It is just (2.14):

Corollary 3.9

We have

$$\begin{aligned}&\Big (\sum _{r,s\ge 0}-\sum _{r,s<0}\Big )(-1)^{r+s}x^ry^sq^{\left( {\begin{array}{c}r\\ 2\end{array}}\right) +2rs+\left( {\begin{array}{c}s\\ 2\end{array}}\right) }\nonumber \\&\ \ \ \ \ =j(y;q)m\Big (\frac{q^2x}{y^2},q^3,-1\Big )+j(x;q)m\Big (\frac{q^2y}{x^2},q^3,-1\Big ) - \frac{yJ_{3}^3j(-x/y;q)j(q^2xy;q^3)}{{\overline{J}}_{0,3}j(-qy^2/x,-qx^2/y;q^3)}. \end{aligned}$$
(3.16)

For another useful result, we specialize [15, Theorem 1.4] to \(a=b=n\), \(c=1\).

Theorem 3.10

Let n be a positive integer. Then

$$\begin{aligned}&f_{n,n,1}(x,y,q)=h_{n,n,1}(x,y,q,-1,-1)-\frac{1}{{\overline{J}}_{0,n-1}{\overline{J}}_{0,n^2-n}}\cdot \theta _{n}(x,y,q), \end{aligned}$$

where

$$\begin{aligned} h_{n,n,1}(x,y,q,z_1,z_0):&=j(x;q^n)m\Big ( -q^{n-1}yx^{-1},q^{n-1},z_1 \Big )\\&\ \ \ \ \ \ +j(y;q)m\Big ( q^{\left( {\begin{array}{c}n\\ 2\end{array}}\right) }x(-y)^{-n},q^{n^2-n},z_0 \Big ), \end{aligned}$$

and

$$\begin{aligned} \theta _{n}(x,y,q):=&\sum _{d=0}^{n-1} q^{(n-1)\left( {\begin{array}{c}d+1\\ 2\end{array}}\right) }j\big (q^{(n-1)(d+1)}y;q^{n}\big ) j\big (-q^{n(n-1)-(n-1)(d+1)}xy^{-1};q^{n(n-1)}\big ) \\&\ \ \ \ \ \cdot \frac{J_{n(n-1)}^3j\big (q^{ \left( {\begin{array}{c}n\\ 2\end{array}}\right) +(n-1)(d+1)}(-y)^{1-n};q^{n(n-1)}\big )}{j\big (-q^{\left( {\begin{array}{c}n\\ 2\end{array}}\right) }x(-y)^{-n};q^{n(n-1)})j(q^{(n-1)(d+1)}x^{-1}y;q^{n(n-1)}\big )}. \end{aligned}$$

Theorem 3.10 has the following specializations.

Corollary 3.11

We have

$$\begin{aligned} f_{2,2,1}(x,y,q)&=h_{2,2,1}(x,y,q,-1,-1)\nonumber \\&\ \ \ \ -\sum _{d=0}^{1} \frac{q^{\left( {\begin{array}{c}d+1\\ 2\end{array}}\right) }j\big (q^{1+d}y;q^{2}\big ) j\big (-q^{1-d}x/y;q^{2}\big ) J_{2}^3j\big (-q^{2+d}/y;q^{2}\big )}{4{\overline{J}}_{1,4}{\overline{J}}_{2,8}j\big (-qx/y^{2};q^2\big )j\big (q^{1+d}y/x;q^2\big )}, \end{aligned}$$
(3.17)

where

$$\begin{aligned} h_{2,2,1}(x,y,q,-1,-1)=j(x;q^2)m(-qx^{-1}y,q,-1)+j(y;q)m(qxy^{-2},q^2,-1). \end{aligned}$$
(3.18)

Corollary 3.12

We have

$$\begin{aligned} f_{3,3,1}(x,y,q)&=h_{3,3,1}(x,y,q,-1,-1)\nonumber \\&\ \ \ \ -\sum _{d=0}^{2} \frac{q^{d(d+1)}j\big (q^{2+2d}y;q^{3}\big ) j\big (-q^{4-2d}x/y;q^{6}\big ) J_{6}^3j\big (q^{5+2d}/y^{2};q^{6}\big )}{4{\overline{J}}_{2,8}{\overline{J}}_{6,24}j\big (q^{3}x/y^{3};q^6\big )j\big (q^{2+2d}y/x;q^6\big )}, \end{aligned}$$
(3.19)

where

$$\begin{aligned} h_{3,3,1}(x,y,q,-1,-1)=j(x;q^3)m(-q^2x^{-1}y,q^2,-1)+j(y;q)m(-q^3xy^{-3},q^6,-1).\qquad \end{aligned}$$
(3.20)

Corollary 3.13

We have

$$\begin{aligned} f_{4,4,1}(x,y,q)&=h_{4,4,1}(x,y,q,-1,-1)\nonumber \\&\ \ \ \ \ -\sum _{d=0}^3\frac{q^{3\left( {\begin{array}{c}d+1\\ 2\end{array}}\right) }j(q^{3+3d}y;q^4)j(-q^{9-3d}x/y;q^{12})J_{12}^3j(-q^{9+3d}/y^3;q^{12})}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}j(-q^{6}x/y^4;q^{12})j(q^{3+3d}y/x;q^{12})},\nonumber \\ \end{aligned}$$
(3.21)

where

$$\begin{aligned} h_{4,4,1}(x,y,q,-1,-1)=j(x;q^4)m\big ( -q^3y/x,q^3,-1 \big )+j(y;q) m\big ( q^6 x/y^4, q^{12}, -1 \big ).\nonumber \\ \end{aligned}$$
(3.22)

Corollary 3.14

We have

$$\begin{aligned} f_{5,5,1}(x,y,q)&=h_{5,5,1}(x,y,q,-1,-1)\nonumber \\&\ \ \ \ \ -\sum _{d=0}^{4} q^{2d(d+1)}\frac{j\big (q^{4+4d}y;q^{5}\big ) j\big (-q^{16-4d}xy^{-1};q^{20}\big )J_{20}^3j\big (q^{14+4d}y^{-4};q^{20}\big )}{{\overline{J}}_{0,4}{\overline{J}}_{0,20}j\big (q^{10}xy^{-5};q^{20})j(q^{4+4d}x^{-1}y;q^{20}\big )}, \end{aligned}$$
(3.23)

where

$$\begin{aligned} h_{5,5,1}(x,y,q,z_1,z_0) =j(x;q^5)m(-q^4x^{-1}y,q^4,z_1)+j(y;q)m(-q^{10}xy^{-5},q^{20},z_0). \end{aligned}$$
(3.24)

Corollary 3.15

We have

$$\begin{aligned} f_{6,6,1}(x,y,q)&=h_{6,6,1}(x,y,q,-1,-1)\nonumber \\&\ \ \ \ \ - \sum _{d=0}^{5} \frac{q^{5\left( {\begin{array}{c}d+1\\ 2\end{array}}\right) }J_{30}^3j\big (q^{5d+5}y;q^{6}\big ) j\big (-q^{25-5d}xy^{-1};q^{30}\big )j\big (-q^{ 20+5d}y^{-5};q^{30}\big )}{{\overline{J}}_{0,5}{\overline{J}}_{0,30}j\big (-q^{15}xy^{-6};q^{30})j(q^{5d+5}x^{-1}y;q^{30}\big )}, \end{aligned}$$
(3.25)

where

$$\begin{aligned} h_{6,6,1}(x,y,q,z_1,z_0):=j(x;q^6)m( -q^{5}yx^{-1},q^{5},z_1 ) +j(y;q)m( q^{15}xy^{-6},q^{30},z_0 ). \end{aligned}$$
(3.26)

We finish with a few example computations that can be found in the literature.

Lemma 3.16

We have

$$\begin{aligned}{} & {} f_{5,5,1}(q^5,q^4,q)=J_{2}J_{10}, \end{aligned}$$
(3.27a)
$$\begin{aligned}{} & {} f_{4,4,1}(-q^{5},q^{3},q)-q^{-1}f_{4,4,1}(-q^{3},q,q) =-q^{-1}J_1^2, \end{aligned}$$
(3.27b)
$$\begin{aligned}{} & {} f_{3,3,1}(-q^{4},q^{3},q)-q^{-1}f_{3,3,1}(-q^{2},q,q) =-q^{-1}J_1J_{1,2}. \end{aligned}$$
(3.27c)

Proof of Lemma 3.16

All three identities have been shown using the appropriate specializations of Theorem 3.10. The first can be found in [15, Section 7] and the last two in [23, Lemma 3.11]. \(\square \)

4 Classical string function relations and Hecke-type double-sums

In this section we use the environment of Hecke-type double-sums and their functional equations such as (3.9) and (3.14) to show that

$$\begin{aligned} S_{m,\ell }^{N}(q):=\frac{q^{-\tfrac{1}{8}+\tfrac{(\ell +1)^2}{4(N+2)}-\tfrac{m^2}{4N}}}{J_{1}^3} f_{1,1+N,1}(q^{1+\tfrac{1}{2}(m+\ell )},q^{1-\tfrac{1}{2}(m-\ell )},q). \end{aligned}$$
(4.1)

satisfies the same classical symmetries for string functions. We recall the classical identities [25, (3.4), (3.5)]:

$$\begin{aligned} S_{m,\ell }^{N}(q)&=S_{-m,\ell }^{N}(q), \end{aligned}$$
(4.2)
$$\begin{aligned} S_{m,\ell }^{N}(q)&=S_{2N-m,\ell }^{N}(q), \end{aligned}$$
(4.3)
$$\begin{aligned} S_{m,\ell }^{N}(q)&=S_{N-m,N-\ell }^{N}(q). \end{aligned}$$
(4.4)

Proof for Identity (4.2):

We have

$$\begin{aligned} S_{m,\ell }^N(q)&=\frac{q^{-\tfrac{1}{8}+\tfrac{(\ell +1)^2}{4(N+2)}-\tfrac{m^2}{4N}}}{J_1^3} \cdot f_{1,1+N,1}(q^{1+\tfrac{1}{2}(m+\ell )},q^{1-\tfrac{1}{2}(m-\ell )},q)\\&=\frac{q^{-\tfrac{1}{8}+\tfrac{(\ell +1)^2}{4(N+2)}-\tfrac{m^2}{4N}}}{J_1^3} \cdot f_{1,1+N,1}(q^{1-\tfrac{1}{2}(-m-\ell )},q^{1+\tfrac{1}{2}(-m+\ell )},q)\\&=\frac{q^{-\tfrac{1}{8}+\tfrac{(\ell +1)^2}{4(N+2)}-\tfrac{(-m)^2}{4N}}}{J_1^3} \cdot f_{1,1+N,1}(q^{1+\tfrac{1}{2}(-m+\ell )},q^{1-\tfrac{1}{2}(-m-\ell )},q)\\&=S_{-m,\ell }^N(q), \end{aligned}$$

where symmetry allows us to write

$$\begin{aligned} f_{1,1+N,1}(x,y,q)=f_{1,1+N,1}(y,x,q). \end{aligned}$$

\(\square \)

Proof for Identity (4.3):

Specializing (3.9) with \((R,S)=(1,-1)\) gives

$$\begin{aligned} f_{1,1+N,1}(q^{1+\tfrac{1}{2}(m+\ell )},q^{1-\tfrac{1}{2}(m-\ell )},q)&=q^{m-N} f_{1,1+N,1}(q^{-N+1+\tfrac{1}{2}(m+\ell )},q^{N+1-\tfrac{1}{2}(m-\ell )},q)\\&=q^{m-N} f_{1,1+N,1}(q^{1-\tfrac{1}{2}(2N-m-\ell )},q^{1+\tfrac{1}{2}(2N-m+\ell )},q)\\&=q^{m-N} f_{1,1+N,1}(q^{1+\tfrac{1}{2}(2N-m+\ell )},q^{1-\tfrac{1}{2}(2N-m-\ell )},q). \end{aligned}$$

As a result,

$$\begin{aligned} S_{m,\ell }^{N}&=\frac{q^{-\tfrac{1}{8}+\tfrac{(\ell +1)^2}{4(N+2)} -\tfrac{m^2}{4N}}}{J_{1}^3}f_{1,1+N,1}(q^{1+\tfrac{1}{2}(m+\ell )},q^{1-\tfrac{1}{2}(m-\ell )},q)\\&=\frac{q^{-\tfrac{1}{8}+\tfrac{(\ell +1)^2}{4(N+2)}-\tfrac{m^2}{4N}+m-N}}{J_{1}^3} f_{1,1+N,1}(q^{1+\tfrac{1}{2}(2N-m+\ell )},q^{1-\tfrac{1}{2}(2N-m-\ell )},q)\\&=\frac{q^{-\tfrac{1}{8}+\tfrac{(\ell +1)^2}{4(N+2)}-\tfrac{(2N-m)^2}{4N}}}{J_{1}^3} f_{1,1+N,1}(q^{1+\tfrac{1}{2}(2N-m+\ell )},q^{1-\tfrac{1}{2}(2N-m-\ell )},q)\\&=S_{2N-m,\ell }^{N}. \end{aligned}$$

\(\square \)

Proof for Identity (4.4):

Specializing (3.9) with \((R,S)=(1,0)\) gives

$$\begin{aligned} f_{1,1+N,1}&(q^{1+\tfrac{1}{2}(m+\ell )},q^{1-\tfrac{1}{2}(m-\ell )},q)\\&=-q^{1+\tfrac{1}{2}(m+\ell )} \cdot f_{1,1+N,1}(q^{2+\tfrac{1}{2}(m+\ell )},q^{2+N-\tfrac{1}{2}(m-\ell )},q)\\&=q^{1+\tfrac{1}{2}(m+\ell )}\cdot q^{-1-\ell } \cdot f_{1,1+N,1}(q^{1+N-\tfrac{1}{2}(m+\ell )},q^{1+\tfrac{1}{2}(m-\ell )},q)\\&=q^{\tfrac{1}{2}(m-\ell )} \cdot f_{1,1+N,1}(q^{1+\tfrac{1}{2}(N-m+N-\ell )},q^{1-\tfrac{1}{2}(N-m-(N-\ell ))},q), \end{aligned}$$

where for the second equality we used (3.14). Hence

$$\begin{aligned} S_{m,\ell }^{N}&=\frac{q^{-\tfrac{1}{8}+\tfrac{(\ell +1)^2}{4(N+2)}-\tfrac{m^2}{4N}}}{J_{1}^3} \cdot f_{1,1+N,1}(q^{1+\tfrac{1}{2}(m+\ell )},q^{1-\tfrac{1}{2}(m-\ell )},q)\\&=\frac{q^{-\tfrac{1}{8}+\tfrac{(\ell +1)^2}{4(N+2)}-\tfrac{m^2}{4N}+\tfrac{1}{2}(m-\ell )}}{J_{1}^3} \cdot f_{1,1+N,1}(q^{1+\tfrac{1}{2}(N-m+N-\ell )},q^{1-\tfrac{1}{2}(N-m-(N-\ell ))},q)\\&=\frac{q^{-\tfrac{1}{8}+\tfrac{(N-\ell +1)^2}{4(N+2)}-\tfrac{(N-m)^2}{4N}}}{J_{1}^3} \cdot f_{1,1+N,1}(q^{1+\tfrac{1}{2}(N-m+N-\ell )},q^{1-\tfrac{1}{2}(N-m-(N-\ell ))},q)\\&=S_{N-m,N-\ell }^{N}. \end{aligned}$$

\(\square \)

5 Deriving the general integral-level N string function

We derive (2.12). We recall the notation from [25] that \(m, \ N\in \mathbb {N}\), \(\ell \in \{ 0,1,2,\dots , N\}\), \(m\equiv \ell \pmod 2\), where N is the level. In [25, p. 236], see also [11, (3.17)], one finds the Hecke-type form for the general integral-level string function:

Proposition 5.1

We have

$$\begin{aligned} C_{m,\ell }^N(q)=S_{m,\ell }^{N}(q), \end{aligned}$$
(5.1)

where \(S_{m,\ell }^{N}(q)\) is given by (4.1).

We begin with an identity from [25]:

$$\begin{aligned} C_{m,\ell }^N(q)=\frac{q^{s(m,\ell ,N)}}{(q)_{\infty }^3}\Big \{ \sum _{\begin{array}{c} j\ge 1\\ k\le 0 \end{array}} - \sum _{\begin{array}{c} j\le 0 \\ k\ge 1 \end{array}} \Big \}(-1)^{k-j}q^{\left( {\begin{array}{c}k-j\\ 2\end{array}}\right) -Njk+\tfrac{1}{2}k(m-\ell )+\tfrac{1}{2}j(m+\ell )}. \end{aligned}$$
(5.2)

where from (1.2):

$$\begin{aligned} s(m,\ell ,N):=-\tfrac{1}{8}+\tfrac{(\ell +1)^2}{4(N+2)}-\tfrac{m^2}{4N}. \end{aligned}$$
(5.3)

We rewrite the above double-sum:

$$\begin{aligned} C_{m,\ell }^N(q)&=\frac{q^{s(m,\ell ,N)}}{(q)_{\infty }^3} \sum _{\begin{array}{c} j\ge 1\\ k\le 0 \end{array}} (-1)^{k-j}q^{\left( {\begin{array}{c}k-j\\ 2\end{array}}\right) -Njk+\tfrac{1}{2}k(m-\ell )+\tfrac{1}{2}j(m+\ell )} \\&\ \ \ \ \ - \frac{q^{s(m,\ell ,N)}}{(q)_{\infty }^3} \sum _{\begin{array}{c} j\le 0 \\ k\ge 1 \end{array}} (-1)^{k-j}q^{\left( {\begin{array}{c}k-j\\ 2\end{array}}\right) -Njk+\tfrac{1}{2}k(m-\ell )+\tfrac{1}{2}j(m+\ell )} \\&=\frac{q^{s(m,\ell ,N)}}{(q)_{\infty }^3} \sum _{\begin{array}{c} j\ge 1\\ k\ge 0 \end{array}} (-1)^{k+j}q^{\left( {\begin{array}{c}k+j+1\\ 2\end{array}}\right) +Njk-\tfrac{1}{2}k(m-\ell )+\tfrac{1}{2}j(m+\ell )} \\&\ \ \ \ \ - \frac{q^{s(m,\ell ,N)}}{(q)_{\infty }^3} \sum _{\begin{array}{c} j\le 0 \\ k< 0 \end{array}} (-1)^{k+j}q^{\left( {\begin{array}{c}k+j+1\\ 2\end{array}}\right) +Njk-\tfrac{1}{2}k(m-\ell )+\tfrac{1}{2}j(m+\ell )} \\&=\frac{q^{s(m,\ell ,N)}}{(q)_{\infty }^3} \sum _{\begin{array}{c} j\ge 0\\ k\ge 0 \end{array}} (-1)^{k+j+1}q^{\left( {\begin{array}{c}k+j+2\\ 2\end{array}}\right) +N(j+1)k-\tfrac{1}{2}k(m-\ell )+\tfrac{1}{2}(j+1)(m+\ell )} \\&\ \ \ \ \ - \frac{q^{s(m,\ell ,N)}}{(q)_{\infty }^3} \sum _{\begin{array}{c} j< 0 \\ k< 0 \end{array}} (-1)^{k+j+1}q^{\left( {\begin{array}{c}k+j+2\\ 2\end{array}}\right) +N(j+1)k-\tfrac{1}{2}k(m-\ell )+\tfrac{1}{2}(j+1)(m+\ell )} \\&=\frac{q^{s(m,\ell ,N)}}{(q)_{\infty }^3} \Big ( \sum _{\begin{array}{c} j\ge 0\\ k\ge 0 \end{array}} - \sum _{\begin{array}{c} j< 0 \\ k< 0 \end{array}} \Big ) (-1)^{k+j+1}q^{\left( {\begin{array}{c}k+j+2\\ 2\end{array}}\right) +N(j+1)k-\tfrac{1}{2}k(m-\ell )+\tfrac{1}{2}(j+1)(m+\ell )} \\&=-\frac{q^{s(m,\ell ,N)}}{(q)_{\infty }^3} q^{1+\frac{1}{2}(m+\ell )} f_{1,N+1,1}(q^{2+N-\frac{1}{2}(m-\ell )}, q^{2+\frac{1}{2}(m+\ell )},q), \end{aligned}$$

where we have used \(k\rightarrow -k\), \(j\rightarrow j+1\). We recall identity (3.12)

$$\begin{aligned} f_{a,b,c}(x,y,q)=-yf_{a,b,c}(q^bx,q^cy,q)+j(x;q^a), \end{aligned}$$

and the fact that \(j(z;q)=0\) if and only if \(z=q^{n}\), \(n\in \mathbb {Z}\). This gives

$$\begin{aligned} C_{m,\ell }^N(q)&=\frac{q^{s(m,\ell ,N)}}{(q)_{\infty }^3}\Big ( f_{1,N+1,1}(q^{1-\frac{1}{2}(m-\ell )}, q^{1+\frac{1}{2}(m+\ell )},q) - j(q^{1+\frac{1}{2}(m+\ell )};q)\Big ) \\&=\frac{q^{s(m,\ell ,N)}}{J_1^3}\cdot f_{1,1+N,1}(q^{1-\tfrac{1}{2}(m-\ell )},q^{1+\tfrac{1}{2}(m+\ell )},q)\\&=\frac{q^{s(m,\ell ,N)}}{J_1^3}\cdot f_{1,1+N,1}(q^{1+\tfrac{1}{2}(m+\ell )},q^{1-\tfrac{1}{2}(m-\ell )},q)\\&=S_{m,\ell }^{N}(q), \end{aligned}$$

for the second equality the condition \(m\equiv \ell \pmod 2\) forces that

$$\begin{aligned} j(q^{1+\frac{1}{2}(m+\ell )};q)=0. \end{aligned}$$
(5.4)

For the third equality, the x and y in \(f_{1,N+1,1}(x,y,q)\) can be swapped because of symmetry in the definition of (2.1).

6 Proof of the main theorem and its two corollaries

The driving force of our proof is the following proposition.

Proposition 6.1

We have

$$\begin{aligned}&f_{1,2K+1,1}(q^{d},q^{e},q)\pm q^{\frac{K+d+e}{2}}f_{1,2K+1,1}(q^{1+K+d},q^{1+K+e},q)\nonumber \\&\ \ \ =f_{K+1,K+1,1}(\mp q^{(K+d+e)/2},q^{d},q) \nonumber \\ {}&\quad \mp q^{(K+2-d-e)/2}f_{K+1,K+1,1} (\mp q^{2+(3K-d-e)/2},q^{K+2-e},q). \end{aligned}$$
(6.1)

Proof of Proposition 6.1

We have

$$\begin{aligned}&f_{1,2K+1,1}(q^{d},q^{e},q)+q^{\frac{K+d+e}{2}}f_{1,2K+1,1}(q^{1+K+d},q^{1+K+e},q)\\&=\sum _{\begin{array}{c} u,v\\ u\equiv v \mod 2 \end{array}}\text {sg}(u,v)(-1)^{\frac{u-v}{2}}q^{\frac{1}{8}u^2+\frac{2K+1}{4}uv+\frac{1}{8}v^2+\frac{2d-1}{4}u+\frac{2e-1}{4}v}\\&=\Big ( \sum _{\begin{array}{c} n+j\ge 0\\ n-j\ge 0 \end{array}}- \sum _{\begin{array}{c} n+j< 0\\ n-j< 0 \end{array}}\Big ) (-1)^jq^{(K+1)n^2/2+(d+e-1)n/2-Kj^2/2+(d-e)j/2}\\&= \sum _{n\ge 0}q^{(K+1)n^2/2+(d+e-1)n/2}\sum _{j=-n}^{n}(-1)^jq^{-Kj^2/2+(d-e)j/2}\\&\ \ \ \ \ -\sum _{n<0}q^{(K+1)n^2/2+(d+e-1)n/2}\sum _{n<j<-n}(-1)^jq^{-Kj^2/2+(d-e)j/2}\\&= \sum _{n\ge 0}q^{(K+1)n^2/2+(d+e-1)n/2}\sum _{j=-n}^{n}(-1)^jq^{-Kj^2/2+(d-e)j/2}\\&\ \ \ \ \ \ -\sum _{n\ge 0}q^{(K+1)(-n-1)^2/2+(d+e-1)(-n-1)/2}\sum _{-n-1<j<n+1}(-1)^jq^{-Kj^2/2+(d-e)j/2}\\&= \sum _{n\ge 0}q^{(K+1)n^2/2+(d+e-1)n/2}\sum _{j=-n}^{n}(-1)^jq^{-Kj^2/2+(d-e)j/2}\\&\ \ \ \ \ \ -\sum _{n\ge 0}q^{(K+1)n^2/2+(2K+3-d-e)n/2+(K+2-d-e)/2}\sum _{j=-n}^n(-1)^jq^{-Kj^2/2+(d-e)j/2}\\&= \sum _{\text {sg}(j)=\text {sg}(n-j)}\text {sg}(j)(-1)^jq^{(K+1)n^2/2+(d+e-1)n/2-Kj^2/2+(d-e)j/2}\\&\ \ \ \ \ \cdot (1-q^{(K+2-d-e)n+(K+2-d-e)/2})\\&=f_{K+1,K+1,1}(-q^{(K+d+e)/2},q^{d},q)\\&\ \ \ \ \ -q^{(K+2-d-e)/2}f_{K+1,K+1,1}(-q^{2+(3K-d-e)/2},q^{K+2-e},q). \end{aligned}$$

For the second identity one replaces \((-1)^{(u-v)/2}\) with \((-1)^{(u+v)/2}\). This also results in the \((-1)^j\) becoming \((-1)^n\). \(\square \)

Proof of Theorem 2.1

We prove the identity for the initial plus sign. The proof for the minus sign is analogous. For (2.2), we have

$$\begin{aligned} f_{1,2K+1,1}&(q^{1+\frac{1}{2}(m+\ell )},q^{1-\frac{1}{2}(m-\ell )},q) +q^{-(\frac{K-m}{2})}f_{1,2K+1,1}(q^{1+\frac{1}{2}(2K-m+\ell )},q^{1-\frac{1}{2}(2K-m-\ell )},q)\\&=f_{1,2K+1,1}(q^{1+\frac{1}{2}(m+\ell )},q^{1-\frac{1}{2}(m-\ell )},q)\\&\ \ \ \ \ -q^{1+\frac{1}{2}(K+\ell )}f_{1,2K+1,1}(q^{1+K+1-\frac{1}{2}(m-\ell )},q^{1+K+1+\frac{1}{2}(m+\ell )},q)\\&=f_{1,2K+1,1}(q^{1+\frac{1}{2}(m+\ell )},q^{1-\frac{1}{2}(m-\ell )},q)\\&\ \ \ \ \ -q^{1+\frac{1}{2}(K+\ell )}f_{1,2K+1,1}(q^{1+K+1+\frac{1}{2}(m+\ell )},q^{1+K+1-\frac{1}{2}(m-\ell )},q)\\&=f_{K+1,K+1,1}(q^{1+\frac{1}{2}(K+\ell )},q^{1+\frac{1}{2}(m+\ell )},q)\\&\ \ \ \ \ +q^{\frac{1}{2}(K-\ell )}f_{K+1,K+1,1}(q^{1+K+\frac{1}{2}(K-\ell )},q^{1+K+\frac{1}{2}(m-\ell )},q), \end{aligned}$$

where the first equality follows (3.9) with \((R,S)=(1,0)\) and the third from (6.1). \(\square \)

Proof of Corollaries 2.2 and 2.3

To prove (2.3), we let \(\ell =K\) in (2.2). To prove (2.4), we set \(m=K\) in (2.2) to have

$$\begin{aligned} 2C_{K,\ell }^{2K}(q)&=\frac{q^{\lambda (K,\ell ,2K)}}{J_{1}^3}\Big ( f_{K+1,K+1,1}(q^{1+\frac{1}{2}(K+\ell )},q^{1+\frac{1}{2}(K+\ell )},q)\\&\ \ \ \ \ +q^{\frac{1}{2}(K-\ell )}f_{K+1,K+1,1}(q^{1+K+\frac{1}{2}(K-\ell )},q^{1+K+\frac{1}{2}(K-\ell )},q)\Big )\\&=\frac{q^{\lambda (K,\ell ,2K)}}{J_{1}^3}\Big ( f_{K+1,K+1,1}(q^{1+\frac{1}{2}(K+\ell )},q^{1-\frac{1}{2}(K-\ell )},q)\\&\ \ \ \ \ +q^{\frac{1}{2}(K-\ell )}f_{K+1,K+1,1}(q^{1+K+\frac{1}{2}(K-\ell )},q^{1+K+\frac{1}{2}(K-\ell )},q)\Big )\\&=\frac{q^{\lambda (K,\ell ,2K)}}{J_{1}^3}\Big ( f_{K+1,K+1,1}(q^{1+\frac{1}{2}(K+\ell )},q^{1-\frac{1}{2}(K-\ell )},q)\\&\ \ \ \ \ -q^{1-\frac{1}{2}(K-\ell )}f_{K+1,K+1,1}(q^{2+K+\frac{1}{2}(K+\ell )},q^{2-\frac{1}{2}(K-\ell )},q)\Big )\\&=\frac{q^{\lambda (K,\ell ,2K)}}{J_{1}^3}\Big ( 2f_{K+1,K+1,1}(q^{1+\frac{1}{2}(K+\ell )},q^{1-\frac{1}{2}(K-\ell )},q)\Big ), \end{aligned}$$

where the second equality follows from (3.9) with \((R,S)=(-1,1)\), the third equality follows from (3.14), and the fourth follows from (3.9) with \((R,S)=(0,-1)\). \(\square \)

7 Computing-level \(N=2\) string functions

7.1 The string function \(c_{11}^{11}\) (2.7a)

It suffices to show (2.18a):

$$\begin{aligned} f_{2,2,1}(q^2,q,q)=J_{1}J_{2}. \end{aligned}$$
(7.1)

In Corollary 3.11, we find potential singularities, so we consider

$$\begin{aligned} \lim _{x\rightarrow q}f_{2,2,1}(x^2,x,q). \end{aligned}$$

We first focus on (3.18) and write

$$\begin{aligned} \lim _{x\rightarrow q}h_{2,2,1}(x^2,x,q)&=\lim _{x\rightarrow q}\Big [ j(x^2;q^2)m(-qx^{-1},q,-1)+j(x;q)m(q,q^2,-1)\Big ] \\&=\lim _{x\rightarrow q}\Big [ j(x^2;q^2)m(-qx^{-1},q,-1)\Big ] \\&=\lim _{x\rightarrow q} j(x^2;q^2)\Big [m(-qx^{-1},q,z)+\frac{zJ_{1}^3j(-z^{-1};q)j(qz/x;q)}{j(-1;q)j(z;q)j(q/x;q)j(-qz/x;q)}\Big ]\\&=\lim _{x\rightarrow q} j(x^2;q^2)\cdot \frac{zJ_{1}^3j(-z^{-1};q)j(qz/x;q)}{j(-1;q)j(z;q)j(q/x;q)j(-qz/x;q)}, \end{aligned}$$

where we have used (3.6e) in the penultimate equality. Continuing with product rearrangements, we have

$$\begin{aligned} \lim _{x\rightarrow q}h_{2,2,1}(x^2,x,q)&=\lim _{x\rightarrow q} \frac{j(x;q)j(-x;q)J_2}{J_1^2}\cdot \frac{zJ_{1}^3j(-z^{-1};q)j(qz/x;q)}{j(-1;q)j(z;q)j(q/x;q)j(-qz/x;q)}\\&=\lim _{x\rightarrow q} \frac{j(x;q)j(-x;q)J_2}{J_1^2}\cdot \frac{J_{1}^3j(-z;q)j(qz/x;q)}{j(-1;q)j(z;q)j(x;q)j(-qz/x;q)}\\&= J_{1}J_2, \end{aligned}$$

where in the second line we used (3.2b) and (3.2c). Now we consider

$$\begin{aligned}&\lim _{x\rightarrow q} \sum _{d=0}^{1} \frac{q^{\left( {\begin{array}{c}d+1\\ 2\end{array}}\right) }j\big (q^{1+d}x;q^{2}\big ) j\big (-q^{1-d}x;q^{2}\big ) J_{2}^3j\big (-q^{2+d}/x;q^{2}\big )}{4{\overline{J}}_{1,4}{\overline{J}}_{2,8}j\big (-q;q^2\big )j\big (q^{1+d}/x;q^2\big )}\\&=\lim _{x\rightarrow q} \left[ \frac{j\big (qx;q^{2}\big ) j\big (-qx;q^{2}\big ) J_{2}^3j\big (-q^{2}/x;q^{2}\big )}{4{\overline{J}}_{1,4}{\overline{J}}_{2,8}{\overline{J}}_{1,2}j\big (q/x;q^2\big )} + \frac{q j\big (q^{2}x;q^{2}\big ) j\big (-x;q^{2}\big ) J_{2}^3j\big (-q^{3}/x;q^{2}\big )}{4{\overline{J}}_{1,4}{\overline{J}}_{2,8}{\overline{J}}_{1,2}j\big (q^{2}/x;q^2\big )} \right] \\&=\lim _{x\rightarrow q} \left[ \frac{j\big (qx;q^{2}\big ) j\big (-qx;q^{2}\big ) J_{2}^3j\big (-x;q^{2}\big )}{4{\overline{J}}_{1,4}{\overline{J}}_{2,8}{\overline{J}}_{1,2}j\big (qx;q^2\big )} - \frac{ j\big (x;q^{2}\big ) j\big (-x;q^{2}\big ) J_{2}^3j\big (-qx;q^{2}\big )}{4{\overline{J}}_{1,4}{\overline{J}}_{2,8}{\overline{J}}_{1,2}j\big (x;q^2\big )} \right] \\&=\lim _{x\rightarrow q}\left[ \frac{ j\big (-qx;q^{2}\big ) J_{2}^3j\big (-x;q^{2}\big )}{4{\overline{J}}_{1,4}{\overline{J}}_{2,8}{\overline{J}}_{1,2}} - \frac{ j\big (-x;q^{2}\big ) J_{2}^3j\big (-qx;q^{2}\big )}{4{\overline{J}}_{1,4}{\overline{J}}_{2,8}{\overline{J}}_{1,2}} \right] \\&=0, \end{aligned}$$

where in the second equality we used (3.2b) and (3.2c), and in the third equality we simplified. Assembling the pieces, we have

$$\begin{aligned} \lim _{x\rightarrow q}f_{2,2,1}(x^2,x,q)=J_{1}J_{2}. \end{aligned}$$
(7.2)

8 Computing-level \(N=4\) string functions

8.1 The string function \(c_{40}^{40}-c_{04}^{40}\) (2.8b)

It suffices to show (2.19b):

$$\begin{aligned} f_{3,3,1}(-q^2,q,q)-qf_{3,3,1}(-q^4,q^3,q)=J_1J_{1,2}, \end{aligned}$$
(8.1)

which is true by Lemma 3.16.

9 Computing-level \(N=6\) string functions

9.1 The string function \(c_{51}^{33}\) (2.9a)

It suffices to show (2.20a):

$$\begin{aligned} f_{4,4,1}(q^4,q^3,q)=J_{2}J_{3,12}. \end{aligned}$$
(9.1)

In Corollary 3.13 we immediately see that

$$\begin{aligned} h_{4,4,1}(q^4,q^3,q)=0. \end{aligned}$$
(9.2)

Hence, it follows from Corollary 3.13 that

$$\begin{aligned} f_{4,4,1}&(q^4,q^3,q)\\&= -\sum _{d=0}^3\frac{q^{3\left( {\begin{array}{c}d+1\\ 2\end{array}}\right) }j(q^{6+3d};q^4)j(-q^{10-3d};q^{12})J_{12}^3j(-q^{3d};q^{12})}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}j(-q^{-2};q^{12})j(q^{2+3d};q^{12})}\\&= -q^{2}\frac{j(q^{6};q^4){\overline{J}}_{2,12}J_{12}^3}{{\overline{J}}_{0,3}{\overline{J}}_{2,12}J_{2,12}} -\frac{q^{5}j(q^{9};q^4){\overline{J}}_{7,12}J_{12}^3{\overline{J}}_{3,12}}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}{\overline{J}}_{2,12}J_{7,12}} -\frac{q^{20}j(q^{15};q^4)J_{12}^3{\overline{J}}_{1,12}{\overline{J}}_{3,12}}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}{\overline{J}}_{2,12}J_{1,12}}\\&= q^{-1}\frac{J_{1,4}J_{12}^3{\overline{J}}_{3,12}}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}{\overline{J}}_{2,12}} \cdot \Big ( \frac{{\overline{J}}_{1,12}}{J_{1,12}}-\frac{{\overline{J}}_{7,12}}{J_{7,12}}\Big ) +\frac{J_{2,4}J_{12}^3}{{\overline{J}}_{0,3}J_{2,12}}\\&= q^{-1}\frac{J_{1,4}J_{12}^3{\overline{J}}_{3,12}}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}{\overline{J}}_{2,12}} \cdot \Big ( \frac{{\overline{J}}_{1,12}J_{7,12}-J_{1,12}{\overline{J}}_{7,12}}{J_{1,12}J_{7,12}}\Big ) +\frac{J_{2,4}J_{12}^3}{{\overline{J}}_{0,3}J_{2,12}}\\&= q^{-1}\frac{J_{1,4}J_{12}^3{\overline{J}}_{3,12}}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}{\overline{J}}_{2,12}} \cdot \Big ( \frac{2qJ_{6,24}J_{4,24}}{J_{1,12}J_{7,12}}\Big ) +\frac{J_{2,4}J_{12}^3}{{\overline{J}}_{0,3}J_{2,12}}\\&=J_{2}J_{3,12}, \end{aligned}$$

where we have used (3.2b), collected terms, and then used (3.3a).

9.2 The string function \(c_{51}^{51}+c_{15}^{51}\) (2.9b)

It suffices to show (2.20b):

$$\begin{aligned} f_{4,4,1}(q^3,q^2,q)+qf_{4,4,1}(q^5,q^4,q)=J_{2}J_{6,12}. \end{aligned}$$
(9.3)

We use Corollary 3.13. Considering (3.22), we see that two of the four summands vanish right away giving us

$$\begin{aligned}&h_{4,4,1}(q^3,q^2,q)+qh_{4,4,1}(q^5,q^4,q) \\ {}&=j(q^3;q^4)m(-q^4,q^5,-1)+qj(q^5;q^4)m(-q^4,q^5,-1)\\&=j(q^3;q^4)m(-q^4,q^5,-1)-j(q;q^4)m(-q^4,q^5,-1)\\&=0, \end{aligned}$$

where we have used (3.2b) and (3.2c). Thus we have

$$\begin{aligned} f_{4,4,1}&(q^3,q^2,q)+qf_{4,4,1}(q^5,q^4,q)\\&=-\sum _{d=0}^3\frac{q^{3\left( {\begin{array}{c}d+1\\ 2\end{array}}\right) }j(q^{5+3d};q^4)j(-q^{10-3d};q^{12})J_{12}^3j(-q^{3+3d};q^{12})}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}j(-q;q^{12})j(q^{2+3d};q^{12})}\\&\ \ \ \ \ -q\sum _{d=0}^3\frac{q^{3\left( {\begin{array}{c}d+1\\ 2\end{array}}\right) }j(q^{7+3d};q^4)j(-q^{10-3d};q^{12})J_{12}^3j(-q^{-3+3d};q^{12})}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}j(-q^{-5};q^{12})j(q^{2+3d};q^{12})}\\&= \frac{J_{12}^3}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}}\Big [ q^{-1}\frac{J_{1,4}{\overline{J}}_{2,12}{\overline{J}}_{3,12}}{{\overline{J}}_{1,12}J_{2,12}}+0 -q^{-1}\frac{J_{1,4}{\overline{J}}_{4,12}{\overline{J}}_{3,12}}{{\overline{J}}_{1,12}J_{4,12}} +\frac{J_{2,4}{\overline{J}}_{0,12}}{J_{1,12}}\Big ] \\&\ \ \ \ \ +\frac{J_{12}^3}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}} \Big [ \frac{J_{1,4}{\overline{J}}_{2,12}{\overline{J}}_{3,12}}{{\overline{J}}_{5,12}J_{2,12}} -q\frac{J_{2,4}{\overline{J}}_{0,12}}{J_{5,12}} +\frac{J_{1,4}{\overline{J}}_{4,12}{\overline{J}}_{3,12}}{{\overline{J}}_{5,12}J_{4,12}}+0\Big ] , \end{aligned}$$

where we have used (3.2b), (3.2c), and simplified. Regrouping terms, using (3.2c), and simplifying, we have

$$\begin{aligned} f_{4,4,1}&(q^3,q^2,q)+qf_{4,4,1}(q^5,q^4,q)\\&= q^{-1}\frac{J_{12}^3J_{1,4}{\overline{J}}_{3,12}}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}{\overline{J}}_{1,12}} \cdot \frac{{\overline{J}}_{2,12}J_{4,12}-{\overline{J}}_{4,12}J_{2,12}}{J_{2,12}J_{8,12}} +\frac{J_{12}^3J_{2,4}}{{\overline{J}}_{0,3}}\cdot \frac{J_{5,12}-qJ_{11,12}}{J_{1,12}J_{7,12}} \\&\ \ \ \ \ +\frac{J_{12}^3J_{1,4}{\overline{J}}_{3,12}}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}{\overline{J}}_{5,12}} \cdot \frac{{\overline{J}}_{2,12}J_{4,12}+{\overline{J}}_{4,12}J_{2,12}}{J_{2,12}J_{8,12}}\\&= q^{-1}\frac{J_{12}^3J_{1,4}{\overline{J}}_{3,12}}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}{\overline{J}}_{1,12}} \cdot \frac{J_6}{J_{2,6}J_{12}^2}\cdot \Big ( {\overline{J}}_{2,12}J_{4,12}-{\overline{J}}_{4,12}J_{2,12}\Big ) \\&\ \ \ \ \ +\frac{J_{12}^3J_{1,4}{\overline{J}}_{3,12}}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}{\overline{J}}_{5,12}} \cdot \frac{J_6}{J_{2,6}J_{12}^2} \cdot \Big ( {\overline{J}}_{2,12}J_{4,12}+{\overline{J}}_{4,12}J_{2,12}\Big ) \\&\ \ \ \ \ +\frac{J_{12}^3J_{2,4}}{{\overline{J}}_{0,3}}\cdot \frac{J_6}{J_{1,6}J_{12}^2}\cdot \Big ( J_{5,12}-qJ_{11,12}\Big ), \end{aligned}$$

where we have used (3.2d). Employing (3.3a), (3.3b), and (3.2a), yields

$$\begin{aligned} f_{4,4,1}&(q^3,q^2,q)+qf_{4,4,1}(q^5,q^4,q)\\&= q^{-1}\frac{J_{12}^3J_{1,4}{\overline{J}}_{3,12}}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}{\overline{J}}_{1,12}} \cdot \frac{J_6}{J_{2,6}J_{12}^2}\cdot 2q^2J_{2,24}J_{18,24} +\frac{J_{12}^3J_{1,4}{\overline{J}}_{3,12}}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}{\overline{J}}_{5,12}} \cdot \frac{J_6}{J_{2,6}J_{12}^2} \cdot 2J_{6,24}J_{14,24} \\&\ \ \ \ \ +\frac{J_{12}^3J_{2,4}}{{\overline{J}}_{0,3}}\cdot \frac{J_6}{J_{1,6}J_{12}^2}\cdot j(q;-q^3)\\&= 2\frac{J_{12}^3J_{1,4}{\overline{J}}_{3,12}}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}} \cdot \frac{J_6J_{6,24}}{J_{2}J_{12}^2}\cdot \frac{J_{24}}{J_{12}^2}\cdot \Big ( qJ_{1,12}+J_{5,12}\Big ) +\frac{J_{12}^3J_{2,4}}{{\overline{J}}_{0,3}}\cdot \frac{J_6}{J_{1,6}J_{12}^2}\cdot j(q;-q^3)\\&= 2\frac{J_{12}^3J_{1,4}{\overline{J}}_{3,12}}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}} \cdot \frac{J_6J_{6,24}}{J_{2}J_{12}^2}\cdot \frac{J_{24}}{J_{12}^2}\cdot j(-q;-q^3) +\frac{J_{12}^3J_{2,4}}{{\overline{J}}_{0,3}}\cdot \frac{J_6}{J_{1,6}J_{12}^2}\cdot j(q;-q^3), \end{aligned}$$

where for the second equality we used (3.2f), and for the third equality we used (3.2a). Applying (3.2e) gives

$$\begin{aligned} f_{4,4,1}&(q^3,q^2,q)+qf_{4,4,1}(q^5,q^4,q)\\&= 2\frac{J_{12}^3J_{1,4}{\overline{J}}_{3,12}}{{\overline{J}}_{0,3}{\overline{J}}_{0,12}} \cdot \frac{J_6J_{6,24}}{J_{2}J_{12}^2}\cdot \frac{J_{24}}{J_{12}^2}\cdot \frac{{\overline{J}}_{1,6}J_{2,6}}{J_{3,12}} +\frac{J_{12}^3J_{2,4}}{{\overline{J}}_{0,3}}\cdot \frac{J_6}{J_{1,6}J_{12}^2}\cdot \frac{J_{1,6}{\overline{J}}_{2,6}}{J_{3,12}}\\&=\frac{1}{2}J_{2}J_{6,12}+\frac{1}{2}J_{2}J_{6,12}\\&=J_2J_{6,12}, \end{aligned}$$

where the second equality follows from elementary product rearrangements.

9.3 The string function \(c_{51}^{51}-c_{15}^{51}\) (2.9c)

It suffices to show (2.20c):

$$\begin{aligned} f_{4,4,1}(-q^3,q^2,q)-qf_{4,4,1}(-q^5,q^4,q)=J_1^2. \end{aligned}$$
(9.4)

From Lemma 3.16, we have

$$\begin{aligned} J_1^2&=f_{4,4,1}(-q^{3},q,q)-qf_{4,4,1}(-q^{5},q^{3},q)\\&=-qf_{4,4,1}(-q^7,q^2,q)+j(-q^3;q^4)+q^4f_{4,4,1}(-q^{9},q^{4},q)-qj(-q^5;q^4)\\&=-qf_{4,4,1}(-q^5,q^4,q)+f_{4,4,1}(-q^{3},q^{2},q), \end{aligned}$$

where for the second equality we used (3.9) with \((R,S)=(0,1)\), and for the third we used (3.2b) and (3.14).

10 Computing-level \(N=8\) string functions

10.1 The string function \(c_{62}^{44}\) (2.10a)

It suffices to show (2.21a):

$$\begin{aligned} f_{5,5,1}(q^5,q^4,q)=J_{2}J_{10}, \end{aligned}$$
(10.1)

but this is just the first identity in Lemma 3.16.

11 Computing-level \(N=10\) string functions

11.1 The string function \(c_{91}^{55}\) (2.11b)

It suffices to show (2.22b):

$$\begin{aligned} f_{6,6,1}(q^6,q^4,q)=J_{4,10}J_{3,15}. \end{aligned}$$
(11.1)

We use Corollary 3.15. In (3.26), we have

$$\begin{aligned} h_{6,6,1}(q^6,q^4,-1,-1) =j(q^6;q^6)m( -q^{3},q^{5},-1 ) +j(q^4;q)m( q^{-3},q^{30},-1 )=0. \end{aligned}$$
(11.2)

Hence

$$\begin{aligned} f_{6,6,1}&(q^6,q^4,q)\\&=-\frac{J_{30}^3}{{\overline{J}}_{0,5}{\overline{J}}_{0,30}}\sum _{d=0}^{5} q^{5\left( {\begin{array}{c}d+1\\ 2\end{array}}\right) } \cdot \frac{j\big (q^{5d+9};q^{6}\big ) j\big (-q^{27-5d};q^{30}\big )j\big (-q^{5d};q^{30}\big )}{j\big (-q^{-3};q^{30})j(q^{5d+3};q^{30}\big )}\\&=\frac{J_{30}^3}{{\overline{J}}_{0,5}{\overline{J}}_{0,30}{\overline{J}}_{3,30}}\Big [ \frac{J_{3,6}{\overline{J}}_{27,30}{\overline{J}}_{0,30}}{J_{3,30}} - q^{-2} \cdot \frac{J_{2,6} {\overline{J}}_{22,30}{\overline{J}}_{5,30}}{J_{8,30}}\\&\ \ \ \ \ +q^{-3} \cdot \frac{J_{1,6} {\overline{J}}_{17,30}{\overline{J}}_{10,30}}{J_{13,30}} -q^{-3} \cdot \frac{J_{1,6} {\overline{J}}_{7,30}{\overline{J}}_{20,30}}{J_{23,30}} +q^{-2} \cdot \frac{J_{2,6} {\overline{J}}_{2,30}{\overline{J}}_{25,30}}{J_{28,30}} \Big ], \end{aligned}$$

where we have used (3.2b). Using (3.2c) and regrouping terms yields

$$\begin{aligned} f_{6,6,1}&(q^6,q^4,q)\\&=\frac{J_{30}^3}{{\overline{J}}_{0,5}{\overline{J}}_{0,30}{\overline{J}}_{3,30}}\Big [ \frac{J_{3,6}{\overline{J}}_{27,30}{\overline{J}}_{0,30}}{J_{3,30}} +q^{-2} \cdot J_{2} {\overline{J}}_{5,30}\cdot \frac{{\overline{J}}_{2,30}J_{8,30}-{\overline{J}}_{8,30}J_{2,30}}{J_{2,30}J_{8,30}}\\&\ \ \ \ \ +q^{-3} \cdot J_{1,6} {\overline{J}}_{10,30}\cdot \frac{{\overline{J}}_{13,30}J_{7,30}-{\overline{J}}_{7,30}J_{13,30}}{J_{7,30}J_{13,30}}\Big ] \\&=\frac{J_{30}^3}{{\overline{J}}_{0,5}{\overline{J}}_{0,30}{\overline{J}}_{3,30}}\Big [ \frac{J_{3,6}{\overline{J}}_{27,30}{\overline{J}}_{0,30}}{J_{3,30}} +2\cdot \frac{J_{2} {\overline{J}}_{5,30}J_{6,60}J_{40,60}}{J_{2,30}J_{8,30}} -2q^{4} \cdot \frac{J_{1,6} {\overline{J}}_{10,30}J_{6,60}J_{50,60}}{J_{7,30}J_{13,30}}\Big ], \end{aligned}$$

where we have used (3.3a). We focus on the last two summands:

$$\begin{aligned}&\frac{J_{2,6} {\overline{J}}_{5,30}J_{6,60}J_{40,60}}{J_{2,30}J_{8,30}} -q^{4} \cdot \frac{J_{1,6} {\overline{J}}_{10,30}J_{6,60}J_{50,60}}{J_{7,30}J_{13,30}}\\&=J_{6,60}{\overline{J}}_{5,30}{\overline{J}}_{10,30}\cdot \frac{J_{60}}{J_{30}^2}\cdot \Big [ \frac{J_{2,6} J_{10,30}}{J_{2,30}J_{8,30}} -q^{4} \cdot \frac{J_{1,6}J_{5,30}}{J_{7,30}J_{13,30}}\Big ] \\&=J_{6,60}{\overline{J}}_{5,30}{\overline{J}}_{10,30}\cdot \frac{J_{6}}{J_{30}^5} \cdot \frac{J_{60}}{J_{30}^2}\cdot \Big [ J_{14,30}J_{20,30}J_{26,30} J_{10,30} -q^{4} \cdot J_{1,30}J_{19,30}J_{25,30}J_{5,30}\Big ]. \end{aligned}$$

If we specialize Proposition 3.1 with \(a=q^{15}\), \(b=q^{10}\), \(c=q^{6}\), \(d=q^{5}\), we have

$$\begin{aligned} J_{16,30}J_{20,30}J_{26,30} J_{10,30} +q^{4} \cdot J_{1,30}J_{11,30}J_{25,30}J_{5,30}=J_{21,30}J_{9,30}J_{15,30}J_{5,30}. \end{aligned}$$
(11.3)

Using (3.2c) we can then write

$$\begin{aligned} f_{6,6,1}(q^6,q^4,q)&=\frac{J_{30}^3}{{\overline{J}}_{0,5}} \frac{J_{3,6}}{J_{3,30}} +2\cdot \frac{J_{6,60}{\overline{J}}_{5,30}{\overline{J}}_{10,30}}{{\overline{J}}_{0,5}{\overline{J}}_{0,30}{\overline{J}}_{3,30}} \cdot \frac{J_{6}J_{60}}{J_{30}^4} \cdot \\&\ \ \ \ \ \cdot \Big [ 2J_{16,30}J_{20,30}J_{26,30} J_{10,30} - J_{9,30}J_{21,30}J_{15,30}J_{5,30}\Big ]. \end{aligned}$$

The result follows from the two identities in Lemma 3.3.

12 Concluding remarks and a question for further research

We have derived the expressions for even-level string functions for an irreducible highest weight module of Kac–Moody Lie algebra \(A_1^{(1)}\) in terms of double-sums of the form \(f_{K+1,K+1,1}(x,y,q)\). These double-sums may be expressed in terms of theta functions and Appell–Lerch functions: the building blocks of Ramanujan’s mock theta functions.

There are also questions for future research. For example, can one use a variation of the techniques in this paper in order to reduce the number of theta quotients that appear in the initial expressions for the odd-level \(A_{1}^{(1)}\) string functions?