Signed Permutations We provide signed permutations, that is permutations that can additionally change the sign of their result.

Assume n \in \mathbb{N}, then a signed permutation on n points is a permutation \pi on \{ 1 \ldots n \} together with signs sgn : \{ 1 .. n \} \rightarrow \{-1,1\}. A signed permutation on n points acts on the set \{ -n \ldots 1, 1 \ldots n \} by \omega ^ { (\pi, sgn) } = sgn(\omega)\cdot sgn(|\omega|^\pi) \cdot (|\omega|^\pi) .

We provide two representations of signed permutations, one as a list of images and one formed as pair of a permutation and a sign map . Our benchmarks indicate that a list of images is the better representation, and hence this is the default.

To get started with signed permutations consider the following example
gap> s := SignedPerm([2,-1]); <signed permutation in list rep> gap> 1 ^ s; 2 gap> 2 ^ s; -1 gap> OnPoints(2, s); -1

One can form groups out of signed permutations

gap> r := SignedPerm([-1,3,-2,4]);; t := SignedPerm([3,1,4,2]);; gap> G := Group(r,t); <group with 2 generators> gap> Size(G); 32 gap> Orbit(G, 1, OnPoints); [ 1, -1, 3, -3, -2, 4, 2, -4 ] gap> Stabilizer(G, 1, OnPoints); <group of size 4 with 9 generators>

Note that currently the package does not make an effort to exploit the special structure of signed permutation groups as permutation groups.

Different Representations

To create signed permutations in the different representations, we provide a constructor.
gap> r := NewSignedPerm(IsSignedPermRep, [-1,3,-2,4]);; gap> t := SignedPerm(IsSignedPermRep, [3,1,4,2]);; gap> G := Group(r,t); <group with 2 generators> gap> Size(G); 32 gap> r := NewSignedPerm(IsSignedPermListRep, [-1,3,-2,4]);; gap> t := SignedPerm(IsSignedPermListRep, [3,1,4,2]);; gap> G := Group(r,t); <group with 2 generators> gap> Size(G); 32

Low-Level Descriptions true or false Category of signed permutations Convert a signed permutation into a list of images, equivalent to List([1..LargestMovedPoint(s)], x -> x^s); Convert a signed permutation to a list of images of length len. Arguments perm, len Given a list of signed images create a signed permutation object in .

true or false Representation of signed permutations as a permutation and a vector of signs. true or false Representation of signed permutations as a list of signed images Only act as a permutation on \{ 1\ldots n\} The largest point that is moved by the signed permutation, where moving includes changing the sign. Create a random list of images that can be used to create a signed permutation. Create a random signed permutation