Commutative additive groups¶
-
class
sage.categories.commutative_additive_groups.
CommutativeAdditiveGroups
(base_category)¶ Bases:
sage.categories.category_with_axiom.CategoryWithAxiom_singleton
,sage.categories.category_types.AbelianCategory
The category of abelian groups, i.e. additive abelian monoids where each element has an inverse.
EXAMPLES:
sage: C = CommutativeAdditiveGroups(); C Category of commutative additive groups sage: C.super_categories() [Category of additive groups, Category of commutative additive monoids] sage: sorted(C.axioms()) ['AdditiveAssociative', 'AdditiveCommutative', 'AdditiveInverse', 'AdditiveUnital'] sage: C is CommutativeAdditiveMonoids().AdditiveInverse() True sage: from sage.categories.additive_groups import AdditiveGroups sage: C is AdditiveGroups().AdditiveCommutative() True
Note
This category is currently empty. It’s left there for backward compatibility and because it is likely to grow in the future.
TESTS:
sage: TestSuite(CommutativeAdditiveGroups()).run() sage: sorted(CommutativeAdditiveGroups().CartesianProducts().axioms()) ['AdditiveAssociative', 'AdditiveCommutative', 'AdditiveInverse', 'AdditiveUnital']
The empty covariant functorial construction category classes
CartesianProducts
andAlgebras
are left here for the sake of nicer output since this is a commonly used category:sage: CommutativeAdditiveGroups().CartesianProducts() Category of Cartesian products of commutative additive groups sage: CommutativeAdditiveGroups().Algebras(QQ) Category of commutative additive group algebras over Rational Field
Also, it’s likely that some code will end up there at some point.
-
class
Algebras
(category, *args)¶ Bases:
sage.categories.algebra_functor.AlgebrasCategory
TESTS:
sage: from sage.categories.covariant_functorial_construction import CovariantConstructionCategory sage: class FooBars(CovariantConstructionCategory): ....: _functor_category = "FooBars" ....: _base_category_class = (Category,) sage: Category.FooBars = lambda self: FooBars.category_of(self) sage: C = FooBars(ModulesWithBasis(ZZ)) sage: C Category of foo bars of modules with basis over Integer Ring sage: C.base_category() Category of modules with basis over Integer Ring sage: latex(C) \mathbf{FooBars}(\mathbf{ModulesWithBasis}_{\Bold{Z}}) sage: import __main__; __main__.FooBars = FooBars # Fake FooBars being defined in a python module sage: TestSuite(C).run()
-
class
CommutativeAdditiveGroups.
CartesianProducts
(category, *args)¶ Bases:
sage.categories.cartesian_product.CartesianProductsCategory
TESTS:
sage: from sage.categories.covariant_functorial_construction import CovariantConstructionCategory sage: class FooBars(CovariantConstructionCategory): ....: _functor_category = "FooBars" ....: _base_category_class = (Category,) sage: Category.FooBars = lambda self: FooBars.category_of(self) sage: C = FooBars(ModulesWithBasis(ZZ)) sage: C Category of foo bars of modules with basis over Integer Ring sage: C.base_category() Category of modules with basis over Integer Ring sage: latex(C) \mathbf{FooBars}(\mathbf{ModulesWithBasis}_{\Bold{Z}}) sage: import __main__; __main__.FooBars = FooBars # Fake FooBars being defined in a python module sage: TestSuite(C).run()
-
class