Basis for Modular Forms over Congruence Subgroup I'm aware that a basis of the modular forms of weight $k$ over $SL_2(\mathbb{Z})$ is $\{E_{4}^iE_{6}^j: 4i + 6j = k\}$ where $E_4$ and $E_6$ are the 4th and 6th Eisenstein series respectively. I'm wondering if a similar basis exists for principal congruence subgroups. In particular, does there exist a similar basis for the set of modular forms of weight k over $\Gamma(2)$?   
 A: The group $\Gamma(2)$ is conjugate to $\Gamma_0(4)$; if $f(\tau)$ is a modular form for $\Gamma(2)$, then $f(2\tau)$ is modular of level $\Gamma_0(4)$ and vice versa. So it suffices to compute the ring of modular forms of level $\Gamma_0(4)$. Sage has functionality to do this in a single step:
sage: ModularFormsRing(Gamma0(4)).generators()

[(2, 1 + 24*q^2 + 24*q^4 + 96*q^6 + 24*q^8 + O(q^10)),
(2, q + 4*q^3 + 6*q^5 + 8*q^7 + 13*q^9 + O(q^10))]

What this means is that the ring of modular forms for $\Gamma_0(4)$ is generated by the two forms $F, G$ with the given $q$-expansions, both of which live in weight 2. (In fact, both of them are Eisenstein series: they are linear combinations of $H(\tau)$ and $H(2\tau)$, where $H$ is the unique Eisenstein series of weight 2 and level 2.) So the space of forms of weight $2k$ is spanned by the sums $\{F^a G^b : a+b=k\}$, which are linearly independent.
What is making this work is that the modular curve $X(2) \cong X_0(4)$ has genus 0; whenever you have a genus 0 modular curve, you will get a similar isomorphism of the ring of modular forms onto a polynomial ring in two generators. (Edit: Sorry, that bit was wrong; it fails for $\Gamma(5)$, even though $\Gamma(5)$ does have genus 0.) 
