Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in FixedPoints for a partial perm coll #1034

Merged
merged 1 commit into from
Dec 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);