Esempio n. 1
0
    def super_categories(self):
        """
        EXAMPLES::

            sage: Coalgebras(QQ).super_categories()
            [Category of vector spaces over Rational Field]
        """
        return [Modules(self.base_ring())]
Esempio n. 2
0
    def super_categories(self):
        """
        EXAMPLES::

            sage: GradedModules(QQ).super_categories()
            [Category of vector spaces over Rational Field]
            sage: GradedModules(ZZ).super_categories()
            [Category of modules over Integer Ring]
        """
        R = self.base_ring()
        return [Modules(R)]
Esempio n. 3
0
    def super_categories(self):
        """
        EXAMPLES::

            sage: ChainComplexes(Integers(9)).super_categories()
            [Category of modules over Ring of integers modulo 9]
        """
        from sage.categories.all import Fields, Modules, VectorSpaces
        base_ring = self.base_ring()
        if base_ring in Fields():
            return [VectorSpaces(base_ring)]
        return [Modules(base_ring)]
Esempio n. 4
0
def category_meet(self, other):
    """
    TESTS::
        sage: from yacop.categories.utils import category_meet
        sage: from yacop.categories.left_modules import YacopLeftModules
        sage: from yacop.categories.right_modules import YacopRightModules
        sage: A3=YacopLeftModules(SteenrodAlgebra(3))
        sage: category_meet(A3,A3)
        Category of yacop left modules over mod 3 Steenrod algebra, milnor basis
        sage: category_meet(A3,Modules(GF(3)))
        Category of vector spaces over Finite Field of size 3
        sage: A2=YacopLeftModules(SteenrodAlgebra(2))
        sage: B2=YacopLeftModules(SteenrodAlgebra(2,profile=(2,1,1)))
        sage: category_meet(A2,B2)
        Category of yacop left modules over sub-Hopf algebra of mod 2 Steenrod algebra, milnor basis, profile function [2, 1, 1]
        sage: A2=YacopRightModules(SteenrodAlgebra(2))
        sage: B2=YacopRightModules(SteenrodAlgebra(2,profile=(2,1,1)))
        sage: category_meet(A2,B2)
        Category of yacop right modules over sub-Hopf algebra of mod 2 Steenrod algebra, milnor basis, profile function [2, 1, 1]

    """

    import yacop.categories

    oR = other.base_ring()
    B = steenrod_algebra_intersect((self.base_ring(), oR))
    if not hasattr(B, "is_generic"):
        return Modules(FiniteField(B.characteristic()))

    is_algebra = self._yacop_has_multiplication() and other._yacop_has_multiplication()
    is_right = self._yacop_has_right_action() and other._yacop_has_right_action()
    is_left = self._yacop_has_left_action() and other._yacop_has_left_action()
    is_bimod = is_left and is_right

    if is_algebra:
        if is_bimod:
            return yacop.categories.bimodules.YacopBimoduleAlgebras(B)
        elif is_right:
            return yacop.categories.right_modules.YacopRightModuleAlgebras(B)
        else:
            return yacop.categories.left_modules.YacopLeftModuleAlgebras(B)
    else:
        if is_bimod:
            return yacop.categories.bimodules.YacopBimodules(B)
        elif is_right:
            return yacop.categories.right_modules.YacopRightModules(B)
        else:
            return yacop.categories.left_modules.YacopLeftModules(B)
Esempio n. 5
0
    def __init__(self, X, Y, category=None):
        """
        EXAMPLES::

            sage: V = span([[1/2,1,1],[3/2,2,1],[0,0,1]],ZZ); W = V.span([2*V.0+4*V.1, 9*V.0+12*V.1, 4*V.2]); Q = V/W
            sage: type(Q.Hom(Q))
            <class 'sage.modules.fg_pid.fgp_morphism.FGP_Homset_class_with_category'>
        """
        if category is None:
            from sage.modules.free_module import is_FreeModule
            if is_FreeModule(X) and is_FreeModule(Y):
                from sage.categories.all import FreeModules
                category = FreeModules(X.base_ring())
            else:
                from sage.categories.all import Modules
                category = Modules(X.base_ring())
        Homset.__init__(self, X, Y, category)