[GAP Forum] applying permutation to subset: strange problem?

Frederic Vanhove fvanhove at cage.UGent.be
Thu Nov 8 10:22:19 GMT 2012


Hello,

thank you both, that seems to do the trick!

Kind regards,
Frédéric


Op 06/11/12 13:16, Muhammad Shah schreef:
> Dear Frédéric,
> The command OnSet takes two arguments a set and a group g. In the
> first case you are taking a set which is orbits[1]:=[1,2]
> While in second case it is not a set as (orbits[2]:= [ 3, 4, 7, 8, 10,
> 12, 5, 6, 9, 11 ] whish is not SSortted so not a set.that is why it
> gives error.
> you should make it first a set like the  following
> gap> g:=AllPrimitiveGroups(DegreeOperation,12)[2];
> M(12)
> gap> h:=Stabilizer(g,[1,2],OnSets);
> Group([ (5,9,6,11)(7,12,10,8), (5,10,6,7)(8,9,12,11),
> (4,7)(5,8)(6,9)(11,12), (4,8)(5,9)(6,7)(10,11),
>    (3,4,10,5)(6,7,9,8), (1,2)(4,12)(5,11)(6,10) ])
> gap> w:=Random(h);
> (3,12)(4,7,10,5,8,6,11,9)
> gap> orbits:=Orbits(h,[1..12]);
> [ [ 1, 2 ], [ 3, 4, 7, 8, 10, 12, 5, 6, 9, 11 ] ]
> gap> OnSets(Set(orbits[2]),w);
> [ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ]
> gap>
> I hope this helps
> Muhammad Shah



Op 06/11/12 13:05, Burkhard Höfling schreef:
> On 2012-11-06, at 12:32 , Frederic Vanhove <fvanhove at cage.UGent.be> wrote:
>
>> gap> orbits:=Orbits(h,[1..12]);
>> [ [ 1, 2 ], [ 3, 4, 7, 8, 10, 12, 5, 6, 9, 11 ] ]
>> gap> OnSets(orbits[2],w);
>> OnSets: <set> must be a set (not a list (plain,cyc,nsort,imm))
>> not in any function
>> Entering break read-eval-print loop ...
>> you can 'quit;' to quit to outer loop, or
>> you can replace <set> via 'return <set>;' to continue
> The error message tells you that the second orbit is not a set in the GAP sense (i.e., a strictly sorted list). As the documentation about Orbits states, the result contains lists of points, not necessarily sets. To do what you intended, just convert the list to a set first:
>
> OnSets(Set(orbits[2]),w);
>
> Regards,
>
> Burkhard.




More information about the Forum mailing list