def __init__(self, G): """ TESTS:: sage: S8 = SymmetricGroup(8) sage: TestSuite(GSets(S8)).run() """ Category.__init__(self) self.__G = G
def __init__(self, G): """ TESTS:: sage: S8 = SymmetricGroup(8) sage: TestSuite(GSets(S8)).run() """ Category.__init__(self, "G-sets") self.__G = G
def __init__(self): """ TESTS:: sage: C = Schemes() sage: C Category of Schemes sage: TestSuite(C).run() """ Category.__init__(self, "Schemes")
def __init__(self, left_base, right_base, name=None): """ EXAMPLES:: sage: C = Bimodules(QQ, ZZ) sage: TestSuite(C).run() """ Category.__init__(self, name) assert left_base in _Rings, "The left base must be a ring" assert right_base in _Rings, "The right base must be a ring" self._left_base_ring = left_base self._right_base_ring = right_base
def __init__(self, left_base, right_base, name=None): """ EXAMPLES:: sage: C = Bimodules(QQ, ZZ) sage: TestSuite(C).run() """ Category.__init__(self, name) assert left_base in _Rings, "The left base must be a ring" assert right_base in _Rings, "The right base must be a ring" self._left_base_ring = left_base self._right_base_ring = right_base
def __init__(self, G = None): """ TESTS:: sage: S8 = SymmetricGroup(8) sage: C = Groupoid(S8) sage: TestSuite(C).run() """ Category.__init__(self) #, "Groupoid") if G is None: from sage.groups.perm_gps.permgroup_named import SymmetricGroup G = SymmetricGroup(8) self.__G = G
def __init__(self, G=None): """ TESTS:: sage: S8 = SymmetricGroup(8) sage: C = Groupoid(S8) sage: TestSuite(C).run() """ Category.__init__(self) #, "Groupoid") if G is None: from sage.groups.perm_gps.permgroup_named import SymmetricGroup G = SymmetricGroup(8) self.__G = G
def __init__(self, left_base, right_base, name=None): """ EXAMPLES:: sage: C = Bimodules(QQ, ZZ) sage: TestSuite(C).run() """ if not (left_base in Rings or (isinstance(left_base, Category) and left_base.is_subcategory(Rings()))): raise ValueError("the left base must be a ring or a subcategory of Rings()") if not (right_base in Rings or (isinstance(right_base, Category) and right_base.is_subcategory(Rings()))): raise ValueError("the right base must be a ring or a subcategory of Rings()") self._left_base_ring = left_base self._right_base_ring = right_base Category.__init__(self, name)
def __init__(self, left_base, right_base, name=None): """ EXAMPLES:: sage: C = Bimodules(QQ, ZZ) sage: TestSuite(C).run() """ if not ( left_base in Rings() or (isinstance(left_base, Category) and left_base.is_subcategory(Rings())) ): raise ValueError("the left base must be a ring or a subcategory of Rings()") if not ( right_base in Rings() or (isinstance(right_base, Category) and right_base.is_subcategory(Rings())) ): raise ValueError("the right base must be a ring or a subcategory of Rings()") self._left_base_ring = left_base self._right_base_ring = right_base Category.__init__(self, name)
def __init__(self, category, *args): """ TESTS:: sage: from sage.categories.covariant_functorial_construction import CovariantConstructionCategory sage: class FooBars(CovariantConstructionCategory): ... pass sage: C = FooBars(ModulesWithBasis(QQ)) sage: C Category of foo bars of modules with basis over Rational Field sage: C.base_category() Category of modules with basis over Rational Field sage: latex(C) \mathbf{FooBars}(\mathbf{ModulesWithBasis}_{\Bold{Q}}) sage: import __main__; __main__.FooBars = FooBars # Fake FooBars being defined in a python module sage: TestSuite(C).run() """ assert isinstance(category, Category) Category.__init__(self) self._base_category = category self._args = args
def __init__(self, left_base, right_base=None, name=None): self._left_base_ring = left_base self._right_base_ring = left_base if right_base is None else right_base assert self._left_base_ring.characteristic( ) == self._right_base_ring.characteristic() Category.__init__(self, name)