[GAP Forum] Urgent Issue on GAP...

Justin Walker justin at mac.com
Tue Mar 8 20:05:47 GMT 2005


On Mar 8, 2005, at 10:10, Sergei Haller wrote:

> On Tue, 8 Mar 2005, Justin Walker (JW) wrote:
>
> JW> On Mar 8, 2005, at 8:13, Dan Rossul wrote:
> JW>
> JW> > When I try the command:
> JW> >
> JW> > gap> g:=Group((1)(2)(3,4));
> JW> > Syntax error: ) expected
> JW>
> JW> On input, "(1)(2)..." is invalid.  The parser expects a '*' to be 
> used;
> JW> juxtaposition does not mean "group operation".
>
> well, it does for permutations, so (3,4)(5,6) or (3,4)(2) are perfectly
> valid.

Yes, but no :-}

The two examples you show can be interpreted two ways:
   - (3,4)(5,6) is a single permutation, a pair of disjoint 2-cycles
   - (3,4)(5,6) is the product of two 2-cycles

and I believe that GAP takes the former view, given this:

gap> (1,2)(3,2);
Permutation: cycles must be disjoint and duplicate-free
gap> (1,2)*(3,2);
(1,3,2)

My interpretation of all this is that you must use '*' for the group 
operation; and "(1)" is not a valid permutation.

I'm sure there's more to this story, but I don't have the time to 
actually RTFM :-}

> The thing is that GAP seems to interpret the command line from left to
> right and decides that the first object in (1)(2)(3,4) is an integer, 
> the
> second object is (2), an integer, too, but juxtaposition of integers in
> parentheses is not accepted.
>
> if you use * then (1)*(3,4) is fine, since right hand side is a
> permutation, the left hand side (1) is interpreted as the identity
> permutation in parentheses. So 1*(3,4) works as well.
>
> Here, (2)*(3,4) does not work, since (2) is interpreted as an integer 
> and
> (3,4) as a permutation.

To get much farther, I think a session with the doc is needed.  This is 
what I see:
gap> (1)^(1,2);
2
gap> (1)^(1);
1
gap> (1)^(2);
1

so "(2)" is certainly a permutation at some level.

> Back to the original question:
>
> As Dan pointed out, the input like Group((3,4)) does work.
> Why would you like to use Group((1)(2)(3,4))?

Just to be clear: Dan was the original poster; he pointed out that the 
former worked, and asked why the latter did not.

Regards,

Justin

--
Justin C. Walker, Curmudgeon-At-Large  *
Institute for General Semantics        |   When LuteFisk is outlawed
                                        |   Only outlaws will have
                                        |       LuteFisk
*--------------------------------------*-------------------------------*




More information about the Forum mailing list