CoCalc -- Collaborative Calculation in the Cloud
Sharedsage_worksheets / ADS_Subgroups.sagewsOpen in CoCalc

Worksheets related to Applied Discrete Structures

File: /ext/sage/sage-8.6_1804/local/lib/python2.7/site-packages/sage/categories/
Signature : G.submonoid(self, generators, category=None)
Docstring :
Return the multiplicative submonoid generated by "generators".


* "generators" -- a finite family of elements of "self", or a
  list, iterable, ... that can be converted into one (see

* "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 "".


   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)],
   sage: M2 is M