Monoids¶
- class sage.monoids.monoid.Monoid_class(names, category=None)[source]¶
Bases:
ParentEXAMPLES:
sage: from sage.monoids.monoid import Monoid_class sage: Monoid_class(('a','b')) <sage.monoids.monoid.Monoid_class_with_category object at ...>
>>> from sage.all import * >>> from sage.monoids.monoid import Monoid_class >>> Monoid_class(('a','b')) <sage.monoids.monoid.Monoid_class_with_category object at ...>
- gens()[source]¶
Return the generators for
self.EXAMPLES:
sage: F.<a,b,c,d,e> = FreeMonoid(5) sage: F.gens() (a, b, c, d, e)
>>> from sage.all import * >>> F = FreeMonoid(Integer(5), names=('a', 'b', 'c', 'd', 'e',)); (a, b, c, d, e,) = F._first_ngens(5) >>> F.gens() (a, b, c, d, e)
- monoid_generators()[source]¶
Return the generators for
self.EXAMPLES:
sage: F.<a,b,c,d,e> = FreeMonoid(5) sage: F.monoid_generators() Family (a, b, c, d, e)
>>> from sage.all import * >>> F = FreeMonoid(Integer(5), names=('a', 'b', 'c', 'd', 'e',)); (a, b, c, d, e,) = F._first_ngens(5) >>> F.monoid_generators() Family (a, b, c, d, e)