> < ^ Date: Fri, 05 Nov 1999 09:28:39 -0500 (EST)
> < ^ From: Alexander Hulpke <hulpke@math.colostate.edu >
> < ^ Subject: Re: the function "Group()"

Dear Gap-Forum,

Jan de Beule wrote:
> There seems to be a problem with the function Group();
> I have attached a file named "testgroup". You should use this in gap with
> Read("testgroup").

What happens is not a bug in GAP but an error in the `PrintObj' method for
your new objects:

When creating groups, GAP tests the property
`IsGeneratorsOfMagmaWithInverses' for the argument. (This is to stop the
creation of groups, if the generators are non-invertible elements.)

The default method for `IsGeneratorsOfMagmaWithInverses' now checks, whether
`Inverse' is computable. This alone does not prove for example that the
multiplication is associative, and therefore this method prints a warning:
#I default `IsGeneratorsOfMagmaWithInverses' method returns `true' for
followed by the respective generators. (You can turn this and other warnings
off by setting SetInfoLevel(InfoWarning,0); )

Your Print method however calls `NewGroup' again (why it does this, I don't
understand). This leads to an infinite recursion and the error you observed.
(Normally such infinite recursions are trapped by GAP, but because `Print'
interfaces through the kernel, this last safety feature does not apply here.

If you change this `PrintObj' method (or provide a private method for
`IsGeneratorsOfMagmaWithInverses' which will not issue a warning), your
example works without problems.

InstallMethod( PrintObj,
    "for new object",
    [ IsNewObject and IsNewObjectRep ],
    function( x )
    local H, G;
H:= FamilyObj( x );
# this line is the problem:
>     G:= NewGroup( H!.n, H!.q );
Print( "NewObject( ", G,", ", x![1],", ", x![2], " )" );
end );

Best regards,

Alexander Hulpke

> < [top]