I know how to build a basis of the vector space of cusp forms for the congruence subgroups $\Gamma_1 (N)$ and $\Gamma_0 (N)$, but I couldn't find in the literature how to build a basis for $\Gamma(N)$. Also, Sage doesn't seem to be able to do this.

For instance, for $N=6$ and weight 2, the dimension of this space is 1. Is it possible to compute explicitely the Fourier coefficients of the cusp form ?

  • 2
    $\begingroup$ You have to specify the weight of the cusp form. How can one sat the dimension is one otherwise? $\endgroup$ Oct 28, 2014 at 16:24
  • $\begingroup$ Sorry I forgot to say that I am mainly interested in weight 2. I edited the question. $\endgroup$
    – Antoine
    Oct 28, 2014 at 16:37

1 Answer 1


You can do this in Sage but "in disguise". The idea is that if $f(z)$ is a cusp form for $\Gamma(N)$, then $g(z) := f(Nz)$ is a cusp form for a certain subgroup intermediate between $\Gamma_0(N^2)$ and $\Gamma_1(N^2)$ which Sage calls $\Gamma_H(N^2, [N + 1])$; the $N + 1$ is here because it generates the subgroup of $(\mathbf{Z} / N^2 \mathbf{Z})^\times$ consisting of classes that are 1 mod $N$. If $f(z) = \sum a_n q^{n/N}$, then $g(z) = \sum a_n q^n$, so if you have the $q$-expansion of $g$ then you have the $q$-expansion of $f$ and vice versa.

| Sage Version 5.9, Release Date: 2013-04-30                         |
| Type "notebook()" for the browser-based notebook interface.        |
| Type "help()" for help.                                            |
sage: G = GammaH(36, [7])
sage: G.index() == Gamma(6).index()
sage: [g.q_expansion(25) for g in CuspForms(G, 2).basis()]
[q - 4*q^7 + 2*q^13 + 8*q^19 + O(q^25)]

(Note that this $g$ actually has trivial character, and is of CM type, so its $q$-expansion has lots of zero coefficients.)

  • $\begingroup$ Thank you very much for the detailed and precise answer ! Maybe it's a stupid question but is there any particular reason why Sage is not able to do it directly, or is it just a matter of time, and we just have to wait for it to be implemented ? $\endgroup$
    – Antoine
    Oct 29, 2014 at 9:02
  • $\begingroup$ Sage is open source and welcomes all contributions; if you want this feature, then you can implement it yourself :-). I think the main reason nobody's done this yet is because the answers would be power series in $q^{1/N}$, and this is fiddly to work with because all the existing modular forms code in Sage works with power series in $q$. $\endgroup$ Oct 29, 2014 at 14:03
  • $\begingroup$ Thanks I can understand that working with fractional powers can be annoying. When I know a little more about all that stuff maybe I'll consider contributing. Anyway it is already a wonderful tool. $\endgroup$
    – Antoine
    Oct 29, 2014 at 23:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.