# 23.2 Set Functions for Finitely Presented Groups

Finitely presented groups are domains, thus in principle all set theoretic functions are applicable to them (see chapter Domains). However because words that are not equal may denote the same element of a finitely presented group many of them will not work correctly. This sections describes which set theoretic functions are implemented specially for finitely presented groups and how they work. You should not use the set theoretic functions that are not mentioned in this section.

The general information that enables GAP to work with a finitely presented group G is a coset table (see CosetTableFpGroup). Basically a coset table is the permutation representation of the finitely presented group on the cosets of a subgroup (which need not be faithful if the subgroup has a nontrivial core). Most of the functions below use the regular representation of G, i.e., the coset table of G over the trivial subgroup. Such a coset table is computed by a method called coset enumeration.

`Size( G )`

The size is simply the degree of the regular representation of G.

`w in G`

A word w lies in a parent group G if all its letters are among the generators of G.

`w in H`

To test whether a word w lies in a subgroup H of a finitely presented group G, GAP computes the coset table of G over H. Then it tests whether the permutation one gets by replacing each generator of G in w with the corresponding permutation is trivial.

`Elements( G )`

The elements of a finitely presented group are computed by computing the regular representation of G. Then for each point p GAP adds the smallest word w that, when viewed as a permutation, takes 1 to p to the set of elements. Note that this implies that each word in the set returned is the smallest word that denotes an element of G.

`Elements( H )`

The elements of a subgroup H of a finitely presented group G are computed by computing the elements of G and returning those that lie in H.

`Intersection( H1, H2 )`

The intersection of two subgroups H1 and H2 of a finitely presented group G is computed as follows. First GAP computes the coset tables of G over H1 and H2. Then it computes the tensor product of those two permutation representations. The coset table of the intersection is the transitive constituent of 1 in this tensored permutation representation. Finally GAP computes a set of Schreier generators for the intersection by performing another coset enumeration using the already complete coset table. The intersection is returned as the subgroup generated by those Schreier generators.

GAP 3.4.4
April 1997