I am using the FreeGroup function in GAP
gap> f:=FreeGroup(2);;
gap> Order(f);
infinity
gap> Order(f.1);
# GAP Hangs here with not output
# with Ctrl-c
^CError, user interrupt in
MakeImmutable( a ); called from
pow * obj called from
<function "unknown">( <arguments> )
called from read-eval loop at line 18 of *stdin*
you can 'return;'
brk>
I quote from Wikipedia here
On the other hand, any nontrivial finite group cannot be free, since the elements of a free generating set of a free group have infinite order.
Now shouldn't Order(f.1) should return Infinity as well (for free group not for any general group)? I know that mathematically it is possible that one of them has a finite order and other has infinite order (for general group). Shouldn't my statement be true for "Free Group" specifically?
Thanks
Just because the element of a group element is infinite does not necessarily mean that a computer program will be able to determine it. The documentation of
Orderstates:An infinite loop may happen either if there is no [known] algorithm for the given group to determine whether or not an element has infinite order, or if such an algorithm simply has not been implemented.
As you point out, for the free group, it would be rather trivial to implement. So, my guess would be that nobody bothered to implement
Orderfor free groups in a better way (e.g., as a special case). It's hardly necessary from a computational point of view, asOrderis trivial anyway. You could try digging through to source code to see exactly what's going on.