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(50, [27])); M
Modular Forms space of dimension 13 for Congruence Subgroup Gamma_H(50) with H generated by [27] of weight 2 over Rational Field
sage: M.q_expansion_basis(25)
[
q + q^4 - q^6 - 2*q^9 - 3*q^11 - 2*q^14 + q^16 + 5*q^19 + 2*q^21 - q^24 + O(q^25),
q^2 - q^3 - 2*q^7 + q^8 - q^12 + 4*q^13 + 3*q^17 - 2*q^18 - 3*q^22 - 6*q^23 + O(q^25),
1 + O(q^25),
q + 12*q^11 + 8*q^14 + q^16 - 6*q^19 + 19*q^21 + 5*q^24 + O(q^25),
q^2 + 5*q^12 - q^18 + 12*q^22 + O(q^25),
q^3 - 3/2*q^12 + 9/2*q^13 - 1/2*q^17 + q^18 + 8*q^23 + O(q^25),
q^4 + 4*q^14 + q^16 + 8*q^24 + O(q^25),
q^5 + 4*q^15 - 2*q^20 + O(q^25),
q^6 - q^14 + 3*q^16 + q^24 + O(q^25),
q^7 + 1/2*q^12 - 1/2*q^13 + 5/2*q^17 + q^18 - q^23 + O(q^25),
q^8 + q^12 + 2*q^18 + O(q^25),
q^9 - q^16 + 2*q^19 + q^21 - q^24 + O(q^25),
q^10 + 3*q^20 + O(q^25)
]
sage: M.q_integral_basis(25)
[
1 + O(q^25),
q - 4*q^14 + q^16 + 6*q^19 + 7*q^21 - 7*q^24 + O(q^25),
q^2 + 5*q^13 + 5*q^17 - q^18 + 2*q^22 + O(q^25),
q^3 + 3*q^13 - 2*q^17 + q^18 + 3*q^22 + 8*q^23 + O(q^25),
q^4 + 4*q^14 + q^16 + 8*q^24 + O(q^25),
q^5 + 4*q^15 - 2*q^20 + O(q^25),
q^6 - q^14 + 3*q^16 + q^24 + O(q^25),
q^7 + 3*q^17 + q^18 - q^22 - q^23 + O(q^25),
q^8 + q^13 + q^17 + 2*q^18 - 2*q^22 + O(q^25),
q^9 - q^16 + 2*q^19 + q^21 - q^24 + O(q^25),
q^10 + 3*q^20 + O(q^25),
q^11 + q^14 - q^19 + q^21 + q^24 + O(q^25),
q^12 - q^13 - q^17 + 2*q^22 + O(q^25)
]
TESTS:
sage: m = ModularForms(Gamma1(20),2)
sage: loads(dumps(m)) == m
True
sage: m = ModularForms(GammaH(15, [4]), 2)
sage: loads(dumps(m)) == m
True
Bases: sage.modular.modform.ambient_g1.ModularFormsAmbient_gH_Q
A space of modular forms for the group over the rational numbers.
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
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
Bases: sage.modular.modform.ambient.ModularFormsAmbient
A space of modular forms for the group over the rational numbers.
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
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'>