I have the following input in GAP's environment:
I wanted to check whether a certain element of my Free group is in the group or not, so I used the code:
> a in e;
and expected to get
[ true
But it didn't work:
[ false
But when I eliminated the long green [ in above pic on the right by hand, the answer got clear:
May I ask a help not to do it by hand? Thanks.
Edit: Here is the codes I did for a Free group for two generators. Look at the results at the end.
Indeed, GAP behaves correctly here:
a
is an element off
and not ofw
. If you want to access generators of the newly created finitely presented group, useGeneratorsOfGroup(w)
to get their list.An example based on the original question, but also demonstrating how to use
ParseRelators
to simplify input:Now quite technical detail: indeed,
a
fromf
anda
fromw
belong to different families:This is why you were getting
false
in your examples.