I am trying to use GAP to study a certain finite (finitely presented)
group. To make the question simple, suppose I want to consider a
free group with 1 generator X and 1 relation: X*X = 1.
This group has two elements: IdWord & X .
Given an element, such as X*X*X*X*X*X*X, how can I make the GAP program
reveal to me which of two elements, IdWord or X, this is?