# Modular Forms for $$\Gamma_1(N)$$ and $$\Gamma_H(N)$$ over $$\QQ$$¶

EXAMPLES:

sage: M = ModularForms(Gamma1(13),2); M
Modular Forms space of dimension 13 for Congruence Subgroup Gamma1(13) of weight 2 over Rational Field
sage: S = M.cuspidal_submodule(); S
Cuspidal subspace of dimension 2 of Modular Forms space of dimension 13 for Congruence Subgroup Gamma1(13) of weight 2 over Rational Field
sage: S.basis()
[
q - 4*q^3 - q^4 + 3*q^5 + O(q^6),
q^2 - 2*q^3 - q^4 + 2*q^5 + O(q^6)
]

sage: M = ModularForms(GammaH(11, [4])); M
Modular Forms space of dimension 2 for Congruence Subgroup Gamma_H(11) with H generated by [4] of weight 2 over Rational Field
sage: M.q_expansion_basis(8)
[
q - 2*q^2 - q^3 + 2*q^4 + q^5 + 2*q^6 - 2*q^7 + O(q^8),
1 + 12/5*q + 36/5*q^2 + 48/5*q^3 + 84/5*q^4 + 72/5*q^5 + 144/5*q^6 + 96/5*q^7 + O(q^8)
]


TESTS:

sage: m = ModularForms(Gamma1(20),2)
True

sage: m = ModularForms(GammaH(15, [4]), 2)
True


We check that #10453 is fixed:

sage: CuspForms(Gamma1(11), 2).old_submodule()
Modular Forms subspace of dimension 0 of Modular Forms space of dimension 10 for Congruence Subgroup Gamma1(11) of weight 2 over Rational Field
sage: ModularForms(Gamma1(3), 12).old_submodule()
Modular Forms subspace of dimension 4 of Modular Forms space of dimension 5 for Congruence Subgroup Gamma1(3) of weight 12 over Rational Field

class sage.modular.modform.ambient_g1.ModularFormsAmbient_g1_Q(level, weight)

A space of modular forms for the group $$\Gamma_1(N)$$ over the rational numbers.

cuspidal_submodule()

Return the cuspidal submodule of this modular forms space.

EXAMPLES:

sage: m = ModularForms(Gamma1(17),2); m
Modular Forms space of dimension 20 for Congruence Subgroup Gamma1(17) of weight 2 over Rational Field
sage: m.cuspidal_submodule()
Cuspidal subspace of dimension 5 of Modular Forms space of dimension 20 for Congruence Subgroup Gamma1(17) of weight 2 over Rational Field

eisenstein_submodule()

Return the Eisenstein submodule of this modular forms space.

EXAMPLES:

sage: ModularForms(Gamma1(13),2).eisenstein_submodule()
Eisenstein subspace of dimension 11 of Modular Forms space of dimension 13 for Congruence Subgroup Gamma1(13) of weight 2 over Rational Field
sage: ModularForms(Gamma1(13),10).eisenstein_submodule()
Eisenstein subspace of dimension 12 of Modular Forms space of dimension 69 for Congruence Subgroup Gamma1(13) of weight 10 over Rational Field

class sage.modular.modform.ambient_g1.ModularFormsAmbient_gH_Q(group, weight)

A space of modular forms for the group $$\Gamma_H(N)$$ over the rational numbers.

cuspidal_submodule()

Return the cuspidal submodule of this modular forms space.

EXAMPLES:

sage: m = ModularForms(GammaH(100, [29]),2); m
Modular Forms space of dimension 48 for Congruence Subgroup Gamma_H(100) with H generated by [29] of weight 2 over Rational Field
sage: m.cuspidal_submodule()
Cuspidal subspace of dimension 13 of Modular Forms space of dimension 48 for Congruence Subgroup Gamma_H(100) with H generated by [29] of weight 2 over Rational Field

eisenstein_submodule()

Return the Eisenstein submodule of this modular forms space.

EXAMPLES:

sage: E = ModularForms(GammaH(100, [29]),3).eisenstein_submodule(); E
Eisenstein subspace of dimension 24 of Modular Forms space of dimension 72 for Congruence Subgroup Gamma_H(100) with H generated by [29] of weight 3 over Rational Field
sage: type(E)
<class 'sage.modular.modform.eisenstein_submodule.EisensteinSubmodule_gH_Q_with_category'>


#### Previous topic

Modular Forms for $$\Gamma_0(N)$$ over $$\QQ$$

#### Next topic

Modular Forms over a Non-minimal Base Ring