[GAP Forum] bugs?
Thomas Breuer
thomas.breuer at math.rwth-aachen.de
Wed Feb 23 12:21:12 GMT 2005
Dear GAP Forum,
Laurent Bartholdi has reported the following GAP bugs.
> gap> A := GroupRing(GF(5),SymmetricGroup(4));
> <algebra-with-one over GF(5), with 2 generators>
> gap> 3*A.1;
> (Z(5)^3)*(1,2,3,4)
> gap> 3/4*A.1;
> Error, no method found! For debugging hints type ?Recovery from NoMethodFou=
> nd
> Error, no 1st choice method found for `PROD' on 2 arguments called from
> gap> 3*A.1/4;
> Z(5)*(1,2,3,4)
> gap> A.1*3/4;
> Z(5)*(1,2,3,4)
> ---------------------------------------------------
> gap> L := LeftIdeal(A,[A.1+A.1^2+A.1^3+A.1^4]);; B := Basis(L);;
> gap> IsList(B);
> true
> gap> Concatenation([A.1],B);
> AppendList: <list2> must be a small list (not a object (component)) at
> Append( res, arg[i] );
> called from
> <function>( <arguments> ) called from read-eval-loop
> ..
> gap> Concatenation([A.1],Elements(B));
> [ (Z(241)^0)*(1,2,3,4), ... ]
> gap> Concatenation([A.1],B);
> [ (Z(241)^0)*(1,2,3,4), ... ]
The first problem is due to a missing method for multiplying group ring
elements with rationals.
As the example shows, multiplication and division by integers works,
so there is clearly no reason why multiplication with rationals should
not be supported.
The necessary method installations for a quick fix are appended below.
The second problem is due to a too restrictive method for `Append'.
Fixing this will require a change to the GAP kernel,
but a preliminary workaround for the example above (and others)
is appended below.
Thanks very much for the report.
All the best,
Thomas
InstallMethod( \*,
"for magma ring element, and rational",
[ IsElementOfMagmaRingModuloRelations, IsRat ],
ElmTimesRingElm );
InstallMethod( \*,
"for rational, and magma ring element",
[ IsRat, IsElementOfMagmaRingModuloRelations ],
RingElmTimesElm );
InstallImmediateMethod( IsSmallList,
IsBasis and HasBasisVectors and IsAttributeStoringRep, 0,
function( B )
B:= BasisVectors( B );
if HasIsSmallList( B ) then
return IsSmallList( B );
fi;
TryNextMethod();
end );
InstallImmediateMethod( IsSmallList,
IsBasis and HasUnderlyingLeftModule and IsAttributeStoringRep, 0,
function( B )
B:= UnderlyingLeftModule( B );
if HasDimension( B ) then
return Dimension( B ) <= MAX_SIZE_LIST_INTERNAL;
fi;
TryNextMethod();
end );
More information about the Forum
mailing list