Functor construction for all spaces

AUTHORS:

  • Jonas Jermann (2013): initial version

class sage.modular.modform_hecketriangle.functors.BaseFacade(ring)[source]

Bases: Parent, UniqueRepresentation

BaseFacade of a ring.

This class is used to distinguish the construction of constant elements (modular forms of weight 0) over the given ring and the construction of FormsRing or FormsSpace based on the BaseFacade of the given ring.

If that distinction was not made then ring elements couldn’t be considered as constant modular forms in e.g. binary operations. Instead the coercion model would assume that the ring element lies in the common parent of the ring element and e.g. a FormsSpace which would give the FormsSpace over the ring. However this is not correct, the FormsSpace might (and probably will) not even contain the (constant) ring element. Hence we use the BaseFacade to distinguish the two cases.

Since the BaseFacade of a ring embeds into that ring, a common base (resp. a coercion) between the two (or even a more general ring) can be found, namely the ring (not the BaseFacade of it).

sage.modular.modform_hecketriangle.functors.ConstantFormsSpaceFunctor(group)[source]

Construction functor for the space of constant forms.

When determining a common parent between a ring and a forms ring or space this functor is first applied to the ring.

EXAMPLES:

sage: from sage.modular.modform_hecketriangle.functors import (ConstantFormsSpaceFunctor, FormsSpaceFunctor)
sage: ConstantFormsSpaceFunctor(4) == FormsSpaceFunctor("holo", 4, 0, 1)
True
sage: ConstantFormsSpaceFunctor(4)
ModularFormsFunctor(n=4, k=0, ep=1)
>>> from sage.all import *
>>> from sage.modular.modform_hecketriangle.functors import (ConstantFormsSpaceFunctor, FormsSpaceFunctor)
>>> ConstantFormsSpaceFunctor(Integer(4)) == FormsSpaceFunctor("holo", Integer(4), Integer(0), Integer(1))
True
>>> ConstantFormsSpaceFunctor(Integer(4))
ModularFormsFunctor(n=4, k=0, ep=1)
class sage.modular.modform_hecketriangle.functors.FormsRingFunctor(analytic_type, group, red_hom)[source]

Bases: ConstructionFunctor

Construction functor for forms rings.

NOTE:

When the base ring is not a BaseFacade the functor is first merged with the ConstantFormsSpaceFunctor. This case occurs in the pushout constructions. (when trying to find a common parent between a forms ring and a ring which is not a BaseFacade).

AT = Analytic Type[source]
AnalyticType[source]

alias of AnalyticType

merge(other)[source]

Return the merged functor of self and other.

It is only possible to merge instances of FormsSpaceFunctor and FormsRingFunctor. Also only if they share the same group. An FormsSubSpaceFunctors is replaced by its ambient space functor.

The analytic type of the merged functor is the extension of the two analytic types of the functors. The red_hom parameter of the merged functor is the logical and of the two corresponding red_hom parameters (where a forms space is assumed to have it set to True).

Two FormsSpaceFunctor with different (k,ep) are merged to a corresponding FormsRingFunctor. Otherwise the corresponding (extended) FormsSpaceFunctor is returned.

A FormsSpaceFunctor and FormsRingFunctor are merged to a corresponding (extended) FormsRingFunctor.

Two FormsRingFunctors are merged to the corresponding (extended) FormsRingFunctor.

EXAMPLES:

sage: from sage.modular.modform_hecketriangle.functors import (FormsSpaceFunctor, FormsRingFunctor)
sage: functor1 = FormsRingFunctor("mero", group=6, red_hom=True)
sage: functor2 = FormsRingFunctor(["quasi", "cusp"], group=6, red_hom=False)
sage: functor3 = FormsSpaceFunctor("weak", group=6, k=0, ep=1)
sage: functor4 = FormsRingFunctor("mero", group=5, red_hom=True)

sage: functor1.merge(functor1) is functor1
True
sage: functor1.merge(functor4) is None
True
sage: functor1.merge(functor2)
QuasiMeromorphicModularFormsRingFunctor(n=6)
sage: functor1.merge(functor3)
MeromorphicModularFormsRingFunctor(n=6, red_hom=True)
>>> from sage.all import *
>>> from sage.modular.modform_hecketriangle.functors import (FormsSpaceFunctor, FormsRingFunctor)
>>> functor1 = FormsRingFunctor("mero", group=Integer(6), red_hom=True)
>>> functor2 = FormsRingFunctor(["quasi", "cusp"], group=Integer(6), red_hom=False)
>>> functor3 = FormsSpaceFunctor("weak", group=Integer(6), k=Integer(0), ep=Integer(1))
>>> functor4 = FormsRingFunctor("mero", group=Integer(5), red_hom=True)

>>> functor1.merge(functor1) is functor1
True
>>> functor1.merge(functor4) is None
True
>>> functor1.merge(functor2)
QuasiMeromorphicModularFormsRingFunctor(n=6)
>>> functor1.merge(functor3)
MeromorphicModularFormsRingFunctor(n=6, red_hom=True)
rank = 10
class sage.modular.modform_hecketriangle.functors.FormsSpaceFunctor(analytic_type, group, k, ep)[source]

Bases: ConstructionFunctor

Construction functor for forms spaces.

NOTE:

When the base ring is not a BaseFacade the functor is first merged with the ConstantFormsSpaceFunctor. This case occurs in the pushout constructions (when trying to find a common parent between a forms space and a ring which is not a BaseFacade).

AT = Analytic Type[source]
AnalyticType[source]

alias of AnalyticType

merge(other)[source]

Return the merged functor of self and other.

It is only possible to merge instances of FormsSpaceFunctor and FormsRingFunctor. Also only if they share the same group. An FormsSubSpaceFunctors is replaced by its ambient space functor.

The analytic type of the merged functor is the extension of the two analytic types of the functors. The red_hom parameter of the merged functor is the logical and of the two corresponding red_hom parameters (where a forms space is assumed to have it set to True).

Two FormsSpaceFunctor with different (k,ep) are merged to a corresponding FormsRingFunctor. Otherwise the corresponding (extended) FormsSpaceFunctor is returned.

A FormsSpaceFunctor and FormsRingFunctor are merged to a corresponding (extended) FormsRingFunctor.

Two FormsRingFunctors are merged to the corresponding (extended) FormsRingFunctor.

EXAMPLES:

sage: from sage.modular.modform_hecketriangle.functors import (FormsSpaceFunctor, FormsRingFunctor)
sage: functor1 = FormsSpaceFunctor("holo", group=5, k=0, ep=1)
sage: functor2 = FormsSpaceFunctor(["quasi", "cusp"], group=5, k=10/3, ep=-1)
sage: functor3 = FormsSpaceFunctor(["quasi", "mero"], group=5, k=0, ep=1)
sage: functor4 = FormsRingFunctor("cusp", group=5, red_hom=False)
sage: functor5 = FormsSpaceFunctor("holo", group=4, k=0, ep=1)

sage: functor1.merge(functor1) is functor1
True
sage: functor1.merge(functor5) is None
True
sage: functor1.merge(functor2)
QuasiModularFormsRingFunctor(n=5, red_hom=True)
sage: functor1.merge(functor3)
QuasiMeromorphicModularFormsFunctor(n=5, k=0, ep=1)
sage: functor1.merge(functor4)
ModularFormsRingFunctor(n=5)
>>> from sage.all import *
>>> from sage.modular.modform_hecketriangle.functors import (FormsSpaceFunctor, FormsRingFunctor)
>>> functor1 = FormsSpaceFunctor("holo", group=Integer(5), k=Integer(0), ep=Integer(1))
>>> functor2 = FormsSpaceFunctor(["quasi", "cusp"], group=Integer(5), k=Integer(10)/Integer(3), ep=-Integer(1))
>>> functor3 = FormsSpaceFunctor(["quasi", "mero"], group=Integer(5), k=Integer(0), ep=Integer(1))
>>> functor4 = FormsRingFunctor("cusp", group=Integer(5), red_hom=False)
>>> functor5 = FormsSpaceFunctor("holo", group=Integer(4), k=Integer(0), ep=Integer(1))

>>> functor1.merge(functor1) is functor1
True
>>> functor1.merge(functor5) is None
True
>>> functor1.merge(functor2)
QuasiModularFormsRingFunctor(n=5, red_hom=True)
>>> functor1.merge(functor3)
QuasiMeromorphicModularFormsFunctor(n=5, k=0, ep=1)
>>> functor1.merge(functor4)
ModularFormsRingFunctor(n=5)
rank = 10
class sage.modular.modform_hecketriangle.functors.FormsSubSpaceFunctor(ambient_space_functor, generators)[source]

Bases: ConstructionFunctor

Construction functor for forms sub spaces.

merge(other)[source]

Return the merged functor of self and other.

If other is a FormsSubSpaceFunctor then first the common ambient space functor is constructed by merging the two corresponding functors.

If that ambient space functor is a FormsSpaceFunctor and the generators agree the corresponding FormsSubSpaceFunctor is returned.

If other is not a FormsSubSpaceFunctor then self is merged as if it was its ambient space functor.

EXAMPLES:

sage: from sage.modular.modform_hecketriangle.functors import (FormsSpaceFunctor, FormsSubSpaceFunctor)
sage: from sage.modular.modform_hecketriangle.space import ModularForms
sage: ambient_space = ModularForms(n=4, k=12, ep=1)
sage: ambient_space_functor1 = FormsSpaceFunctor("holo", group=4, k=12, ep=1)
sage: ambient_space_functor2 = FormsSpaceFunctor("cusp", group=4, k=12, ep=1)
sage: ss_functor1 = FormsSubSpaceFunctor(ambient_space_functor1, [ambient_space.gen(0)])
sage: ss_functor2 = FormsSubSpaceFunctor(ambient_space_functor2, [ambient_space.gen(0)])
sage: ss_functor3 = FormsSubSpaceFunctor(ambient_space_functor2, [2*ambient_space.gen(0)])
sage: merged_ambient = ambient_space_functor1.merge(ambient_space_functor2)
sage: merged_ambient
ModularFormsFunctor(n=4, k=12, ep=1)
sage: functor4 = FormsSpaceFunctor(["quasi", "cusp"], group=4, k=10, ep=-1)

sage: ss_functor1.merge(ss_functor1) is ss_functor1
True
sage: ss_functor1.merge(ss_functor2)
FormsSubSpaceFunctor with 2 generators for the ModularFormsFunctor(n=4, k=12, ep=1)
sage: ss_functor1.merge(ss_functor2) == FormsSubSpaceFunctor(merged_ambient, [ambient_space.gen(0), ambient_space.gen(0)])
True
sage: ss_functor1.merge(ss_functor3) == FormsSubSpaceFunctor(merged_ambient, [ambient_space.gen(0), 2*ambient_space.gen(0)])
True
sage: ss_functor1.merge(ambient_space_functor2) == merged_ambient
True
sage: ss_functor1.merge(functor4)
QuasiModularFormsRingFunctor(n=4, red_hom=True)
>>> from sage.all import *
>>> from sage.modular.modform_hecketriangle.functors import (FormsSpaceFunctor, FormsSubSpaceFunctor)
>>> from sage.modular.modform_hecketriangle.space import ModularForms
>>> ambient_space = ModularForms(n=Integer(4), k=Integer(12), ep=Integer(1))
>>> ambient_space_functor1 = FormsSpaceFunctor("holo", group=Integer(4), k=Integer(12), ep=Integer(1))
>>> ambient_space_functor2 = FormsSpaceFunctor("cusp", group=Integer(4), k=Integer(12), ep=Integer(1))
>>> ss_functor1 = FormsSubSpaceFunctor(ambient_space_functor1, [ambient_space.gen(Integer(0))])
>>> ss_functor2 = FormsSubSpaceFunctor(ambient_space_functor2, [ambient_space.gen(Integer(0))])
>>> ss_functor3 = FormsSubSpaceFunctor(ambient_space_functor2, [Integer(2)*ambient_space.gen(Integer(0))])
>>> merged_ambient = ambient_space_functor1.merge(ambient_space_functor2)
>>> merged_ambient
ModularFormsFunctor(n=4, k=12, ep=1)
>>> functor4 = FormsSpaceFunctor(["quasi", "cusp"], group=Integer(4), k=Integer(10), ep=-Integer(1))

>>> ss_functor1.merge(ss_functor1) is ss_functor1
True
>>> ss_functor1.merge(ss_functor2)
FormsSubSpaceFunctor with 2 generators for the ModularFormsFunctor(n=4, k=12, ep=1)
>>> ss_functor1.merge(ss_functor2) == FormsSubSpaceFunctor(merged_ambient, [ambient_space.gen(Integer(0)), ambient_space.gen(Integer(0))])
True
>>> ss_functor1.merge(ss_functor3) == FormsSubSpaceFunctor(merged_ambient, [ambient_space.gen(Integer(0)), Integer(2)*ambient_space.gen(Integer(0))])
True
>>> ss_functor1.merge(ambient_space_functor2) == merged_ambient
True
>>> ss_functor1.merge(functor4)
QuasiModularFormsRingFunctor(n=4, red_hom=True)
rank = 10