File: /ext/sage/sage-8.6_1804/local/lib/python2.7/site-packages/sage/categories/monoids.py
Signature : G.submonoid(self, generators, category=None)
Docstring :
Return the multiplicative submonoid generated by "generators".
INPUT:
* "generators" -- a finite family of elements of "self", or a
list, iterable, ... that can be converted into one (see
"Family").
* "category" -- a category
This is a shorthand for "Semigroups.ParentMethods.subsemigroup()"
that specifies that this is a submonoid, and in particular that the
unit is "self.one()".
EXAMPLES:
sage: R = IntegerModRing(15)
sage: M = R.submonoid([R(3),R(5)]); M
A submonoid of (Ring of integers modulo 15) with 2 generators
sage: M.list()
[1, 3, 5, 9, 0, 10, 12, 6]
Not the presence of the unit, unlike in:
sage: S = R.subsemigroup([R(3),R(5)]); S
A subsemigroup of (Ring of integers modulo 15) with 2 generators
sage: S.list()
[3, 5, 9, 0, 10, 12, 6]
This method is really a shorthand for subsemigroup:
sage: M2 = R.subsemigroup([R(3),R(5)], one=R.one())
sage: M2 is M
True