Construct the free semigroup F on n generators, where n is a positive integer. The i-th generator may be referenced by the expression F.i, i = 1, ..., n. Note that a special form of the assignment statement is provided which enables the user to assign names to the generators of F. In this form of assignment, the list of generator names is enclosed within angle brackets and appended to the variable name on the left hand side of the assignment statement.
Construct the free monoid F on n generators, where n is a positive integer. The i-th generator may be referenced by the expression F.i, i = 1, ..., n. Note that a special form of the assignment statement is provided which enables the user to assign names to the generators of F. In this form of assignment, the list of generator names is enclosed within angle brackets and appended to the variable name on the left hand side of the assignment statement.
> F := FreeSemigroup(2);creates the free semigroup on two generators. Here the generators may be referenced using the standard names, F.1 and F.2.
The statement
> F<x, y> := FreeSemigroup(2);defines F to be the free semigroup on two generators and assigns the names x and y to the generators.
Suppose S is an fp-semigroup, not necessarily free, for which generators have already been defined. A word is defined inductively as follows:
Given a semigroup S defined on r generators and a sequence Q = [i1, ..., is] of integers lying in the range [1, r], construct the word G.(i1) G.(i2) ... G.(is).
Construct the identity element (empty word) for the fp-monoid M.