HOLONOMIC RELATIONS FOR MODULAR FUNCTIONS AND FORMS: FIRST GUESS, THEN PROVE

One major theme of this article concerns the expansion of modular forms and functions in terms of fractional (Puiseux) series. This theme is connected with another major theme, holonomic functions and sequences. With particular attention to algorithmic aspects, we study various connections between these two worlds. Applications concern partition congruences, Fricke-Klein relations, irrationality proofs a la Beukers, or approximations to pi studied by Ramanujan and the Borweins. As a major ingredient to a “first guess, then prove” strategy, a new algorithm for proving differential equations for modular forms is introduced.


Introduction
The study of holonomic functions and sequences satisfying linear differential and difference equations, respectively, with polynomial coefficients has roots tracing back (at least) to the time of Gauß. More recently such objects have become fundamental ingredients for the modern theory of enumerative combinatorics; see, for example, the work of Stanley [34]. Concerning the promotion of the algorithmic relevance of these objects, a major role was played by Zeilberger's pioneering "holonomic systems approach" to special functions identities [40].
The ubiquitous nature of holonomic functions and sequences is documented by the numerous examples given in the literature, for instance, in the magnum opus [34]. 1 However, when browsing through Ramanujan's Notebooks [8,9,10,11,12] and Lost Notebooks [3,4,5,6,7], one finds it surprisingly difficult to identify holonomic sequences or functions -apart from classical hypergeometric series having Our article is structured as follows. To make the exposition as self-contained as possible, in Section 2 we present the most important basic facts on modular functions and forms needed. Section 3 does the same for univariate holonomic functions and sequences; an illustrative example is taken from Ramanujan's "Quarterly Reports". Section 4 introduces to one of the major themes, the expansion of modular forms and functions in terms of fractional (Puiseux) series. In Section 5 we present case studies dealing with relations of Fricke-Klein type, irrationality proofs based on modular forms a la Beukers, and approximations to pi which were first discovered by Ramanujan and then extensively studied by Jonathan and Peter Borwein. In Section 6, again with focus on an algorithmic setting, we discuss aspects of a classical connection of modular forms with differential equations. This connection traces back to Gauß and was popularized prominently by Zagier. In addition, we present a brief account 5 of a new algorithm for proving differential equations for modular forms. Beginning with Section 7, we try make the following point: connecting Puiseux expansions for modular functions with holonomic differential equations is of interest for the theory of partition congruences. After an introductory example inspired by Ramanujan's 11 | p(11n + 6) observation, in Section 8 we discuss algebraic relations between modular functions and corresponding issues of computational relevance. In Section 9 the focus is shifted from algebraic relations to differential equations involving modular functions. Choosing Andrews' 2-colored Frobenius partitions, Section 10 presents another case study to illustrate aspects treated in Sections 8 and 9. Linear differential equations with algebraic function coefficients can be transformed into holonomic differential equations. The Appendix Section 11 contains a proof of this fact 6 ; it also comments very shortly on zero-recognition of meromorphic functions on Riemann surfaces. Congruence subgroups Γ are subgroups of SL 2 (Z) which are specified by congruence conditions on their entries. 7 The so-called principal congruence subgroup is 5 Full details are given in [31]. 6 Proposition 6.2 7 More precisely, such Γ is a discrete subgroup of SL 2 (R) which is commensurable with SL 2 (Z) (i.e., Γ ∩ SL 2 (Z) has finite index in Γ and SL 2 (Z)) and Γ(N ) ⊆ Γ for some N . A congruence subgroup Γ is called to be of level N , if Γ(N ) ⊆ Γ and N is minimal with this property. Besides Γ(N ), we need the congruence subgroups

Conventions and Basic Facts: Modular Functions and Forms
There are many refinements, for instance, for positive integers N, M, P such that M | N P : In Section 6.3 we will need Γ(2, 4, 2) together with properties which we retrieve by using the computer algebra system Magma. 8 See also Example 2.6, Example 4.2, and Section 5.3.
Modular forms with weight k = 0 are called modular functions; in this case we write f | γ 0 instead of f | 0 γ 0 . Also if k = 0, the integer n 0 = n 0 (γ 0 ) is called the order of f | γ 0 at infinity; notation: n 0 = ord(f |γ 0 ).

Modular Functions.
For algorithmic zero recognition, modular functions to us are most important. For those, owing to k = 0, we have the invariance f (γτ ) = f (τ ) for all γ ∈ Γ, and the expansions (2) then allow to extend f meromorphically to all the points a/c ∈Q where a/0 := ∞. To this end, the first step is to extend the action of SL 2 (Z) on H to an action onĤ := H ∪Q as already mentioned. Notation: for any congruence subgroup Γ the Γ-orbit of τ ∈Ĥ is written as [τ ] Γ := {γτ : γ ∈ Γ}. We will write [τ ] instead of [τ ] Γ , if the subgroup Γ is clear from the context.
After this first step, the meromorphic extension of a modular function f from H to a function onĤ is done by choosing γ 0 = ( a b c d ) ∈ SL 2 (Z) such that γ 0 ∞ = a/c, and one defines f (a/c) := (f |γ 0 )(∞) := A straightforward verification shows that this definition is independent from the choice of γ 0 . This means, if one chooses another γ 1 ∈ SL 2 (Z) such that γ 1 ∞ = a/c, one would obtain the same value for f (a/c). Moreover, f (a/c) = f (γ a c ) for any γ ∈ Γ. Together with (1), this means, a modular function is constant on all the Γ-orbits [τ ] Γ . The set of all such orbits, denoted by X(Γ), can be equipped with the structure of a compact Riemann surface. Hence a modular function f with respect to Γ can be interpreted as a functionf : X(Γ) →Ĉ; in fact, suchf will be meromorphic.
is a disjoint union of finitely many cusps. Fourier expansions as in (2) are called expansions of f at the cusp [a/c], or simply at a/c. Special attention is given to the case a/c = ∞ (i.e., c = 0). In this case we can exploit the fact that each congruence subgroup contains a translation matrix ±1 N 0 0 ±1 with N 0 ∈ Z >0 minimal; this means, a modular function f satisfying (1) has minimal period N 0 . Suppose for all τ ∈ H with Im(τ ) sufficiently large the Fourier expansion of f at infinity 9 is: In various contexts we need to put emphasis on representing f in the Fourier variable q; in such cases we write Remark 2.1. As mentioned above,Q is a disjoint union of finitely many cusps. As a consequence, if f is a non-constant modular function holomorph on H and with f (a/c) = ∞ for some a/c ∈Q, then f (r) = ∞ for an infinite set of values r ∈Q. In view of (4) this means,f (z) = ∞ for infinitely many z on the complex unit circle |q| = 1. f is a modular function for the congruence subgroup Γ}.
We note that M ∞ (Γ) is a C-algebra; i.e., a ring with multiplication by scalars from C. To prove equality f 1 = f 2 of two modular functions in M ∞ (Γ), it is sufficient to inspect the q-expansion at infinity, and to verify that Notice that in this case f 1 − f 2 ∈ M ∞ (Γ), resp.f 1 −f 2 : X(Γ) →Ĉ, has no pole but a zero at infinity; hence according to (5) it must be a constant.
where for the root one takes the principal branch 10 and with v(γ) being some 24th root of unity depending on γ. For details on ∆ and v(γ) see, e.g., [16,Thm. 5.8.1]. As a consequence of (8) the Delta function is a modular form of weight 12 for SL 2 (Z); i.e., ∆ ∈ M 12 (SL 2 (Z)).
Example 2.5. The most important modular function is the Klein j function, also called modular invariant, Being the quotient of two modular forms in M 12 (SL 2 (Z)), one has that j ∈ M (Γ(1)). Since j has no pole in H, j ∈ M ∞ (Γ(1)); see [16,Sect. 5.7].

Univariate Holonomic Functions and Sequences
An introduction to univariate holonomic theory and related algorithms is given in [22]. 12 In this section we recall only the most fundamental holonomic notions.
To illustrate the main concepts, we apply computer algebra to an example arising in the work of Ramanujan. Further details and proofs of the presented holonomic yoga, can be found found in [22]; related theoretical extensions and applications in enumerative combinatorics can be found in [34].
In the given context we restrict to complex sequences; as a consequence, the p j (X) are from C[X], the ring of polynomials with coefficients in C. The same restriction to C applies to functions.
Proposition 3.1. If y(z) is a formal power series or a function analytic at 0: a(n)z n is holonomic ⇔ (a(n)) n≥0 is holonomic.
We will see many applications below. But first we apply Prop. 3.1 to prove Corollary 3.2. The sequence of partition numbers (p(n)) n≥0 is not holonomic.
Proof. Suppose it is holonomic. Then Prop. 3.1 implies that y(z) := ∞ n=0 p(n)z n is holonomic and would satisfy a differential equation as in (12) with P m (z) = 0, say. As a polynomial, P m (z) has only finitely many zeros; thus any analytic solution to (12) can have only finitely many singularities on its circle of convergence. This gives a contradiction to y(z) = ∞ j=1 (1−z j ) −1 having infinitely many singularities on the complex unit circle.
For the same reason, modular forms and modular functions cannot be holonomic. We restrict to prove an important special case explicitly: Proof. The statement follows from the fact thatf (z) = ∞ for infinitely many z = e 2πiτ on the complex unit circle; see Remark 2.1.
Example 3.4. For fixed n ∈ Z ≥1 consider the power series (13) y(z) := ∞ k=0 a n (k)z k where a n (k) := n (n + 2k − 1)! (n + k)!k! (−1) k , which arose in the work of Ramanujan. Before we point to references, we demonstrate how y(z) can be studied by following the "holonomic paradigm." To this end, as announced in the Introduction, we use a RISC software package written in the Mathematica system. After putting the package in a directory where we open a Mathematica session, we read it in as follows 15 : Package GeneratingFunctions version 0.8 written by Christian Mallinger c RISC-JKU As a hypergeometric sequence (a n (k)) k≥0 is holonomic. This means, the quotient of two consecutive terms is a rational function, a n (k + 1) a n (k) = − (2k + n)(2k + n + 1) (k + 1)(k + n + 1) ; in other words, it satisfies recurrence of order 1.
Hence, by Prop. 3.1, y(z) is holonomic and we use the package to pass from the order 1 recurrence as input, to a differential equation for y(z): From the system's reply we extract that the built-in solver 16 cannot handle a generic positive integer n in this differential equation, so we ask the system to solve special instances of it: We could continue with n = 3, 4, and so on, to collect more data for guessing a closed form for y(z). However, in our context it is more instructive to consider an alternative way to proceed. The output expressions in Out [4] already suggest that y(x) might be an algebraic function (resp. power series); this means, a function (resp. power series) which satisfies a polynomial relation with polynomial coefficients. Connecting to holonomic objects, we have the Proposition 3.5. Any algebraic function (resp. power series) y(z) is holonomic. More concretely, if P (z, y(z)) = 0 for a polynomial P (X, in Y , then y(z) satisfies a homogeneous differential equation of order m as in (12), or an inhomogeneous differential equation of order m − 1 of the form Proof. The proof in [34, Thm. 6.4.6] works the same for our case where P (X, Y ) is not necessarily irreducible.
Example 3.6 (Example 3.4 continued). To obtain a closed form for y(z), our strategy is to apply computer-supported guessing successively for n = 1,2, etc. The procedure to do so, GuessAE, is part of the GeneratingFunctions package. As input we take the first 15 coefficients a n (0), . . . , a n (14) successively fixing n = 1, n = 2, and n = 3. As it turns out, these 15 initial values are sufficient to automatically guess an algebraic equation in each instance: From this data, after solving the quadratic equations and fixing the sign of the solution, the following conjecture becomes evident: Remarks 3.7 (on Example 3.4 and Example 3.6). (i) Using computer-supported holonomic guessing, we derived the closed form representation (15) as a conjecture. On the other hand, by holonomic methods we computed (and thus proved!) the differential equation in Out [2] which is satisfied by y(z) for generic n ∈ Z >0 . 18 Hence the task to prove (15) is trivialized: just take the differential equation and verify that it is satisfied by the right hand side of (15).
(ii) With the GeneratingFunctions package one can automatically obtain from any specific algebraic equation the corresponding differential equation; for example, starting with the relation in Out [8] gives, Up to the factor −(1 + z), this is the case n = 3 of Out [2].
(iii) Identity (15) stems from the first of Ramanujan's "Quarterly Reports"; it is entry (1.12) in [8]. As explained in [8], this identity arose in the context of Ramanujan's "Master Theorem"; Bruce Berndt presents a wonderful account of this theorem, and also tells the story of Ramanujan's reports.

Puiseux Expansions
In this section we present the basic mechanism of Puiseux expansion which will be used to connect holonomic functions and sequences with modular functions and forms.
As a major theme, we will study the following setting. Given a Laurent series, and a power series, ), m ∈ Z ≥1 fixed, find (c(k)) k≥M such that where to define h Expansions as in (16) are called Puiseux series or fractional series. Such expansions always exist, for formal power series as well as for complex functions g and h being meromorphic and holomorphic, respectively, at 0. The coefficients can be computed as follows.
Lemma 4.1. Given g and h as above. Then there exists a sequence (c(k)) k≥M of complex numbers such that Moreover, the c(k) are uniquely determined by To illustrate this kind of Puiseux expansion, we take a classical example from Zagier's classical exposition [39].
Interpreting the Mathematica output, we obtained With the same ease one can compute sufficiently many further values of the c(k) for additional information. For example, using the first 12 values, we can automatically guess a holonomic recurrence for the c(k): The output recurrence tells that where (a) k := a(a + 1) . . . (a + k − 1). Summarizing, on the level of generating functions we have derived the conjecture that 20 Comparing the guessed differential equation to the classical hypergeometric differential equation z(z − 1)y ′′ (z) + ((a + b + 1)z − c)y ′ (z) + aby(z) = 0, which has y(z) = 2 F 1 (a, b; c; z) as a solution, again produces the generating function identity (18).
Using computer algebra, we derived relation (18) as a conjecture. In Section 6 we explain how such identities, once guessed, can be proved routinely in computerassisted fashion. As a concrete example, in Section 6.3 we present a computersupported proof of the equation in Out [18] which, relating back to h = h(τ ) and 20 In [39, (73)] the binomial coefficient 2n n should be replaced by its square; i.e., 2n n 2 . 21 Another option is to transform the recurrence in Out [17] to the desired differential equation by the command RE2DE[Out [17] g = g(τ ) = y(h(τ )), reads as, Remark 4.4. Using the chain rule, the differential equation (19) translates into the differential equation: Despite being linear in the g (k) , the coefficients are not modular forms anymore. 22 Nevertheless, as explained in Section 6, one can overcome this problem by a different processing of the holonomic version (19).

Case Studies: Puiseux Expansions of Modular Forms
In this section we present further examples to illustrate computational aspects.
This means, we obtained As in our first example, we compute further coefficients to produce a guess on their structure. To this end, we input the coefficients from c(0) to c(20) collected in the list cList: In [23]:= cList = {1, 240, 180720, 183321600, 213917180400, . . . }; Now, if we would proceed as in Ex. 4.2, we would need the first 56 coefficients c(k) to guess a differential equation. An algorithmic version of Prop. 3.1 allows us to directly transform the recurrence Out[24] into a differential equation: Without giving this differential equation explicitly, Zagier makes the following comment on this example: "Since g := E 4 is a modular form of weight 4, it should satisfy a fifth order linear differential equation with respect to h(τ ) := 1/j(τ ), but by the third proof above 23 one should even have that the fourth root of E 4 satisfies a second order differential equation, and indeed one finds 12 2 j(τ ) 2 + · · · a classical identity which can be found in the works of Fricke and Klein." Needless to say, that, as above, the corresponding differential equation in a computer-assisted way can be derived (as a guess) and proved (as the example Section 6.3) without any effort. Instead of going through this, we do a square root variation of the problem and determine c(k) such that Again, the coefficients can be computed as follows: The output recurrence Out [36] was guessed by using only the first 12 coefficients; it means that the c(k) form a hypergeometric sequence; more concretely: As hypergeometric series, identities (20) and (21) are related by Clausen's formula; for further details, including relevance of (21) to Calabi-Yau varieties and string theory, see [25].

5.2.
Relations connected to irrationality proofs. The next example is taken from Beukers' modular-form-based proof [14] for the irrationality of ζ(3). Following Beukers, resp. Zagier [39, pp. 63-64] Relating to the setting of Lemma 4.1, m = 1, and we determine As above, the coefficients c(k) can be computed as follows: In [38] This means, To gain further insight into the structure of the c(k), we proceed as above: This guess, recurrence Out[41], was computed by using only the first 21 coefficients. The sequence (c(k)) k≥0 can be defined as a definite hypergeometric sum, which satisfies the same recurrence with the same initial conditions, and which can be proven automatically by using implementations of Zeilberger's holonomic systems approach [40]. This sequence is the celebrated Apéry sequence which, as beautifully described in [35], has played a key role in Apéry's proof of ζ(3) ∈ Q.
According to Prop. 3.1 the recurrence in Out[41] translates into a differential equation for the generating function y(x) = k≥0 c(k)x k . E.g., with the GeneratingFunctions package, one computes: Owing to Prop. 6.1, discussed in the next section, the order 3 of the differential equation is no surprise: Using the modular transformation property of η(τ ) = q 1/24 ∞ n=1 (1 − q n ), one can show that g is a modular form of weight 2 for Γ 1 (6); moreover, h is a Hauptmodul 24 for Γ 1 (6), and X(Γ 1 (6)) has genus 0. This means, when taking √ g instead of g, one obtains a differential equation of order 2: In [13] Beukers gives further details about how the differential equations in for the complete elliptic integral of the first kind K(k(τ )) with modulus k(τ ).
In [15] the 12 identities were discovered (and proved) by using tools from hypergeometric functions like Kummer's identity or Clausen's product formula, and by "piecing together quadratic and cubic transformations given in Erdély et al. [18,Sect. 2.1]." Knowing that θ 2 3 is a modular form in M 1 (Γ(2, 4, 2) and λ ∈ M (Γ(2, 4, 2)), in our setting the proofs of all these 12 identities become routine and can be carried out with full computer-support. We illustrate this by choosing as a concrete example [15, Thm. 5.6(ai)], (i) Computer-supported discovery of (22). In our setting this relation can be discovered as follows: for we determine c(k) such that  This means, the program guesses that which confirms (22).
(ii) Computer-supported proof of (22). The first step is to guess a holonomic differential equation satisfied by y(z) = ∞ k=0 c(k)z k . For various purposes, including order estimation of the desired differential equations, modular function/form knowledge is useful. In our case, X(Γ(2, 4, 2)) has genus 0. In addition, g is a modular form of weight 1 not only for Γ(2, 4, 2), but also for the larger group As a consequence, in order to prove (22) we have to prove that where, as above, g = y(h) = 1 + 4h + 100h 2 + 3600h 3 + 152100h 4 + . . . , and The verification of (25) is immediate from the series expansion of y in powers of h. The "computer-proof" of (24) works analogously to that of (19) given in Section 6.3.

Proving Holonomic Differential Equations for Modular Forms
Using computer algebra, we derived relations like (22) as conjectures. In this section we explain how such identities, once guessed, can be proved routinely in computer-assisted fashion. As pointed out in Section 5.3, such proofs carry out the equivalent task to show that the given modular form g and the given modular function h satisfy an associated holonomic differential equation; for example, the differential equation (24) is associated to (22).

Holonomic DEs for modular forms.
In several examples we showed how these associated holonomic differential equations can be derived, as a guess, in computer-supported fashion. Modular form theory guarantees the existence of such differential equations. Zagier [39,Prop. 21] introduces to this fact as follows: ". . . it is at the heart of the original discovery of modular forms by Gauss and of the later work of Fricke and Klein and others, and appears in modern literature as the theory of Picard-Fuchs differential equations or of the Gauss-Manin connection -but it is not nearly as well known as it ought to be.
Here is a precise statement:" Proposition 6.1. Let g(τ ) be a modular form of weight k > 0 and h(τ ) a modular function, both with respect to the congruence subgroup Γ. Express g(τ ) locally as y(h(τ )). Then the function y(h) satisfies a linear differential equation of order k + 1 with algebraic coefficients, or with polynomial coefficients if the compact Riemann surface X(Γ) has genus 0 and ord(h(τ )) = 1. 26 After stating this proposition, Zagier [39, p. 21] continues: "This proposition is perhaps the single most important source of applications of modular forms in other branches of mathematics, so with no apology we sketch three different proofs, . . . " Zagier's third proof is constructive; i.e., given g and h, it constructs the associated differential equation. Along this line, the following observation is highly relevant for applying holonomic proving strategies: 27 Proposition 6.2. In the setting of Prop. 6.1, the function y(h) satisfies a linear differential equation with rational coefficients also when the genus of X(Γ) is non-zero or when ord(h(τ )) > 1. -In these cases, the order of the differential equation in general will be larger than k + 1.
Proof. See the Appendix Section 11.1.
Another major aspect we want to stress is that, as an alternative to constructing the associated holonomic differential equation, one can follow the "first guess, then prove" strategy. This means, using software like the GeneratingFunctions package, one first guesses the holonomic equation, and then proves it by using the following algorithm. 6.
2. An algorithm to prove holonomic DEs for modular forms. We describe an algorithm, ModFormDE, which solves the following problem.
GIVEN a modular form g ∈ M k (Γ) with weight k ∈ Z ≥1 for the congruence subgroup Γ, and a modular function h ∈ M (Γ); moreover, suppose g has a local expansion of the form PROVE that y(h) satisfies a holonomic differential equation of the form where the P j (X) are given polynomials in C[X] with P m (X) = 0.
Note. Notice that y (k) (h) := dy dz (z)| z=h . Our algorithm ModFormDE is based on work of Yifan Yang [37]. So, before describing the steps of ModFormDE, we recall notation and notions used in [37].
First, we recall the differential operators used by Yang: • for functions ϕ(τ ) defined on H having q-expansions 28φ (q) = k≥n 0 a(k)q k , • for functions ψ = ψ(z) being analytic in z, Note. Owing to q = e 2πiτ , D q = 1 2πi d dτ ; also, D h y = hy ′ (h). As in [37], define the fundamental functions we have Similarly, one has where the p j ∈ M (Γ) are modular functions 29 defined as Yang [37, p. 10] also computed that with α j being polynomials in h, p 1 , p 2 , p ′ 1 , and p ′ 2 ; and this pattern continues. Define the polynomial ring R := C h, p 1 , p 2 , dp 1 dh , dp Yang showed that any expression of the form, with polynomials Q j (X) ∈ C[X], can be written into "Yang form" as In [31] we show that these α j are uniquely determined.
Our algorithm ModFormDE consists of the following steps: Step 0: Rewrite the left side of (26) into the form (31).
Since the α j are modular functions, this task, owing to (5), reduces to determine upper bounds for the number of poles of each α j . Such bounds are given explicitly in [31]; because of α j ∈ R, it is sufficient to provide such bounds for h and for the d n p j dh n , n ≥ 0. The zero test is completed by expanding the q-series expansions of the α j at infinity 30 to sufficiently high powers of q such that the number of possible zeros exceeds the corresponding bounds for the poles.
6.3. The ModFormDE algorithm on an example. To illustrate the behavior of the ModFormDE algorithm, we choose the task to prove the validity of (19). For a better matching to Yang [37, Ex. 1], we choose h := λ, instead of h = λ/16 as in the setting of Ex. 4.2. As a consequence, the differential equation (19) changes into the equivalent form, Step 0: Use (28) and (29) to rewrite the left side of the differential equation in (34) into the form (31): (35) Y := (h − 1)D 2 h y + hD h y + h 4 y.
Step 2: The proof of (34) is reduced to zero recognition of the modular functions α 1 and α 0 . 30 As mentioned, if required we can work also with x-expansions at infinity where x = q 1/N0 for fixed N 0 ∈ Z ≥1 . 31 It is important to note that in this application q is replaced by x := q 1/2 ; compare the remark given in the first paragraph of Ex. 4.2.
Here g Γ(2,4,2) = 0, the genus of X(Γ(2, 4, 2); in addition, according to the definition given in [31], one has NofPoles(g 2 ) = 2. Remark 6.3. Our definition [31, Def. 6.12] of NofPoles(g 2 ) uses a notion of "order of modular forms" for even weight; see Def. 6.9 in [31]. This order is coinciding with the order of a differential on a compact Riemann surface, although a priori there is no direct connection between these two notions.
This means, to prove α 1 = 0, it is sufficient to verify that the first 10 coefficients in the x-expansion of α 1 at ∞ are zero. 32 Step 2b: The task to prove α 0 = 0 works analogously to Step 2a. In this case, Theorem 5.3 from [31] gives, no. of poles(p 2 ) ≤ 22.
This means, to prove α 0 = 0, it is sufficient to verify that the first 24 coefficients in the x-expansion of α 0 at ∞ are zero. 32 .
Note. This algorithmic proving strategy carries over to the general case (26). One can establish explicit formulas for the bounds on the number of poles of p 1 and p 2 , and of the derivatives involved. A full account of all these details is given in [31]. In addition, in a forthcoming version of this paper we present an improved degree estimation. For example, in this setting, for p 1 and p 2 as above, (38) no. of poles(p 1 ) ≤ 2 and no. of poles(p 2 ) ≤ 12.

Puiseux Expansions of Modular Functions
Given a modular function h, in the previous sections we discussed the case when its "Puiseux mate" g is a modular form with positive integer weight. From this section on, we consider what happens when the weight of g is zero; i.e., when both g and h are modular functions. Again we will follow a "first guess, then prove" strategy and we shall see that holonomic guessing will work essentially the same. On the other hand, in contrast to the case of modular forms, for modular functions g, proving will be a more elementary routine step, owing to classical theory.
All the modular functions in this section and in the following sections are for congruence subgroups Γ 0 (N ); consequently, the abbreviations will be convenient.
To illustrate the basic features and the potential for applications in the field of partition congruences, we again consider a concrete example. Define, Owing to Newman's Lemma [28, Thm. 1.64] it is straightforward to show that these eta-quotients are in M (22). In [30] we derived and proved the relation p(11n + 6)q n = 11F 2 2 + 11 2 F 3 + 11 3 F 2 + 11 4 , for the generating function of the partition numbers p(11n + 6) with a(2n)q n .
As the main problem in this section, we consider Puiseux expansion of the left side of (39). Concretely, we consider the following task: Given This means, we obtained, Using additional terms in the q-expansions of f and g, one computes in the same fashion that for h := ( 1 f ) 1/2 : We note explicitly that all the coefficients are quotients with integers as numerators, and denominators being powers of 2. This is owing to (1 + ψ) together with the following lemma for formal power series which is folklore.
In the next step we take the first 24 coefficients in the expansion (43) With y(h) := h 4 g = 1 f 2 g, the algebraic relation in Out[64] translates into an algebraic relation involving f and g which, owing to its importance, we state as a separate proposition.
Proposition 7.2. The modular functions f and g in M ∞ (11) as given in (41) and (40) satisfy Proof. Knowing from [30] that f, g ∈ M ∞ (11), according to Remark 2.2, to prove (44) it suffices to show that the principal part and the constant term in the q-expansion of the left side of (44) are equal to zero.
Remark 7.3. To verify this by actual computation, it turns out that the precision we entered for f and g in our Mathematica session suffices:

Existence of Algebraic Relations
Holonomic guessing can be used to set up algebraic relations like (44). As explained in Section 7, proving such relations between two modular functions in M ∞ (N ) amounts to straightforward computational verification. In this section we discuss why such algebraic relations exist, state some facts of computational relevance, and connect to Puiseux's theorem for solving algebraic equations.
In [29,Thm. 7.1] we proved the following theorem: Without the pole condition (45), this theorem holds with the c j being rational functions in C(X). In this version the statement is folklore; see for instance [20, §8.2 and §8.3]. Our version, where condition (45) forces the c j to be polynomials, is algorithmically relevant, but it seems to be less known. A special instance of Theorem 8.1 where f is allowed to have poles only at one point of S is used in [38].
In the classical context, i.e., without the pole condition (45) which is irreducible over C(X), and where the c j (X) ∈ C(X) are rational functions such that c(f, g) = 0. Now we are ready to state and prove a general theorem which explains the existence of algebraic relations such as (44).  To prove the second part of the theorem, consider the polynomial with d(f, g) = 0; d(X, Y ) exists in this form by applying the same argument as for c(X, Y ). The polynomials c(X, Y ), d(X, Y ) ∈ C[X, Y ] cannot be relatively prime. Suppose they are, then owing to c(f, g) = 0 = d(f, g) there are infinitely many common roots which contradicts the fact that the set of common roots of two bivariate polynomials has to be finite; see, e.g., [1,Exercise 1.3.8]. As a consequence, the irreducible c(X, Y ) has to be a factor of d(X, Y ); i.e., for some polynomials a j ∈ C[Y ]. Now the assumption deg c m (X) = M implies L = 0 and a 0 (Y ) = a 0 ∈ C, and comparing the coefficients of X i Y j of both sides of d(X, Y ) = a 0 · c(X, Y ) proves (49).
The third part of the theorem is an immediate consequence of Lemma 8.2 which implies that both c(X, Y ) and d(X, Y ) are irreducible; hence, as in part two,  (41) and (40), where the orders ord f = −2 and ord g = −4 are not relatively prime. Nevertheless, using computer algebra one can check that the corresponding polynomial such that c(f, g) = 0 as in (44) Recall that, in view of the Laurent series we set y(h) := h 4 g to obtain a power series expansion where the coefficients c(k) form a holonomic sequence with coefficients as in (43). Using the GeneratingFunctions package, we algorithmically guessed the algebraic relation Out[64], (52) y(h) 2 − 11(11 3 h 4 + 11 · 10h 2 + 2)y(h) − 11 2 (11 4 h 6 + 11 3 h 4 + 11h 2 − 1) = 0.
Remark 8.6. The classic version of "Puiseux's theorem" traces back to Newton. For proofs in the setting of complex analysis see, for example, [19,Ch. 7]  Also in our context Puiseux's theorem can be useful for computational reasons: it implies lower bounds supplementing the general degree bound given in Thm. 8.3(49). We restrict to state a special case: Corollary 8.7. Let P (X, Y ) be as in Puiseux's Theorem 8.5 with r = 1 (i.e., d 1 = m) and with coefficient polynomials P n (X) ∈ C[X] such that P (X, Y ) = P m (X)Y m + P m−1 (X)Y m−1 + · · · + P 0 (X).
Suppose d = deg P m (X), then for ℓ = 1, . . . , m and M 1 as in Theorem 8.5: Proof. The statement follows directly by comparing coefficients of Y k in where the y ℓ (X) are the y 1,ℓ (X) in Theorem 8.5. To this end, notice that the fractional series formed by the elementary symmetric functions have to be polynomials.

Holonomic Differential Equations for Modular Functions
In this section we continue to study the situation where g is a modular function as h. But, in contrast to algebraic relations as considered in Section 8, we now put our focus on differential equations. Again we see that the underlying mathematics is somewhat simpler than that for modular forms g. Nevertheless, applications of this setting still seem to be of some interest. In this section and in Section 10 we illustrate this aspect by examples related to congruences for partition numbers.
Suppose we are interested in ∞ n=0 p(11n + 6)q n with coefficients being the numbers of partitions of 11n + 6. Using Smoot's implementation [?] of Radu's Ramanujan-Kolberg algorithm, we compute a q-product, q = e 2πiτ , such that when multiplied to this generating function, p(11n + 6)q n ∈ M ∞ (11).
For computational purposes it is convenient to set y(h) := h 4 g with h := ( 1 f ) 1/2 , and to rewrite (44) into the equivalent form (52), which we repeat to display for the reader's convenience: This means, is an algebraic power series and, according to Prop. 3.5, the coefficients c(k) constitute a holonomic sequence.
After these preliminary remarks we finally turn to the aspect of differential equations. To this end, using the GeneratingFunctions package, we transform (52) into a holonomic differential equation: The output also contains initial conditions; one observes that c [1] can be freely chosen and the recurrence is still valid. In order to match the initial and apply the relabeling (58): Proposition 9.2. Given f as in (41) and g as in (55). Then the uniquely determined coefficients c(k) such that for k ≥ 5 satisfy the recurrence Proposition 6.1 is fundamental when working with modular forms g of positive weight. 34 We conclude the present section with a version for the case when the weight is zero; i.e., when g is a modular function.
Then y(h) satisfies a homogeneous holonomic differential equation of order m, P m (h) dy dh m + · · · + P 0 (h)y = 0, or an inhomogeneous differential equation of order m − 1 of the form where the P i (X), Q j (X), and Q(X) are polynomials in C[X].
Proof. By Thm. 8.3 there exists a polynomial such that P (f, g) = 0. Equivalently we have, In addition, the c(k) inherit property (56) of the p(11n+6) in the following sense: each numerator in the quotient representation (63) is divisible by 11. We proved this fact as a consequence of the algebraic relation (44), resp. (52). In the q-series interpretation 35 , relation (61) reads as Consequently, the 11 divisibility of the c(k), by coefficient comparison of q-powers, implies 11 | p(11n + 6), n ≥ 0. In other words, Ramanujan's congruence (56) involving a non-holonomic sequence p(11n + 6) is implied by the analogous divisibility property of a holonomic sequence c(k)!

Case Study: a Partition Congruence by Andrews
In this section we present another example to illustrate the relevance of holonomic differential equations to partition congruences.
Consider the number cφ 2 (n) of 2-colored Frobenius partitions of n introduced by Andrews [2]; their generating function is Picking the subsequence (cφ 2 (5n+3)) n≥0 , as for (55) we use Smoot's package [?] to compute a q-product G(τ ), q = e 2πiτ , which, when multiplied with the generating function, gives a modular function, The genus of X(Γ 0 (20)) is 1, hence by Weierstraß' gap theorem 36 there exists a modular function F ∈ M ∞ (20) such that ord f = −2. Such h can also be computed using Smoot's package: Remark 10.1. In general, such q-product (resp. eta-quotient) generators of modular function spaces M ∞ (N )-provided they exist for a particular choice of N -are not uniquely determined. Algorithmically, they are members of the solution space of a system of linear Diophantine equations and inequalities. Another element of the solution space for the given problem, for instance, is These two modular functions are related, which owing to the fact that f, f ⋆ ∈ M ∞ (20) can be easily verified by comparing the coefficients of q −2 , q −1 , and q 0 in their q-expansions. After the replacement q 2 → q, relation (68) is Thm. 1.6.1(ii), in Andrews and Berndt [3]; see also (10.7) in Cooper's monograph [17].
Proof. Knowing that f, g ∈ M ∞ (20), to prove (70) it suffices to show that the principal part and the constant term in the q-expansion of the left side of (70) are equal to zero: Proof. By (70) each coefficient of g 2 has 5 as a factor. Hence 5 divides each coefficient of g, and thus 5 | cφ 2 (5n + 3).
Remark 10.4. Another direct consequence of relation (70) is g 2 ≡ f 8 (mod 2); hence g ≡ f 4 (mod 2) or equivalently, Taking the the q-product factor G(τ ) of g(τ ) from (66) into account, one can reduce this further. By applying freshman's dream, (1 + x) p ≡ 1 + x p (mod p) with p a prime, one, for instance, obtains On other words, the q-series expansion of the q-product on the right side describes the parity sequence of the partition numbers cφ 2 (5n + 3).
Finally, we return to the aspect of differential and recurrence equations. First, using the GeneratingFunctions package, we convert relation AlgRel in Out[80], which is equivalent to (70), into a holonomic differential equation:  its quotient field, the rational functions, by C(z). This notation is extended to multivariate polynomials, C[z 1 , . . . , z n ], and to rational functions, C(z 1 , . . . , z n ).
As a concrete choice of the linear generators b j (z), for instance, one can take all the power products, A 0 (z) a 0 · · · A ℓ (z) a ℓ with a 0 < deg Y P 0 (X, Y ), . . . , a ℓ < deg Y P ℓ (X, Y ).
This can be seen by the following steps which can be applied successively to prove the statement by mathematical induction. Assuming A ℓ (z) = 0, rewrite (75) as which by (77) is of the required form. Taking the derivative, again by (77), gives y (ℓ+1) (z) = d ℓ (z)y (ℓ) (z) + · · · + d 0 (z) for some d j (z) ∈ K.
In other words, number of poles of f = number of zeros of f, counting multiplicities.
Here ord x 0 f is defined as follows: Suppose f (x) = n≥m c n (ϕ(x) − ϕ(x 0 )) n , c m = 0, is the local Laurent expansion of g at x 0 using the local coordinate chart ϕ : U 0 → C which homeomorphically maps a neighborhood U 0 of x 0 ∈ X to an open set V 0 ⊆ C. Then ord x 0 f := m.

Conclusion
In this article we attempt to connect two worlds which, at the first glance, look very different: the "web of modularity", i.e.,modular forms and functions, with the universe of holonomic functions and sequences. It is our hope to inspire subsequent investigations in this direction.
To point to one of the more general aspects: in the given context, we see quite some application potential of the "first guess, then prove" strategy. For instance, it led us to develop, on the "shoulders" of Yang [37], a new algorithm, Mod-FormDE, to verify holonomic differential equations involving modular forms; see Section 6 and, for full details, [31]. Concerning the computational complexity of this approach, we remark that the holonomic procedure to guess the differential equation only requires to solve a system of linear equations. The proving step by algorithm ModFormDE boils down to zero-testing of the coefficients α j in (32). Each of these tests needs linear time in the number of coefficients of the corresponding q-expansions, resp. x-expansions with x = q 1/N 0 , at infinity of the particular α j .
We restrict to mention only one more concrete aspect for further exploration. Choosing modular functions g and h, as explained, one can relate a non-holonomic sequence with a holonomic sequence; for example, (p(11n + 6)) n≥0 ←→ (c(k)) k≥0 , where c(k) is defined by the holonomic recurrence (60). As remarked at the end of Section 9, Ramanujan's observation 11 | p(11n + 6) is implied by the corresponding divisibility property of the holonomic sequence (c(k)) k≥0 . Nevertheless, in the examples we considered (e.g., the sequence defined in (74) is another such instance) we found it a non-trivial task to prove the corresponding arithmetic property of the c(k) directly from the defining holonomic recurrence.