The Bloch–Okounkov theorem for congruence subgroups and Taylor coefficients of quasi-Jacobi forms

There are many families of functions on partitions, such as the shifted symmetric functions, for which the corresponding q-brackets are quasimodular forms. We extend these families so that the corresponding q-brackets are quasimodular for a congruence subgroup. Moreover, we find subspaces of these families for which the q-bracket is a modular form. These results follow from the properties of Taylor coefficients of strictly meromorphic quasi-Jacobi forms around rational lattice points.


Introduction
Denote by P the set of all partitions of integers. For a large class of functions f : P → C the q-bracket, which is defined as the formal power series is a quasimodular form for SL 2 (Z) (here λ is a partition of size |λ|). It is, therefore, natural to raise the following two questions: (I) Given a congruence subgroup ≤ SL 2 (Z), is there an (even larger) class of functions for which the q-bracket is a quasimodular form for ? (II) What is the class of functions for which the q-bracket is a modular form (and not just a quasimodular form)?
In this paper, we explain how to answer these questions by studying a different question of independent interest: (III) What is the modular or quasimodular behaviour of the Taylor coefficients of meromorphic quasi-Jacobi forms?
To illustrate how these questions are related, consider the shifted symmetric functions Q k : P → Q, for k ≥ 1 given by where ∞ k=0 β k z k−1 := e z/2 e z −1 . By the celebrated Bloch-Okounkov theorem, for every homogeneous polynomial in these functions, the q-bracket is a quasimodular form for SL 2 (Z).
More precisely, we have the following. Here, and throughout the paper, we let τ ∈ h, the complex upper half plane, z ∈ C and write e(x) := e 2π ix , q = e(τ ). Given λ ∈ P, write for the generating series of the functions Q k [1,25], which converges for Im(z) < 0. Write W (z 1 ) · · · W (z n ) for the function λ → W λ (z 1 ) · · · W λ (z n ). Then, by the Bloch-Okounkov theorem, W (z 1 ) · · · W (z n ) q is a meromorphic quasi-Jacobi form F n , defined as follows.
The study of the Taylor coefficients of F n around rational values of z 1 , . . . , z n yields an answer to Question I, whereas a detailed description of the (quasi)modular transformation of the Taylor coefficients of F n around z i = 0 answers Question II. The Fourier coefficients of the functions F n were studied in [5], and the Taylor coefficients of certain functions closely related to holomorphic quasi-Jacobi forms were studied in [4]. However, the Taylor coefficients of F n or of a more general meromorphic quasi-Jacobi form have not been studied before.
We now give a short overview of the results in the literature as well as in the present paper. It should be noted that the answer to the third question can be read independently from the applications to functions on partitions.

The Bloch-Okounkov theorem for congruence subgroups
Given a ∈ Q, define Q k (·, a): P → Q by Q 0 (λ, a) := β 0 (a) and for k ≥ 1 by where k∈Z β k (a) (2πiz) k−1 := e(z/2) e(z+a)−1 . We recall e(x) = e 2π ix . The main properties satisfied by these functions are a consequence of the fact that k≥0 Q k (λ, a) z k−1 = e(− 1 2 a) W λ (z + a), and that F n (z 1 , . . . , z n ) = W (z 1 ) · · · W (z n ) q is a quasi-Jacobi form. Observe that Q k (λ, 0) = Q k (λ). Up to a constant, these functions Q k (·, a) have been considered before in [11] for a = 1 2 and in [10] for all a ∈ Q. It was shown that a suitably adapted q-bracket of any polynomial in these functions, excluding the function Q 1 (·, a), is quasimodular for 1 (N ) for some N .
Observe that there are no elements of negative weight in * (N ). Given N ≥ 1, write (2, N ) for gcd (2, N ). For N ∈ Z, denote m N = N 0 0 1 . Remark The occurrence of the group m −1 N ( N )m N in the theorem can be interpreted in at least two ways. First of all, an equivalent formulation of the theorem is that for f ∈ * (N ) of weight k, the series f q N is a quasimodular form of weight k and level N , where q N := q 1/ N . Secondly, as 1 it follows that f q is a quasimodular form for 1 ( N 2 ).
Moreover, the definition of N indicates that the behaviour of Q k (a) is different when the numerator of a is divisible by 2. We will see that this can also be explained by the n-point functions F n : they are quasi-Jacobi forms for which the index is an element of M n ( 1 2 Z).
The following theorem is a refinement of Theorem 1.2, giving us q-brackets (or quotients of q-brackets) that are quasimodular forms on 1 (N ) rather than only on the much smaller group m −1 N ( N )m N . Theorem 1. 3 Let N ≥ 1. Given k i ∈ Z >0 , a i ∈ 1 N Z for i = 1, . . . , n, denote a = a 1 + . . . + a n and Q k (·, a) = Q k 1 (·, a 1 ) · · · Q k n (·, a n ). Then, • If a ∈ Z, then Q k (·, a) q is a quasimodular form for 1 (N ); • If a / ∈ Z, then Q k (·, a) q Q 1 (·, a) q is a quasimodular form for 1

(N ).
Remark Let a ∈ Q. The function Q 1 (·, a) −1 q , equal to (a), is a so-called Klein form; see e.g. [16]. Note Q 1 (·, a) q = 0 for a ∈ Z. Theorem 1.2 should be compared with the results in [12], where Griffin, Jameson and Trebat-Leder consider certain functions Q (p) k in the context of studying p-adic analogues of the shifted symmetric functions (1). Extending their definition to composite m, we let Write (N ) for the graded Q-algebra generated by the functions Q (m) k for all m | N . For primes p, these authors show that the q-bracket of the functions Q (p) k is quasimodular for 0 (p 2 ) and they suggest that it is likely that products of these functions also have quasimodular q-brackets for the same group. Slightly more general, one can wonder whether for f ∈ (N ) the q-bracket f q is a quasimodular form for 0 (N 2 ). Now, observe that the functions Q (m) k are elements of * (m). Hence, (N ) ⊂ * (N ). Therefore, for all odd N Theorem 1.2 implies that q-brackets of elements of (N ) are quasimodular for 1 (N 2 ). That these q-brackets are indeed quasimodular for the bigger group 0 (N 2 ) is the content of the next theorem. It should be noted that the above theorems are true in greater generality. For example, the so-called hook-length moments introduced in [6], and studied in the context of harmonic Maass forms for a congruence subgroup in [3], also have natural generalisations obtained by studying their corresponding n-point functions. Similarly, the moment functions and their generalisations in [22] can equally well be generalized to congruence subgroups. Therefore, we will state and prove the above results in Sect. 3.1 in a more general setting that allows application to the hook-length moments and moment functions.

When is the q-bracket modular?
To illustrate the main ideas, consider again the Bloch-Okounkov algebra * = * (1). For all k ≥ 0, let h k ∈ * be given by We show that the function h k satisfies the following three properties: (ii) The q-bracket h k q is a modular form (and not just a quasimodular form); (iii) For f ∈ * with f q modular and f − Q k divisible by Q 2 , we have f q = h k q .
Hence, one can think of the difference h k − Q k as a correction term for Q k with respect to the property of being a modular form under the q-bracket. By the third property, this correction term is unique up to elements in the kernel of the q-bracket. More generally, one has the following result. Here, M denotes the algebra of modular forms for SL 2 (Z) with rational Fourier coefficients.
The algebra F = * is an example to which the above result applies. In particular, by using (1.5) inductively, each f ∈ * can uniquely be written as a polynomial in Q 2 with coefficients g i ∈ M, i.e.
As g q = 0 if and only if Q 2 g q = 0 for g ∈ * , the following are equivalent: (a) f q is modular; The functions h λ ∈ * defined in [21] form a basis for the space M( * ). The method of proof in this work (i.e. using quasi-Jacobi forms) allowed us to state Theorem 1.5 for many algebras F, whereas the results in [21] could not easily be generalized to other algebras than * . In Sect. 4, we prove this theorem and apply this result to the algebra * of shifted symmetric functions, to its extensions to higher levels * (N ) and to the aforementioned algebra of moment functions.

Quasi-Jacobi forms and their Taylor coefficients
Recall τ ∈ h, the complex upper half plane, z ∈ C and e(x) = e 2π ix , q = e(τ ). The Kronecker-Eisenstein series E k are given by Here, the letter 'e' indicates we perform the Eisenstein summation procedure, given by Do these series E k , the Jacobi theta function θ and its derivatives, and the Bloch-Okounkov n-points functions F n have a common property?
To answer this question, observe that the first two functions can be interpreted as generating functions of the Eisenstein series e k , given by 1 e k (τ ) := (m,n)∈Z 2 (m,n) =(0,0) Namely, In particular, the Taylor (or Laurent) coefficients around z = 0 of these functions are polynomials in Eisenstein series, hence quasimodular forms-a property which is shared by the stronger notion of a Jacobi form. Just as e 2 transforms as a quasimodular form, so do θ (r) and F n transform as quasi-Jacobi forms. Our answer to the question is that all these functions are quasi-Jacobi forms, introduced in Sect. 2.4. Quasi-Jacobi forms transform comparable to quasimodular forms, as we explain now. There is a slash action (see Definition 2.2) on all functions ϕ : h × C n → C for all γ ∈ SL 2 (Z) and for all X ∈ M n,2 (Q) (so actually for the action of their semidirect product SL 2 (Z) M n,2 (Q)). In case ϕ is a quasi-Jacobi form of weight k and index M, there exist quasi-Jacobi forms ϕ i,j , indexed by a finite subset of Z ≥0 × Z n ≥0 , such that for all γ = a b c d and X = (λ, μ) ∈ M n,2 (Z) one has together with similar formulas for each ϕ i,j | k,M γ and ϕ i,j | M X. Jacobi forms are quasi-Jacobi forms for which the right-hand side in both equations above equals ϕ. The quasi-Jacobi forms ϕ we study are strictly meromorphic, i.e. meromorphic such that if z ∈ R n τ + R n is a pole of ϕ(τ , ·) for some τ ∈ h, it is a pole for almost all τ ∈ h. This is a new notion we introduce in this work; see Sect. 2.1. The Weierstrass ℘-function is an example of a strictly meromorphic Jacobi form, but its inverse is not. Also, E k , −1 and F n are strictly meromorphic. If the number of elliptic variables n satisfies n = 1, this condition is equivalent to the statement that all poles of ϕ are torsion points z ∈ Qτ + Q. This is crucial to obtain mock modular forms as Fourier coefficients of meromorphic Jacobi forms (see [8,26]). For n > 1, the Jacobi transformation properties of ϕ imply a more complicated restriction on the positions of the poles. By studying the orbits of the action of SL 2 (Z) on (R 2 ) n we prove the following result. Theorem 1.6 Let ϕ be a strictly meromorphic quasi-Jacobi form and τ ∈ h. Then, all poles z of ϕ(τ , ·) lie in finite union of rational hyperplanes s 1 z 1 + . . . + s n z n ∈ uτ + v with s 1 , . . . , s n ∈ Z and u, v ∈ Q/Z.
In this work, we determine conditions on the Taylor coefficients (or rather Laurent coefficients in case we are expanding around a pole) of a meromorphic function ϕ : h × C n → C for it to be a (quasi-)Jacobi form. This is the technical result we need to answer Question I and II. In one direction, by the work of Eichler and Zagier [9], it is known that for a Jacobi form the Taylor coefficients around rational lattice points are quasimodular, or equivalently that certain linear combinations ξ X of derivatives of these Taylor coefficients are modular. For example, is a weak Jacobi form, hence it satisfies for all X = (λ, μ) ∈ M 1,2 (Q) and γ ∈ SL 2 (Z), where the implicit multiplicative constant is a root of unity depending on X and γ . Hence, it follows that the Taylor coefficients of around z = λτ + μ (after multiplying with a certain power of q) are quasimodular for some subgroup X of SL 2 (Z) consisting of γ for which Xγ − X ∈ M 1,2 (Z) (see 18). In contrast, the weak quasi-Jacobi form (τ , z) = θ (τ ,z) θ (τ ,0) transforms as Therefore, the Taylor coefficients of + λ around z = λτ + μ, rather than of , give rise to quasimodular forms for X . We write g X ( ) for the th Taylor coefficient of + λ . In Definition 2.29 we extend this notation by writing g X (ϕ) for the 'correct' Taylor coefficient of a quasi-Jacobi form ϕ. Moreover, in (20) we define ξ X m (ϕ) to be a certain combination of the derivatives of g X (ϕ).
The main result on Taylor coefficients of quasi-Jacobi forms is given by Theorem 2.35 and summarized in the following result. For simplicity, we assume that s = (s 1 , . . . , s n ) in Theorem 1.6 is always a standard basis vector, e.g. we allow ℘(z 1 )℘(z 2 + 1 2 ), but we do not allow ℘(z 1 − z 2 ). Theorem 1.7 Let ϕ be a strictly meromorphic quasi-Jacobi form of weight k and index M whose poles z lie on a finite collection of hyperplanes of the form z j ∈ uτ + v with j ∈ {1, . . . , n} and u, v ∈ Q/Z. Then (i) for all X ∈ M n,2 (Q) and ∈ Z n the 'Taylor coefficients' g X (ϕ) are quasimodular forms of weight k + 1 + . . . + n for the group X and satisfy the functional Eqs. (21) and (22). (ii) for all X ∈ M n,2 (Q) and m ∈ Z n the functions ξ X m (ϕ) are modular forms of weight k + m 1 + . . . + m n for X and satisfy the functional Eq. (21). Definition 2.29 and Eq. (20) (defining g X (ϕ) and ξ X m (ϕ)) use the functions ϕ i,j in (8) and (9), which are uniquely determined by the quasi-Jacobi form ϕ. The results of Sect. 2.7 also show that the four collections of functions {ϕ}, {ϕ i,j }, {g X } and {ξ X m } determine each other in a computable way, and give explicit conditions on the collections {ϕ i,j }, {g X } and {ξ X m } that imply that they arise from a quasi-Jacobi form.
In Sect. 2, we introduce strictly meromorphic quasi-Jacobi forms and prove Theorem 1.6 and Theorem 1.7. The quasimodular transformation of the Taylor coefficients of F n will then imply the results on the Bloch-Okounkov theorem for congruence subgroups in Sect. 3. Moreover, in Sect. 4, we see that "pulling back" the functions ξ X m under the qbracket leads to the construction of the functions h m for which the q-bracket is modular.

Quasi-Jacobi forms
The definition of a Jacobi form in [9] has been generalized in many ways. We provide a generalization that incorporates several elliptic variables, characters, weakly holomorphic and meromorphic functions, and quasi-Jacobi forms [2,19,20]. In particular, the normalized Jacobi theta function , the Kronecker-Eisenstein series E k and the Bloch-Okounkov n-point functions F n from the introduction will be examples throughout this paper.
For τ ∈ h, the complex upper half plane, we write L τ = Zτ + Z. As is customary, we often omit the dependence on the modular variable τ in any type of Jacobi form, e.g. we write (z) for (τ , z). We write a = (a 1 , . . . , a n ) for a vector of elements and we write |a| for a 1 +. . .+a n . For vectors a and b, we write a b to denote i a b i i . Also, given X ∈ M n,2 (R), we denote the rows of X by λ and μ, i.e. X = (λ, μ). Moreover, for γ ∈ SL 2 (Z), we write γ = a b c d and we write λ γ and μ γ for the rows of Xγ , i.e. Xγ = (λ γ , μ γ ).

Strictly meromorphic Jacobi forms
The definition of a strictly meromorphic Jacobi form is subtle, excluding many meromorphic functions transforming as Jacobi forms. For example, the j-invariant, the reciprocal of an Eisenstein series e k , or ℘/ , where ℘ is the Weierstrass ℘-function and the modular discriminant, are all non-examples of strictly meromorphic Jacobi forms. Namely, although a strictly meromorphic Jacobi form is meromorphic we want its Taylor coefficients in the elliptic variables to be holomorphic (rather than weakly holomorphic or meromorphic) quasimodular forms. But with this not everything has been said, the definition is even stricter: we require the poles of ϕ to be "constant" in the modular variable τ . Consider, for example, the Weierstrass ℘-function, which is an example of a strictly meromorphic Jacobi form. For every fixed z ∈ C (e.g. z = i) the function ℘(τ , z) is a meromorphic function of τ , as ℘(τ , z) has a pole whenever τ is such that z ∈ L τ (e.g. τ = z = i). However, for λ, μ ∈ R, the function ℘(τ , λτ + μ) is holomorphic, unless both λ ∈ Z and μ ∈ Z. That is, all poles of ℘(τ , z) are given by z ∈ L τ . On the contrary, we will see that ℘ −1 is not a strictly meromorphic Jacobi form, as the poles of ℘ −1 are not "constant" in τ . Before introducing strictly meromorphic Jacobi forms, we first recall the Jacobi group and its action on (meromorphic) functions. Definition 2.1 For all n ∈ N, the (discrete) Jacobi group J n of rank n is defined as the semi-direct product J n := SL 2 (Z) M n,2 (Z) with respect to the right action of SL 2 (Z) on M n,2 (Z).
Remark Given k ∈ Z and M ∈ M n (Q), the slash operator defines an action of J n of weight k and index M on the space of all meromorphic functions ϕ : h × C n → C.
Given M ∈ M n (Q), for X, X ∈ M n,2 (Q), we let where we wrote B = B M for the bilinear form associated to M. Observe that By extending the slash action to the real Jacobi group , generalizing [9, Theorem 1.4] to several variables and half-integral index, we obtain the following functional equations.

Proposition 2.3 Given a meromorphic function
for all X, X ∈ M n,2 (R) and γ ∈ SL 2 (Z) one has Classical modular forms are defined as the invariants for a certain group action of the space Hol 0 (h) of holomorphic functions in h satisfying a certain growth condition (having at most polynomial growth near the boundary).

Definition 2.4
Let Hol 0 (h) be the ring of holomorphic functions ϕ of moderate growth on h, i.e. for all C > 0, γ ∈ SL 2 (Z) and x ∈ R one has ϕ(γ (x + iy)) = O(e Cy ) as y → ∞ (where γ acts on h by Möbius transformations).
With the remarks at the beginning of this section in mind, we now define strictly meromorphic Jacobi forms. A final subtlety in the definition below is coming from the fact that a meromorphic function in two or more variables always has points of indeterminacy (think of x/y near the origin, whose limiting value depends on the angle of approach). Points of indeterminacy are not "generic", and we exclude these points when we say, for instance, that a certain function ϕ(τ , z) has its poles precisely on certain hyperplanes for all generic τ ∈ h. Definition 2.5 Given n ≥ 0, denote by Mer n the space of meromorphic functions ϕ : h × C n → C such that for all λ, μ ∈ R n either z = λτ + μ is a pole of ϕ(τ , ·) for all generic τ ∈ h or the function τ → ϕ(τ , λτ + μ) belongs to Hol 0 (h). Moreover, given M ∈ M n (Q), denote by Mer M n the subspace of ϕ ∈ Mer n for which ϕ| M X ∈ Mer n for all X ∈ M n,2 (Q). Let Hol n and Hol M n be the subspace in Mer n and Mer M n , respectively, of holomorphic functions. Definition 2.6 Let k ∈ Z and M ∈ M n (Q). A holomorphic, weak, or a strictly meromorphic Jacobi form of weight k, index M and rank n for the Jacobi group J n is a function ϕ in Hol M n , Hol n or Mer M n , respectively, that is invariant under the action of J n of weight k and index M (i.e. ϕ| k,M g = ϕ for all g ∈ J n ). We write J hol k,M , J weak k,M and J sm k,M for the vector spaces of holomorphic, weak, and strictly meromorphic Jacobi forms of weight k and index M (often omitting the indices).
Remark Let M = (m ij ) ∈ M n (Q). Any space of Jacobi forms is trivial whenever 2B M (z, z) is a non-integral quadratic form, or, equivalently, when m ij / ∈ 1 4 Z or m ii / ∈ 1 2 Z for some i = j. Namely, let ϕ be a Jacobi form and let τ ∈ h be fixed. If ϕ is nonzero of rank 1, write M = (m) for its index. It follows from the elliptic transformation law (Definition 2.2(ii)) that the number of zeros minus the number of poles of z → ϕ(τ , z) in any fundamental domain for the action of L τ on C is exactly 2m. For Jacobi forms of higher rank the integrability of 2B M (z, z) follows by noting that for fixed μ 2 , . . . , μ n ∈ C, functions of the form z → ϕ(τ , z, μ 2 , μ 3 , . . . , μ n ) and z → ϕ(τ , z, z, μ 3 , . . . , μ n ) still satisfy the elliptic transformation law.
A holomorphic Jacobi form of rank 0 is just a modular form. More interestingly, the Kronecker-Eisenstein series (7) are examples of a strictly meromorphic Jacobi form of index (0), with expansions given by Closely related are the Weierstrass ℘-function and its derivative, that is, ℘ = E 2 − e 2 and ℘ = −2E 3 . By [9,Theorem 9.4], it follows that the algebra of weak Jacobi forms is given by where A, B and C are equal to 2 , ℘ 2 and ℘ 4 , respectively. Note that the relation 6 A 4 comes from the differential equation satisfied by the Weierstrass ℘-function.
The following result, yielding an algebraic proof and extending [19, Proposition 2.8] 3 , gives all strictly meromorphic Jacobi forms of rank 1 with only poles at the lattice points. The corresponding algebra is free, as the relation between ℘ 3 and (℘ ) 2 can be used to express e 6 in terms of the generators. As usual, we write m (instead of the matrix M = (m)) for the index of a Jacobi form of rank 1.
Proof First, we show that f = ϕ −2m ∈ J sm is a strictly meromorphic Jacobi form of index 0 with all poles (τ , z) satisfying z ∈ L τ . This follows from the claim that −1 ∈ J sm 1,−1/2 and that all the poles of −1 are at the lattice points. To prove this claim, note that by the Jacobi triple product It follows that is a weak Jacobi form with all zeros at the lattice points z ∈ L τ . Moreover, for all X ∈ M n,2 (Q) the function |X does not vanish at infinity, from which the claim follows.
From now on, assume that ϕ is of index 0, i.e. that ϕ is an elliptic function. Write ϕ = ϕ 0 + ϕ 1 with ϕ 0 and ϕ 1 the even and odd part of ϕ, respectively. For u, v ∈ Rτ + R, where m j ∈ Z and u j (τ ) are representatives with respect to the above equivalence relation for the zeros and poles of ϕ i outside L τ . As both ϕ 0 and ϕ 1 do not admit poles outside the lattice, it follows that m j > 0. Hence, ϕ is a polynomial in ℘ and ℘ where the coefficients are polynomials in the functions ℘(u j (τ )). By the modular transformation every such coefficient is a modular form for SL 2 Remark Although the above result and many examples of strictly meromorphic Jacobi forms in the literature have only poles at z ∈ L τ , one easily constructs a strictly meromorphic Jacobi forms with poles at different places. Namely, if ϕ is a Jacobi form with all poles at z ∈ L τ , then is a Jacobi form for the same group, but now with the poles at 1 2 , 1 2 + 1 2 τ and 1 2 τ modulo the lattice L τ .

Poles of Jacobi forms
In contrast to the space of (weakly) holomorphic Jacobi forms, the space of strictly meromorphic Jacobi forms of given weight and index is not finite-dimensional. However, the latter space is not far from being finite-dimensional. First of all, in contrast to the space of all meromorphic functions, the space of strictly meromorphic Jacobi forms is not a field. Moreover, the poles lie in a finite number of hyperplanes and after fixing finitely many such hyperplanes to contain the poles, the vector space of strictly meromorphic Jacobi forms of given weight and index is finite-dimensional, as we will explain in this section.
Given a meromorphic Jacobi form ϕ of rank n, we write for the set of poles as well as points of indeterminacy of ϕ. We identify two points of P ϕ if they have same image under the projection h × C n M n,2 (R) given by (τ , λτ + μ) → (λ, μ). That is, we define an equivalence relation on P ϕ by saying that (τ , z) ∼ (τ , z ) whenever, after writing z = λτ + μ and z = λ τ + μ with λ, λ , μ, μ ∈ R n , one has λ = λ and μ = μ . We identify the quotient set Q ϕ with a subset of M n,2 (R) by identifying a point of P ϕ with its image under the projection. From the definition of a strictly meromorphic Jacobi form, we obtain the factorisation h × Q ϕ P ϕ of P ϕ , given by (τ , (λ, μ)) → (τ , λτ + μ). Note that Q ϕ is invariant under translation by M n,2 (Z).
As an example of how the definition works, we first prove a simple consequence: Then both ϕ(τ , z(τ )) and 1 ϕ(τ ,z(τ )) are holomorphic as a function of τ ∈ h. Hence, as a function of τ ∈ h, both ϕ(τ , z(τ )) and 1 ϕ(τ ,z(τ )) do not admit any zeros. Similarly, it follows that both ϕ(τ , z(τ )) and 1 ϕ(τ ,z(τ )) are holomorphic (as a function of τ ∈ h) at the cusps. Hence, both functions do not admit any zero at the cusps. In other words, ϕ(τ , z(τ )) does not admit any zeros and poles on a compact set. So, ϕ(τ , z(τ )) is constant as a function of τ . As this holds for almost all X ∈ M n,2 (R), we conclude that ϕ is globally constant.
The following result, which is crucial for the sequel, tells us that the image of Q ϕ in the torus M n,2 (R/Z) consists of finitely many hyperplanes given by linear equations with rational coefficients. In other words, the following result strengthens Theorem 1.6 (the fact that the second conclusion is also true for quasi-Jacobi forms, follows immediately after introducing such functions (see Corollary 2.19).

Theorem 2.9
Let ϕ ∈ J sm , and let P ϕ h × Q ϕ be the set of non-holomorphic points as above. Then, we have: (ii) There exist finitely many hyperplanes of the form with s ∈ Z n primitive (i.e. with coprime entries) and u, v ∈ Q/Z, such that X ∈ Q ϕ precisely if X lies on such a hyperplane.
First, we treat the case that the rank n is 1. Then, by Lemma 2.12, proven in the next section, the fact that Y is bounded away from Xγ for all γ ∈ SL 2 (Z) implies that both λ and μ are rational. Therefore, we can take s = 1 and (u, v) = (λ, μ) mod Z 2 .
Next, let n ≥ 2. By an approximation property proven in the next section (see Proposition 2.15), the fact that Y is bounded away from X implies that there are non-trivial s ∈ Z n , t ∈ Z with s · λ = t. (In fact, the result states that if Y is bounded away from X then for all α, β ∈ Z, there exist non-trivial s ∈ Z n , t ∈ Z with s · (αλ + βμ) = t. We choose α = 1, β = 0.) Note that the value of s and t is a function of X, i.e. for all elements X ∈ Q ϕ there exists an element (s, t) ∈ Rel giving the relation, where Let τ ∈ h be given and identify M n,2 (R) with C n via X → x = X(τ , 1) t . For almost all X ∈ Q ϕ , the conditions of the implicit function theorem for the function ϕ are satisfied. In this case, there exists an open set U ⊂ C n−1 containing 0, an open neighbourhood V ⊂ C n of x, and a holomorphic function g : U → V , such that z ∈ V is a pole of ϕ precisely if z lies in the image of g. Consider the isomorphism (π τ , ρ τ ) : C Rτ +R. Let g i be the ith component function of g, which takes values in Rτ + R under this isomorphism. For example, taking τ = i, we find π i (g i ) = Im(g i ) and ρ i (g i ) = Re(g i ). For every u ∈ U we find a relation of the form where (s, t) ∈ Rel, possibly depending on the choice of u. We now show that we can choose (s, t) ∈ Rel such that (11) holds for all u ∈ U . Recall that the set of zeros of a non-constant real-analytic function has measure 0. As π τ (g i ) is a real-analytic function, either (11) holds for all u ∈ U , or it holds for a real subspace of U of measure 0. Now, note that Rel is a countable set, whereas countably many subspaces of measure 0 do not cover U . Hence, we find a relation (11) which holds for all u ∈ U . By the Cauchy-Riemann equations for the holomorphic functions g i we can 'upgrade' this relation to the statement that s · z takes a constant value uτ + v in Rτ + R for all z ∈ g(U ). Without loss of generality we assume that gcd(s 1 , . . . , s n ) = 1; if not, we scale s, u and v appropriately. Now, by the Weierstrass preparation theorem, locally around x the set of poles is given by k branches coming together, where each branch is an (n − 1)-dimensional space given by the zeros of a holomorphic function and k equals the multiplicity of the pole at x (see [7, Lemma 6.1] for the same argument in a different setting). We know that almost all (hence all) the elements in such a branch satisfy s · x = uτ + v. Write T for (Rτ + R)/(Zτ + Z). By analytically extending such a local branch, we find that all solutions z ∈ T of s · z = uτ + v are poles of ϕ(τ , ·) as long as they are in the same connected component as has exactly the same poles as z → ϕ(z) except for the poles which are zeros of s · z ≡ uτ + v mod L τ . Hence, the statement now follows inductively. By compactness of T it follows that one can restrict to only finitely many linear functions.
Remark Note that if s·X ∈ (u, v) is one of the equations determining Q ϕ , then s·X = (u , v ) is another equation whenever (u, v)γ = (u , v ) for some γ ∈ SL 2 (Z).

Corollary 2.10
The vector space of strictly meromorphic Jacobi forms of some weight k, index M and poles (τ , z) only in finitely many fixed hyperplanes of the form Proof Recall that the th Taylor coefficient of a Jacobi form is a quasimodular form of weight k + | |. Therefore, the multiplicity at a pole is bounded by the weight k. Now, writing s i · z ∈ u i τ − v i + L τ for the hyperplanes in the statement, indexed by i ∈ I, we find that the function ϕ(z) i∈I (s i · z − u i τ − v i ) k is a weak Jacobi form with weight and index uniquely determined by ϕ and the s i . The statement now follows directly from the finite-dimensionality of the space of weak Jacobi forms of fixed weight and index.

An approximation lemma
In this section, we prove the approximation properties that were used in the proof of Proposition 2.9(ii). That is, we prove a result indicating when for given X, Y ∈ M n,2 (R), there exists a γ ∈ SL 2 (Z) such that Xγ lies arbitrarily close to Y . For Z ∈ M n,m (R), write Z for the distance to the closest integer matrix, i.e.
We are interested in conditions on X and Y such that Y is SL 2 (Z)-approximable by X. For example, in case n = 1 a sufficient (but not necessary) condition is given by X / ∈ M 1,2 (Q): μ). First of all, if λ/μ is irrational, then the stronger statement that the orbit of (λ, μ) under SL 2 (Z) lies dense in R 2 holds (see e.g. [18]). Also, if μ = 0 the orbit of (λ, μ) lies dense in R 2 /Z 2 whenever λ is irrational. From now on, we assume both λ and μ are irrational, but with rational ratio. Then, Note that the matrix on the right-hand side parametrizes N −1 (Z ∧ Z), where N is the denominator of λ/μ and Z ∧ Z denotes the subset of Z 2 consisting of coprime integers.
As μ is irrational, we conclude that the orbit of (λ, μ) under SL 2 (Z) lies dense in R 2 /Z 2 . Hence, if λ or μ is irrational, then SL 2 (Z)-approximability of Y by X holds.
If we replace SL 2 (Z) by M n,m (Z), there is a renowned criterion for when X approximates Y [15].

Theorem 2.13 (Kronecker's theorem on Diophantine approximation) For X, Y ∈ M n,m (R) it holds that
This is almost the result we are looking for, except that we want to replace M 2 (Z) by SL 2 (Z). If we were instead considering the action of SL n on M n,2 (R), the results of, for example, [17] would suffice. The action of SL 2 (Z) on M 1,2 (R) is dealt with in, for example, [13,18]. The latter work already hints at the fact that the condition (12) should be altered if one replaces M 2 (Z) by SL 2 (Z). Namely, if λ, μ are coprime integers, then (λ, μ)γ is a vector of coprime integers for all γ ∈ SL 2 (Z). Hence, if X = ( 1 2 , 1 3 ), then (0, 0) is not in the orbit of X for SL 2 (Z), although it is in the orbit of X for M 2 (Z). Observe that in this case the smallest s ∈ Z ≥1 for which s · (0, 0) ∈ Z 2 does not equal the smallest s ∈ Z ≥1 for which s · X ∈ Z (i.e. 1 = 6), which is formalized in (14).
For almost all X = (λ, μ) ∈ M n,2 (R) we have that 1, λ 1 , . . . , λ n , μ 1 , . . . , μ n are linearly independent over Q. In this case, and, more generally, for generic X defined below, we show one has a Diophantine approximation theorem for SL 2 (Z). Definition 2.14 Given X ∈ M n,2 (R), we say X is generic when there are α, β ∈ Z such that for all s ∈ Z n with s = 0 one has For s ∈ Z n and X ∈ M n,2 (R) with s = 0 and s · X t ∈ Z 2 , we write for the greatest common divisor of the entries of s and s · X.
Proposition 2.15 (Partial result on Diophantine approximation for SL 2 (Z)) Let X, Y ∈ M n,2 (R). Then, if X is generic one has Conversely, if (13) holds, then for all non-trivial s ∈ Z n for which s · X ∈ Z 2 one has that Proof Suppose that s ∈ Z n is such that s · X ∈ Z 2 (as in the second part of the statement).
Choose γ 0 ∈ SL 2 (Z) such that its first column is given by (α, β) t and write Xγ 0 = (λ,μ). By construction,λ = αλ + βμ. Hence, by Kronecker's theorem we find infinitely many b ∈ Z such that where we denoted Y = (ν, ξ). Suppose for all such b there exists a non-trivial s(b) ∈ Z n such that s(b) · (bλ +μ) ∈ Z. Note that there exist finitely many integers contradicting our assumption that X is generic. Hence, for a suitably chosen b ∈ Z both (15) holds and there exists a c ∈ Z such that c(bλ +μ) +λ − ν < .
Remark Condition (14) is necessary for SL 2 (Z)-approximability of Y by X. Whether this condition also suffices, or, if not, how it should be strengthened to a necessary and sufficient condition remains an open problem.

Quasi-Jacobi forms
Consider the real-analytic functions ν : h → C and ξ : h × C → C, given by These functions almost transform as a Jacobi form:

Definition 2.16
Let k ∈ Z, M ∈ M n (Q). Denote by C n a subspace of all strictly meromorphic functions h × C n → C. An almost Jacobi form of rank n, weight k, index M and analytic type C n satisfies: z 1 ), . . . , ξ (τ , z n )]; (ii) | k,M g = for all g ∈ J n .

Definition 2.17
A quasi-Jacobi form ϕ is the constant term with respect to ν and ξ of an almost Jacobi form. If C n equals Hol M n , Hol n or Mer M n , ϕ is a holomorphic, weak or strictly meromorphic quasi-Jacobi form, respectively. We write J hol , J weak and J sm for the algebras of holomorphic, weak, and strictly meromorphic quasi-Jacobi forms.
As a first example, quasimodular forms are quasi-Jacobi forms of rank n = 0. More interestingly, the functions are almost strictly meromorphic Jacobi forms of index 0 and weight 2 and 1, respectively. Hence, E 2 and E 1 are strictly meromorphic quasi-Jacobi forms. Observe that which reminds one of Remark Let be the meromorphic almost Jacobi form corresponding to ϕ and write Making use of the algebraic independence of ν and ξ over the field of meromorphic functions, we find ϕ ∈ J sm precisely if ϕ ∈ Mer M n and there exist a finite number of ϕ i,j ∈ Mer M n , indexed by a subset of Z ≥0 × Z n ≥0 , satisfying These are equations (8) and (9) in the Introduction. (Recall that for vectors a ∈ C n , b ∈ Z n we write a b = r a b r r .) The strictly meromorphic quasi-Jacobi forms e 2 and E 1 play a central role as building blocks of quasi-Jacobi forms out of Jacobi forms. For convenience, we introduce the following alternative normalizations Quasi-Jacobi forms are not invariant under the action of the Jacobi group. However, the fact that an almost Jacobi form is a polynomial in ν and ξ implies that a quasi-Jacobi form transforms "up to a polynomial correction" as a Jacobi form, or, equivalently, that it is a polynomial in the strictly meromorphic quasi-Jacobi forms e 2 (τ ) and A(τ , z) with Jacobi forms as coefficients.
Proof We define the coefficients ψ i,j by the expansion of the almost Jacobi form corresponding to ϕ, i.e.
(τ , z) =: Note that e 2 (τ ) + ν(τ ) 2π i and A(τ , z r ) + ξ (τ , z r ) transform as Jacobi forms. Moreover, they are algebraically independent over the space of all meromorphic functions. Hence, it follows that the coefficients ψ i,j are strictly meromorphic Jacobi forms. The constant term with respect to i and j, by definition equal to ϕ, is now easily seen to be equal to the right-hand side of (16).
Remark From (17) it follows that the ϕ i,j are quasi-Jacobi forms related to the ψ i,j by where j + j j := r j r + j r j r .
Also, note that given a representation for ϕ as in (16) Proof Choose an ordering on Z n+1 respecting the ordering on Z. Given a Jacobi form ϕ, let (i, j) be maximal (with respect to this ordering) for which ϕ i,j in Proposition 2.18 exists and is nonzero. A direct check using the same proposition shows that ϕ minus a multiple of D j 0 τ D j 1 z j 1 · · · D j n z jn ϕ i,j is a quasi-Jacobi form for which this maximal index is smaller. Here, as M is positive definite, this multiple is nonzero.

Action of the Jacobi Lie algebra by derivations
The last proposition depended on the derivations D τ and D z i . Here, we study natural derivations on the space of quasi-Jacobi forms. Given a quasi-Jacobi form ϕ, recall the quasi-Jacobi forms ϕ i,j (see Equations (8) and (9) or the previous section) are defined for (i, j) in a finite index set I with I ⊂ Z × Z n . By convention, we let ϕ i,j := 0 if (i, j) / ∈ I.

Definition 2.22
Let δ τ and δ z i be the derivations on the space of quasi-Jacobi forms given by ϕ → ϕ 1,0 and ϕ → ϕ 0,e i , respectively (with e i the standard ith basis vector of R n ).
Observe that the functions ϕ i,j are given by Now, a key observation for the rest of this work is that the transformation behaviour of ϕ is uniquely determined by the action of the operators δ i τ δ j z on ϕ. In particular, the transformation behaviour of the Taylor coefficients of ϕ-which are quasimodular forms-is determined by the action of δ i τ on these coefficients. In the next section, we investigate how the transformation behaviour of a quasi-Jacobi form determines the transformation of its Taylor coefficients, and vice versa, by studying the action of these derivations.
Remark Writing ϕ as in (16) yields The operators D τ , D z i , δ τ and δ z i are part of a Lie algebra of operators acting on quasi-Jacobi forms by derivations, as we explain now. Following a suggestion by Zagier, we consider the notion of a g-algebra for any Lie algebra g, defined as follows.

Proposition 2.24 The algebra of quasi-Jacobi forms is a j-algebra, i.e. the algebra of derivations D τ , D z i , δ τ , δ z i , W and I ij is isomorphic to j and acts on the space of quasi-Jacobi forms.
Remark More concretely, the commutation relations of (i) the modular operators, (ii) the elliptic operators and (iii) their interactions are given by The other commutators vanish. As the spaces of almost Jacobi forms and quasi-Jacobi forms are isomorphic, the same result holds for almost Jacobi forms when one replaces δ τ by 2πi ∂ ∂ν and δ z by ∂ ∂ξ(z) .

The double slash operator
A holomorphic Jacobi form has two important representations: the theta expansion and the Taylor expansion. We generalize the Taylor expansion to strictly meromorphic quasi-Jacobi forms in such a way that the Taylor coefficients are quasimodular forms. Moreover, we give criteria based on the coefficients in these representations for a meromorphic function to be a quasi-Jacobi form. Given a Jacobi form ϕ and X ∈ M n,2 (Q), the Taylor coefficients of (ϕ|X)(z) around z = 0 are quasimodular forms for the group where ρ and ζ X,X are defined by (10). In contrast to Jacobi forms, it is not true that the Taylor coefficients of quasi-Jacobi forms are quasimodular. Namely, as stated the Introduction, for X = (λ, μ) ∈ M n,2 (Q) one has that ( |X|γ )(τ , z) equals-up to the multiplicative constant ρ(X)ρ(−Xγ )- for all γ ∈ X . All but the last term − λ cτ +d ( |X)(τ , z) of (19) depend polynomially on c cτ +d , so that the Taylor coefficients of ( |X)(τ , z) at z = 0 are not transforming in accordance with the quasimodular transformation formula. Note that this last term can be written as −λ ( |X| 0 γ )(τ , z). Here, it should be noted that the weight 0 in the slash operator is unusual. Namely, is of weight −1, whereas is of weight 0. In conclusion, the function |X + λ |X rather than |X transforms as a quasi-Jacobi form of weight 0, i.e. for γ ∈ X one has We now introduce the double slash action (ϕ X) for any quasi-Jacobi form ϕ and all X ∈ M n,2 (R). In the next section, we will use this notation to define the Taylor coefficients of ϕ at X.

Definition 2.25
Given M ∈ M n (Q) and a family of functions ϕ 0,j : h × C n → C indexed by a finite subset of Z n ≥0 (with ϕ := ϕ 0,0 ), define the double slash operator by where ρ is given by (10).

Convention 2.26
In case ϕ is a quasi-Jacobi form, in this definition, we always take the family ϕ 0,j determined by the elliptic transformation (16).

Proposition 2.27
Given a family of functions ϕ i,j : h × C n → C indexed by a finite subset of Z ≥0 × Z n ≥0 (with ϕ = ϕ 0,0 ) and X ∈ M n,2 (R), one has (i) If ϕ satisfies the quasimodular transformation (8) for , then for all γ ∈ . (ii) If ϕ satisfies the quasi-elliptic transformation (9), then for all X ∈ M n,2 (Z), where the root of unity ζ X,X is defined by (10).
(iii) If ϕ is a quasi-Jacobi form for SL 2 (Z), then ϕ X is a quasi-Jacobi form for X , and ϕ (X + X ) = ρ(−X ) ζ X,X ϕ X for all X ∈ M n,2 (Z).
Proof The transformation of ϕ X under the Jacobi group follows by direct computations. We often make use of where (as before) j + j j = r j r + j r j r .
The first property follows from the following: For the second property, observe that from which it is clear that ζ X ,X ϕ X X = ζ X,X ϕ X X. Moreover, by the elliptic transformation Next, one has Finally, the fact that ϕ X is a quasi-Jacobi form follows directly from the definition of X and the previous properties.

Taylor coefficients
Let X = (λ, μ) ∈ M n,2 (Q), M ∈ M n (Q) and ϕ ∈ Mer n . We now study the Taylor coefficients of ϕ M X around z = 0. In case ϕ is a strictly meromorphic quasi-Jacobi form, recall that all poles z lie on hyperplanes of the form s · z ∈ uτ + v for some s ∈ Z n and u, v ∈ Q/Z by Theorem 1.6. From now on, we assume that s = e i for some i so that a Laurent series of ϕ X of the form 1 ≥L · · · n ≥L a 1 ,..., n (z 1 − λ 1 τ − μ 1 ) 1 · · · (z n − λ n τ − μ n ) n for some L ∈ Z and a ∈ C exists. For example, the poles of all the meromorphic quasi-Jacobi forms we encounter in the applications lie on the coordinate axes.

Definition 2.28
We call the poles of a meromorphic function ϕ : h × C n → C orthogonal if the set of poles of ϕ(τ , ·) is given by a union of special hyperplanes of the form z j ∈ uτ + v for some j ∈ {1, . . . , n} and u, v ∈ Q/Z.
Making use of the notions of orthogonal poles (defined above) and the double slash action (defined in Definition 2.25), we will now define the "Taylor coefficients" of a family of functions in the following way. Recall that in case ϕ is a Jacobi form, there is a canonical choice for the family of functions ϕ which is part of the data of these "Taylor coefficients" (see Convention 2.26).

Definition 2.29
Let M ∈ M n (Q) and ϕ = {ϕ i,j }, where ϕ i,j : h × C n → C is a family of meromorphic functions indexed by a finite subset of Z ≥0 × Z n ≥0 , with ϕ := ϕ 0,0 ∈ Mer M n such that all poles of ϕ are orthogonal. Define g (ϕ) as the th Laurent coefficient of ϕ: For all X ∈ M n,2 (R), we define the th "Taylor coefficient" g X (ϕ) of ϕ as g (ϕ M X). Also, denote We often omit r, s or X from the notation if r = 0, s = 0 or X = (0, 0).

Remark • The functions g X,r
,s (ϕ) naturally appear if one studies the action of δ τ on the "Taylor coefficients" g X (ϕ) of ϕ.
• In case r = 0, one may be tempted to write However, we do not assume that the functions ϕ i,j admit orthogonal poles, so the Taylor expansion of ϕ i,j may not exist. For example, taking ϕ = F 2 (defined by Definition 1.1), we will see later that ϕ 0,e 1 (z 1 , z 2 ) = 1 (z 1 +z 2 ) , which has a pole whenever z 1 + z 2 = 0. Theorem 2.33 implicitly shows that the notation g X,r ,s (ϕ) is well-defined for a quasi-Jacobi form ϕ with all poles orthogonal.
The data {g X (ϕ)} uniquely determine ϕ as well as the family ϕ = {ϕ i,j }. Hence, it is natural to ask under which conditions on g X (ϕ) the function ϕ is a meromorphic quasi-Jacobi form. Before we answer this question, we study the modular properties of g X (ϕ) given ϕ is a quasi-Jacobi form. As a corollary of the previous proposition on ϕ X, generalizing [9, Theorem 1.3] to quasi-Jacobi forms, we first show that g X 0 (ϕ) is a quasimodular form in case ϕ is holomorphic.

Corollary 2.30 Let ϕ be a holomorphic quasi-Jacobi form of weight k and index M.
For all X ∈ M n,2 (Q), the function g X 0 (ϕ) is a holomorphic quasimodular form of weight k for the group X (defined by (18)). Moreover, Proof Let X ∈ M n,2 (Q) and γ ∈ X . Then, by Proposition 2.27(2.27) one finds where ϕ i denotes the family corresponding to ϕ i,0 . Holomorphicity in h and at infinity follows directly as ϕ is a holomorphic Jacobi form. Hence, g X 0 (ϕ) is a quasimodular form for this group and δ r τ g X 0 (ϕ) = 1 r! g X 0 (ϕ r ) = g X 0 (δ r τ ϕ).
In the above corollary, observe that if ϕ is a true Jacobi form (rather than a quasi-Jacobi form), then δ τ ϕ = 0. Correspondingly, in that case δ τ g X 0 (ϕ) = 0 and g X 0 (ϕ) is a true modular form (rather than a quasimodular form).
The quasimodularity of the other coefficients g X (ϕ) can be understood in terms of lower coefficients in two ways. First of all, certain linear combinations of derivatives of these coefficients are modular. Secondly the action of δ i τ on g X (ϕ) can be expressed in terms of other coefficients.
We first show that these two ways are equivalent. Recall that (x) n denotes the Pochhammer symbol (x) n = x(x + 1) · · · (x + n − 1).

Proposition 2.31
Let g = g k , g k−2 . . . , g k−2p be quasimodular forms of depth at most p and weight k, k − 2 . . . , k − 2p, respectively. Then, the following are equivalent: Let k = 2p, i = p−1 and take m = p−i, i.e. m = 1. Then, the numerator (k −2i −m−1) m vanishes. Moreover, for these values of k, i and m, the function g k−2i−2m is a modular form of weight 0. Hence, it is a constant function. Therefore, also the numerator D m τ g k−2i−2m vanishes in this case. One can think of e 2 as being the appropriate regularization of the corresponding ill-defined ratio.
Observe that in the third equivalence we replaced D τ by D τ + e 2 , in which case the corresponding numerator never vanishes. If one would replace D τ by e 2 , one would obtain a generalisation of the functions ϕ n of [4, Proposition 3.1].
Proof Assume that (2.31) holds. Define g k−2p−2 := 0. Then, using [δ τ , D τ ] = W (as follows from Proposition 2.24), it follows that applying δ τ to a term in the sum in (2.31) yields where the second term is taken to be zero when m = 0. Also the first term vanishes when m = p − i as g k−2p−2 is set to be zero. Hence, after applying δ τ the sum becomes a telescoping sum, equal to zero. Also δ τ (g 2 − e 2 g 0 ) = g 0 − g 0 = 0. The third statement follows from the first by the same argument, mutatis mutandis. Conversely, the first statement follows inductively from the second (or third) by using that all but two terms in the same sum, which is equal to zero, cancel. Hence, these terms are equal.
Inspired by the above result, we now also introduce certain linear combinations which later turn out to be modular. Recall (x) n = x(x+1) · · · (x+n−1) denotes the Pochhammer symbol.

Definition 2.32
Let k ∈ Z, M ∈ M n (Q), ϕ ∈ Mer M n and a family ϕ as before. For ∈ Z n and X ∈ M n,2 (Q) with k + | | ≥ 0, the functions ξ X (ϕ)(τ ) : h → C are defined by Abbreviate ξ X (ϕ) by ξ (ϕ) if X is the zero matrix.
Remark We formulate all results below for ξ X (ϕ) as defined above, but by Proposition 2.31 all results remain valid after replacing ξ X (ϕ) by Note that this equation, as well as Eq. 20, can be inverted, expressing ξ X m (ϕ) as linear combination of derivatives of certain g X (ϕ). Now, we have completed the full set-up for the main results on Taylor coefficients of quasi-Jacobi forms. In the first theorem, we characterize when a family of meromorphic functions is invariant under the quasimodular action in terms of its Taylor coefficients, generalizing [9, Theorem 3.2]: Theorem 2.33 Let be a congruence subgroup, k ∈ Z and M ∈ M n (Q). As before, let ϕ = {ϕ i,j } be a family of meromorphic functions h × C n → C with ϕ := ϕ 0,0 ∈ Mer M n and admitting a Laurent expansion around z = 0. Then, the following are equivalent: (i) The function ϕ satisfies the quasimodular transformation (8) Proof Expanding (8) yields Extracting on both sides the coefficient of z yields Also, the coefficient g (ϕ) is holomorphic in h as well as at the cusps of , because of the analytic properties of the functions ϕ i,j . Hence, the first statement is equivalent to the second. The equivalence of the second to the third follows from Proposition 2.31.
Sometimes one is interested in comparing the action of δ τ on some quasi-Jacobi form ϕ with the action of δ τ on the Taylor coefficients of ϕ. By expanding the equality in (2.33) above we find that the action of δ τ on the Taylor coefficients of ϕ corresponds to the action of B M (z, z) + δ τ + j z j δ z j on ϕ. In [20, Proposition 2(ii)] an analogous result for the Fourier coefficients of a weakly holomorphic quasi-Jacobi form is derived.

Corollary 2.34 If ϕ = g (ϕ)(τ ) z is a strictly meromorphic quasi-Jacobi form, then
One can characterize a quasi-Jacobi form ϕ by its Taylor coefficients in three ways: by considering g X (ϕ) as a vector-valued quasimodular form, by the modularity of the functions ξ X (ϕ), and, finally, by the action of δ τ on the quasimodular form g X (ϕ). Write f X for g X (ϕ) or ξ X (ϕ). Then, the 'elliptic transformation' of the (quasi)modular form f X is given by Recall that g X (ϕ) and ξ X (ϕ) are only defined when the zeros of ϕ are orthogonal (see Definition 2.28) and depend on a family of functions ϕ i,j : h × C n → C. Moreover, recall that in case ϕ is a quasi-Jacobi form by Convention 2.26 this family ϕ = {ϕ i,j } determines the transformation of ϕ. Theorem 1.7 follows from the following result.

(i) The function ϕ is a strictly meromorphic quasi-Jacobi form of weight k and index M for which the functions ϕ i,j determine its transformation behaviour as in
(ii ) For all X ∈ M n,2 (Q) the function g X (ϕ) is a vector-valued quasimodular form satisfying (21) for = 0 and transforming as (iii) For all ∈ Z n the functions ξ (ϕ) are modular forms of weight k + | | for SL 2 (Z) and for all X ∈ M n,2 (Q) the functions ξ X 0 (ϕ) satisfy (21). (iii ) For all X ∈ M n,2 (Q) and ∈ Z n the functions ξ X (ϕ) in (20) are modular forms of weight k + | | for X and satisfy (21). (iv) For all X ∈ M n,2 (Q) and ∈ Z n the functions g X (ϕ) are quasimodular forms of weight k + | | for X , satisfying (21) and Proof (2.35) implies (2.35): Let X ∈ M n,2 (Q) and γ ∈ X be given. By Proposition 2.27 the function ϕ X satisfies the conditions of Theorem 2.33 for = X . Moreover, by the same proposition (21)  Observe that X = SL 2 (Z) for X equal to the zero matrix. Hence, we simply forget some of the properties of ξ X .
(2.35) implies (2.35 ): As ξ is a modular form for SL 2 (Z) for all ∈ Z n , it follows by Theorem 2.33 that ϕ satisfies the quasimodular transformation for all γ ∈ SL 2 (Z). As by Proposition 2.27 the result follows by extracting the coefficients of z on both sides. Finally, note that ξ X 0 = g X 0 . Let ϕ i be the family of functions corresponding to ϕ i,0 . Using (2.35), for γ ∈ SL 2 (Z) one has that On the other hand, Combining the identities yields As both sides equal ρ(Xγ ) g X 0 (ϕ), which is periodic with finite period as a function of λ, the constant terms with respect to λ agree. Hence, for all X = (λ, μ) ∈ M n,2 (Q) with X not corresponding to a pole. Therefore, ϕ satisfies the quasimodular transformation for all z of the given form. As (Q n τ × Q) n \ P ϕ , with P ϕ the set of poles of ϕ, lies dense in C n for all τ ∈ h, the function ϕ satisfies the quasimodular transformation equation.
For the elliptic transformation, we again assume z = λτ + μ, with X = (λ, μ) ∈ M n,2 (Q), is not a pole of ϕ. Given X = (λ , μ ) ∈ M n,2 (Z), by Definitions 2.29, 2.25 and Proposition 2.3 we have The coefficients of λ agree, so for all z of the given form. As before by continuity of ϕ the above equation holds for all z.
Remark The proof of the above result also applies to weak Jacobi forms, after replacing 'strictly meromorphic Jacobi form' and '(quasi)modular' by 'weak Jacobi form' and 'weakly holomorphic (quasi)modular', respectively.
Specializing to holomorphic Jacobi forms (instead of meromorphic quasi-Jacobi forms), we obtain the following result, generalizing the main results on Taylor coefficients of Jacobi forms in [9] to multivariable Jacobi forms. (ii ) For all X ∈ M n,2 (Q) the function g X (ϕ) is a vector-valued quasimodular form satisfying (21) for = 0 and transforming as (iii ) For all X ∈ M n,2 (Q) and ∈ Z n the functions ξ X (ϕ) given by ξ X (ϕ) = r (−1) r D r τ g X,r (ϕ) (k + | | − 1) r r! are modular forms of weight k + | | for X and satisfy (21).

Quasimodular algebras for congruence subgroups
The main result of the previous part, Theorem 2.35, will almost immediately imply the proof of Theorem 1.2 on the quasimodularity of the elements of * (N ) for some subgroup. We will first introduce a more general set-up, in the context of which we will present this proof. In the rest of this section, we provide many examples of algebras of functions on partitions to which this general set-up applies, i.e. we will recall the hook-length moments and the (double) moment functions and explain how the corresponding algebras can be extended to several congruence subgroups.

General set-up
We answer the question of how to extend an algebra of functions on partitions for which the q-bracket is a quasimodular form for SL 2 (Z) to one for a congruence subgroup . More precisely, we consider quasimodular algebras for .
Definition 3.1 A quasimodular algebra for a congruence subgroup ≤ SL 2 (Z) is a graded algebra of functions f : P → C for which f q is a quasimodular form for of the same weight as f .
Given a quasimodular algebra for SL 2 (Z), we now present a construction of a quasimodular algebra for a congruence subgroup. To do so, from now on we assume that : P × C r → C and k ∈ Z are such that for all n ≥ 1 the function ϕ n : h × M n,r (C) → C given by where Z i is the ith row of Z, is a meromorphic quasi-Jacobi form of weight kn which admits a Laurent expansion around all Z ∈ M n,r (Q) (after identifying M n,r (C) with C nr ). Here, (λ, z) can be thought of a generalisation of the generating series W λ (z) of the Bloch-Okounkov functions Q k , defined by (2). Definition 3.2 Given such a , for a ∈ Q r denote by f (·, a) = f (·, a): P → C the th Taylor coefficient of (z) around z = a, i.e.
Define the graded Q-algebra F (N ) = F(N ) as the algebra generated by the weight k +| | elements f (·, a) for a ∈ 1 N Z r , ∈ Z r .
Remark By Theorem 2.35, up to a sign, f m (·, a) and f m (·, b) agree whenever a − b ∈ Z r . Hence, in the definition one can assume that a ∈ [0, 1) r .
For example, letting be the Bloch-Okounkov generating series W , we find Q +1 (a) = e(− 1 2 a) f W (a) (see 4) and * (N ) = F W (N ). Now we relate the Taylor coefficients of to the Taylor coefficients of the corresponding meromorphic quasi-Jacobi forms ϕ n . Let L ∈ M n,r (Z) and A ∈ M n,r (Q). An arbitrary monomial f L in F (N ) is given by with L i and A i the ith row of L and A, respectively. Recall that g X (ϕ) denotes the th Taylor coefficient of ϕ around λτ + μ; see Definition 2.29. By construction of these Taylor coefficients, we find where on the right-hand side we identified M n,r (Z) and M n,r (Q) with Z nr and Q nr , respectively. 4 Recall that for N ∈ Z, we write m N = N 0 0 1 . The following result is the general statement of Theorem 1.2.  (23), for some L ∈ M n,r (Z) and A ∈ M n,r (Q). Write X = (0, A). Then, f L (A) q = g X L (ϕ n ). This Taylor coefficient is quasimodular for X by Theorem 2.35. Therefore, it suffices to show that the q-bracket respects the weight grading of F(N ) and that X contains m −1 For the first, observe that the weight of f is given by n i=1 (k + |L i |), whereas correspondingly the weight of g X L (ϕ) equals kn + |L| (here |L| = i,j L ij ). Write M for the index of ϕ n and B = B M for the corresponding bilinear form. Recall Observe that 2N 2 B(A, A) is integral. Hence, if γ ∈ SL 2 (Z) satisfies then γ ∈ X . Let N ∈ Z >0 . Then, In case 2 N , the conditions (24) are satisfied for all γ ∈ m −1 For a monomial element f L (A) as in (23) with L ∈ M n,r (Z) and A ∈ M n,r (Q), and γ ∈ 1 (N ) one has that where B is again the bilinear form corresponding to the index of ϕ n . Hence, restricting to A ∈ M n,r (Q) Q nr for which e((c 2 − cd + (d − 1) 2 ) B(A, A)) = 1 for all γ ∈ 1 (N ), we find the following result. This result allows us to derive Theorem 1.3, using some additional properties of the Bloch-Okounkov n-point functions. Proof This follows from (25) using the following two observations. First of all, Secondly, for integers c, d the integer c 2 − cd + (d − 1) 2 is always even whenever not both c and d are even.
In the Introduction, we introduced certain functions Q (p) k introduced in [12]. In that work the authors let Observe that for primes p this agrees with the definition in (6) in the Introduction. Similarly, we define functions f d in terms of the Taylor coefficients f (a). Definition 3.5 Let be as above. Given d ∈ Z r >0 , we let Define the graded algebra F (N ) = F (N ), as the Q-algebra generated by the functions f d, for all ∈ Z r and d ∈ Z r >0 for which d i | N for all i.
Then, Theorem 1.4 follows directly from the following result.  , μ). Note that h r is zero for all but finitely many r.
The rest of this part is devoted to providing examples of quasimodular algebras of higher level, using Theorem 3.6.

First application: the Bloch-Okounkov theorem of higher level
The results on the Bloch-Okounkov algebra, as stated in the introduction, are proven in this section. The proofs follow almost immediately from the results in the previous section using the properties of the Bloch-Okounkov n-point functions.
Recall the Bloch-Okounkov n-point functions F n are defined (in Definition 1.1) as follows. For all n ≥ 0, let S n be the symmetric group on n letters and let  Proof We start with the observation that for all n ≥ 0 the function (n) (z) (z) is a true meromorphic Jacobi form (of weight n and index B(z, z) = 0), in contrast to (z) itself which is weakly holomorphic. Namely, all poles are given by z ∈ Zτ +Z and for z = aτ +b with a, b ∈ Q, one has that (n) (aτ + b) whenever Imτ → ∞, or equivalently q → 0. Next, observe that (z 1 + . . . + z n ) V n (z 1 , . . . , z n ) can be written as a polynomial of weight n − 1 in (i) (z 1 +...+z j ) (z 1 +...+z j ) for i, j = 1, . . . , n; a fact which can be proven inductively by its recursion (3). Hence, (z 1 + . . . + z n ) V n (z 1 , . . . , z n ) is a meromorphic Jacobi form. As (z) −1 is a meromorphic Jacobi form of weight 1 and index given by the bilinear form B(z, z) = − 1 2 z 2 , we conclude that F n is a meromorphic quasi-Jacobi form of weight n and index B(z, z) = − 1 2 |z| 2 .
Observe that Theorem 1.2 is a direct corollary of the previous lemma and Theorem 3.3. Also, Theorem 1.4 follows directly from the previous lemma and Theorem 3.6. So, we are only left with the following proof.
Proof of Theorem 1.3 First of all, in case a ∈ Z, one has B(a, a) = − 1 2 |a| 2 ∈ 1 2 Z. Hence, the result follows directly from Proposition 3.4.
If a / ∈ Z, for both Q k (a) q and Q 1 (a) q the root of unity in (25) is e(B(a, a)) = e (B(a, a)), so that the subgroup of quasimodularity for their ratio is 1 (N ). For the holomorphicity in the second case, observe that Q 1 (a) q equals (a) −1 up to a constant. Also, Q k (a) q can be written as a product of Taylor coefficients of the function (z 1 + . . . + z n + a) −1 and of (z 1 + . . . + z n + a) F n (z 1 + a 1 , . . . , z n + a n ), the latter Taylor coefficients being holomorphic quasimodular forms. Observe that the Taylor coefficients around z 1 = . . . = z n = 0 of (a) (z 1 + . . . + z n + a) are all polynomials in the holomorphic quasimodular forms (i) (a) (a) . Therefore, Q k (a) q Q 1 (a) q is a holomorphic quasimodular form.

Second application: hook-length moments of higher level
As a second example, consider the hook-length moments where B k is the kth Bernoulli number, Y λ denotes the Young diagram of λ, ξ is a cell in this Young diagram, and h(ξ ) denotes the hook-length of this cell. By [6,Theorem 13.5] one has that H k (λ) is (up to a constant) equal to the (k − 2)th order Taylor coefficient of W λ (z) W λ (−z). In particular, any homogeneous polynomial in the H k admits a quasimodular q-bracket. The results in Sect. 3.1 now specialize to the following statements.
(i). For a ∈ Q and k ∈ Z ≥2 , let Denote by H(N ) the algebra generated by the H k (·, a) with k ≥ 2 and a ∈ 1 N Z. The algebra H(N ) is graded by assigning to H k (·, a) weight k. Let N = (2, N )N .
(for k ≥ 2, these values agree with the constantsα k in the previous example). Denote by S(N ) the algebra generated by the S k (·, a) with a ∈ 1 N Z. Assign to S k (·, a) weight k.
More concretely, for all homogeneous f ∈ H(N ) of weight k, the q-bracket f q is a quasimodular form of weight k for 1 (N ).
Denote by S (N ) the algebra generated by the S t k for which k is even and t | N . Assign to S t k weight k.
More concretely, for all homogeneous f ∈ S (N ) of weight k, the q-bracket f q is a quasimodular form of weight k for 0 (N ).

Fourth application: double moment functions of higher level
As a final example, consider the double moment functions introduced in [22] given by Hence, the 1-point function G 1 is a Jacobi form of weight 1 and index B((z, w), (z, w)) = zw. This example now deviates from the previous ones because T (z 1 , w 1 ) · · · T (z n , w n ) q is not a Jacobi form of some fixed weight (but rather a linear combination of functions of different weights). It is, therefore, that we have to consider a different product on the space of functions of partitions, for which G n (z, w) := T (z 1 , w 1 ) · · · T (z n , w n ) q = (−1) n n i=1 1 2 To define this product consider the isomorphism C P → C[[u 1 , u 2 , . . .]], f → f u , given by Then, the induced product is defined by The algebra T generated by the T k,l contains exactly the same elements as the algebra consisting of polynomials in the moment functions T k,l with multiplication given by the induced product [22]. In Sect. 3.1, one can replace the pointwise product on functions of partitions by the product . Therefore, we have the following generalisations of the algebra T .
(i) For a, b ∈ Q, and k ≥ 0, ≥ 1, let  More concretely, for all homogeneous f ∈ T (N ) of some weight k, the rescaled qbracket f q N , where q N = q 1/ N , is a quasimodular form of weight k for ( N ).

(iii) Let
Denote by T (N ) the algebra generated by the T s,t k, , where k, are even and s, t | N , under the induced product. Assign to T s,t k, weight k + and extend to a weight grading under the induced product. More concretely, for all homogeneous f ∈ H (N ) of weight k, the q-bracket f q is a quasimodular form of weight k for 0 (N 2 ).
Remark Combining this result with Corollary 3.14, by restricting to t = 1, we find that any polynomial in T s,1 k, with respect to the induced product is quasimodular for 0 (N ). A similar statement holds after restricting to s = 1.

When is the q-bracket modular?
We first state and prove our answer to the question in the title of this section in full generality, using the main result on the Taylor coefficients of quasi-Jacobi forms (Theorem 2.35). Afterwards, we provide many examples, i.e. we prove the results on the 'modular subspace' of the Bloch-Okounkov algebra as stated in the introduction, and state similar results for the Bloch-Okounkov algebra for congruence subgroups as well as the algebra of double moment functions.

Construction of functions with modular q-bracket
12 − 2 m,r≥1 m q mr is the quasimodular Eisenstein series of weight 2 and g r−s ,s (ϕ) is a "Taylor coefficient" of ϕ defined by Definition 2.29. Given a quasi-Jacobi form ϕ of weight k satisfying the conditions of Theorem 2.35, the functions are modular forms (see also Proposition 2.31). Therefore, as in the previous section, assume that : P × C r → C and k ∈ Z are such that for all n ≥ 1 the function ϕ n : h × M n,r (C) → C given by where Z i is the ith row of Z, is a meromorphic quasi-Jacobi form of weight kn which admits a Laurent expansion around all Z ∈ M n,r (Q) (after identifying M n,r (C) with C nr ). Write F = F (1) for the graded algebra of Taylor coefficients of (see Definition 3.2). Given ∈ Z n , our aim is to find h ∈ F such that h q = ξ (ϕ n ), i.e. we want to determine a pullback of ξ (ϕ n ) under the q-bracket. Observe that these pullbacks h for all define a unique linear map F → F so that π(f ) = h . Note that in this case π(f ) q is modular for all f ∈ F. To define π, assume the algebra F satisfies the following two properties: There is a linear operator D acting on F such that where D is extended to a linear operator on F[[z 1 , . . . , z n ]] by D(f z ) = D(f ) z for all f ∈ F and ∈ Z n .
Remark As observed in [25], by an easy computation one finds that the function Q 2 makes the q-bracket equivariant with respect to the operator D τ + e 2 , i.e. Q 2 f q = (D + e 2 ) f q for all f : P → C. This motivates the first condition. The second condition is motivated by noting that Recall that the algebra F = F (1) is generated by the Taylor coefficients f = f (0) of for ∈ Z r . An arbitrary monomial f L in F is given by f L 1 · · · f L n with L ∈ M n,r (Z). We define an operator on F corresponding to the index of ϕ.
Remark For the Bloch-Okounkov algebra * the mapping π turns out to be the canonical projection of * on H in [21] and M = H. We do not expect that the conditions in this section ensure that π is a projection in general, nor that π(Q 2 F) = {0} (in which case one could choose M = π(F )), nor that the splitting in (4.2) is canonical. However, once one has chosen M it follows immediately from (4.2) that every element of F has a canonical expansion with f i ∈ M, and that f q ∈ M precisely if f i q = 0 for all i > 0.
Proof By (31) and by construction of M , one has that 1 s! M r−s D s f q = g r−s ,s (ϕ) . Hence, where ϕ is the meromorphic Jacobi form ϕ(z) = ϕ n (z) = n i=1 (z i ) q . Hence, π(f ) is modular under the q-bracket for all f ∈ F.
Choose M 0 ⊆ F such that F = M 0 ⊕ Q 2 F. Then, we take M = πM 0 . As, by definition, π(f ) − f is a multiple of Q 2 , the first property follows. The second property is immediate as M ⊆ π(F ). For the last property, let f ∈ Q 2 F with f q ∈ M be given. As f is divisible by Q 2 , the q-bracket f q is in the image of D + e 2 acting on quasimodular forms. Now, the zero function is the only function in the image of D+e 2 which is modular, so that the last property follows.
We now provide several examples of quasimodular algebras to which Theorem 4.2 applies.

First example: the Bloch-Okounkov algebra
To apply the results of the previous section to the Bloch-Okounkov algebra * , we have to understand how the operators δ τ and δ z i act on the n-points functions F n (defined by Definition 1.1), or equivalently, we have to understand the transformation behaviour of F n . This behaviour is uniquely determined by the following two properties.
Remark As F n is symmetric in its arguments, above proposition provides an expression for δ z j F n (z 1 , . . . , z n ) for all j.
Proof The second equality is equivalent to [1, Theorem 0.6], whereas the first statement seems not to be in the literature. As both statements follow by more or less the same argument, we give both proofs. That is, we prove = θ (z 1 + . . . + z n+1 ) V n (z 1 , . . . , z i + z i+1 , . . . , z n+1 ).
Next, recall the jth order differential operators D j in [21].

Definition 4.4
Define the jth order differential operators D j by where the coefficient is a multinomial coefficient (in this section we pretend these operators act on * , although formally there are only defined on the formal algebra R = Q[Q 1 , Q 2 , . . .] freely generated by the variables Q 1 , Q 2 , . . ., which admits a canonical mapping to * ).
Define the mapping ∨ as the algebra homomorphism uniquely determined by Q n → n , where the commuting family of operators k of [21] are given by We write (x) − n = x(x − 1) · · · (x − n + 1) for the falling factorial. (iv) M = H, where H is the harmonic subspace of * as in [21].
Proof Equation 33, as well as the fact that π is a projection, follows directly from [21,Corollary 2]. In particular, as 2 (Q 3/2 2 ) = 0, it follows that π(Q 2 f ) = 0. For the properties of M, observe that D and M , defined in the previous section, can also be expressed as D 2 /2 and −∂ 2 /2, respectively. Hence, the properties follow from Theorem 4.2, and the fourth follows as the set {π(Q λ )}, where λ goes over all partitions with all parts at least 3, is a basis for both spaces.

Second example: the Bloch-Okounkov algebra of higher level
To extend the result in the previous section to the Bloch-Okounkov algebras * (N ) of level N (see (5) and Sect. 3.2), we should generalize the operators ∂ and D 2 .

Definition 4.7
Let R = Q[Q k (a) | k ∈ Z ≥0 , a ∈ Q] be the algebra in the formal variables Q k (a) with canonical projection to N ∈Z * (N ). Given a ∈ Q j , define the jth order

Funding Information
Open Access funding enabled and organized by Projekt DEAL.

Data availability statement
Data sharing is not applicable to this article as no datasets were generated or analysed during the current study.