Skip to content

Commit

Permalink
Fix bug in FixedPoints for a partial perm coll
Browse files Browse the repository at this point in the history
Previously it called MovedPoints!
  • Loading branch information
james-d-mitchell authored and markuspf committed Dec 23, 2016
1 parent 458ab05 commit 77ae12c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/pperm.gi
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ InstallMethod(MovedPoints, "for a partial perm coll",
[IsPartialPermCollection], coll-> Union(List(coll, MovedPoints)));

InstallMethod(NrFixedPoints, "for a partial perm coll",
[IsPartialPermCollection], coll-> Length(MovedPoints(coll)));
[IsPartialPermCollection], coll-> Length(FixedPointsOfPartialPerm(coll)));

InstallMethod(NrMovedPoints, "for a partial perm coll",
[IsPartialPermCollection], coll-> Length(MovedPoints(coll)));
Expand Down
2 changes: 1 addition & 1 deletion lib/semipperm.gi
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ s-> ImageOfPartialPermCollection(GeneratorsOfSemigroup(s)));

InstallMethod(FixedPointsOfPartialPerm, "for a partial perm semigroup",
[IsPartialPermSemigroup],
s-> MovedPoints(GeneratorsOfSemigroup(s)));
s-> FixedPointsOfPartialPerm(GeneratorsOfSemigroup(s)));

InstallMethod(MovedPoints, "for a partial perm semigroup",
[IsPartialPermSemigroup],
Expand Down
41 changes: 41 additions & 0 deletions tst/testinstall/semipperm.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#############################################################################
##
#W semipperm.tst
#Y James D. Mitchell
##
#############################################################################
##
gap> START_TEST("semipperm.tst");

# Test DisplayString
gap> S := Semigroup(PartialPerm([1, 2, 3], [4, 5, 11]),
> PartialPerm([1], [3]));;
gap> DisplayString(S);
"\><\>partial perm\< \>semigroup\< \>of\< \>rank \>3\<\< \>with\< \>2\< \>gene\
rators\<>\<"

# Test Fixed/moved points etc
gap> S := Semigroup(PartialPerm([1, 2, 3, 4, 6, 7, 10], [10, 8, 4, 6, 5, 3, 2]),
> PartialPerm([1, 2, 4, 5, 6, 9, 10], [3, 5, 8, 4, 1, 9, 7]),
> PartialPerm([1, 2, 4, 7, 9], [5, 3, 7, 4, 9]),
> PartialPerm([1, 2, 3, 4, 6, 8], [5, 1, 10, 7, 8, 9]));
<partial perm semigroup of rank 10 with 4 generators>
gap> FixedPointsOfPartialPerm(S);
[ 9 ]
gap> MovedPoints(S);
[ 1, 2, 3, 4, 5, 6, 7, 8, 10 ]
gap> NrFixedPoints(S);
1
gap> NrMovedPoints(S);
9
gap> LargestMovedPoint(S);
10
gap> LargestImageOfMovedPoint(S);
10
gap> SmallestMovedPoint(S);
1
gap> SmallestImageOfMovedPoint(S);
1

#
gap> STOP_TEST( "semipperm.tst", 10000);

0 comments on commit 77ae12c

Please sign in to comment.