Subspaces of modular forms for Hecke triangle groups#
AUTHORS:
Jonas Jermann (2013): initial version
- sage.modular.modform_hecketriangle.subspace.ModularFormsSubSpace(*args, **kwargs)[source]#
Create a modular forms subspace generated by the supplied arguments if possible. Instead of a list of generators also multiple input arguments can be used. If
reduce=True
then the corresponding ambient space is choosen as small as possible. If no subspace is available then the ambient space is returned.EXAMPLES:
sage: from sage.modular.modform_hecketriangle.subspace import ModularFormsSubSpace sage: from sage.modular.modform_hecketriangle.space import ModularForms sage: MF = ModularForms() sage: subspace = ModularFormsSubSpace(MF.E4()^3, MF.E6()^2+MF.Delta(), MF.Delta()) sage: subspace Subspace of dimension 2 of ModularForms(n=3, k=12, ep=1) over Integer Ring sage: subspace.ambient_space() ModularForms(n=3, k=12, ep=1) over Integer Ring sage: subspace.gens() [1 + 720*q + 179280*q^2 + 16954560*q^3 + 396974160*q^4 + O(q^5), 1 - 1007*q + 220728*q^2 + 16519356*q^3 + 399516304*q^4 + O(q^5)] sage: ModularFormsSubSpace(MF.E4()^3-MF.E6()^2, reduce=True).ambient_space() CuspForms(n=3, k=12, ep=1) over Integer Ring sage: ModularFormsSubSpace(MF.E4()^3-MF.E6()^2, MF.J_inv()*MF.E4()^3, reduce=True) WeakModularForms(n=3, k=12, ep=1) over Integer Ring
>>> from sage.all import * >>> from sage.modular.modform_hecketriangle.subspace import ModularFormsSubSpace >>> from sage.modular.modform_hecketriangle.space import ModularForms >>> MF = ModularForms() >>> subspace = ModularFormsSubSpace(MF.E4()**Integer(3), MF.E6()**Integer(2)+MF.Delta(), MF.Delta()) >>> subspace Subspace of dimension 2 of ModularForms(n=3, k=12, ep=1) over Integer Ring >>> subspace.ambient_space() ModularForms(n=3, k=12, ep=1) over Integer Ring >>> subspace.gens() [1 + 720*q + 179280*q^2 + 16954560*q^3 + 396974160*q^4 + O(q^5), 1 - 1007*q + 220728*q^2 + 16519356*q^3 + 399516304*q^4 + O(q^5)] >>> ModularFormsSubSpace(MF.E4()**Integer(3)-MF.E6()**Integer(2), reduce=True).ambient_space() CuspForms(n=3, k=12, ep=1) over Integer Ring >>> ModularFormsSubSpace(MF.E4()**Integer(3)-MF.E6()**Integer(2), MF.J_inv()*MF.E4()**Integer(3), reduce=True) WeakModularForms(n=3, k=12, ep=1) over Integer Ring
- class sage.modular.modform_hecketriangle.subspace.SubSpaceForms(ambient_space, basis, check)[source]#
Bases:
FormsSpace_abstract
,Module
,UniqueRepresentation
Submodule of (Hecke) forms in the given ambient space for the given basis.
- basis()[source]#
Return the basis of
self
in the ambient space.EXAMPLES:
sage: from sage.modular.modform_hecketriangle.space import ModularForms sage: MF = ModularForms(n=6, k=20, ep=1) sage: subspace = MF.subspace([(MF.Delta()*MF.E4()^2).as_ring_element(), MF.gen(0)]) sage: subspace.basis() [q + 78*q^2 + 2781*q^3 + 59812*q^4 + O(q^5), 1 + 360360*q^4 + O(q^5)] sage: subspace.basis()[0].parent() == MF True
>>> from sage.all import * >>> from sage.modular.modform_hecketriangle.space import ModularForms >>> MF = ModularForms(n=Integer(6), k=Integer(20), ep=Integer(1)) >>> subspace = MF.subspace([(MF.Delta()*MF.E4()**Integer(2)).as_ring_element(), MF.gen(Integer(0))]) >>> subspace.basis() [q + 78*q^2 + 2781*q^3 + 59812*q^4 + O(q^5), 1 + 360360*q^4 + O(q^5)] >>> subspace.basis()[Integer(0)].parent() == MF True
- change_ambient_space(new_ambient_space)[source]#
Return a new subspace with the same basis but inside a different ambient space (if possible).
EXAMPLES:
sage: from sage.modular.modform_hecketriangle.space import ModularForms, QuasiModularForms sage: MF = ModularForms(n=6, k=20, ep=1) sage: subspace = MF.subspace([MF.Delta()*MF.E4()^2, MF.gen(0)]) sage: new_ambient_space = QuasiModularForms(n=6, k=20, ep=1) sage: subspace.change_ambient_space(new_ambient_space) # long time Subspace of dimension 2 of QuasiModularForms(n=6, k=20, ep=1) over Integer Ring
>>> from sage.all import * >>> from sage.modular.modform_hecketriangle.space import ModularForms, QuasiModularForms >>> MF = ModularForms(n=Integer(6), k=Integer(20), ep=Integer(1)) >>> subspace = MF.subspace([MF.Delta()*MF.E4()**Integer(2), MF.gen(Integer(0))]) >>> new_ambient_space = QuasiModularForms(n=Integer(6), k=Integer(20), ep=Integer(1)) >>> subspace.change_ambient_space(new_ambient_space) # long time Subspace of dimension 2 of QuasiModularForms(n=6, k=20, ep=1) over Integer Ring
- change_ring(new_base_ring)[source]#
Return the same space as
self
but over a new base ringnew_base_ring
.EXAMPLES:
sage: from sage.modular.modform_hecketriangle.space import ModularForms sage: MF = ModularForms(n=6, k=20, ep=1) sage: subspace = MF.subspace([MF.Delta()*MF.E4()^2, MF.gen(0)]) sage: subspace.change_ring(QQ) Subspace of dimension 2 of ModularForms(n=6, k=20, ep=1) over Rational Field sage: subspace.change_ring(CC) Traceback (most recent call last): ... NotImplementedError
>>> from sage.all import * >>> from sage.modular.modform_hecketriangle.space import ModularForms >>> MF = ModularForms(n=Integer(6), k=Integer(20), ep=Integer(1)) >>> subspace = MF.subspace([MF.Delta()*MF.E4()**Integer(2), MF.gen(Integer(0))]) >>> subspace.change_ring(QQ) Subspace of dimension 2 of ModularForms(n=6, k=20, ep=1) over Rational Field >>> subspace.change_ring(CC) Traceback (most recent call last): ... NotImplementedError
- contains_coeff_ring()[source]#
Return whether
self
contains its coefficient ring.EXAMPLES:
sage: from sage.modular.modform_hecketriangle.space import ModularForms sage: MF = ModularForms(k=0, ep=1, n=8) sage: subspace = MF.subspace([1]) sage: subspace.contains_coeff_ring() True sage: subspace = MF.subspace([]) sage: subspace.contains_coeff_ring() False sage: MF = ModularForms(k=0, ep=-1, n=8) sage: subspace = MF.subspace([]) sage: subspace.contains_coeff_ring() False
>>> from sage.all import * >>> from sage.modular.modform_hecketriangle.space import ModularForms >>> MF = ModularForms(k=Integer(0), ep=Integer(1), n=Integer(8)) >>> subspace = MF.subspace([Integer(1)]) >>> subspace.contains_coeff_ring() True >>> subspace = MF.subspace([]) >>> subspace.contains_coeff_ring() False >>> MF = ModularForms(k=Integer(0), ep=-Integer(1), n=Integer(8)) >>> subspace = MF.subspace([]) >>> subspace.contains_coeff_ring() False
- coordinate_vector(v)[source]#
Return the coordinate vector of
v
with respect to the basisself.gens()
.INPUT:
v
– An element ofself
.
OUTPUT:
The coordinate vector of
v
with respect to the basisself.gens()
.Note: The coordinate vector is not an element of
self.module()
.EXAMPLES:
sage: from sage.modular.modform_hecketriangle.space import ModularForms, QuasiCuspForms sage: MF = ModularForms(n=6, k=20, ep=1) sage: subspace = MF.subspace([(MF.Delta()*MF.E4()^2).as_ring_element(), MF.gen(0)]) sage: subspace.coordinate_vector(MF.gen(0) + MF.Delta()*MF.E4()^2).parent() Vector space of dimension 2 over Fraction Field of Univariate Polynomial Ring in d over Integer Ring sage: subspace.coordinate_vector(MF.gen(0) + MF.Delta()*MF.E4()^2) (1, 1) sage: MF = ModularForms(n=4, k=24, ep=-1) sage: subspace = MF.subspace([MF.gen(0), MF.gen(2)]) sage: subspace.coordinate_vector(subspace.gen(0)).parent() Vector space of dimension 2 over Fraction Field of Univariate Polynomial Ring in d over Integer Ring sage: subspace.coordinate_vector(subspace.gen(0)) (1, 0) sage: MF = QuasiCuspForms(n=infinity, k=12, ep=1) sage: subspace = MF.subspace([MF.Delta(), MF.E4()*MF.f_inf()*MF.E2()*MF.f_i(), MF.E4()*MF.f_inf()*MF.E2()^2, MF.E4()*MF.f_inf()*(MF.E4()-MF.E2()^2)]) sage: el = MF.E4()*MF.f_inf()*(7*MF.E4() - 3*MF.E2()^2) sage: subspace.coordinate_vector(el) (7, 0, -3) sage: subspace.ambient_coordinate_vector(el) (7, 21/(8*d), 0, -3)
>>> from sage.all import * >>> from sage.modular.modform_hecketriangle.space import ModularForms, QuasiCuspForms >>> MF = ModularForms(n=Integer(6), k=Integer(20), ep=Integer(1)) >>> subspace = MF.subspace([(MF.Delta()*MF.E4()**Integer(2)).as_ring_element(), MF.gen(Integer(0))]) >>> subspace.coordinate_vector(MF.gen(Integer(0)) + MF.Delta()*MF.E4()**Integer(2)).parent() Vector space of dimension 2 over Fraction Field of Univariate Polynomial Ring in d over Integer Ring >>> subspace.coordinate_vector(MF.gen(Integer(0)) + MF.Delta()*MF.E4()**Integer(2)) (1, 1) >>> MF = ModularForms(n=Integer(4), k=Integer(24), ep=-Integer(1)) >>> subspace = MF.subspace([MF.gen(Integer(0)), MF.gen(Integer(2))]) >>> subspace.coordinate_vector(subspace.gen(Integer(0))).parent() Vector space of dimension 2 over Fraction Field of Univariate Polynomial Ring in d over Integer Ring >>> subspace.coordinate_vector(subspace.gen(Integer(0))) (1, 0) >>> MF = QuasiCuspForms(n=infinity, k=Integer(12), ep=Integer(1)) >>> subspace = MF.subspace([MF.Delta(), MF.E4()*MF.f_inf()*MF.E2()*MF.f_i(), MF.E4()*MF.f_inf()*MF.E2()**Integer(2), MF.E4()*MF.f_inf()*(MF.E4()-MF.E2()**Integer(2))]) >>> el = MF.E4()*MF.f_inf()*(Integer(7)*MF.E4() - Integer(3)*MF.E2()**Integer(2)) >>> subspace.coordinate_vector(el) (7, 0, -3) >>> subspace.ambient_coordinate_vector(el) (7, 21/(8*d), 0, -3)
- degree()[source]#
Return the degree of
self
.EXAMPLES:
sage: from sage.modular.modform_hecketriangle.space import ModularForms sage: MF = ModularForms(n=6, k=20, ep=1) sage: subspace = MF.subspace([(MF.Delta()*MF.E4()^2).as_ring_element(), MF.gen(0)]) sage: subspace.degree() 4 sage: subspace.degree() == subspace.ambient_space().degree() True
>>> from sage.all import * >>> from sage.modular.modform_hecketriangle.space import ModularForms >>> MF = ModularForms(n=Integer(6), k=Integer(20), ep=Integer(1)) >>> subspace = MF.subspace([(MF.Delta()*MF.E4()**Integer(2)).as_ring_element(), MF.gen(Integer(0))]) >>> subspace.degree() 4 >>> subspace.degree() == subspace.ambient_space().degree() True
- dimension()[source]#
Return the dimension of
self
.EXAMPLES:
sage: from sage.modular.modform_hecketriangle.space import ModularForms sage: MF = ModularForms(n=6, k=20, ep=1) sage: subspace = MF.subspace([(MF.Delta()*MF.E4()^2).as_ring_element(), MF.gen(0)]) sage: subspace.dimension() 2 sage: subspace.dimension() == len(subspace.gens()) True
>>> from sage.all import * >>> from sage.modular.modform_hecketriangle.space import ModularForms >>> MF = ModularForms(n=Integer(6), k=Integer(20), ep=Integer(1)) >>> subspace = MF.subspace([(MF.Delta()*MF.E4()**Integer(2)).as_ring_element(), MF.gen(Integer(0))]) >>> subspace.dimension() 2 >>> subspace.dimension() == len(subspace.gens()) True
- gens()[source]#
Return the basis of
self
.EXAMPLES:
sage: from sage.modular.modform_hecketriangle.space import ModularForms sage: MF = ModularForms(n=6, k=20, ep=1) sage: subspace = MF.subspace([(MF.Delta()*MF.E4()^2).as_ring_element(), MF.gen(0)]) sage: subspace.gens() [q + 78*q^2 + 2781*q^3 + 59812*q^4 + O(q^5), 1 + 360360*q^4 + O(q^5)] sage: subspace.gens()[0].parent() == subspace True
>>> from sage.all import * >>> from sage.modular.modform_hecketriangle.space import ModularForms >>> MF = ModularForms(n=Integer(6), k=Integer(20), ep=Integer(1)) >>> subspace = MF.subspace([(MF.Delta()*MF.E4()**Integer(2)).as_ring_element(), MF.gen(Integer(0))]) >>> subspace.gens() [q + 78*q^2 + 2781*q^3 + 59812*q^4 + O(q^5), 1 + 360360*q^4 + O(q^5)] >>> subspace.gens()[Integer(0)].parent() == subspace True
- rank()[source]#
Return the rank of
self
.EXAMPLES:
sage: from sage.modular.modform_hecketriangle.space import ModularForms sage: MF = ModularForms(n=6, k=20, ep=1) sage: subspace = MF.subspace([(MF.Delta()*MF.E4()^2).as_ring_element(), MF.gen(0)]) sage: subspace.rank() 2 sage: subspace.rank() == subspace.dimension() True
>>> from sage.all import * >>> from sage.modular.modform_hecketriangle.space import ModularForms >>> MF = ModularForms(n=Integer(6), k=Integer(20), ep=Integer(1)) >>> subspace = MF.subspace([(MF.Delta()*MF.E4()**Integer(2)).as_ring_element(), MF.gen(Integer(0))]) >>> subspace.rank() 2 >>> subspace.rank() == subspace.dimension() True
- sage.modular.modform_hecketriangle.subspace.canonical_parameters(ambient_space, basis, check=True)[source]#
Return a canonical version of the parameters. In particular the list/tuple
basis
is replaced by a tuple of linearly independent elements in the ambient space.If
check=False
(default:True
) thenbasis
is assumed to already be a basis.EXAMPLES:
sage: from sage.modular.modform_hecketriangle.subspace import canonical_parameters sage: from sage.modular.modform_hecketriangle.space import ModularForms sage: MF = ModularForms(n=6, k=12, ep=1) sage: canonical_parameters(MF, [MF.Delta().as_ring_element(), MF.gen(0), 2*MF.gen(0)]) (ModularForms(n=6, k=12, ep=1) over Integer Ring, (q + 30*q^2 + 333*q^3 + 1444*q^4 + O(q^5), 1 + 26208*q^3 + 530712*q^4 + O(q^5)))
>>> from sage.all import * >>> from sage.modular.modform_hecketriangle.subspace import canonical_parameters >>> from sage.modular.modform_hecketriangle.space import ModularForms >>> MF = ModularForms(n=Integer(6), k=Integer(12), ep=Integer(1)) >>> canonical_parameters(MF, [MF.Delta().as_ring_element(), MF.gen(Integer(0)), Integer(2)*MF.gen(Integer(0))]) (ModularForms(n=6, k=12, ep=1) over Integer Ring, (q + 30*q^2 + 333*q^3 + 1444*q^4 + O(q^5), 1 + 26208*q^3 + 530712*q^4 + O(q^5)))