Converting a group element to an ordered list of generators in GAP

43 Views Asked by At

Consider the free group on {a,b} which is gap is constructed with FreeGroup("a","b"). I want to cyclically reduce words. For example, given word $a^{-1}*b*a$, this would be achieved by conjugating by $a$. However, no matter how hard I try/read about GAP, I can not figure out how to have GAP detect that the first letter in the word $a^{-1}*b*a$ is $a^{-1}$. I assume this is because GAP views $a^{-1}*b*a$ as a group element (for which the notion of letter is meaningless) and not as a tuple $(a^{-1},b,a)$. But surely there is a way to generate such a tuple in GAP given a word in the free group?

1

There are 1 best solutions below

0
On BEST ANSWER

You can use Subword(word,from,to) to extract partial word expression, and Length to get the word length. (Be aware that if it is not a free group, but a finitely presented group, you need to use UnderlyingElement first, to get the free group word representing the element of the finitely presented group.)

Thus to get the list of generators, you would use: List([1..Length(w)],i->Subword(w,i,i));