  
  [1X7 [33X[0;0YSigned Permutations[133X[101X
  
  [33X[0;0YWe  provide  [13Xsigned permutations[113X, that is permutations that can additionally
  change the sign of their result.[133X
  
  [33X[0;0YAssume  [22Xn ∈ N[122X, then a signed permutation on [22Xn[122X points is a permutation [22Xπ[122X on [22X{
  1  ...  n  }[122X  together  with  signs  [22Xsgn  :  {  1  .. n } → {-1,1}[122X. A signed
  permutation  on  [22Xn[122X  points  acts on the set [22X{ -n ... 1, 1 ... n }[122X by [22Xω ^ (π,
  sgn) = sgn(ω)⋅ sgn(|ω|^π) ⋅ (|ω|^π)[122X.[133X
  
  [33X[0;0YWe  provide  two  representations  of  signed permutations, one as a list of
  images  [2XIsSignedPermListRep[102X  ([14X7.2-8[114X) and one formed as pair of a permutation
  and  a sign map [2XIsSignedPermRep[102X ([14X7.2-7[114X). Our benchmarks indicate that a list
  of images is the better representation, and hence this is the default.[133X
  
  [33X[0;0YTo get started with signed permutations consider the following example[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs := SignedPerm([2,-1]);[127X[104X
    [4X[28X<signed permutation in list rep>[128X[104X
    [4X[25Xgap>[125X [27X1 ^ s;[127X[104X
    [4X[28X2[128X[104X
    [4X[25Xgap>[125X [27X2 ^ s;[127X[104X
    [4X[28X-1[128X[104X
    [4X[25Xgap>[125X [27XOnPoints(2, s);[127X[104X
    [4X[28X-1[128X[104X
  [4X[32X[104X
  
  [33X[0;0YOne can form groups out of signed permutations[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xr := SignedPerm([-1,3,-2,4]);; t := SignedPerm([3,1,4,2]);;[127X[104X
    [4X[25Xgap>[125X [27XG := Group(r,t);[127X[104X
    [4X[28X<group with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize(G);[127X[104X
    [4X[28X32[128X[104X
    [4X[25Xgap>[125X [27XOrbit(G, 1, OnPoints);[127X[104X
    [4X[28X[ 1, -1, 3, -3, -2, 4, 2, -4 ][128X[104X
    [4X[25Xgap>[125X [27XStabilizer(G, 1, OnPoints);[127X[104X
    [4X[28X<group of size 4 with 9 generators>[128X[104X
  [4X[32X[104X
  
  [33X[0;0YNote  that  currently  the  package  does  not make an effort to exploit the
  special structure of signed permutation groups as permutation groups.[133X
  
  
  [1X7.1 [33X[0;0YDifferent Representations[133X[101X
  
  [33X[0;0YTo create signed permutations in the different representations, we provide a
  constructor.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xr := NewSignedPerm(IsSignedPermRep, [-1,3,-2,4]);;[127X[104X
    [4X[25Xgap>[125X [27Xt := SignedPerm(IsSignedPermRep, [3,1,4,2]);;[127X[104X
    [4X[25Xgap>[125X [27XG := Group(r,t);[127X[104X
    [4X[28X<group with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize(G);[127X[104X
    [4X[28X32[128X[104X
    [4X[25Xgap>[125X [27Xr := NewSignedPerm(IsSignedPermListRep, [-1,3,-2,4]);;[127X[104X
    [4X[25Xgap>[125X [27Xt := SignedPerm(IsSignedPermListRep, [3,1,4,2]);;[127X[104X
    [4X[25Xgap>[125X [27XG := Group(r,t);[127X[104X
    [4X[28X<group with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize(G);[127X[104X
    [4X[28X32[128X[104X
  [4X[32X[104X
  
  
  [1X7.2 [33X[0;0YLow-Level Descriptions[133X[101X
  
  [1X7.2-1 IsSignedPerm[101X
  
  [33X[1;0Y[29X[2XIsSignedPerm[102X( [3Xarg[103X ) [32X filter[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X[133X
  
  [33X[0;0YCategory of signed permutations[133X
  
  [1X7.2-2 ListSignedPerm[101X
  
  [33X[1;0Y[29X[2XListSignedPerm[102X( [3Xperm[103X ) [32X operation[133X
  
  [33X[0;0YConvert   a  signed  permutation  into  a  list  of  images,  equivalent  to
  List([1..LargestMovedPoint(s)], x -> x^s);[133X
  
  [1X7.2-3 ListSignedPerm[101X
  
  [33X[1;0Y[29X[2XListSignedPerm[102X( [3Xarg1[103X, [3Xarg2[103X ) [32X operation[133X
  
  [33X[0;0YConvert  a  signed  permutation to a list of images of length [3Xlen[103X. Arguments
  perm, len[133X
  
  [1X7.2-4 SignedPerm[101X
  
  [33X[1;0Y[29X[2XSignedPerm[102X( [3Xarg[103X ) [32X function[133X
  
  [33X[0;0YGiven  a  list  of  signed  images  create  a  signed  permutation object in
  [2XIsSignedPermListRep[102X ([14X7.2-8[114X).[133X
  
  [1X7.2-5 NewSignedPerm[101X
  
  [33X[1;0Y[29X[2XNewSignedPerm[102X( [3Xarg1[103X, [3Xarg2[103X ) [32X constructor[133X
  
  [1X7.2-6 NewSignedPerm[101X
  
  [33X[1;0Y[29X[2XNewSignedPerm[102X( [3Xarg1[103X, [3Xarg2[103X, [3Xarg3[103X ) [32X constructor[133X
  
  [1X7.2-7 IsSignedPermRep[101X
  
  [33X[1;0Y[29X[2XIsSignedPermRep[102X( [3Xarg[103X ) [32X filter[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X[133X
  
  [33X[0;0YRepresentation  of  signed  permutations  as  a  permutation and a vector of
  signs.[133X
  
  [1X7.2-8 IsSignedPermListRep[101X
  
  [33X[1;0Y[29X[2XIsSignedPermListRep[102X( [3Xarg[103X ) [32X filter[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X[133X
  
  [33X[0;0YRepresentation of signed permutations as a list of signed images[133X
  
  [1X7.2-9 OnPosPoints[101X
  
  [33X[1;0Y[29X[2XOnPosPoints[102X( [3Xarg[103X ) [32X function[133X
  
  [33X[0;0YOnly act as a permutation on [22X{ 1... n}[122X[133X
  
  [1X7.2-10 LargestMovedPoint[101X
  
  [33X[1;0Y[29X[2XLargestMovedPoint[102X( [3Xarg[103X ) [32X attribute[133X
  
  [33X[0;0YThe  largest  point  that  is  moved by the signed permutation, where moving
  includes changing the sign.[133X
  
  [1X7.2-11 RandomSignedPermList[101X
  
  [33X[1;0Y[29X[2XRandomSignedPermList[102X( [3Xarg[103X ) [32X function[133X
  
  [33X[0;0YCreate  a  random  list  of  images  that  can  be  used  to create a signed
  permutation.[133X
  
  [1X7.2-12 RandomSignedPerm[101X
  
  [33X[1;0Y[29X[2XRandomSignedPerm[102X( [3Xarg[103X ) [32X function[133X
  
  [33X[0;0YCreate a random signed permutation[133X
  
