[Top] [Up] [Previous] [Next] [Index]

# 50 Monoids

This chapter describes functions for monoids. Currently there are only few of them. More general functions for magmas and semigroups can be found in Chapters Magmas and Semigroups.

- `IsMonoid(` D`) P`

  A monoid is a magma-with-one (see Magmas) with associative multiplication.

- `Monoid(` gen1`,` gen2`... ) F`
- `Monoid(` gens`) F`
- `Monoid(` gens`,` id`) F`

  In the first form, `Monoid` returns the monoid generated by the arguments gen1, gen2 ..., that is, the closure of these elements under multiplication and taking the 0-th power. In the second form, `Monoid` returns the monoid generated by the elements in the homogeneous list gens; a square matrix as only argument is treated as one generator, not as a list of generators. In the third form, `Monoid` returns the monoid generated by the elements in the homogeneous list gens, with identity id.

  It is not checked whether the underlying multiplication is associative, use `MagmaWithOne` (see MagmaWithOne) and `IsAssociative` (see IsAssociative) if you want to check whether a magma-with-one is in fact a monoid.

- `Submonoid(` M`,` gens`) F`
- `SubmonoidNC(` M`,` gens`) F`

  are just synonyms of `SubmagmaWithOne` and `SubmagmaWithOneNC`, respectively (see SubmagmaWithOne).

- `MonoidByGenerators(` gens`) O`
- `MonoidByGenerators(` gens`,` one`) O`

  is the underlying operation of `Monoid` (see Monoid).

- `AsMonoid(` C`) A`

  If C is a collection whose elements form a monoid (see IsMonoid) then `AsMonoid` returns this monoid. Otherwise `fail` is returned.

- `AsSubmonoid(` D`,` C`) O`

  Let D be a domain and C a collection. If C is a subset of D that forms a monoid then `AsSubmonoid` returns this monoid, with parent D. Otherwise `fail` is returned.

- `GeneratorsOfMonoid(` M`) A`

  Monoid generators of a monoid M are the same as magma-with-one generators (see GeneratorsOfMagmaWithOne).

- `TrivialSubmonoid(` M`) A`

  is just a synonym for `TrivialSubmagmaWithOne` (see TrivialSubmagmaWithOne).

- `FreeMonoid( [`wfilt`, ]`rank`) F`
- `FreeMonoid( [`wfilt`, ]`rank`,` name`) F`
- `FreeMonoid( [`wfilt`, ]`name1`,` name2`, ... ) F`
- `FreeMonoid( [`wfilt`, ]`names`) F`
- `FreeMonoid( [`wfilt`, ]infinity,` name`,` init`) F`

  Called in the first form, `FreeMonoid` returns a free monoid on rank generators. Called in the second form, `FreeMonoid` returns a free monoid on rank generators, printed as ``name `1`, ``name `2` etc., that is, each name is the concatenation of the string name and an integer from `1` to range. Called in the third form, `FreeMonoid` returns a free monoid on as many generators as arguments, printed as name1, name2 etc. Called in the fourth form, `FreeMonoid` returns a free monoid on as many generators as the length of the list names, the i-th generator being printed as ``names`[i]`. Called in the fifth form, `FreeMonoid` returns a free monoid on infinitely many generators, where the first generators are printed by the names in the list init, and the other generators by name and an appended number.

  If the extra argument wfilt is given, it must be either `IsSyllableWordsFamily` or `IsLetterWordsFamily` or `IsWLetterWordsFamily` or `IsBLetterWordsFamily`. The filter then specifies the representation used for the elements of the free group (see Representations for Associative Words). If no such filter is given, a letter representation is used.

- `MonoidByMultiplicationTable(` A`) F`

  returns the monoid whose multiplication is defined by the square matrix A (see MagmaByMultiplicationTable) if such a monoid exists. Otherwise `fail` is returned.

  [Top] [Up] [Previous] [Next] [Index]

  GAP 4 manual
  May 2002