DeclareOperation("helpfunction", [IsList]);
InstallMethod(helpfunction, "for a representation of a quiver",[IsList],0,function(L)
local list, n, i, j, f, temp, temp2, temp3, u;
n:=L[1];
s:=L[2];
l:=L[3];
A:=GroupRing(GF(3),SymmetricGroup(n));
temp:=[];
r:=Identity(A);
for i in [1..l-1] do
r:=r+s^i;
od;
return(r);
end);
This works:
gap> helpfunction([3,(1,2),4]);
(Z(3))*()+(Z(3))*(1,2)
But now I use it:
DeclareOperation("helpfunction2", [IsList]);
InstallMethod(helpfunction2, "for a representation of a quiver",[IsList],0,function(L)
local list, n, i, j, f, temp, temp2, temp3, u;
x:=L[1];
n:=L[2];
A:=SymmetricGroup(n);
U:=Size(Elements(A));
temp:=[];
for i in [1..U] do
Append(temp,[helpfunction([n,x,i])]);
od;
return(temp);
end);
This works as well alone:
gap> helpfunction2([(1,3),3]);
[ (Z(3)^0)*(), (Z(3)^0)*()+(Z(3)^0)*(1,3), (Z(3))*()+(Z(3)^0)*(1,3),
(Z(3))*()+(Z(3))*(1,3), (Z(3))*(1,3), of ... ]
Now the next things do not work:
gap> B:=SymmetricGroup(3);
Sym( [ 1 .. 3 ] )
gap> A:=GroupRing(GF(3),B);
gap> W:=Subspace(A,helpfunction2([(1,3),3]));
Error, first argument must be a left module, second a collection
called from ( )
called from read-eval loop at line 1823 of stdin
So what did I do wrong? Somehow it seems the list is not regocnized as a subset of A.