Skip to content

Commit

Permalink
semieunit: fix tests and improve code coverage
Browse files Browse the repository at this point in the history
Fix two tests which have different (but mathematically correct) output
when acting methods are enabled/disabled. Improve code coverage in main/setup.gi.
Noticed that IdempotentCreator method may need to be fixed.
  • Loading branch information
ChristopherRussell committed Sep 5, 2018
1 parent 44fa4c1 commit 97479ac
Showing 1 changed file with 38 additions and 18 deletions.
56 changes: 38 additions & 18 deletions tst/standard/semieunit.tst
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,8 @@ documentation for more detail,
gap> ps := InverseSemigroup([PartialPerm([2, 3, 4, 5], [1, 3, 5, 4]),
> PartialPerm([2, 3, 4, 5], [1, 4, 5, 3])]);;
gap> Mps := IsomorphismSemigroup(IsMcAlisterTripleSemigroup, ps);;
gap> Image(Mps);
[ (1, ()), (1, (1,2)(3,6)(4,5)), (1, (1,4)(2,6)(3,5)), (1, (1,6,5)(2,4,3)),
(3, ()), (3, (1,3)(2,5)(4,6)), (3, (1,4)(2,6)(3,5)), (3, (1,5,6)(2,3,4)),
(4, ()), (4, (1,2)(3,6)(4,5)), (4, (1,3)(2,5)(4,6)), (4, (1,4)(2,6)(3,5)),
(4, (1,5,6)(2,3,4)), (4, (1,6,5)(2,4,3)) ]
gap> Range(Mps);
<McAlister triple semigroup over Group([ (1,5,6)(2,3,4), (1,4)(2,6)(3,5) ])>
gap> AsSemigroup(IsMcAlisterTripleSemigroup, ps);
<McAlister triple semigroup over Group([ (1,5,6)(2,3,4), (1,4)(2,6)(3,5) ])>
gap> ps := InverseSemigroup([PartialPerm([1, 4, 6, 7], [1, 4, 6, 7]),
Expand All @@ -114,31 +111,36 @@ gap> ps := InverseSemigroup([PartialPerm([1, 4, 6, 7], [1, 4, 6, 7]),
> PartialPerm([1, 4, 6, 7], [2, 3, 7, 6]),
> PartialPerm([2, 3, 6, 7], [1, 4, 7, 6]), PartialPerm([6, 7], [7, 6])]);;
gap> Mps := IsomorphismSemigroup(IsMcAlisterTripleSemigroup, ps);;
gap> Image(Mps);
[ (1, ()), (1, (1,2)), (2, ()), (2, (1,2)), (3, ()), (3, (1,2)), (4, ()) ]
gap> Elements(Range(Mps));
[ (1, ()), (1, (1,2)), (2, ()), (2, (1,2)), (3, ()), (3, (1,2)), (4, ()) ]
gap> Range(Mps);
<McAlister triple semigroup over Group([ (1,2) ])>
gap> Elements(Range(Mps));;
gap> IsWholeFamily(Range(Mps));
true
gap> AsSemigroup(IsMcAlisterTripleSemigroup, ps);
<McAlister triple semigroup over Group([ (1,2) ])>
gap> G := Semigroup(PartialPerm([1, 2, 3], [2, 3, 1]));;
gap> iso := IsomorphismSemigroup(IsMcAlisterTripleSemigroup, G);
MappingByFunction( <partial perm group of size 3, rank 3 with 1 generator>
, <McAlister triple semigroup over Group([ (2,3,
4) ])>, function( s ) ... end )
gap> PartialPerm([1, 2, 3], [2, 3, 1]) ^ iso;;

#T# McAlister triple subsemigroup methods
gap> S := Semigroup(Image(Mps){[1 .. 3]});
gap> S := Semigroup(Elements(Range(Mps)){[1, 2, 3]});
<McAlister triple subsemigroup over Group([ (1,2) ])>
gap> attr := [MTSSemilattice, MTSGroup, MTSPartialOrder, MTSAction,
> MTSActionHomomorphism, MTSUnderlyingAction, MTSComponents,
> MTSQuotientDigraph, MTSSemilatticeVertexLabelInverseMap];;
gap> M := Range(Mps);;
gap> ForAll(attr, A -> A(S) = A(M));
true
gap> Print(S, "\n");
Semigroup([ MTSE(McAlisterTripleSemigroup(Group( [ (1,2) ] ), Digraph( [ [ 1, \
3 ], [ 2, 3 ], [ 3 ], [ 2, 3, 4 ], [ 1, 3, 5 ] ] ), [ 3, 2, 4, 1 ]), 1, ()), M\
TSE(McAlisterTripleSemigroup(Group( [ (1,2) ] ), Digraph( [ [ 1, 3 ], [ 2, 3 ]\
, [ 3 ], [ 2, 3, 4 ], [ 1, 3, 5 ] ] ), [ 3, 2, 4, 1 ]), 1, (1,2)), MTSE(McAlis\
terTripleSemigroup(Group( [ (1,2) ] ), Digraph( [ [ 1, 3 ], [ 2, 3 ], [ 3 ], [\
2, 3, 4 ], [ 1, 3, 5 ] ] ), [ 3, 2, 4, 1 ]), 2, ()) ]
gap> Print(Semigroup(Elements(M1){[1, 2, 3]}), "\n");
Semigroup([ MTSE(McAlisterTripleSemigroup(SymmetricGroup( [ 2 .. 5 ] ), Digrap\
h( [ [ 1 ], [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 1, 5 ] ] ), [ 1 .. 4 ]), 1, ()), M\
TSE(McAlisterTripleSemigroup(SymmetricGroup( [ 2 .. 5 ] ), Digraph( [ [ 1 ], [\
1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 1, 5 ] ] ), [ 1 .. 4 ]), 1, (4,5)), MTSE(McAlis\
terTripleSemigroup(SymmetricGroup( [ 2 .. 5 ] ), Digraph( [ [ 1 ], [ 1, 2 ], [\
1, 3 ], [ 1, 4 ], [ 1, 5 ] ] ), [ 1 .. 4 ]), 1, (3,4)) ]

#T# AsSemigroup with bad input
gap> T := Semigroup([PartialPerm([1], [3]),
Expand Down Expand Up @@ -235,7 +237,7 @@ gap> M7 := McAlisterTripleSemigroup(Group((5, 6)), x4, x4);;
gap> IsomorphismSemigroups(M6, M7);
fail

#T# IsomorphicSemigroups with bad input
#T# IsomorphismSemigroups with bad input
gap> x1 := Digraph([[1], [1, 2], [1, 3]]);;
gap> G := Group((2, 3));;
gap> M1 := McAlisterTripleSemigroup(G, x1, x1);;
Expand Down Expand Up @@ -341,6 +343,24 @@ true
gap> S = Range(cov);
true

#T# acting semgroups
#TODO: Are these functions necessary? They aren't used anywhere else in tests.
gap> G := SymmetricGroup([2 .. 5]);;
gap> x := Digraph([[1], [1, 2], [1, 3], [1, 4], [1, 5]]);;
gap> y := Digraph([[1], [1, 2], [1, 3], [1, 4]]);;
gap> M := McAlisterTripleSemigroup(G, x, y, OnPoints);;
gap> x1 := Generators(M)[1];;
gap> ActionDegree(Elements(M){[1, 2]});;
gap> MinActionRank(M);;
gap> LambdaRank(M)(0);
0
gap> RhoRank(M)(0);
0
gap> RhoInverse(M)(x1, x1);;
gap> LambdaConjugator(M)(x1, x1);;
gap> IdempotentTester(M)(x1, x1);;
gap> IdempotentCreator(M);; # TODO: needs more coverage, may be broken

#T# SEMIGROUPS_UnbindVariables
gap> Unbind(A);
gap> Unbind(act);
Expand Down

0 comments on commit 97479ac

Please sign in to comment.