Dear Derek,
you wrote:
if F<>0 then ....but I was rather surprised when this caused GAP to try and calculate
the order of F (which was pretty hopeless, since F was infinite).
yes, GAP behaves sometimes unpredictable, if one tries to compare
elements of different universes, simply because it is nearly
impossible to catch all the cases. So it is safer to first check that
<F> is of the correct type before comparing, e.g.
if not IsInt(F) then
instead of
if F <> 0 then
best wishes
Frank