Bases: sage.categories.category.Category
The category of (multiplicative) monoids, i.e. semigroups with a unit.
EXAMPLES:
sage: Monoids()
Category of monoids
sage: Monoids().super_categories()
[Category of semigroups]
sage: Monoids().all_super_categories()
[Category of monoids,
Category of semigroups,
Category of magmas,
Category of sets,
Category of sets with partial maps,
Category of objects]
TESTS:
sage: C = Monoids()
sage: TestSuite(C).run()
Bases: sage.categories.algebra_functor.AlgebrasCategory
EXAMPLES:
sage: Monoids().Algebras(QQ).extra_super_categories()
[Category of algebras with basis over Rational Field]
sage: Monoids().Algebras(QQ).super_categories()
[Category of semigroup algebras over Rational Field]
sage: Monoids().example().algebra(ZZ).categories()
[Category of monoid algebras over Integer Ring,
Category of semigroup algebras over Integer Ring,
Category of algebras with basis over Integer Ring,
...
Category of objects]
Bases: sage.categories.cartesian_product.CartesianProductsCategory
The category of monoids constructed as cartesian products of monoids
A cartesian product of monoids is endowed with a natural monoid structure.
EXAMPLES:
sage: Monoids().CartesianProducts().extra_super_categories()
[Category of monoids]
sage: Monoids().CartesianProducts().super_categories()
[Category of monoids, Category of Cartesian products of semigroups]
Returns whether self is the one of the monoid
The default implementation, is to compare with self.one().
TESTS:
sage: S = Monoids().example()
sage: S.one().is_one()
True
sage: S("aa").is_one()
False
Returns the one of the monoid, that is the unique neutral element for .
EXAMPLES:
sage: M = Monoids().example(); M
An example of a monoid: the free monoid generated by ('a', 'b', 'c', 'd')
sage: M.one()
''
Backward compatibility alias for one().
TESTS:
sage: S = Monoids().example()
sage: S.one_element()
''
n-ary product
Returns the product of the elements in args, as an element of self.
EXAMPLES:
sage: S = Monoids().example()
sage: S.prod([S('a'), S('b')])
'ab'
Bases: sage.categories.subquotients.SubquotientsCategory
Returns a list of the immediate super categories of self.
EXAMPLES:
sage: Monoids().super_categories()
[Category of semigroups]