Esempio n. 1
0
    def __init__(self, analytic_type, group, k, ep):
        r"""
        Construction functor for the forms space
        (or forms ring, see above) with
        the given ``analytic_type``, ``group``,
        weight ``k`` and multiplier ``ep``.

        See :meth:`__call__` for a description of the functor.

        INPUT:

        - ``analytic_type``  -- An element of ``AnalyticType()``.

        - ``group``          -- The index of a Hecke Triangle group.

        - ``k``              -- A rational number, the weight of the space.

        - ``ep``             -- `1` or `-1`, the multiplier of the space.

        OUTPUT:

        The construction functor for the corresponding forms space/ring.

        EXAMPLES::

            sage: from sage.modular.modform_hecketriangle.functors import FormsSpaceFunctor
            sage: FormsSpaceFunctor(["holo", "weak"], group=4, k=0, ep=-1)
            WeakModularFormsFunctor(n=4, k=0, ep=-1)
        """

        Functor.__init__(self, Rings(), CommutativeAdditiveGroups())
        from space import canonical_parameters
        (self._group, R, self._k, self._ep, n) = canonical_parameters(group, ZZ, k, ep)

        self._analytic_type = self.AT(analytic_type)
Esempio n. 2
0
    def __init__(self, analytic_type, group, red_hom):
        r"""
        Construction functor for the forms ring
        with the given ``analytic_type``, ``group``
        and variable ``red_hom``

        See :meth:`__call__` for a description of the functor.

        INPUT:

        - ``analytic_type``  -- An element of ``AnalyticType()``.

        - ``group``          -- The index of a Hecke Triangle group.

        - ``red_hom``        -- A boolean variable for the parameter ``red_hom``
                                (also see ``FormsRing_abstract``).

        OUTPUT:

        The construction functor for the corresponding forms ring.

        EXAMPLES::

            sage: from sage.modular.modform_hecketriangle.functors import FormsRingFunctor
            sage: FormsRingFunctor(["quasi", "mero"], group=6, red_hom=False)
            QuasiMeromorphicModularFormsRingFunctor(n=6)
            sage: FormsRingFunctor(["quasi", "mero"], group=6, red_hom=True)
            QuasiMeromorphicModularFormsRingFunctor(n=6, red_hom=True)
        """

        Functor.__init__(self, Rings(), Rings())
        from graded_ring import canonical_parameters
        (self._group, R, red_hom, n) = canonical_parameters(group, ZZ, red_hom)
        self._red_hom = bool(red_hom)
        self._analytic_type = self.AT(analytic_type)
Esempio n. 3
0
    def __init__(self, analytic_type, group, red_hom):
        r"""
        Construction functor for the forms ring
        with the given ``analytic_type``, ``group``
        and variable ``red_hom``

        See :meth:`__call__` for a description of the functor.

        INPUT:

        - ``analytic_type``  -- An element of ``AnalyticType()``.

        - ``group``          -- The index of a Hecke Triangle group.

        - ``red_hom``        -- A boolean variable for the parameter ``red_hom``
                                (also see ``FormsRing_abstract``).

        OUTPUT:

        The construction functor for the corresponding forms ring.

        EXAMPLES::

            sage: from sage.modular.modform_hecketriangle.functors import FormsRingFunctor
            sage: FormsRingFunctor(["quasi", "mero"], group=6, red_hom=False)
            QuasiMeromorphicModularFormsRingFunctor(n=6)
            sage: FormsRingFunctor(["quasi", "mero"], group=6, red_hom=True)
            QuasiMeromorphicModularFormsRingFunctor(n=6, red_hom=True)
        """

        Functor.__init__(self, Rings(), Rings())
        from graded_ring import canonical_parameters
        (self._group, R, red_hom, n) = canonical_parameters(group, ZZ, red_hom)
        self._red_hom = bool(red_hom)
        self._analytic_type = self.AT(analytic_type)
Esempio n. 4
0
    def __init__(self, group, base_ring, k, ep):
        r"""
        Abstract (Hecke) forms space.

        INPUT:

        - ``group``       - The Hecke triangle group (default: ``HeckeTriangleGroup(3)``)
        - ``k``           - The weight (default: ``0``)
        - ``ep``          - The epsilon (default: ``None``).
                            If ``None``, then k*(n-2) has to be divisible by 2 and
                            ep=(-1)^(k*(n-2)/2) is used.
        - ``base_ring``   - The base_ring (default: ``ZZ``).

        OUTPUT:

        The corresponding abstract (Hecke) forms space.

        EXAMPLES::

            sage: from space import ModularForms
            sage: MF = ModularForms(group=5, base_ring=ZZ, k=6, ep=-1)
            sage: MF
            ModularForms(n=5, k=6, ep=-1) over Integer Ring
            sage: MF.group()
            Hecke triangle group for n = 5
            sage: MF.base_ring()
            Integer Ring
            sage: MF.weight()
            6
            sage: MF.ep()
            -1
            sage: MF.has_reduce_hom()
            True
            sage: MF.is_homogeneous()
            True
        """

        from space import canonical_parameters
        (group, base_ring, k, ep) = canonical_parameters(group, base_ring, k, ep)

        super(FormsSpace_abstract, self).__init__(group=group, base_ring=base_ring, red_hom=True)
        #self.register_embedding(self.hom(lambda f: f.parent().graded_ring()(f), codomain=self.graded_ring()))

        self._weight = k
        self._ep = ep
        (self._l1,self._l2) = self.weight_parameters()
        self._module = None
        self._ambient_space = self
Esempio n. 5
0
    def __init__(self, analytic_type, group, k, ep):
        r"""
        Construction functor for the forms space
        (or forms ring, see above) with
        the given ``analytic_type``, ``group``,
        weight ``k`` and multiplier ``ep``.

        See :meth:`__call__` for a description of the functor.

        INPUT:

        - ``analytic_type``  -- An element of ``AnalyticType()``.

        - ``group``          -- The index of a Hecke Triangle group.

        - ``k``              -- A rational number, the weight of the space.

        - ``ep``             -- `1` or `-1`, the multiplier of the space.

        OUTPUT:

        The construction functor for the corresponding forms space/ring.

        EXAMPLES::

            sage: from sage.modular.modform_hecketriangle.functors import FormsSpaceFunctor
            sage: FormsSpaceFunctor(["holo", "weak"], group=4, k=0, ep=-1)
            WeakModularFormsFunctor(n=4, k=0, ep=-1)
        """

        Functor.__init__(self, Rings(), CommutativeAdditiveGroups())
        from space import canonical_parameters
        (self._group, R, self._k, self._ep,
         n) = canonical_parameters(group, ZZ, k, ep)

        self._analytic_type = self.AT(analytic_type)
Esempio n. 6
0
def FormsRing(analytic_type, group=3, base_ring=ZZ, red_hom=False):
    r"""
    Return the FormsRing with the given ``analytic_type``, ``group``
    ``base_ring`` and variable ``red_hom``.

    INPUT:

    - ``analytic_type``   - An element of ``AnalyticType()`` describing
                            the analytic type of the space.
    - ``group``           - The (Hecke triangle) group of the space
                            (default: ``3``).
    - ``base_ring``       - The base ring of the space
                            (default: ``ZZ``).
    - ``red_hom``         - The (boolean= variable ``red_hom`` of the space
                            (default: ``False``).

    For the variables ``group``, ``base_ring``, ``red_hom``
    the same arguments as for the class ``FormsRing_abstract`` can be used.
    The variables will then be put in canonical form.

    OUTPUT:

    The FormsRing with the given properties.

    EXAMPLES::

        sage: FormsRing("cusp", group=5, base_ring=CC)
        CuspFormsRing(n=5) over Complex Field with 53 bits of precision
        sage: FormsRing("cusp", group=5, base_ring=CC) == FormsRing([], group=5, base_ring=CC)
        True

        sage: FormsRing("holo")
        ModularFormsRing(n=3) over Integer Ring

        sage: FormsRing("weak", group=6, base_ring=ZZ, red_hom=True)
        WeakModularFormsRing(n=6) over Integer Ring

        sage: FormsRing("mero", group=7, base_ring=ZZ)
        MeromorphicModularFormsRing(n=7) over Integer Ring

        sage: FormsRing(["quasi", "cusp"], group=5, base_ring=CC)
        QuasiCuspFormsRing(n=5) over Complex Field with 53 bits of precision
        sage: FormsRing(["quasi", "cusp"], group=5, base_ring=CC) == FormsRing(["quasi"], group=5, base_ring=CC)
        True

        sage: FormsRing(["quasi", "holo"])
        QuasiModularFormsRing(n=3) over Integer Ring

        sage: FormsRing(["quasi", "weak"], group=6, base_ring=ZZ, red_hom=True)
        QuasiWeakModularFormsRing(n=6) over Integer Ring

        sage: FormsRing(["quasi", "mero"], group=7, base_ring=ZZ, red_hom=True)
        QuasiMeromorphicModularFormsRing(n=7) over Integer Ring
    """

    from graded_ring import canonical_parameters
    (group, base_ring, red_hom) = canonical_parameters(group, base_ring, red_hom)

    from analytic_type import AnalyticType
    AT = AnalyticType()
    analytic_type = AT(analytic_type)

    if analytic_type <= AT("mero"):
        if analytic_type <= AT("weak"):
            if analytic_type <= AT("holo"):
                if analytic_type <= AT("cusp"):
                    from graded_ring import CuspFormsRing
                    return CuspFormsRing(group=group, base_ring=base_ring, red_hom=red_hom)
                else:
                    from graded_ring import ModularFormsRing
                    return ModularFormsRing(group=group, base_ring=base_ring, red_hom=red_hom)
            else:
                from graded_ring import WeakModularFormsRing
                return WeakModularFormsRing(group=group, base_ring=base_ring, red_hom=red_hom)
        else:
            from graded_ring import MModularFormsRing
            return MModularFormsRing(group=group, base_ring=base_ring, red_hom=red_hom)
    elif analytic_type <= AT(["mero", "quasi"]):
        if analytic_type <= AT(["weak", "quasi"]):
            if analytic_type <= AT(["holo", "quasi"]):
                if analytic_type <= AT(["cusp", "quasi"]):
                    from graded_ring import QCuspFormsRing
                    return QCuspFormsRing(group=group, base_ring=base_ring, red_hom=red_hom)
                else:
                    from graded_ring import QModularFormsRing
                    return QModularFormsRing(group=group, base_ring=base_ring, red_hom=red_hom)
            else:
                from graded_ring import QWeakModularFormsRing
                return QWeakModularFormsRing(group=group, base_ring=base_ring, red_hom=red_hom)
        else:
            from graded_ring import QMModularFormsRing
            return QMModularFormsRing(group=group, base_ring=base_ring, red_hom=red_hom)
    else:
        raise NotImplementedError
Esempio n. 7
0
def FormsSpace(analytic_type, group=3, base_ring=ZZ, k=QQ(0), ep=None):
    r"""
    Return the FormsSpace with the given ``analytic_type``, ``group``
    ``base_ring`` and degree (``k``, ``ep``).

    INPUT:

    - ``analytic_type``   - An element of ``AnalyticType()`` describing
                            the analytic type of the space.
    - ``group``           - The (Hecke triangle) group of the space
                            (default: ``3``).
    - ``base_ring``       - The base ring of the space
                            (default: ``ZZ``).
    - ``k``               - The weight of the space, a rational number
                            (default: ``0``).
    - ``ep``              - The multiplier of the space, ``1``, ``-1``
                            or ``None`` (in case ``ep`` should be
                            determined from ``k``). Default: ``None``.

    For the variables ``group``, ``base_ring``, ``k``, ``ep``
    the same arguments as for the class ``FormsSpace_abstract`` can be used.
    The variables will then be put in canonical form.
    In particular the multiplier ``ep`` is calculated
    as usual from ``k`` if ``ep == None``.

    OUTPUT:

    The FormsSpace with the given properties.

    EXAMPLES::

        sage: FormsSpace([])
        ZeroForms(n=3, k=0, ep=1) over Integer Ring
        sage: FormsSpace(["quasi"]) # not implemented

        sage: FormsSpace("cusp", group=5, base_ring=CC, k=12, ep=1)
        CuspForms(n=5, k=12, ep=1) over Complex Field with 53 bits of precision

        sage: FormsSpace("holo")
        ModularForms(n=3, k=0, ep=1) over Integer Ring

        sage: FormsSpace("weak", group=6, base_ring=ZZ, k=0, ep=-1)
        WeakModularForms(n=6, k=0, ep=-1) over Integer Ring

        sage: FormsSpace("mero", group=7, base_ring=ZZ, k=2, ep=-1)
        MeromorphicModularForms(n=7, k=2, ep=-1) over Integer Ring

        sage: FormsSpace(["quasi", "cusp"], group=5, base_ring=CC, k=12, ep=1)
        QuasiCuspForms(n=5, k=12, ep=1) over Complex Field with 53 bits of precision

        sage: FormsSpace(["quasi", "holo"])
        QuasiModularForms(n=3, k=0, ep=1) over Integer Ring

        sage: FormsSpace(["quasi", "weak"], group=6, base_ring=ZZ, k=0, ep=-1)
        QuasiWeakModularForms(n=6, k=0, ep=-1) over Integer Ring

        sage: FormsSpace(["quasi", "mero"], group=7, base_ring=ZZ, k=2, ep=-1)
        QuasiMeromorphicModularForms(n=7, k=2, ep=-1) over Integer Ring
    """

    from space import canonical_parameters
    (group, base_ring, k, ep) = canonical_parameters(group, base_ring, k, ep)

    from analytic_type import AnalyticType
    AT = AnalyticType()
    analytic_type = AT(analytic_type)

    if analytic_type <= AT("mero"):
        if analytic_type <= AT("weak"):
            if analytic_type <= AT("holo"):
                if analytic_type <= AT("cusp"):
                    if analytic_type <= AT([]):
                        from space import ZeroForm
                        return ZeroForm(group=group, base_ring=base_ring, k=k, ep=ep)
                    else:
                        from space import CuspForms
                        return CuspForms(group=group, base_ring=base_ring, k=k, ep=ep)
                else:
                    from space import ModularForms
                    return ModularForms(group=group, base_ring=base_ring, k=k, ep=ep)
            else:
                from space import WeakModularForms
                return WeakModularForms(group=group, base_ring=base_ring, k=k, ep=ep)
        else:
            from space import MModularForms
            return MModularForms(group=group, base_ring=base_ring, k=k, ep=ep)
    elif analytic_type <= AT(["mero", "quasi"]):
        if analytic_type <= AT(["weak", "quasi"]):
            if analytic_type <= AT(["holo", "quasi"]):
                if analytic_type <= AT(["cusp", "quasi"]):
                    if analytic_type <= AT(["quasi"]):
                        raise Exception("There should be only non-quasi ZeroForms. That could be changed but then this exception should be removed.")
                        from space import ZeroForm
                        return ZeroForm(group=group, base_ring=base_ring, k=k, ep=ep)
                    else:
                        from space import QCuspForms
                        return QCuspForms(group=group, base_ring=base_ring, k=k, ep=ep)
                else:
                    from space import QModularForms
                    return QModularForms(group=group, base_ring=base_ring, k=k, ep=ep)
            else:
                from space import QWeakModularForms
                return QWeakModularForms(group=group, base_ring=base_ring, k=k, ep=ep)
        else:
            from space import QMModularForms
            return QMModularForms(group=group, base_ring=base_ring, k=k, ep=ep)
    else:
        raise NotImplementedError
Esempio n. 8
0
def FormsRing(analytic_type, group=3, base_ring=ZZ, red_hom=False):
    r"""
    Return the FormsRing with the given ``analytic_type``, ``group``
    ``base_ring`` and variable ``red_hom``.

    INPUT:

    - ``analytic_type``  -- An element of ``AnalyticType()`` describing
                            the analytic type of the space.

    - ``group``          -- The index of the (Hecke triangle) group of the space
                            (default: 3`).

    - ``base_ring``      -- The base ring of the space
                            (default: ``ZZ``).

    - ``red_hom``        -- The (boolean= variable ``red_hom`` of the space
                            (default: ``False``).

    For the variables ``group``, ``base_ring``, ``red_hom``
    the same arguments as for the class ``FormsRing_abstract`` can be used.
    The variables will then be put in canonical form.

    OUTPUT:

    The FormsRing with the given properties.

    EXAMPLES::

        sage: from sage.modular.modform_hecketriangle.constructor import FormsRing
        sage: FormsRing("cusp", group=5, base_ring=CC)
        CuspFormsRing(n=5) over Complex Field with 53 bits of precision

        sage: FormsRing("holo")
        ModularFormsRing(n=3) over Integer Ring

        sage: FormsRing("weak", group=6, base_ring=ZZ, red_hom=True)
        WeakModularFormsRing(n=6) over Integer Ring

        sage: FormsRing("mero", group=7, base_ring=ZZ)
        MeromorphicModularFormsRing(n=7) over Integer Ring

        sage: FormsRing(["quasi", "cusp"], group=5, base_ring=CC)
        QuasiCuspFormsRing(n=5) over Complex Field with 53 bits of precision

        sage: FormsRing(["quasi", "holo"])
        QuasiModularFormsRing(n=3) over Integer Ring

        sage: FormsRing(["quasi", "weak"], group=6, base_ring=ZZ, red_hom=True)
        QuasiWeakModularFormsRing(n=6) over Integer Ring

        sage: FormsRing(["quasi", "mero"], group=7, base_ring=ZZ, red_hom=True)
        QuasiMeromorphicModularFormsRing(n=7) over Integer Ring

        sage: FormsRing(["quasi", "cusp"], group=infinity)
        QuasiCuspFormsRing(n=+Infinity) over Integer Ring
    """

    from graded_ring import canonical_parameters
    (group, base_ring, red_hom,
     n) = canonical_parameters(group, base_ring, red_hom)

    from analytic_type import AnalyticType
    AT = AnalyticType()
    analytic_type = AT(analytic_type)

    if analytic_type <= AT("mero"):
        if analytic_type <= AT("weak"):
            if analytic_type <= AT("holo"):
                if analytic_type <= AT("cusp"):
                    if analytic_type <= AT([]):
                        raise ValueError(
                            "Analytic type Zero is not valid for forms rings.")
                    else:
                        from graded_ring import CuspFormsRing
                        return CuspFormsRing(group=group,
                                             base_ring=base_ring,
                                             red_hom=red_hom)
                else:
                    from graded_ring import ModularFormsRing
                    return ModularFormsRing(group=group,
                                            base_ring=base_ring,
                                            red_hom=red_hom)
            else:
                from graded_ring import WeakModularFormsRing
                return WeakModularFormsRing(group=group,
                                            base_ring=base_ring,
                                            red_hom=red_hom)
        else:
            from graded_ring import MeromorphicModularFormsRing
            return MeromorphicModularFormsRing(group=group,
                                               base_ring=base_ring,
                                               red_hom=red_hom)
    elif analytic_type <= AT(["mero", "quasi"]):
        if analytic_type <= AT(["weak", "quasi"]):
            if analytic_type <= AT(["holo", "quasi"]):
                if analytic_type <= AT(["cusp", "quasi"]):
                    if analytic_type <= AT(["quasi"]):
                        raise ValueError(
                            "Analytic type Zero is not valid for forms rings.")
                    else:
                        from graded_ring import QuasiCuspFormsRing
                        return QuasiCuspFormsRing(group=group,
                                                  base_ring=base_ring,
                                                  red_hom=red_hom)
                else:
                    from graded_ring import QuasiModularFormsRing
                    return QuasiModularFormsRing(group=group,
                                                 base_ring=base_ring,
                                                 red_hom=red_hom)
            else:
                from graded_ring import QuasiWeakModularFormsRing
                return QuasiWeakModularFormsRing(group=group,
                                                 base_ring=base_ring,
                                                 red_hom=red_hom)
        else:
            from graded_ring import QuasiMeromorphicModularFormsRing
            return QuasiMeromorphicModularFormsRing(group=group,
                                                    base_ring=base_ring,
                                                    red_hom=red_hom)
    else:
        raise NotImplementedError("Analytic type not implemented.")
Esempio n. 9
0
def FormsSpace(analytic_type, group=3, base_ring=ZZ, k=QQ(0), ep=None):
    r"""
    Return the FormsSpace with the given ``analytic_type``, ``group``
    ``base_ring`` and degree (``k``, ``ep``).

    INPUT:

    - ``analytic_type``   -- An element of ``AnalyticType()`` describing
                             the analytic type of the space.

    - ``group``           -- The index of the (Hecke triangle) group of the
                             space (default: `3`).

    - ``base_ring``       -- The base ring of the space
                             (default: ``ZZ``).

    - ``k``               -- The weight of the space, a rational number
                             (default: ``0``).

    - ``ep``              -- The multiplier of the space, `1`, `-1`
                             or ``None`` (in case ``ep`` should be
                             determined from ``k``). Default: ``None``.

    For the variables ``group``, ``base_ring``, ``k``, ``ep``
    the same arguments as for the class ``FormsSpace_abstract`` can be used.
    The variables will then be put in canonical form.
    In particular the multiplier ``ep`` is calculated
    as usual from ``k`` if ``ep == None``.

    OUTPUT:

    The FormsSpace with the given properties.

    EXAMPLES::

        sage: from sage.modular.modform_hecketriangle.constructor import FormsSpace
        sage: FormsSpace([])
        ZeroForms(n=3, k=0, ep=1) over Integer Ring
        sage: FormsSpace(["quasi"]) # not implemented

        sage: FormsSpace("cusp", group=5, base_ring=CC, k=12, ep=1)
        CuspForms(n=5, k=12, ep=1) over Complex Field with 53 bits of precision

        sage: FormsSpace("holo")
        ModularForms(n=3, k=0, ep=1) over Integer Ring

        sage: FormsSpace("weak", group=6, base_ring=ZZ, k=0, ep=-1)
        WeakModularForms(n=6, k=0, ep=-1) over Integer Ring

        sage: FormsSpace("mero", group=7, base_ring=ZZ, k=2, ep=-1)
        MeromorphicModularForms(n=7, k=2, ep=-1) over Integer Ring

        sage: FormsSpace(["quasi", "cusp"], group=5, base_ring=CC, k=12, ep=1)
        QuasiCuspForms(n=5, k=12, ep=1) over Complex Field with 53 bits of precision

        sage: FormsSpace(["quasi", "holo"])
        QuasiModularForms(n=3, k=0, ep=1) over Integer Ring

        sage: FormsSpace(["quasi", "weak"], group=6, base_ring=ZZ, k=0, ep=-1)
        QuasiWeakModularForms(n=6, k=0, ep=-1) over Integer Ring

        sage: FormsSpace(["quasi", "mero"], group=7, base_ring=ZZ, k=2, ep=-1)
        QuasiMeromorphicModularForms(n=7, k=2, ep=-1) over Integer Ring

        sage: FormsSpace(["quasi", "cusp"], group=infinity, base_ring=ZZ, k=2, ep=-1)
        QuasiCuspForms(n=+Infinity, k=2, ep=-1) over Integer Ring
    """

    from space import canonical_parameters
    (group, base_ring, k, ep,
     n) = canonical_parameters(group, base_ring, k, ep)

    from analytic_type import AnalyticType
    AT = AnalyticType()
    analytic_type = AT(analytic_type)

    if analytic_type <= AT("mero"):
        if analytic_type <= AT("weak"):
            if analytic_type <= AT("holo"):
                if analytic_type <= AT("cusp"):
                    if analytic_type <= AT([]):
                        from space import ZeroForm
                        return ZeroForm(group=group,
                                        base_ring=base_ring,
                                        k=k,
                                        ep=ep)
                    else:
                        from space import CuspForms
                        return CuspForms(group=group,
                                         base_ring=base_ring,
                                         k=k,
                                         ep=ep)
                else:
                    from space import ModularForms
                    return ModularForms(group=group,
                                        base_ring=base_ring,
                                        k=k,
                                        ep=ep)
            else:
                from space import WeakModularForms
                return WeakModularForms(group=group,
                                        base_ring=base_ring,
                                        k=k,
                                        ep=ep)
        else:
            from space import MeromorphicModularForms
            return MeromorphicModularForms(group=group,
                                           base_ring=base_ring,
                                           k=k,
                                           ep=ep)
    elif analytic_type <= AT(["mero", "quasi"]):
        if analytic_type <= AT(["weak", "quasi"]):
            if analytic_type <= AT(["holo", "quasi"]):
                if analytic_type <= AT(["cusp", "quasi"]):
                    if analytic_type <= AT(["quasi"]):
                        raise ValueError(
                            "There should be only non-quasi ZeroForms. That could be changed but then this exception should be removed."
                        )
                        from space import ZeroForm
                        return ZeroForm(group=group,
                                        base_ring=base_ring,
                                        k=k,
                                        ep=ep)
                    else:
                        from space import QuasiCuspForms
                        return QuasiCuspForms(group=group,
                                              base_ring=base_ring,
                                              k=k,
                                              ep=ep)
                else:
                    from space import QuasiModularForms
                    return QuasiModularForms(group=group,
                                             base_ring=base_ring,
                                             k=k,
                                             ep=ep)
            else:
                from space import QuasiWeakModularForms
                return QuasiWeakModularForms(group=group,
                                             base_ring=base_ring,
                                             k=k,
                                             ep=ep)
        else:
            from space import QuasiMeromorphicModularForms
            return QuasiMeromorphicModularForms(group=group,
                                                base_ring=base_ring,
                                                k=k,
                                                ep=ep)
    else:
        raise NotImplementedError("Analytic type not implemented.")