[GAP Forum] Writing custom action on a set of list(erratum)

Pierre-Alain BOURDIL pabourdi at laas.fr
Thu May 7 17:18:34 BST 2015


Dear Alexander, we have the same error.

As a workaround, i encapsulated each point of omega in a list (and 
modified act accordingly):

omega := [[1,rc[1],2],[2,rc[2],1]]
becomes
omega:= [ [[1,rc[1],2]],[[2,rc[2],1]]]

and

act := function (xs,g)
   local repr,comp,rc,orbital,x;
   x:=xs[1];
   comp := x[1];
   rc := x[2];
   orbital := x[3];
   repr:=rc*g;
   return [[comp^g,repr,orbital]];
end;;

The above code works

Le 07/05/2015 17:54, Alexander Konovalov a écrit :
....
> gap> G:=SymmetricGroup(2); 
> Sym( [ 1 .. 2 ] ) 
> gap> stab:=Stabilizer(G,1); 
> Group(())
> gap> rc:=RightCosets(G,stab);
> [ RightCoset(Group( () ),()), RightCoset(Group( () ),(1,2)) ] 
> gap> omega := [[1,rc[1],2],[2,rc[2],1]] ; 
> [ [ 1, RightCoset(Group( () ),()), 2 ], [ 2, RightCoset(Group( () 
> ),(1,2)), 1 ] ] 

> gap> act := function (x,g)
>>   local repr,comp,rc,orbital;
>>   #extract args
>>   comp := x[1];
>>   rc := x[2];
>>   orbital := x[3];
>>   # compute the coset
>>   repr:=rc*g;
>>   return [comp^g,repr,orbital];
>> end;;
> gap>
> gap> A:=Action(G,omega,act);
> Error, no method found! For debugging hints type ?Recovery from NoMethodFound
> Error, no 1st choice method found for `<' on 2 arguments called from
> func( elm ) called from
> ForAll( D, IsList and IsSSortedList ) called from
> ActionHomomorphismConstructor( xset, true ) called from
> attr( xset ) called from
> CallFuncList( ActionHomomorphism, arg ) called from
> ...  at line 16 of *stdin*
> you can 'quit;' to quit to outer loop, or
> you can 'return;' to continue
> brk> D;
> [ [ 1, RightCoset(Group( () ),()), 2 ],
>    [ 2, RightCoset(Group( () ),(1,2)), 1 ] ]
>
> because GAP expects IsSSortedList to work on elements of omega, while it doesn't:
>
> gap> IsSSortedList(omega[1]);
> Error, no method found! For debugging hints type ?Recovery from NoMethodFound
> Error, no 1st choice method found for `<' on 2 arguments called from
> <function "HANDLE_METHOD_NOT_FOUND">( <arguments> )
>   called from read-eval loop at line 31 of *stdin*
> you can 'quit;' to quit to outer loop, or
> you can 'return;' to continue
> brk>
>
> Before continuing, do we now at least see the same error message?
>
> Best,
> Alexander
>
> P.S. Actually, the following works:
>
> gap> G:=SymmetricGroup(2);
> Sym( [ 1 .. 2 ] )
> gap> stab:=Stabilizer(G,1);
> Group(())
> gap> rc:=RightCosets(G,stab);
> [ RightCoset(Group( () ),()), RightCoset(Group( () ),(1,2)) ]
> gap> A:=Action(G,rc,OnRight);
> Group([ (1,2) ])
>
> and also
>
> gap> A:=Action(G,[1,2],OnPoints);
> Group([ (1,2) ])
>
> - could any of these examples be helpful?
>
>
>
>


-- 
Pierre-Alain BOURDIL
pabourdi at laas.fr <mailto:pabourdi at laas.fr>


More information about the Forum mailing list