Like other domains semigroups and monoids are represented by records.
While it is possible to construct such a record by hand it is preferable
to have the functions `SemiGroup`

(see SemiGroup) or `Monoid`

(see
Monoid) do this for you.

After such a record is created one can add record components. But you may not alter the values of components which are already present.

A semigroup or monoid record has the following category components.

`isDomain`

:-

is always`true`

since a monoid or a semigroup is a domain.

`isSemiGroup`

:

is always`true`

for semigroups.

`isMonoid`

:-

is always`true`

for monoids. The following components are the identification components of a semigroup or monoid record.

`generators`

:-

is a list of generators of the monoid or the semigroup. Duplicates are allowed in this list, but in the case of a monoid none of the generators may be the identity.

`identity`

:-

is the indentity in the case of a monoid.

Other components which contain information about the semigroup or monoid may be present.

`size`

:-

is the size of the monoid or the semigroup (see "Size").

`elements`

:-

is the set of elements of the monoid or the semigroup (see "Elements").