<<

Modular forms for groups

Modulära former för triangelgrupper

Elisabet Edvardsson

Faculty of Health, Science and Technology Mathematics, Bachelor Degree Project 15 ECTS Supervisor: Håkan Granath Examiner: Niclas Bernhoff January 2017

Abstract Modular forms are important in different areas of mathematics and theoretical physics. The theory is well known for the modular PSL(2, Z), but is also of interest for other Fuchsian groups. In this thesis we will be interested in triangle groups with a cusp. We review some theory about mapping of hyperbolic in order to derive an expression for the Hauptmodul of a triangle group, and use this to write a SageMath-program that calculates the Fourier series of the Hauptmodul. We then review some of the results presented in [4] that describe generalizations of well known concepts such as the Eisenstein series, the Serre derivative and some general results about the algebra of modular forms for triangle groups with a cusp. We correct some of the mistakes made in [4] and prove some further properties of the generators of the algebra of modular forms in the case of Hecke groups. Then we use the results from [4] to write a SageMath-program that calculates the Fourier series of the generators of the algebra of modular forms for triangle groups with a cusp and that also finds the relations between the generators in the special case of Hecke groups. Using the results from this program, we present some conjectures concerning the generators of the algebra of modular forms for a Hecke group, which, if proven to be true, give us a generalization of some of the Ramanujan equations. We conclude by explicitly calculating the generalized Ramanujan equations for the first few Hecke groups.

Sammanfattning Modul¨araformer ¨arviktiga inom olika delar av matematik och teoretisk fysik. Teorin ¨ar v¨alk¨andf¨orden modul¨aragruppen PSL(2, Z), men ¨arocks˚aintressant f¨orandra Fuchsgrupper. Den h¨aruppsatsen inriktar sig p˚atriangelgrupper med en spets. Vi ˚atergerhur avbildningar av hyperboliska trianglar kan beskrivas i syfte att hitta ett uttryck f¨oren Hauptmodul f¨or en triangelgrupp, och anv¨anderdetta f¨oratt skriva ett program i SageMath som ber¨aknar Hauptmodulens Fourierserie. N˚agraav resultaten fr˚an[4], som beskriver generaliseringar av v¨alk¨andabegrepp som Eisensteinserierna och Serrederivatan, samt n˚agraallm¨anna resultat f¨or algebran av modul¨araformer, ˚aterges.Vi r¨attarn˚agraav felen som gjorts i [4] och visar att generatorerna till algebran av modul¨araformer har vissa egenskaper i fallet med Heckegrupper. Resultaten fr˚an[4] anv¨andsf¨oratt skriva ett program i SageMath som ber¨aknarFourierserierna f¨orgeneratorerna till algebran av modul¨araformer f¨oren triangelgrupp med en spets samt hittar relationerna mellan generatorerna i fallet med Heckegrupper. Utifr˚anresultaten som f˚asfr˚an programmet, kommer vi fram till och presenterar n˚agraf¨ormodanden ang˚aendegeneratorerna till algebran av modul¨ara former f¨oren Heckegrupp. Om dessa f¨ormodanden visar sig vara sanna ger de oss en generalisering av n˚agraav Ramanujanekvationerna. Vi avslutar genom att explicit ber¨aknade generaliserade Ramanujanekvationerna f¨orde f¨orstaHeckegrupperna.

1 Contents

1 Introduction 3

2 Introduction to modular forms 4 2.1 The upper half plane and M¨obiustransformations ...... 4 2.2 Modular functions and modular forms ...... 5 2.3 The ...... 7

3 Mapping of hyperbolic triangles 11 3.1 Definition of triangle groups ...... 11 3.2 Hauptmoduls for triangle groups with a cusp ...... 14

4 Algebras of modular forms 26 4.1 Generators for the algebra of modular forms ...... 28 4.2 The Hilbert series ...... 29 4.3 Implementation in SageMath ...... 31 4.4 Results ...... 34

5 Differential equations for modular forms 35 5.1 Generalization of the Serre derivative ...... 35 5.2 Generalization of the Ramanujan equations ...... 37

6 Discussion 41

A SageMath-code 42 A.1 Fourier series for Jt ...... 42 A.2 Generator relations for Hecke groups ...... 42 A.3 Differential equations for modular forms ...... 45

2 1 Introduction

The theory of modular forms for the modular group PSL(2, Z) is well known and used in both mathematics and physics. Somewhat loosely a modular form is a complex function on the upper half plane that transforms in a certain way under M¨obiustransformations. More precisely, a modular form f(τ) of weight k of some group Γ ⊂ SL(2, R) satisfies aτ + b a b f = (cτ + d)kf(τ), for ∈ Γ. (1.1) cτ + d c d

If k = 0, we call this a modular function. The main importance of modular forms is in number theory. For example, they were integral in the proof of Fermat’s last theorem by Andrew Wiles and Richard Taylor who proved the Taniyama-Shimura conjecture [5, p. 130]. Also, modular forms have Fourier expansions with coefficients that have interesting arithmetic properties, and thus can be used to prove relations that are otherwise very difficult to prove or even realize exist. The applications are not limited to number theory. There is a surprising connection, called Monstrous moonshine [5], between modular forms and the representation theory of the monster group, which is the largest of the sporadic simple groups. This connection is related to a certain vertex operator algebra, which is the structure underlying conformal field theory in physics. Further applications in physics are mostly related to string theory. In this thesis we will be interested in the theory of modular forms for discrete of PSL(2, R), also called Fuchsian groups. More specifically we will be interested in modular forms for groups, which are groups that describe how the complex upper half plane is tessellated by hyperbolic triangles. We review some of the work done in [4], an article that describes the theory of modular forms in the case of triangle groups. We will correct several of the errors made in this article, simplify some of the results, and use their results in order to generalize some of the well known theory of modular forms for the modular group PSL(2, Z). In addition, we will write a program in SageMath [12] that calculates Fourier series for the Hauptmodul and the generators for the algebra of modular forms, finds the relations between these generators, and finds differential equations corresponding to the Ramanujan equations for Hecke groups. The outline of the thesis is as follows. In Section 2, we will review some of the standard theory of modular forms and in particular describe some important results for the modular forms of the modular group, PSL(2, Z). This section is meant to provide a context for the rest of the material in the thesis, and thus explanations will be brief, and no proofs will be given. In Section 3 we go on to introduce triangle groups and show how a Hauptmodul, i.e. a function that generates all modular functions, can be calculated for such groups by studying mapping properties of hyperbolic triangles. We also correct some mistakes made in [4] concerning the fundamental domain of a triangle group. We then show how we can calculate the Fourier series for such Hauptmoduls using SageMath. In Section 4 a closer study of the algebra of modular forms for a triangle group is made. We review some of the results presented in [4] and use these results to write a program in SageMath that calculates the relations between the generators of the algebra of modular forms and thus determines the structure of this algebra. We also prove some further results and formulate some conjectures concerning the generators in the case of Hecke groups. In Section 5 we will describe

3 and correct the definitions and results from [4] concerning the generalization of the Eisenstein series and the Serre derivative. We will then use these results together with the results and conjectures about the generators of the algebra of modular forms from Section 4 to suggest a way to generalize some of the Ramanujan equations in the case of Hecke groups. We also write a SageMath program that finds these differential equations.

2 Introduction to modular forms

In this section a review of the basic theory of modular forms will be presented. The contents are meant as a background for the theory that is presented in later sections, and thus explanations will be kept brief and most proofs will be left out. The interested reader is referred to [1] and [8] for details.

2.1 The upper half plane and M¨obiustransformations

We denote by H the complex upper half plane H = {z ∈ C | Im(z) > 0}. The special linear group, SL(2, R) acts on H by M¨obius transformations, namely, for γ ∈ SL(2, R) a b az + b γ = : → , z 7→ γ(z) = . (2.1) c d H H cz + d

That this is a group action can be seen by the following considerations:

For x ∈ H and γ ∈ SL(2, R), we have that az + b [a(i Imz + Rez) + b][c(i Imz − Rez) + d]) Im(γz) = Im = Im cz + d |cz + d|2 (2.2) Im(z) = , |cz + d|2 since (ad − bc) = 1, and thus γz is in H if z is.

Furthermore, if we denote the 2 × 2 identity matrix by I2×2, we have that z + 0 I z = = z. (2.3) 2×2 0 + 1

a b a0 b0 Also, if γ = , and γ0 = , we have that c d c0 d0

a0z + b0 a + b a b a0z + b0 0 0 (aa0 + bc0)z + ab0 + bd0 γ(γ0z) = = c z + d = c d c0z + d0 a0z + b0 (ca0 + dc0)z + cb0 + dd0 c + d (2.4) c0z + d0 aa0 + bc0 ab0 + bd0 = z = (γγ0)z. ca0 + dc0 cb0 + dd0

4 Thus the action of SL(2, R) satisfies the properties of a group action. 1 We extend the action to the extended upper half-plane , H¯ = H ∪ R ∪ {i∞}, by noting that all of the arguments above hold also on the boundary ∂H = R ∪ {i∞} if one defines the special cases −d γ = i∞, (2.5) c and a γ(i∞) = . (2.6) c

One classifies M¨obius transformations in the following way: An element γ ∈ SL(2, R) is called [8, p. 7] 1. parabolic if (trγ)2 = 4 2. elliptic if (trγ)2 < 4 3. hyperbolic if (trγ)2 > 4 We have the following result [8, p. 7]:

Proposition 2.1. Let γ ∈ SL(2, R). Then γ is 1. elliptic if and only if γ has exactly one fixed-point in H. 2. parabolic if and only if γ has a unique fixed point on the boundary ∂H = R ∪ {i∞} 3. hyperbolic if and only if γ has two distinct fixed points on ∂H.

2.2 Modular functions and modular forms

Consider an element γ ∈ SL(2, R). We have that −az − b az + b (−γ)(z) = = = γz. (2.7) −cz − d cz + d ∼ This means that instead of looking at the whole group SL(2, R), one can study the group PSL(2, R) = SL(2, R)/ {I, −I}, see [5, p. 107]. In fact, if we consider the map φ : SL(2, R) → Aut(H), we note that this map has the kernel ker(φ) = {I, −I}, so PSL(2, Z) acts faithfully on H. We will be interested in discrete subgroups of PSL(2, R). These groups are called Fuchsian groups, and for such a group Γ, we are interested in functions that have certain invariance properties under the action of the elements γ ∈ Γ.

First we recall some properties of complex functions. A function f : C → C is called holomorphic if it is complex differentiable at every point z ∈ C, and a function f : C → C is called meromorphic if it is complex differentiable at every point z ∈ C except for a finite number of points, where f has a pole, see [16, 17]. We now define the following types of functions that satisfy different properties under the action of a :

1Note that we use the symbol i∞ instead of ∞. The reason for this will be clear later.

5 Definition 2.1. [1, Sec. 1] Let Γ be a Fuchsian group. A modular function of Γ is a function f that is meromorphic in H and which for each γ ∈ Γ and τ ∈ H satisfies f(γτ) = f(τ). Definition 2.2. [1, Sec. 1] Let Γ be a discrete of SL(2, R). A weakly holomorphic modular form of weight k ∈ Z of Γ is a function f that is holomorphic on H and that for each a b γ = ∈ Γ satisfies c d f(γτ) = (cτ + d)kf(τ) (2.8)

We note that if the group Γ contains the element −I, all modular forms must be of even weight. This is clear from equation (2.8), since f(τ) = f(−Iτ) = (−1)kf(τ). For simplicity, we will from now on restrict ourselves to consider only modular form of even weight. With this restriction we can just as well talk about modular forms for Fuchsian groups Γ ⊂ PSL(2, R).

It is clear that the set of modular forms of weight 2k forms a vector space, m2k(Γ). Now suppose we have a modular form g2k(τ) of weight 2k and another modular form, g2l(τ) of weight 2l. Then the product g2kg2l is a modular form of weight 2(k + l), which can be seen by the following calculation:

2k 2l 2(k+l) g2k(γτ)g2l(γτ) = (c + dτ) (c + dτ) g2k(τ)g2l(τ) = (c + dτ) g2k(τ)g2l(τ). (2.9) The set of all modular forms of a Fuchsian group therefore forms a graded algebra [1, Sec. 1], which means it can be written as M m(Γ) = m2k(Γ). (2.10) k

We will also be interested in the modular properties of the derivative of a modular form, that is in df aτ + b finding the expression for . We have that dτ cτ + d df(γτ) df dγ 1 df = (γτ) = (γτ) (2.11) dτ dτ dτ (cτ + d)2 dτ Differentiating equation (2.8), we get that df(γτ) df(τ) = ck(cτ + d)k−1f(τ) + (cτ + d)k , (2.12) dτ dτ which means that df df(τ) (γτ) = ck(cτ + d)k+1f(τ) + (cτ + d)k+2 , (2.13) dτ dτ and we see that the derivative of a modular form is not necessarily a modular form, and thus the algebra of modular forms is not closed under differentiation. To create a set that is, which includes the modular forms, we make the following definition [1, p. 58]: Definition 2.3. Let Γ be a Fuchsian group. A quasi-modular form of weight k and depth p of the −k c group Γ is a function f(τ) which satisfies that f(γτ)(cτ + d) is a polynomial of degree p in cτ+d , i.e. we have that p r X  c  f(γτ) = (cτ + d)k f (τ) , (2.14) r cτ + d r=0 where fr(τ) are holomorphic functions of z that are independent of γ and fp 6= 0.

6 We see that a modular form, f(τ), is a special case of a quasi-modular form where p = 0 and f0(τ) = f(τ). Also, from equation (2.13), we see that the derivative of a modular form of weight k is a quasi-modular form of weight k + 2 and depth 1. 1 h If the Fuchsian group contains an element with h 6= 0, we get that f(τ + h) = f(τ), which 0 1 means that the function is periodic. Because of this, a modular form of this group will have a Fourier expansion of the form ∞ X n f(τ) = anq , (2.15) −∞ where q = e2πiτ/h. More generally, around a cusp, say z, such an expansion will have the form [4]

∞ X n f(τ) = jz(k; τ) anqz , (2.16) n=−m where the finite lower bound on n comes from requiring meromorphicity at the cusp and

(1 if z = i∞, jz(k; τ) = k (2.17) τz if z ∈ R.

2πiτ/hz Furthermore one lets qz = e , where hz is a parameter depending on z that to be defined later in Section 3. We will be mostly interested in expansions around z = i∞, which means that we will study Fourier expansions of the form

∞ X n f(τ) = anqz . (2.18) n=−m

It turns out that the modular functions form a field and when the geometric genus of he H/Γ is zero, this field can be expressed as the rational functions C(f) of some generator f. Such a generator is called a Hauptmodul. The Hauptmodules are mapped to one another by M¨obiustransformations of elements in SL(2, C) and a Hauptmodul is therefore determined by three complex parameters, see [4], which e.g. can be the values of the function at three given points.

2.3 The modular group

∼ The most studied Fuchsian group is PSL(2, Z) = SL(2, Z)/ {I, −I}, the modular group, and to put our later discussions into context, we will now give a short review of the classical theory of modular forms for this group and point out the most important results. For simplicity we will continue to denote elements of PSL(2, Z) as matrices just as for SL(2, Z), even though, to be precise, one should denote the elements as cosets.

It is well known that PSL(2, Z) is generated by the matrices [1, p. 6] 0 −1 1 1 S = and T = . (2.19) 1 0 0 1

7 Figure 1: A fundamental domain for the action of PSL(2, Z) on H. Reprinted from [18] under the Creative Commons Attribution/Share-Alike License

We see that up to a sign (remember that we are in PSL(2, Z))

S2 = I and (ST )3 = I. (2.20)

Letting g1 = S and g2 = ST , the group has the following presentation in terms of generators and relations [5, p. 127]: 2 3 g1, g2 | g1 = g2 = 1 , (2.21) so it is isomorphic to the free product Z2 ∗ Z3. Letting the matrices S and T act on τ ∈ H one gets that 1 S(τ) = − , (2.22) τ and T (τ) = τ + 1. (2.23)  1 A common choice of fundamental domain for the action of PSL(2, Z) on H is the set τ ∈ H | |Re τ| < 2 , |τ| > 1 . This fundamental domain is illustrated in Figure 1. Important modular forms for the modular group are the Eisenstein series. The classical Eisenstein series are given by [5, p. 2] X 1 G (τ) = , (2.24) 2k (mτ + n)2k m,n∈Z (m,n)6=(0,0)

8 for k ≥ 2, where k is an . The classical Eisenstein series are commonly normalized by the Riemann zeta function [5, p. 127]: 1 E (τ) = G (τ). (2.25) 2k 2ζ(2k) 2k

Remembering the Bernoulli numbers, Bn, defined by a generating function in the following way [14] ∞ n x X Bnx = , (2.26) ex − 1 n! n=0 and the divisor functions X m σm(n) = d , (2.27) d|n for m ∈ N, it can be shown that for k ∈ Z and k ≥ 2 [5, p. 127]

∞ 4k X E (τ) = 1 − σ (n)qn, (2.28) 2k B 2k−1 2k n=1 where q = e2πiτ . The divisor function is important in number theory, which makes this result important since, as we will see below, it can be used to find properties of the divisor function which are otherwise hard to both prove and to find. The first few Eisenstein series are given by [1, p. 17]

2 2 E4(τ) = 1 + 240q + 2160q + ··· = 1 + 240(q + 9q + ... ), (2.29) 2 2 E6(τ) = 1 − 504q − 16632q − · · · = 1 − 504(q + 33q + ... ), (2.30) 2 2 E8(τ) = 1 + 480q + 61920q + ··· = 1 + 480(q + 129q + ... ). (2.31)

One can see from equation (2.24), that if we were to let k = 1, the series would not converge. However, it is still possible to extend the definition of the Eisenstein series to include also the case k = 1, by simply letting k = 1 in equation (2.28), i.e.

∞ 4 X E (τ) = 1 − σ (n)qn 2 B 1 2 n=1 (2.32) = 1 − 24q − 72q2 − ....

In this case, however, the series is no longer a modular form. In [1, p. 19] it is proven that

aτ + b 6ic E = (cτ + d)2E (τ) − (cτ + d), (2.33) 2 cτ + d 2 π which means that E2 in fact is a quasi-modular form of depth 1 and weight 2.

The Eisenstein series are important since E4 and E6 generates the algebra of modular forms, m(PSL(2, Z)) = C [E4,E6], so knowing the Eisenstein series allows us to generate all other modular

9 forms. Furthermore, the algebra of quasi-modular is generated by E2, E4 and E6 and is given by C [E2,E4,E6], see [1, p. 15, 48]. As we have seen earlier, the algebra of modular forms is not closed under differentiation, since one gets a quasi-modular form after differentiation. Since the algebra of quasi-modular forms is generated by E2, E4 and E6, we see that if we introduce a new differential operator that somehow depends on E2 one could get that the algebra of modular forms is closed under this action. Indeed, one defines the Serre derivative, D2k : m2k → m2k+2, acting on a modular form of weight 2k, by [1, p. 48] 1 d 2k d 2k D = − E = q − E . (2.34) 2k 2πi dτ 12 2 dq 12 2

That the action of D2k on a modular form of weight 2k gives us a new modular form can be seen by comparing this expression with the one for E2 and equation (2.13). As we will see later in Section 5, one can show that the Serre derivative satisfies the product rule

D2k+2l(fg) = D2k(f)g + fD2l(g), (2.35) where f and g are modular forms of weights 2k and 2l respectively. The space of modular forms of weight 2k is finite dimensional, which means that we can find relations between different modular forms by comparing a finite number of coefficients in their Fourier expansions. For example, from equations (2.29) and (2.31), we see that the constant term 2 in the Fourier series of both E4 and E8 is 1. This means that E4 , which is of weight 8, also has constant term 1. As we will see later, it can be shown that the dimension of m8(PSL(2, Z)) is 1. From this one immediately gets that 2 E8 = E4 . (2.36) Combining this with equation (2.28), one gets that [1, p. 18]

n−1 X σ7(n) − σ3(n) σ (m)σ (n − m) = . (2.37) 3 3 120 m=1

For other relations between the Eisenstein series, one obtains other relations between the σi(n), and as mentioned earlier, these relations are hard to prove otherwise, so results like these are important for number theoretical purposes.

In a similar fashion differential equations for the modular forms can be derived. Since E2, E4 and E6 generate the ring of quasi-modular forms, it is enough to determine the derivative of these functions in order to get enough information to find the derivative of all modular forms using the product rule for the Serre derivative in equation (2.35). One gets the following three differential equations by looking at the first few terms of the Fourier expansions of the products of the relevant Eisenstein series [1, p. 49]: E2 − E ϑE = 2 4 , (2.38) 2 12 E E − E ϑE = 2 4 6 , (2.39) 4 3 E E − E2 ϑE = 2 6 4 , (2.40) 6 2

10 1 d d where we have defined ϑ = 2πi dτ = q dq . These are called the Ramanujan equations. As mentioned earlier, the Hauptmodul of a group is an important function, and for PSL(2, Z) a Hauptmodul can be expressed using the Eisenstein series, namely

3 1728E4(τ) −1 j(τ) = 3 2 = q + 744 + 196884q + ... (2.41) E4(τ) − E6(τ) This is the standard choice for a Hauptmodul, and it is called the j-function [5, p. 3]. In other situations it can be preferable to choose another Hauptmodul, in particular when one studies the so called Monstrous moonshine [5, ch. 0] one is more interested in

J(τ) = j(τ) − 744. (2.42)

Monstrous moonshine is the connection between the coefficients of J(τ) and the dimensions of the smallest irreducible representations of the Monster finite simple group, denoted by M, which is the largest of the exceptional finite simple groups. The dimensions of the first few irreducible representations of M are 1, 196883, 21296876 and 842609326, and we get the following equalities

196884 = 196883 + 1, (2.43)

21493760 = 21296876 + 196883 + 1, (2.44) 864299970 = 842609326 + 21296876 + 2 · 196883 + 2 · 1, (2.45) where we recognize the left hand sides as the first coefficients in J(τ). This is a very interesting result since it connects very different areas of mathematics. In particular it is explained by studying a certain vertex operator algebra, which is the structure underlying conformal field theory, and thus also connects this to theoretical physics. We have now reviewed some of the basics of the modular group, and will now turn to other Fuchsian groups. The groups we will be interested in are triangle groups, which can be seen as a natural generalization of the modular group.

3 Mapping of hyperbolic triangles

The aim of this section is to introduce a special type of Fuchsian groups called triangle groups and to study some of the basic modular properties of these. This will serve as a base for the rest of the text.

3.1 Definition of triangle groups

Consider a triangle in with angles π/k, π/l and π/m, with k, l, m ∈ Z ≥ 2. We have that 1 1 1 + + = 1. (3.1) k l m

11 (a) (2, 3, 6) (b) (3, 3, 3) (c) (2, 4, 4)

Figure 2: Illustration of the tilings obtainable from the three Euclidean triangle groups. Reprinted from [19] under the Creative Commons Attribution/Share-Alike License

It is easy to check that there are only a few integer solutions to this equation, namely (2, 3, 6), (2, 4, 4) and (3, 3, 3), up to permutation. These are precisely those triangles that can tessellate the Euclidean plane by successive reflections in the sides of the triangles. This is illustrated in Figure 2. We will, however, not be interested in Euclidean triangles. Instead we will focus on triangles in hyperbolic geometry, so called hyperbolic triangles. We will denote such a triangle with angles π/k, π/l and π/m by ∆(k, l, m). The angles of a hyperbolic triangle satisfy 1 1 1 + + < 1, (3.2) k l m

+ and there are infinitely many such combinations of k, l, m ∈ Z . Consider the hyperbolic triangle ∆(k, l, m) and denote the length of the side opposite to the angle π/k by a. Then we have from [6, p. 16] that cos(π/l)cos(π/m) + cos(π/k) cosh(a) = , (3.3) sin(π/l)sin(π/m) which means that the lengths of the sides in a hyperbolic triangle are determined by the angles of the triangle. This in turn implies that all hyperbolic triangles with the same angles are congruent. Also the area of this triangle is determined by the angles and is given by [5, p. 107]

 1 1 1  π 1 − − − . (3.4) k l m

As in the Euclidean case, successive reflections in the sides of a triangle ∆(k, l, m) give a of the hyperbolic plane. This is shown in [9, ch. VI, sec. 5]. As is discussed in [5, p. 107], the group of isometries of H, Isom(H), consists of all M¨obiustransformations in PSL(2, R) together with the transformation σ(τ) = −τ¯, i.e. ∼ Isom(H) = PSL(2, R) ∪ σPSL(2, R). (3.5)

12 This group contains all isometries, including reflections, which means that the elements are not nec- essarily orientation preserving. It can be shown that the group of orientation preserving isometries of H, i.e. Aut(H) is given by ∼ Aut(H) = PSL(2, R). (3.6) Now consider the hyperbolic triangle ∆(k, l, m). As we mentioned, H can be tessellated by suc- cessively reflecting this triangle in its sides. This can be described by the discrete subgroup G(k,l,m) ⊂ Isom(H) generated by the three reflections in the sides of the triangle. The subgroup of G(k,l,m) that only contains orientation preserving elements is given by

Γ(k,l,m) = G(k,l,m) ∩ PSL(2, R). (3.7)

This group is called the triangle group of the triangle ∆(k, l, m). A fundamental domain of this group is given by the triangle ∆(k, l, m) together with the triangle ∆0(k, m, l) obtained by reflecting ∆(k, l, m) in one of its sides. We note that the triangle group of ∆(k, l, m) is the same as the triangle group of ∆0(k, m, l). This together with the fact that any hyperbolic triangle with angles π/k, π/l 0 and π/m can be mapped to either ∆(k, l, m) of ∆ (k, m, l) using an element of PSL(2, R) means that a triangle group is determined up to conjugation by an element of PSL(2, R).

A triangle group Γ(k,l,m) has an abstract representation

D k l m E g1, g2 | g1 = g2 = (g1g2) = 1 . (3.8)

Hyperbolic triangles can have one or more cusps, i.e. one or more of k, l or m can be infinity. In these cases we simply remove the relation containing the infinite parameter, e.g.

D k l E Γ(k,l,∞) = g1, g2 | g1 = g2 = 1 . (3.9)

Another common presentation of a triangle group, Γ(k,l,m), using three generators γ1, γ2 and γ3, is the following [7]: D k l m E γ1, γ2, γ3 | γ1 = γ2 = γ3 = γ1γ2γ3 = 1 . (3.10)

That these representations describe the same group can be seen by noting that

−1 γ3 = (γ1γ2) , (3.11) which means that m −m 1 = γ3 = (γ1γ2) , (3.12) and therefore m (γ1γ2) = 1, (3.13) and thus if we let γ1 = g1 and γ2 = g2 we see that the representations describe the same group. The reason for using the second representation involving three generators is that it gives a more intuitive description of how the triangle group acts on a triangle, and also because the generators in this presentation correspond to those mentioned in Definition ??. The action of the group elements γi on a hyperbolic triangle ∆(k, l, m) is illustrated in Figure 3. Here we see that each of the elements

13 Figure 3: Illustration of the action of the generators γ1, γ2 and γ3 on a hyperbolic triangle.

γi represents a clockwise rotation of one of the white triangles into one of the other white triangles, yielding the relation γ1γ2γ3 = 1. It is clear from the symmetry between k, l, m in the presentation of a triangle group and the fact that a triangle group is uniquely determined up to conjugation by an element of PSL(2, R) that we can restrict ourselves, without loss in generality, to triangle groups Γ(m1,m2,m3) for which 2 ≤ m1 ≤ m2 ≤ m3 ≤ ∞.

In the rest of the text we will be interested in triangle groups for which m3 = ∞, so all groups will be determined by the two parameters m1 and m2. A special case that will be of interest is when m1 = 2, in which case the triangle group is called a Hecke group.

3.2 Hauptmoduls for triangle groups with a cusp

In this section we will show how to obtain a Hauptmodul, i.e. a generator for the field of modular functions, for a triangle group Γt with t = (m1, m2, ∞).

That there exists a Hauptmodul for the triangle group Γt, where t = (m1, m2, m3) is proven in [9, ch. VI, sec. 5], and we will denote such a Hauptmodul for the triangle group by Jt. In this section we will determine a Hauptmodul for a triangle group Γ(m1,m2,∞). Before we do this, we introduce some notation and describe the results obtained in [4].

A point on the boundary ∂H is called a cusp of Γt if it is fixed by some parabolic element in Γt. We now let HΓ denote the upper half plane together with the cusps of Γ. An important property of a cusp z is the cusp width, which we denote by hz. For i∞ the cusp-width h∞ is the smallest h > 0

14 1 h such that ∈ Γ . For x ∈ being a cusp, the cusp-width h is the smallest h > 0 such that 0 1 t R x 0 −1−1 1 h 0 −1 ∈ Γ. Using the cusp-width, we can now define local coordinates 1 −x 0 1 1 −x 2πiτz/hz around a cusp z by qz = e , where τz ∈ HΓ is given by  −1  if z ∈ R, τz = τ − z (3.14) τ if z = i∞.

As we have seen, a triangle group Γt is unique up to conjugation with an element of PSL(2, R) and is thus determined by three real parameters. We fix the triangle group by fixing its fundamental domain. In [4] they do this by choosing the locations of the corners of one of the triangles to be

−πi/m1 πi/m2 ζ1 = −e , ζ2 = e , ζ3 = i∞, (3.15)

h3 and then letting the fundamental domain be the union of this triangle and its image under τ 7→ τ+ 2 (where h3 is to be defined later). It is clear that this must be wrong since the fundamental domain is obtained by reflecting a hyperbolic triangle in one of its sides, so instead of translating the triangle h3 by 2 , we want to reflect it in the line Re τ = Re ζ2. This is illustrated in Figure 4. However, as we will see, the choice of ζ1 and ζ2 that is made in [4], is actually inconsistent with the results they present in their first theorem. The correct choice is

−πi/m1 πi/m2 ζ1 = −e + cos(π/m1), ζ2 = e + cos(π/m1), ζ3 = i∞. (3.16)

This triangle, together with its mirror image when mirrored in the line Re τ = Re ζ2 forms a fundamental domain for the triangle group, which is illustrated in Figure 5.

In Figure 5 we see that the width of the fundamental domain of the triangle group Γ(m1,m2,∞), which also is the cusp width of i∞, is h3 = 2cos(π/m1) + 2cos(π/m2). In [4] they argue that the group is generated by       0 2cos(π/m1) 1 0 0 1 0 1 h3 γ1 = , γ2 = , γ3 = , (3.17) −1 0 −1 2cos(π/m2) 0 1 which is true for the triangle group corresponding to the triangle in Figure 4. To get the triangle group for the triangle in Figure 5, we must conjugate by the element

1 cos(π/m ) γ = 1 . (3.18) 0 0 1

So the desired group is generated by [4]     2cos(π/m1) 1 −1 0 1 −1 γ1 = γ0 γ0 , γ2 = γ0 γ0 , −1 0 −1 2cos(π/m2) (3.19) 1 h  1 h  γ = γ 3 γ−1 = 3 , 3 0 0 1 0 0 1

15 Figure 4: Illustration of the fundamental domain used in [4] for the triangle group Γ(m1,m2,∞). which satisfy m1 m2 γ1γ2γ3 = γ1 = γ2 = I2×2, (3.20) and we remember that we are in PSL(2, R). Using the definition of the local coordinates, we see that the local coordinates around the point ζ3 are given by

2πiτ/h3 q3 = e . (3.21)

A Hauptmodul for a triangle group Γt is determined by three independent complex parameters and in [4] they fix it by requiring that

Jt(ζ1) = 1,Jt(ζ2) = 0,Jt(ζ3) = ∞. (3.22)

As we will see, this choice is what makes the definition of ζi in equation (3.15) wrong in [4]. This Hauptmodul is called the normalized Hauptmodul for Γt. The series expansion of Jt around the point ζ3 is calculated in [4] in the following way:

Theorem 3.1. Consider the triangle group Γ(m1,m2,∞), and introduce coordinates q˜3 = α3q3, where

 0   0  b0−1 − 1 cos 2π ka d0−1 − 1 cos 2π lc Y   k  2 b0 Y   l  2 d0 α = b0d0 2 − 2cos 2π 2 − 2cos 2π , (3.23) 3 b0 d0 k=1 l=1

16 Figure 5: Illustration of the correct choice of fundamental domain for the triangle group Γ(m1,m2,∞).

0 0 1 0 0 1 0 0 0 0 where a /b = 2 (1 + 1/m1 − 1/m2), c /d = 2 (1 + 1/m1 + 1/m2) and gcd(a , b ) = gcd(c , d ) = 1. The normalized Hauptmodul is now given by

∞ −1 X k Jt =q ˜3 + ckq˜3 , (3.24) k=0 with coefficients ck determined by ...  2 2 2 2  ˙ ¨2 ˙4 1 − (1/m2) 1 − (1/m1) (1/m1) + (1/m2) − 1 − 2J tJt + 3Jt = Jt 2 + 2 + , (3.25) Jt (Jt − 1) Jt(Jt − 1) for z = ζ and where a dot denotes q˜ d . 3 3 dq˜3 In [4] they determine the coefficients in the Fourier expansion by solving the third order non-linear differential equation (3.25) recursively. This, however, is an inefficient way of doing it, and we will now develop another method which then will be implemented in SageMath. This is partly done in [11], in the special case of Hecke groups, but we will attempt to generalize this. In [9, ch. VI, sec. 5] it is proven that a Hauptmodul exists and in accordance with this proof we begin by studying the mapping of hyperbolic triangles, assuming that the Hauptmodul maps the interior of the hyperbolic triangle ∆(m1, m2, m3) to H and its boundary to R. In the upper half plane a hyperbolic triangle is bounded by geodesics in hyperbolic geometry, which means that we

17 study triangles bounded by circular arcs. The mapping of such triangles is extensively described in [2, ch. 2], and we will follow the outline of that book.

We begin by quite general arguments that apply to all hyperbolic triangles, ∆(m1, m2, m3) and then in the end we restrict ourselves to the case ∆(m1, m2, ∞). That the Hauptmodul maps ∆(m1, m2, m3) to the upper half plane, means that we can choose a local branch of the inverse map that maps H to the interior of the triangle.

To simplify notation, we define vi = 1/mi, for i = 1, 2, 3. We consider the mapping u = u(z), (3.26) that maps H onto a hyperbolic triangle and normalize it in such a way that the vertices of the triangle are the images of the three points z = 0, 1 and ∞. Now, using a M¨obiustransformation, we create a new transformation w = w(z) according to

au + b w = γu = , (3.27) cu + d where γ ∈ SL(2, R). It can be shown that w also maps H onto the interior of a hyperbolic triangle with vertices w(0), w(1) and w(∞). The aim is now to determine the mapping function, w, by finding a differential equation for w that is independent of γ. By differentiating equation (3.27) with respect to z, we get that

dw ad − bc du = . (3.28) dz (cu + d)2 dz

Taking the logarithmic derivative of this expression, we obtain that

d dw  d du 2c du log = log − . (3.29) dz dz dz dz cu + d dz

In order to simplify notation, we let

d dw  W = log , (3.30) dz dz and d du U = log . (3.31) dz dz This way we get that dU dW 2c d2u 2c2 du2 − = − . (3.32) dz dz cu + d dz2 (cu + d)2 dz Combining this with equation (3.29) gives us that

dU dV 1 1 1 − = U(U − W ) − (U − W )2 = U 2 − W 2. (3.33) dz dz 2 2 2

18 Rearranging this we get

d2 1  d 2 d2 1  d 2 log(w0) − log(w0) = log(u0) − log(u0) , (3.34) dz2 2 dz dz2 2 dz

d where we let the prime denote dz . We see that both the left hand side and the right hand side of this equation are independent of the coefficients in the M¨obiustransformation, and that they represent the same differential invariant. We call this invariant the Schwarzian derivative and denote it by {w, z}; 2w0w000 − 3w002 {w, z} = . (3.35) 2w02

We now have the following theorem due to Schwarz [2, p. 134]:

Theorem 3.2. Let H be mapped conformally onto an arbitrary hyperbolic triangle whose vertices are the images of the points z = 0, 1, ∞ and let the triangle have the angles v1π, v2π, v3π at these vertices respectively. Then the mapping function w(z) must be a solution of the third-order differential equation 2w0w000 − 3w002 1 − v2 1 − v2 1 − v2 − v2 + v2 {w, z} = = 1 + 2 + 1 2 3 (3.36) 2w02 2z2 2(1 − z)2 2z(1 − z)

We have seen that the Schwarzian derivative is invariant under M¨obiustransformations. This means that any map aw + b w(z) = 0 (3.37) cw0 + d for which w0 is a solution of (3.36), also is a solution of (3.36). Therefore any solution of this equation that is analytic and non-constant in H represents a mapping of H onto a hyperbolic triangle with angles v1π, v2π, v3π. In order to solve equation (3.36), we will first show that it can be reduced to the hypergeometric differential equation. Consider the second order linear homogeneous differential equation

u00 + p(z)u0 + q(z)u = 0, (3.38) where p(z) and q(z) are meromorphic functions. Now let u1(z) and u2(z) be two linearly indepen- dent solutions of (3.38). Then any solution u(z) of (3.38) can be written as

u(z) = au1(z) + bu2(z), (3.39) where a and b are constants. Letu ˜ = u2/u1. Differentiatingu ˜, we get that

0 0 0 u1u2 − u2u1 u˜ = 2 (3.40) u1 and that 00 0 d 0 u1u2 − u2u1 log˜u = 2 . (3.41) dz u1

19 Using that u1 and u2 are solutions of equation (3.38), we get that

d u0 log˜u0 = −p(z) − 2 1 , (3.42) dz u1 from which by differentiation we obtain that

2 0 02 d 0 0 u1 u1 2 log˜u = −p (z) + 2p + 2q(z) + 2 2 . (3.43) dz u1 u1 Combining these two equations we get that

p(z)2 {u,˜ z} = 2q(z) − p0(z) − . (3.44) 2 Thus we see that if we determine the functions p(z) and q(z) in such a way that

p(z)2 1 − v2 1 − v2 1 − v2 − v2 + v2 {u,˜ z} = 2q(z) − p0(z) − = 1 + 2 + 1 2 3 , (3.45) 2 2z2 2(1 − z)2 2z(1 − z) the quotient of two arbitrary solutions of equation (3.38) gives us the general solution of equation (3.36). We are free to choose either p(z) or q(z) and determining the other one using the first one. One choice in particular turns out to be good, since it gives us regular singularities in equation (3.38), namely: 1 − v 1 − v p(z) = 1 − 2 (3.46) z 1 − z and (1 − v − v + v )(1 − v − v − v ) q(z) = − 1 2 3 1 2 3 . (3.47) 4z(1 − z) By letting 1 1 α = (1 − v − v + v ), β = (1 − v − v − v ), γ = 1 − v (3.48) 2 1 2 3 2 1 2 3 1 and inserting the expressions for p(z) and q(z) into equation (3.38), we get the equation

z(1 − z)u00 + [γ − (α + β + 1)z] u0 − αβu = 0. (3.49)

This is called the Gauss’ hypergeometric differential equation, and is an equation with well-known solutions. In order to find these solutions, we begin by assuming that there exists a solution of the form ∞ X n u(z) = 1 + cnz . (3.50) n=1 Then we substitute this expression together with its derivatives into the hypergeometric equation. By identifying expressions for the coefficient of zn, we get that

α(α + 1) ... (α + n − 1)β(β + 1) ... (β + n − 1) c = , (3.51) n 1 · 2 ····· n · γ(γ + 1) ... (γ + n − 1)

20 which can also be written as (α)n(β)n cn = , (3.52) n!(γ)n where (x)n = x(x + 1) ... (x + n − 1) is the Pochhammer symbol. This solution is called Gauss’ hypergeometric series. We denote the solution with parameters α, β and γ by F (α, β, γ; z), and note that this solution only makes sense as long as γ 6= 0, −1, −2,... , which is the case in all situations we will encounter. In addition to the solution F (α, β, γ; z) it is shown in [2, ch. 2] that we have another solution of the form z1−γF (α + 1 − γ, β + 1 − γ, 2 − γ; z). (3.53) This solution together with the solution F (α, β, γ; z) gives us a basis for the space of solutions equation (3.49).

The case that we are interested in is the case when v3 = 0, which is equivalent to γ = 1. We are then left with the equation

z(1 − z)u00 + [1 − (α + β + 1)z] u0 − αβu = 0. (3.54)

In this case we note that

F (α, β, γ; z) = z1−γF (α + 1 − γ, β + 1 − γ, 2 − γ; z), (3.55) which means that we have to find another solution of equation (3.49) in order to get a basis for the space of solutions. To do this, [2, ch. 2] defines a function F ∗(α, β, γ; z) by

∂F ∂F ∂F F ∗(α, β, γ; z) = + + 2 . (3.56) ∂α ∂β ∂γ This function can be calculated explicitly by representing it as a series:

∞ ∗ X n F (α, β, γ; z) = encnz , (3.57) n=1 where cn is the same as in equation (3.51) and en is given by

n−1 X  1 1 2  e = + − . (3.58) n α + p β + p γ + p p=1

It is now shown in [2, ch. 2] that the function

φ = F ∗(α, β, 1; z) + F (α, β, 1; z)log(z). (3.59) is a solution of equation (3.49).

The goal was to explicitly determine the mapping function for the case v3 = 0. Such a triangle can be mapped by a M¨obiustransformation to the triangle shown in Figure 6.

21 Figure 6: Any hyperbolic triangle ∆(m1, m2, ∞) can be mapped to the grey triangle by a suitable M¨obius transformation.

Now it is shown in [2, ch. 2] that the mapping function is given by 1  F ∗  sin(v π) w(z) = log(z) + − (2ψ(1) − ψ(1 − α) − ψ(1 − β)) + i 1 , (3.60) πi F cos(v1π) + cos(v2π) where ψ(x) is the digamma function, i.e. the logarithmic derivative of the gamma function. Now we can generalize the results in [11], where they calculate the Fourier expansion for the Hauptmodul in the case of Hecke groups. The goal here is to obtain an expression for the Fourier expansion of the normalized Hauptmodul, Jt of the triangle group (m1, m2, ∞), ∞ −1 X k Jt =q ˜3 + ckq˜3 , (3.61) k=0 We now consider the inverse function of this, which in order to match the difference between the triangles in Figures 6 and 5 is given by

2πiτ/h3 = πiw(Jt), (3.62)

22 which means that

∗ −1 −1 F (α, β, 1; Jt ) 2πiτ/h3 = log(J ) + − [2ψ(1) − ψ(1 − α) − ψ(1 − β)] t F (α, β, 1; J −1) t (3.63) sin(v π) − π 1 . cos(v1π) + cos(v2π) By exponentiating this expression, we get that

 ∗ −1  −1 F (α, β, 1; Jt ) exp (2πiτ/h3) = J exp t F (α, β, 1; J −1) t (3.64)  sin(v π)  · exp − [2ψ(1) − ψ(1 − α) − ψ(1 − β)] − π 1 . cos(v1π) + cos(v2π) By letting

1  sin(v π)  = exp − [2ψ(1) − ψ(1 − α) − ψ(1 − β)] − π 1 , (3.65) A cos(v1π) + cos(v2π) we get that  ∗ −1  −1 F (α, β, 1; Jt ) Aexp (2πiτ/h3) = Jt exp −1 . (3.66) F (α, β, 1; Jt )

This gives us

−1 −1 −2  −1 −2 Aexp (2πiτ/h3) = Jt exp k0Jt + k1Jt + ... = Jt + k0Jt + ... (3.67)

We are interested in the explicit form of A, which we will calculate using the result from [10, eq. (5.4.19)]. It states that if p and q are and 0 < p < q, then

q−1 p π  p 1 X  p  2πk  ψ = −γ − lnq − cot π + cos 2πk ln 2 − 2cos , (3.68) q 2 q 2 q q k=1 where γ in this case denotes the Euler constant γ ≈ 0.5772 ... We note that 1 − α and 1 − β are both non-negative rational numbers smaller than 1. This means that we can let a c = 1 − α and = 1 − β, (3.69) b d with a, b, c, d ∈ Z, such that 0 < a < b and 0 < c < d and gcd(a,b) = gcd(c,d) = 1. We now insert

23 this into the expression for A and use equation (3.68) to rewrite the ψ-terms. This gives us

 a  c  sin(v π)  A = exp 2ψ(1) − ψ − ψ + π 1 b d cos(v1π) + cos(v2)π b−1 π  a 1 X  a  2πk  = exp −2γ + γ + lnb + cot π − cos 2πk ln 2 − 2cos 2 b 2 b b k=1 d−1     π  c  1 X  c  2πl sin(v1π) + γ + lnd − cot π + cos 2πl ln 2 − 2cos + π 2 d 2 d d cos(v1π) + cos(v2)π l=1 π  a π  c  sin(v π)  = bdexp cot π + cot π + π 1 2 b 2 d cos(v1π) + cos(v2)π " d−1 # " b−1 # 1 X  c   2πl 1 X  a  2πk  · exp cos 2πl ln 2 − 2cos exp cos 2πk ln 2 − 2cos 2 d d 2 b b l=1 k=1 π  a π  c  sin(v π)  = bdexp cot π + cot π + π 1 2 b 2 d cos(v1π) + cos(v2)π  a   c  b−1 − 1 cos 2πk d−1 − 1 cos 2πk Y  2πk  2 Y  2πk  2 · 2 − 2cos b 2 − 2cos d . b d k=1 l=1 (3.70)

Now we see that the expression for A simplifies a lot since we get:

π  a π  c  sin(v π) cot π + cot π + π 1 2 b 2 d cos(v1π) + cos(v2π) π π sin(v π) = cot (π(1 − α)) + cot (π(1 − β)) + π 1 2 2 cos(v1π) + cos(v2π) π π  π π  sin(v1π) = cot (1 + v1 − v2) + cot (1 + v1 + v2) + π (3.71) 2 2 2 2 cos(v1π) + cos(v2π) π π  π π  sin(v1π) = − tan (v1 − v2) − tan (v1 + v2) + π 2 2 2 2 cos(v1π) + cos(v2π) π sin(πv1) sin(v1π) = − π  π  + π = 0. 2 cos 2 (v1 + v2) cos 2 (v1 − v2) cos(v1π) + cos(v2π)

This means that  a   c  b−1 − 1 cos 2πk d−1 − 1 cos 2πk Y  2πk  2 Y  2πk  2 A = bd 2 − 2cos b 2 − 2cos d . (3.72) b d k=1 l=1

Comparing the expression for A with that for α3 in equation (3.23) we note that A = α3. This in particular means that the choice of ζi made by [4] must be wrong, since in that case one would have introduced an exponential factor accounting for the fact that the triangles in Figures 4 and 5 are not the same.

24 That α3 = A means in particular that

−1 −1 −2  −1 −2 q˜3 = Jt exp k0Jt + k1Jt + ... = Jt + k0Jt + .... (3.73)

The aim is to find Jt in terms ofq ˜3. This can be done by inverting the series (3.73), which is −1 possible since the coefficient of Jt is nonzero. Given a power series

2 3 y = a1x + a2x + a3x + ..., (3.74) we want to find the inverse 2 3 x = b1y + b2y + b3y + ... (3.75) By inserting equation (3.75) into (3.74), we get that

2 2 y = a1b1y + (a2b1 + a1b2)y + ... (3.76)

By equating the coefficients in this expression one gets the coefficients bi in terms of the aj. In −1 particular one has that b1 = a1 , which shows that inversion is only possible when the coefficient of the x-term is nonzero. For expressions for values of other bi, the reader is referred to [15]. By inverting the series (3.73) we get

−1 2 Jt =q ˜3 − k0q˜3 + ..., (3.77) which means that −1 Jt =q ˜3 + k0 + ..., (3.78) and we see that we can make the identification ci = ki.

This means that in order to calculate the coefficients ci, we do not need to solve a third order non-linear differential equation, instead we simply calculate the series (3.67) and invert it. ∗ Using the functions F and F , we can calculate many terms in the Fourier series of Jt, and thus we have a good way to calculate Jt numerically. We do this in SageMath using the following functions, for which the code can be found in Section A.1:

• pochhammer(a,n) calculates the Pochhammer symbol (a)n. • hypergeometric series(alpha,beta,gamma,N) calculates the series expansion of F (α, β, γ; z) with terms up to power zN . • Fstar(alpha,beta,gamma,N) calculates the series expansion of F ∗(α, β, γ; z) up to power zN .

• Jfunction(m1,m2,N) calculates the Fourier expansion of Jt for the triangle group Γ(m1,m2,∞) with terms up to power zN .

The result of doing these calculations in SageMath for different m1 and m2 is shown in Table 1. We see that for (m1, m2, ∞) = (2, 3, ∞), the resulting expression for Jt coincides with equation (2.41), whereq ˜3 = α3q = 1728q and j = 1728Jt. As stated in [4], we also see that all the coefficients ci are rational. This is easily explained by noting that the series representation of the functions −1 ∗ −1 F (α, β, 1; Jt ) and F (α, β, 1; Jt ) have rational coefficients. When calculating the series (3.67)

25 m1 m2 Jt

1 31 1823 10495 2 1778395 3 4 2 3 + + q˜3 + q˜3 + q˜3 + O(˜q3) q˜3 72 27648 2519424 18345885696

1 13 1093 47 2 620001 3 4 2 4 + + q˜3 + q˜3 + q˜3 + O(˜q3) q˜3 32 16384 8192 2147483648

1 79 42877 12957 2 1335816657 3 4 2 5 + + q˜3 + q˜3 + q˜3 + O(˜q3) q˜3 200 640000 2000000 3276800000000

1 1 41 1255 3 4 3 3 + + q˜3 − q˜3 + O(˜q3) q˜3 2 576 2654208

1 137 32111 264761 2 2463283973 3 4 3 4 + + q˜3 + q˜3 − q˜3 + O(˜q3) q˜3 288 442368 161243136 4696546738176

1 209 79019 746752 2 14507838461 3 4 3 5 + + q˜3 + q˜3 − q˜3 + O(˜q3) q˜3 450 1080000 307546875 27993600000000

1 1 19 351 3 4 4 4 + + q˜3 − q˜3 + O(˜q3) q˜3 2 256 524288

1 391 766957 101173 2 593303141583 3 4 4 5 + + q˜3 + q˜3 − q˜3 + O(˜q3) q˜3 800 10240000 128000000 838860800000000

1 1 121 15687 3 4 5 5 + + q˜3 − q˜3 + O(˜q3) q˜3 2 1600 20480000

Table 1: The first terms in Jt for different values of m1 and m2. we take the exponential of the quotient of F ∗ and F and clearly the series representation of this must also have rational coefficients.

To illustrate the invariance of Jt under M¨obiustransformations γ ∈ Γt, we do complex plots of the functions J(2,3,∞) and J(3,5,∞). These are shown in Figures 7 and 8, and one can e.g. clearly see that the function is periodic in the x-direction and that this period matches the width of the fundamental domain, just as it should.

4 Algebras of modular forms

As we saw in Section 2.2, the modular forms of a group form an algebra. The aim of this section is to describe an algorithm for determining the structure of this algebra.

26 Figure 7: Complex plot of J(2,3,∞) generated using 250 terms in the Fourier series.

Figure 8: Complex plot of J(3,5,∞) generated using 250 terms in the Fourier series.

27 4.1 Generators for the algebra of modular forms

As we have seen, the set of all holomorphic modular forms for a triangle group Γt forms an algebra M m(Γt) = m2k(Γt), (4.1) k∈N where m2k(Γt) is the vector space of modular forms of weight 2k. It turns out that we can use Jt to construct this algebra. We remember the floor and ceiling functions, bxc and dxe respectively, defined by

bxc = max {m ∈ Z | m ≤ x} , (4.2) and dxe = min {m ∈ Z | m ≥ x} . (4.3) Using the notation introduced in [4], we do the following: For k ∈ Z, we let  k   k  d2k = k − − , (4.4) m1 m2 and define l k m l m k −k k −k k ˙ m2 m f2k = (−1) Jt Jt (Jt − 1) 1 , (4.5)

dJt where J˙t =q ˜3 . We note that dq˜3 ∞ ˙ −1 X n Jt = −q˜3 + ncnq˜3 , (4.6) n=1 which gives that d2k d2k+1 f2k =q ˜3 + O(˜q3 ). (4.7) We now have the following theorem:

Theorem 4.1. [4] A basis for the vector space m2k(Γt) is the set B = {f2k(τ)Jt(τ)|0 ≤ l ≤ d2k}. For t = (m1, m2, ∞) with m1 ≤ m2 ≤ ∞, the algebra m(Γt) is generated by the minimal set of n d2l o generators G = {f2l | 2 ≤ l ≤ m2} ∪ Jt f2l | 3 ≤ l ≤ m1 .

We note in particular that this theorem means that the dimension of the vector space m2k(Γt) is given by ( d2k + 1 if k ≥ 0, dim(m2k(Γt)) = (4.8) 0 ifk < 0.

To determine the structure of the algebra of modular forms, we proceed to find the relations between the generators of this algebra. We begin by making an observation in the case that m1 = 2 and m2 = m, i.e. when we are dealing with a Hecke group. Consider the graded polynomial algebra

R = Q [x4, x6, . . . , x2m] , (4.9)

28 where each generator x2k has weight 2k, and define an algebra homomorphism φ : R → m(Γ(2,m,∞)) such that φ : xi 7→ fi. The kernel of this map is a homogeneous ideal, I, in R which describes relations between the fi, and we want to find this ideal. The idea is to examine products of the Fourier series for the generators f2k to determine enough relations between them in order to generate the whole ideal I. This method can of course be extended to any triangle group Γ(m1,m2,∞) by simply adding more generators in the definition of R that are of the same weight as the x2k according to Theorem 4.1. Suppose that we have found some relations between the generators and used those to generate an ideal J. Then we know that J ⊆ I. To know that we have found the whole ideal, i.e. that J = I, we will use the concept of Hilbert series, which will be explained in the upcoming section.

4.2 The Hilbert series

In this section we will briefly describe the Hilbert series, see [13], and see how we can use this concept to determine if we have found all relations between the generators or not. Consider a graded C-algebra M R = Rn. (4.10) n≥0 A homogeneous ideal of R is an ideal I that is generated by homogeneous elements of R, i.e. M I = In, (4.11) n≥0 where In ⊆ Rn for all n. The quotient S = R/I is also naturally a graded ring, M S = Sn. (4.12) n≥0

Now the Hilbert function of S is defined by

HFS(n) = dim(Sn), (4.13) for n = 0, 1, 2,... We also define the Hilbert series of S as the generating function

∞ X n HSS(t) = HFS(n)t . (4.14) n=0

Now we have the following result: Lemma 4.2. Let I and J be homogeneous ideals of a graded ring R. If J ⊆ I and R/I and R/J have the same Hilbert series, then I = J.

L L Proof. Let R/I = SI = n SI n and R/J = SJ = n SJ n. That SI and SJ have the same Hilbert series, means that dim(SI n) = dim(SJ n) for all n. This in turn means that dim(In) = dim(Jn) for all n. Now, since J ⊆ I, we know that Jn ⊆ In for all n, and thus we must have that Jn = In for all n. Therefore J = I.

29 To make sure that we have found all relations between the generators, we thus want to compare the Hilbert series for the ideal we generated using the relations we calculated, i.e. J, to the Hilbert series for the algebra of modular forms. If these are equal, we have found all relations between the generators. We now proceed to explicitly calculate the Hilbert series for the algebra of modular forms, M m(Γt) = m2k(Γt). (4.15) k∈Z

From Theorem 4.1, we know that  k   k  HFM (2k) = dim(m2k(Γt)) = k − − + 1, (4.16) m1 m2 which means that we can calculate the Hilbert series for the algebra of modular forms for any given triangle group (m1, m2, ∞). In order to do this, we let L = lcm(m1, m2) and M = m(Γt) and note the following:

Proposition 4.3. For the algebra m(Γt) with t = (m1, m2, ∞) the following is true about the Hilbert function: 1) For all k ∈ Z, k ≥ 0 HFM (2k + 2L) = HFM (2k) + d2L. (4.17) 2) If 0 ≤ k < L, then HFM (2k) ≤ d2L. (4.18)

Proof. For the first statement we note that L/m1 and L/m2 are integers, which gives us k + L k + L HFM (2k + 2L) = k + L + 1 − − m1 m2  k   k  L L = k + 1 − − + L − − (4.19) m1 m2 m1 m2 L L = HFM (2k) + L − − = HFM (2k) + d2L. m1 m2 For k < L we have that  k   k  HFM (2k) = k − − + 1 m1 m2 k k ≤ k − − + 1 (4.20) m1 m2 L L < L − − + 1 = d2L + 1. m1 m2

We note that the last inequality is strict (since at least one of m1 and m2 must be greater than 2), and since we know that it is an inequality between integers, it translates into

HFM (2k) ≤ d2L. (4.21)

30 Before using these results we define the following polynomial:

X n pi(t) = t . (4.22) n s.t. HFM (n)=i

Because of Proposition 4.3 we now see that the Hilbert series for a group (m1, m2, ∞) is given by

d2L ∞ ! X X 2Ln HSM (t) = pi(t) (i + d2Ln) t . (4.23) i=1 n=0 Calculating the inner sum gives us

d2L 2L 2L X d2Lt − it + i HSM (t) = pi(t) . (4.24) 2L 2 i=1 (t − 1) This sum is easily calculated in SageMath. By Proposition 4.3, we see that to find the polynomials pi(t) we only need to compute HFM (n) for 0 ≤ n ≤ 4L.

4.3 Implementation in SageMath

We are now ready to write a program that finds all relations between the generators of the algebra of modular forms. We note that the method for doing so described in the previous sections works

for general triangle groups Γ(m1,m2,∞), but for simplicity we will implement it only for Hecke groups, i.e. in the case m1 = 2. In this case, the generators of the algebra of modular forms for consist of the set {f2k | k = 2, . . . , m2} and all generators thus have different weights. The procedure for finding the relations is as follows: Algorithm 1. N 1. Fourier expansions of the generators f2k are determined and truncated at some suitable power q (what is suitable will be discussed later). (~n) 2. Some maximum weight wmax is chosen and for each weight w ≤ wmax all products, P = Qm f nj , with ~n = (n , n , . . . , n ) ∈ m−1, of the generators with total weight w are deter- j=2 2kj 1 2 m N mined. We index these products with an i to differ between the possible different products of the (~n) same weight, i.e. we write Pi . Finding these products amounts to finding integer solutions of the P Diophantine equation k 2knk = w, 2 ≤ k ≤ m which we do by finding all integer partitions of w/2 that do not contain the number 1. P (~n) 3. For each weight w, we study the system of equations i aiPi = 0, ai ∈ Q. We turn this into a (~n) system of linear equations by calculating the Fourier series of the products Pi and taking only the first N coefficients into account. Solving this system gives us the relations between the generators. Here we note that the value of N must be large enough, so that the matrix M describing the system of equations satisfies rank(M) = d2w+2.

4. The determined relations are used to generate the ideal J = J(wmax) described in Section 4.1.

31 5. To check whether or not we have found the ideal I described in Section 4.1 we calculate the Hilbert series for m(Γt) using equation (4.24) and for the ideal J using the built in SageMath function. If these are equal we know that we have found all relations. If they are not equal, we go back and choose a larger wmax. The code used to implement this algorithm in SageMath can be found in Section A.2, but we give a short description here of the functions used:

• f2k(m1,m2,k,N) calculates the Fourier series for the generator f2k for the algebra of modular N forms of the group Γ(m1,m2,∞) up to power z . • generators(m1,m2) calculates the Fourier series for all generators for the algebra of modular

forms for the group Γ(m1,m2,∞) and returns those in two lists, one that contains the ”pure” f2k-generators and one that contains the rest. We note that in the case of Hecke groups, only the first list can be non-empty. • two partitions(n) finds all partitions of the number n with exactly two terms that do not contain the number one. • generator products(m,fgenerators,weight) finds the Fourier series of all products of the generators of the algebra of modular forms for the Hecke group Γ(2,m,∞) of weight weight. fgenerators is a list containing the Fourier series of all f2k. • relation finder(genprod) finds all relations between the elements in the list genprod, which contains the Fourier series of the generator products obtained from generator products(m,fgenerators,weight). • xtof(fgen,relationer,partitions) transforms the relations obtained from relation finder(genprod) into relations between the f2k. • hilbert check(m,J) calculates the Hilbert series for the ideal J, which is an ideal in the polynomial algebra R defined in equation (4.9), and compares it to the Hilbert series for the algebra of modular forms m(Γ(2,m,∞)). If they are they are equal, the function returns the text ”All relations found”. If they are different the function returns the text ”Relations missing”. In Table 2 we list a set of generators for the ideal of all relations for the first few Hecke groups.

32 m Generators for the ideal I 3 0

3 2 4 f4 − f6 − f4f8

2 2 f4 f8 − f8 − f6f10 5 f6f8 − f4f10 3 2 f4 − f6 − f4f8

2 2 f10 − f4 f12 + f8f12 f8f10 − f6f12 2 f4 f8 − f6f10 − f4f12 6 2 f8 − f4f12 f6f8 − f4f10 3 2 f4 − f6 − f4f8

2 f4f8f12 − f12 − f10f14 f10f12 − f8f14 2 f10 − f6f14 2 f4 f12 − f8f12 − f6f14 f f − f f 7 8 10 4 14 f6f12 − f4f14 2 f4 f8 − f6f10 − f4f12 2 f8 − f4f12 f6f8 − f4f10 3 2 f4 − f6 − f4f8

2 f14 − f4f8f16 + f12f16 f12f14 − f10f16 2 f12 − f8f16 2 f10f14 − f4 f16 + f8f16 f10f12 − f6f16 f8f14 − f6f16 2 f10 − f6f14 2 8 f4 f12 − f6f14 − f4f16 f8f12 − f4f16 f8f10 − f4f14 f6f12 − f4f14 2 f4 f8 − f6f10 − f4f12 2 f8 − f4f12 f6f8 − f4f10 3 2 f4 − f6 − f4f8

Table 2: Generators for the ideal containing all relations between the generators f2k of the algebra of modular forms for different Hecke groups.

33 4.4 Results

Studying the relations in Table 2, we see that it seems like relations appearing for (2, m, ∞) also occur for (2, m + 1, ∞). In fact we can prove the following:

Proposition 4.4. Consider the Hecke groups Γ(2,m,∞) and Γ(2,m+1,∞), and let R(m) = Q [x4, . . . , x2m] and R(m+1) = Q [x4, . . . , x2m+2]. Let I(m) be the ideal in R(m) such that m(Γ(2,m,∞)) = Rm/Im and let I(m+1) be the ideal in R(m+1) such that m(Γ(2,m+1,∞)) = R(m+1)/I(m+1). Then we can define an injective map φ : Rm ,→ Rm+1 by φ : xi 7→ xi, for which we have that Im+1 ∩ φ(Rm) = φ(Im).

Proof. For a Hecke group we have that

l m k −k l k m k k k m k k d e−k k −k f = (−1) J˙ J 2 (J − 1) m1 = (−1) J˙ J m (J − 1)d 2 e 2k t t t t t t (4.25) k k −k k k ˙ d m e −b c = (−1) Jt Jt (Jt − 1) 2 For the generators k ≤ m, which means that

 k  = 1, (4.26) m so we get k ˙ k 1−k −b k c f2k = (−1) Jt Jt (Jt − 1) 2 . (4.27)

Except for the explicit form of Jt we note that this expression is independent of which Hecke group we are considering.

A relation between the fi is, after dividing by an appropriate power of J˙t, of the form of a sum of rational functions in Jt equal to zero. Since Jt is a transcendental function relations are independent of the actual function Jt (one can think of Jt as a transcendental variable). Therefore all relations occurring for one Hecke group occur also for the next one.

From Table 2, taking Proposition 4.4 into account, we note that also the following appears to be the case:

Conjecture 4.5. Consider the algebra m(Γ(2,m,∞)), which is generated by {f2k | k = 2, . . . m}. Qk−1 nj Each product f2kf2l, l ≤ k − 2, can then be written as a linear combination of products j=2 f2j , Pk−1 where nj ∈ N, such that j=2 2jnj = 2k + 2l. If this conjecture is true, we also have the following:

Q lj Conjecture 4.6. For an algebra m(Γ(2,m,∞)) all products f2j, lj = 0, 1, 2,... can be rewritten as n1 n2 a linear combination of products of the form f2k f2k+2, where n1 and n2 are non-negative integers. For example, using the relations in Table 2 we have that

3 2 f4f8f12 = f8 − f12 (4.28) and f6f16 = f10f12. (4.29)

34 These conjectures are not yet proven, but as we can see from Table 2, they are at least true for Hecke groups Γ(2,m,∞) up to m = 8. They will however be useful in Section 5 where we attempt to generalize the Ramanujan equations.

5 Differential equations for modular forms

In this section we aim at finding differential equations of modular forms for triangle groups that can be seen as generalizations of the Ramanujan equations. Before we do this, we will study a generalization of the Serre derivative.

5.1 Generalization of the Serre derivative

Let L = lcm(m1, m2), with lcm(m1, ∞) = m1 and lcm(∞, ∞) = 1. In [4], the function ∆t(τ) = f2L(τ), which is a holomorphic modular form of weight 2L, is defined.

Furthermore, using ∆t, they also make the following definition: 1 d∆ E (τ) = ∆−1 t . (5.1) 2;t 2πi t dτ Since d 2πi d = q˜3 , (5.2) dτ h3 dq˜3 we can also write E2;t as a function ofq ˜3;

q˜3 −1 d∆t E2;t(˜q3) = ∆t . (5.3) h3 dq˜3

We are interested in the modularity of E2;t and will prove that it is in fact a quasi-modular from. This result is described incorrectly in [4, Thm. 2], and we provide a correct version of it.

Proposition 5.1. The function E2;t is a quasi-modular form of weight two and depth one for Γt, a b i.e. for all γ = ∈ Γ c d t

Lc E (γ.τ) = (cτ + d) + (cτ + d)2E . (5.4) 2;t πi 2;t

The space of all holomorphic quasi-modular forms of Γt is m(Γt)[E2;t]

35 Proof. We provide a proof only of equation (5.4). We have that

aτ + b 1 1 d∆ aτ + b E = t 2;t cτ + d 2πi aτ + b dτ cτ + d ∆ t cτ + d

1 1 d 2L  2 = 2L (cτ + d) ∆t(τ) (cτ + d) 2πi (cτ + d) ∆t(τ) dτ (5.5)   1 1 2L+1 2L+2 d∆t = 2L 2L(cτ + d) c∆t(τ) + (cτ + d) 2πi (cτ + d) ∆t(τ) dτ

L 1 1 d∆t(τ) 2 L 2 = c(cτ + d) + (cτ + d) = c(cτ + d) + E2;t(cτ + d) . πi 2πi ∆t(τ) dτ πi

Now we see that in the special case of t = (2, 3, ∞), i.e. when the triangle group is simply the modular group PSL(2, Z), equation (5.4) reduces to equation (2.33). Also, inserting the expression for ∆t = f2L in terms ofq ˜3 into equation (5.3) and comparing this to the series expansion of E2 for the modular group, we see that E2;t provides a good generalization of E2. This motivates introducing the differential operator D2k : m2k(Γt) → m2k(Γt). It is defined incorrectly in [4, Thm. 2], but we provide the following correct version of it:

1 d 2k D = − E . (5.6) 2k 2πi dτ 2L 2;t In order to get better arithmetic properties, we will modify this expression slightly and instead use the operator D˜2k = h3D2k. (5.7)

The reason for this normalization will be clear later on. Now we combine these operators D˜2k for k = 0, 1, 2,... into the operator D˜ : m(Γt) → m(Γt), (5.8) P acting on an element n ang2n, where g2n are modular forms of weight 2n, by ! X X D˜ ang2n = anD˜2ng2n. (5.9) n n

In can now be proven that D˜ is a derivation. Namely, let g2k and g2m be modular forms of weight 2k and 2m respectively, and consider the action of D˜ on the product of g2k and g2m. We get that h d 2k + 2m D˜(g g ) = 3 (g g ) − h E g g 2k 2m 2πi dτ 2k 2m 3 2L 2;t 2k 2m h3 dg2k h3 dg2m 2k 2m = g2m + g2k − h3 E2;tg2kg2m − h3 E2;tg2kg2m 2πi dτ 2πi dτ 2L 2L (5.10)  h dg 2k   h dg 2m  = 3 2k − h E g g + g 3 2m − h E g 2πi dτ 3 2L 2;t 2k 2m 2k 2πi dτ 3 2L 2;t 2m

= D˜(g2k)g2m + g2kD˜(g2m).

36 We will use this generalized Serre derivative on the Fourier expansions of modular forms, and to do this, it is better to rewrite D˜2k in terms ofq ˜3, which gives us h d 2k D˜ = 3 − h E 2k 2πi dτ 3 2L 2;t h3 d dq˜3 2k = − h3 E2;t (5.11) 2πi dq˜3 dτ 2L d 2k =q ˜3 − h3 E2;t. dq˜3 2L

It now becomes clear why we introduced the factor of h3. Namely, when the Serre derivative acts on a Fourier expansion with rational coefficients, we would like the new series have rational coefficients too, which is possible if we multiply by h3. We now note that (5.6) is defined in such a way that it reduces to the ordinary Serre derivative when Γt is the modular group, PSL(2, Z). We also see that not only E2;t becomes E2 when Γt = PSL(2, Z), but also that the set of generators for m(Γt) for PSL(2, Z) is simply {E4,E6}. This motivates the question whether or not it is possible to generalize also the Ramanujan equations to other groups than the modular group. This will be described in detail in the next section.

5.2 Generalization of the Ramanujan equations

In this section we will attempt to generalize the two Ramanujan equations described in equations (2.39)-(2.40). In these equations the generators of the algebra of modular forms are differentiated and these derivatives are then expressed using the other generators. We will attempt to do the same for triangle groups other than the modular group.

Consider the triangle group Γ(m1,m2,∞). The algebra m2k(Γ(m1,m2,∞)) has generators with weights 4,..., 2m. Consider such a generator of weight 2w. Letting the generalized Serre derivative act on this generator, we get a modular form of weight 2w + 2. Now we would like to express this weight-2w + 2 modular form using the generators of m2w+2(Γ(m1,m2,∞)). In order to be able to compare the resulting differential equations for different triangle groups, we would like to find a way to construct a basis for m2w+2(Γ(m1,m2,∞)) that works for all triangle groups. We will attempt to do this for Hecke groups, so consider the triangle group Γ(2,m,∞) and the Serre derivative of the generator f2w, Df˜ 2w. Assuming that conjecture 4.6 is true, we have that n1 n2 f can be written as a sum of products of the form f2k f2k+2. It would therefore be nice if one could n1 n2 show that the set of products f2k f2k+2 with 2w + 2 = 2kn1 + (2k + 2)n2 and k = 2, . . . , m − 1 forms a basis for m2w+2(Γ(2,m,∞)) for w = 2, . . . , m. We denote this set of products by P2w+2.

We know that the dimension of m2w+2(Γ(2,m,∞)) is given by

w + 1 w + 1 dim(m (Γ )) = d + 1 = w + 1 − − + 1, (5.12) 2w+2 (2,m,∞) 2w+2 2 m

37 which in particular means that

 w + 1 w + 1 w + 1 − = if w ≤ m − 1,  2 2 dim(m (Γ )) = (5.13) 2w+2 t w + 1 w + 1 w + 1 − − 1 = − 1 if w = m.  2 2

Now we proceed to determine the number of elements in the set P2w+2. In order to do this we will need to know a little bit more about integer partitions. For an integer n, we define a close partition of n as a partition where the difference between the largest and smallest number in the partition is at most one, e.g. the close partitions of 5 are 1 + 1 + 1 + 1 + 1 = 1 + 1 + 1 + 2 = 1 + 2 + 2 = 2 + 3 = 5. Now we have the following result: Proposition 5.2. Let n be an integer. The number of close partitions of n that do not contain the  n  number 1 is 2 .

Proof. Since we restrict ourselves to partitions with no ones we know that the maximum number of  n  terms in a partition of n is 2 . Now we want to show that there exists precisely one close partition  n  of n with A terms, where 1 ≤ A ≤ 2 . A close partition corresponds to writing n = a(A − k) + (a + 1)k, (5.14) where k and a are integers such that 0 ≤ k < A and 2 ≤ a ≤ n, which means that we want to show that there exists precisely one pair (a, k) for each A. We can rewrite this expression as

n − k n k a = = − . (5.15) A A A It is clear that since 0 ≤ k < A, we can, for each A, choose a k such that this quotient is an integer  n  and that this choice of k is unique. Thus we have precisely 2 close partitions without ones.

We now see that finding the number of elements in P2w+2 corresponds to finding the number of close partitions of w + 1 consisting of numbers in the interval 2, . . . , m. Denoting the number of elements in P2w+2 by |P2w+2| we have that

w + 1  if w ≤ m − 1,  2 |P | = (5.16) 2w+2 w + 1  − 1 if w = m.  2

This means that |P2w+2| = dim(m(2w+2)(Γ(2,m,∞))) for w = 2, . . . , m. We thus have the following conjecture

Conjecture 5.3. For a Hecke group Γ2,m,∞, a basis for the space m(2w+2)(Γ(2,m,∞))) with w = 2, . . . , m is given by the set P2w+2.

38 We note that conjecture 5.3 and 4.6 are true if we can prove conjecture 4.5. Using these results, we are now ready to formulate an algorithm for determining differential equa- tions corresponding to the Ramanujan equations for the Hecke group Γ(2,m,∞) Algorithm 2.

1. The Fourier series for all generators f2k for the algebra m(Γ(2,m,∞)) are calculated to the power N.

2. For the generator f2w, the Fourier series for generalized Serre derivative of f2w, Df˜ 2w, is calculated to the power N. We remember that this is a modular form of weight 2w + 2.

3. The set P2w+2 is determined by finding all integer solutions to the equation 2w+2 = 2kn1+(2k+2)n2 with k = 2, . . . , m. This is done by finding all close partitions of w + 1 that do not contain the number 1. The elements in P2w+2 are written as Fourier series calculated to the power N. ˜ P 4. Now the equation Df2w = i aiPi, where Pi ∈ P2w+2 and ai ∈ Q, is solved by writing all terms as Fourier series truncated at some power N, which gives us a linear system of equations which has a solution if N is large enough so that the matrix M describing the system of equations satisfies rank(M) = dim(m2w+2(Γ2,m,∞)).

5. Steps 2-4 are repeated for all generators f2k. The code used to implement this in SageMath can be found in Section A.3, but we give a brief overview of the functions used here. • close products(m,fgenerators,weight) calculates the Fourier series for all products of the generators f2k in the set P2w+2 for the algebra m(Γ(2,m,∞)) of weight weight and returns those in a list. • equation coefficients(m,gen,genprod,k) calculates the coefficients in the generalized Ra- manujan equations when letting the Serre derivative act on the generator f2k for the group Γ(2,m,∞). The result for the first few Hecke groups is shown in Table 3. We note in particular that for m = 3 we get the original equations (2.39) and (2.40) back.

39 m Differential equation 1 Df˜ = − f 4 3 6 3 1 Df˜ = − f 2 6 2 4 1 Df˜ = − f 4 2 6 1 4 Df˜ = −3f 2 + f  6 4 4 8

Df˜ 8 = 0

3 Df˜ = − f 4 5 6 1 Df˜ = −9f 2 + 4f  6 10 4 8 5 1 Df˜ = − f 8 5 10 1 Df˜ = −f 3 + f 2 10 2 4 6 2 Df˜ = − f 4 3 6 1 Df˜ = −2f 2 + f  6 2 4 8 1 6 Df˜ = − f 8 3 10 1 Df˜ = −4f 3 + 4f 2 + f  10 6 4 6 12

Df˜ 12 = 0

5 Df˜ = − f 4 7 6 1 Df˜ = −15f 2 + 8f  6 14 4 8 3 D˜8f = − f 8 7 10 7 1 Df˜ = −11f 3 + 11f 2 + 4f  10 14 4 6 12 1 Df˜ = − f 12 7 14 1 Df˜ = − f 2 14 2 8

Table 3: Differential equations for the generators of the algebra m(Γ(2,m,∞)).

40 6 Discussion

In this thesis we have described some ways to generalize the theory of modular forms to other groups than the modular group PSL(2, Z), more specifically to the case of triangle groups with a cusp. We have written SageMath code that calculates the Hauptmodul, finds relations between the generators of the algebra of modular forms for a Hecke group, and that finds generalized versions of some of the Ramanujan equations for Hecke groups. We have proven Proposition 4.4 and formulated Conjectures 5.3, 4.5 and 4.6, which remain unproven, but would be of interest to prove since they would give a nice way to generalize the Ramanujan equations to all Hecke groups. If one could do this, it would also be of interest to see if one could find some way to predict the coefficients in the differential equations directly without having to go through all the calculations.

41 A SageMath-code

Here we present the SageMath-code used to calculate the results in Tables 1, 3 and 2.

A.1 Fourier series for Jt

The code for the functions described in Section 3.2 is as follows: def pochhammer(a,n): c = 1 for b in srange(a,a+n): c = c*b return c def hypergeometric_series(alpha,beta,gamma,N): F = 0 for n in range(N): F = F + pochhammer(alpha,n)*pochhammer(beta,n)/(pochhammer(gamma,n)*\ factorial(n))*q^n return F def Fstar(alpha,beta,gamma,N): FS = 0 for n in range(1,N+1): c = pochhammer(alpha,n)*pochhammer(beta,n)/(pochhammer(gamma,n)*\ factorial(n)) e = 0 for p in range(n): e = e + 1/(alpha + p) + 1/(beta + p) - 2/(gamma + p) FS = FS + c*e*q^n return FS def Jfunction(m1,m2,N): alpha = 1/2*(1-1/m1+1/m2) beta = 1/2*(1-1/m1-1/m2) gamma = 1 qtilde = q*(R((Fstar(alpha, beta, gamma, N)/\ hypergeometric_series(alpha,beta,gamma,N))).exp()) J = 1/(qtilde.reverse()) return J

A.2 Generator relations for Hecke groups

The code for the functions described in Section 4.3 is as follows:

42 def f2k(m1,m2,k,N): J = Jfunction(m1,m2,N) f = (-1)^k*(q*diff(J))^k*J^(ceil(k/m2)-k)*(J-1)^(ceil(k/m1)-k) return f def generators(m1,m2): fgenerators = [(P(R(f2k(m1,m2,k,N).truncate(N))),k) for k in range(2,m2+1)] jfgenerators = [(P(R((Jfunction(m1,m2,N)*f2k(m1,m2,k,N)).truncate(N))),k)\ for k in range(3,m1+1)] return fgenerators, jfgenerators def two_partitions(n): P = [] for i in range(2,floor(n/2)+1): P = P+[[i,n-i]] return P def p_partitions(n,p): partitions = two_partitions(n) for i in range(p-2): new_part = [partitions[k] for k in range(len(partitions))] for j in range(len(partitions)): part = two_partitions(partitions[j][-1]) part = [part[k]+[partitions[j][l] for l in range(len(partitions[j])-1)]\ for k in range(len(part))] new_part = new_part+part partitions = [new_part[k] for k in range(len(new_part))] partitions = uniq([tuple(sorted(partitions[k]))\ for k in range(len(partitions))]) return partitions def generator_products(m,fgenerators,weight): PA = p_partitions(weight/2,ceil(weight/4)) PA = [p for p in PA if p[-1]<=m] if weight < 2*m+2: PA = PA+[(weight/2)] genprod = [] for i in range(len(PA)): L = list(PA[i]) index = [L[k]-2 for k in range(len(L))] product = [1] for j in range(len(index)): product = [P(R((product[k]*fgenerators[index[j]][0]).truncate(N)))\ for k in range(len(product))]

43 product = [(product[k],L) for k in range(len(product))] genprod = genprod + product return genprod, PA def relation_finder(genprod): XP = PolynomialRing(QQ,’x’,len(genprod)) L = list(XP.gens()) M = MatrixSpace(QQ,len(genprod),N) koeff = [] for i in range(len(genprod)): koeff = koeff + genprod[i][0].padded_list() A = (M(koeff)) K = (A.kernel()).basis() relationer = [] for i in range(len(K)): relationer = relationer + [sum([L[k]*QQ(K[i][k])\ for k in range(len(K[0]))])] return relationer def xtof(fgen,relationer,partitions): fproducts = [] for i in range(len(partitions)): prod = 1 for j in range(len(list(partitions[i]))): prod = prod*fgen[partitions[i][j]-2] fproducts = fproducts+[prod] frelationer = [] for i in range(len(relationer)): frelationer = frelationer + [relationer[i](fproducts)] return frelationer def hilbert_check(m,I): hs = I.hilbert_series(grading=range(4,m*2+1,2)) t = hs.parent().gens()[0] L = lcm(2,m) E = L-L/2-L/m summa = 0 for i in range(1,E+1): tvektor = [] for k in range(4*L): if k+1-ceil(k/2)-ceil(k/m)==i: tvektor = tvektor + [(k+1-ceil(k/2)-ceil(k/m),2*k)] tvektor = [tvektor[j][0]*t^(tvektor[j][1]) for j in range(len(tvektor))] tpolynom = sum(tvektor) summa = summa + tpolynom*((E/i)*t^(2*L)-t^(2*L)+1)/(t^(2*L)-1)^2

44 if hs-summa==0: print ’All relations found.’ else: print ’Relations missing.’

To use this code we can do the following:

# Specify the triangle group, the power N at which the Fourier series should be # truncated and define the rings which we will be using. m1 = 2 m2 = 7 N = m2-ceil(m2/m1)-ceil(m2/m2)+10 P. = PolynomialRing(QQ,’q’) R. = PowerSeriesRing(QQ,’q’,default_prec=N) Fspace = PolynomialRing(QQ,[’f%s’%p for p in range(4,m2*2+1,2)],\ order=TermOrder(’wdegrevlex’,range(4,m2*2+1,2))) fgen = Fspace.gens()

# Find the relations between the generators. [A,B] = generators(m1,m2) allrelations = [] for weight in range(6,2*m2+20,2): products, partitions = generator_products(m2,A,weight) G = relation_finder(products) frelations = xtof(fgen,G,partitions) allrelations = allrelations + frelations

# Display a basis for the calculated ideal of relations and check if it is # complete. print ’------’ print ’m1 = ’,m1,’m2 = ’,m2 I = Fspace.ideal(allrelations) GB = (Fspace.ideal(allrelations)).groebner_basis() show(GB) hilbert_check(m2,I)

A.3 Differential equations for modular forms

The code for the functions described in Section 5.2 is as follows: def close_products(m,fgenerators,weight): PA = p_partitions(weight/2,ceil(weight/4))

45 PA = [p for p in PA if p[-1]<=p[0]+1] PA = [p for p in PA if p[-1]<=m] if weight < 2*m+2: PA = PA+[(weight/2)] genprod = [] for i in range(len(PA)): L = list(PA[i]) index = [L[k]-2 for k in range(len(L))] product = [1] for j in range(len(index)): product = [P(R((product[k]*fgenerators[index[j]][0]).truncate(N)))\ for k in range(len(product))] product = [(product[k],L) for k in range(len(product))] genprod = genprod + product return genprod, PA def equation_coefficients(m,gen,genprod,k): L = lcm(2,m) delta = f2k(2,m,L,N) Dfh = P(R((q*diff(gen)-q*(2*k)/(2*L)*1/delta*diff(delta)*gen).truncate(N))) koefficienter = [] for i in range(len(genprod)): koefficienter = koefficienter + genprod[i].padded_list() M = matrix(QQ,len(genprod),koefficienter).transpose() if Dfh == 0: V = vector(QQ,[0 for j in range(N)]) else: V = vector(QQ,Dfh.padded_list()) M = M.augment(V) RM = M.rref() return M,RM To use this code we can do the following:

# Specify the triangle group, the power N at which the Fourier series should be # truncated and define the rings which we will be using. m1 = 2 m2 = 7 N = m2-ceil(m2/m1)-ceil(m2/m2)+10 P. = PolynomialRing(QQ,’q’) R. = PowerSeriesRing(QQ,’q’,default_prec=N) Fspace = PolynomialRing(QQ,[’f%s’%p for p in range(4,m2*2+1,2)],order=TermOrder\ (’wdegrevlex’,range(4,m2*2+1,2))) fgen = Fspace.gens()

46 # Take the Serre derivative of each of the generators f_{2w} and express the # result using the products in the set P_{2w+2}. The coefficients used to do # this are found in the displayed matrices. [A,B] = generators(m1,m2) for j in range(4,2*m2+1,2): products, partitions = close_products(m2,A,j+2) prod = [products[i][0] for i in range(len(products))] M,MR = equation_coefficients(m2,A[j/2-2][0],prod,j/2) print ’------’ print ’f’,j print j/(2*lcm(m1,m2)) print MR

References

[1] Bruinier, J. H., van der Geer, G., Harder, G., Zagier, D. 2008. The 1-2-3 of Modular Forms: Lectures at a Summer School in Nordfjordeid, Norway. Springer Verlag. [2] Carath´eodory, C. 2001. Theory of functions of a complex variable (Vol. 1). American Mathe- matical Soc.. [3] Conrad, K. SL2(Z). Expository Papers, http://www.math.uconn.edu/ kconrad/blurbs/grouptheory/SL(2,Z).pdf. [4] Doran, C., Gannon, T., Movasati, H., Shokri, M. 2013. Automorphic forms for triangle groups. Communications in number theory and physics. 7(4) 689-737. [5] Gannon, T. 2006. Moonshine beyond the Monster: The bridge connecting algebra, modular forms and physics. Cambridge University Press. [6] Katok, S. 1992. Fuchsian groups. University of Chicago press. [7] Leo, J. G. 2008. Fourier coefficients of triangle functions. ProQuest. [8] Miyake, T. 1989. Modular forms. Springer-Verlag. [9] Nehari, Z. 1975. Conformal mapping. Courier Corporation. [10] NIST Digital Library of Mathematical Functions. http://dlmf.nist.gov/, Release 1.0.14 of 2016- 12-21. F. W. J. Olver, A. B. Olde Daalhuis, D. W. Lozier, B. I. Schneider, R. F. Boisvert, C. W. Clark, B. R. Miller, and B. V. Saunders, eds. [11] Raleigh, J. 1962. On the Fourier coefficients of triangle functions. Acta Arithmetica, 8(1), 107-111. [12] SageMath, the Sage Mathematics Software System (Version 7.5.1). The Sage Developers. 2017. http://www.sagemath.org.

47 [13] Stanley, R. P. 1978. Hilbert functions of graded algebras. Advances in Mathematics, 28(1), 57-83. [14] Weisstein, Eric W. ”Bernoulli Number.” From MathWorld–A Wolfram Web Resource. http://mathworld.wolfram.com/BernoulliNumber.html [15] Weisstein, Eric W. ”Series Reversion.” From MathWorld–A Wolfram Web Resource. http://mathworld.wolfram.com/SeriesReversion.html [16] Weisstein, Eric W. ”Holomorphic Function.” From MathWorld–A Wolfram Web Resource. http://mathworld.wolfram.com/HolomorphicFunction.html [17] Weisstein, Eric W. ”Meromorphic Function.” From MathWorld–A Wolfram Web Resource. http://mathworld.wolfram.com/MeromorphicFunction.html [18] Wikipedia, the free encyclopedia. Modular group. https://en.wikipedia.org/wiki/Modular group, accessed 2016-12-28. [19] Wikipedia, the free encyclopedia. Triangle group. https://en.wikipedia.org/wiki/Triangle group, accessed 2016-12-15.

48