Пример #1
0
    def __init__(self, ambient, submodule):
        """
        Create a submodule of the homology of a modular abelian variety.

        INPUT:


        -  ``ambient`` - the homology of some modular abelian
           variety with ring coefficients

        -  ``submodule`` - a submodule of the free module
           underlying ambient


        EXAMPLES::

            sage: H = J0(37).homology()
            sage: H.submodule([[1,0,0,0]])
            Submodule of rank 1 of Integral Homology of Abelian variety J0(37) of dimension 2

        TESTS::

            sage: loads(dumps(H)) == H
            True
        """
        if not isinstance(ambient, Homology_abvar):
            raise TypeError, "ambient must be the homology of a modular abelian variety"
        self.__ambient = ambient
        # try:
        #    if not submodule.is_submodule(ambient):
        #        raise ValueError, "submodule must be a submodule of the ambient homology group"
        # except AttributeError:
        submodule = ambient.free_module().submodule(submodule)
        self.__submodule = submodule
        HeckeModule_free_module.__init__(self, ambient.base_ring(), ambient.level(), weight=2)
Пример #2
0
    def __init__(self, abvar, base):
        """
        This is an abstract base class, so it is called implicitly in the
        following examples.

        EXAMPLES::

            sage: H = J0(43).integral_homology()
            sage: type(H)
            <class 'sage.modular.abvar.homology.IntegralHomology_with_category'>

        TESTS::

            sage: H = J0(43).integral_homology()
            sage: loads(dumps(H)) == H
            True
        """
        if not isinstance(base, CommutativeRing):
            raise TypeError("base ring must be a commutative ring")
        HeckeModule_free_module.__init__(self, base, abvar.level(), weight=2)
        self.__abvar = abvar
Пример #3
0
    def __init__(self, abvar, base):
        """
        This is an abstract base class, so it is called implicitly in the
        following examples.

        EXAMPLES::

            sage: H = J0(43).integral_homology()
            sage: type(H)
            <class 'sage.modular.abvar.homology.IntegralHomology_with_category'>

        TESTS::

            sage: H = J0(43).integral_homology()
            sage: loads(dumps(H)) == H
            True
        """
        if not is_CommutativeRing(base):
            raise TypeError, "base ring must be a commutative ring"
        HeckeModule_free_module.__init__(self, base, abvar.level(), weight=2)
        self.__abvar = abvar
Пример #4
0
    def __init__(self, ambient, submodule):
        """
        Create a submodule of the homology of a modular abelian variety.

        INPUT:


        -  ``ambient`` - the homology of some modular abelian
           variety with ring coefficients

        -  ``submodule`` - a submodule of the free module
           underlying ambient


        EXAMPLES::

            sage: H = J0(37).homology()
            sage: H.submodule([[1,0,0,0]])
            Submodule of rank 1 of Integral Homology of Abelian variety J0(37) of dimension 2

        TESTS::

            sage: loads(dumps(H)) == H
            True
        """
        if not isinstance(ambient, Homology_abvar):
            raise TypeError(
                "ambient must be the homology of a modular abelian variety")
        self.__ambient = ambient
        #try:
        #    if not submodule.is_submodule(ambient):
        #        raise ValueError, "submodule must be a submodule of the ambient homology group"
        #except AttributeError:
        submodule = ambient.free_module().submodule(submodule)
        self.__submodule = submodule
        HeckeModule_free_module.__init__(self,
                                         ambient.base_ring(),
                                         ambient.level(),
                                         weight=2)