Skip to content

Commit

Permalink
Add a few more IsRegularPGroup tests (gap-system#5775)
Browse files Browse the repository at this point in the history
Contributed by Jack Schmidt in a comment on PR gap-system#5359.

Also change phrasing in the documentation for IsRegularPGroup.
  • Loading branch information
fingolfin authored Aug 27, 2024
1 parent 8936b67 commit b2506e1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/grp.gd
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ InstallTrueMethod( IsPowerfulPGroup, IsFinite and IsPGroup and IsAbelian );
##
## <Description>
## <Index Key="RegularPGroup">Regular <M>p</M>-group</Index>
## A finite <M>p</M>-group <A>G</A> is said to be a <E>regular <M>p</M>-group</E>
## A finite <M>p</M>-group <A>G</A> is a <E>regular <M>p</M>-group</E>
## if for all <M>a,b</M> in <A>G</A>, one has <M>a^p b^p = (a b)^p c^p</M>
## where <M>c</M> is an element of the derived subgroup of the group generated
## by <M>a</M> and <M>b</M> (see&nbsp;<Cite Key="Hal34"/>).
Expand Down
24 changes: 24 additions & 0 deletions tst/testinstall/pgroups.tst
Original file line number Diff line number Diff line change
Expand Up @@ -222,5 +222,29 @@ gap> Number(myList,IsRegularPGroup);
5
gap> g:=AbelianGroup(ListWithIdenticalEntries(2000,2));;

#
# Test IsRegularPGroup method thoroughly
#
gap> IsRegularPGroup(SmallGroup(8, 3)); # Case 1
false
gap> IsRegularPGroup(SmallGroup(2187, 224)); # Case 2
false
gap> IsRegularPGroup(SmallGroup(27,3)); # Case 3
true
gap> IsRegularPGroup(SmallGroup(81, 1)); # Case 4
true
gap> IsRegularPGroup(SmallGroup(243,22)); # Case 5
true
gap> IsRegularPGroup(SmallGroup(2187, 4487)); # Case 6
true
gap> IsRegularPGroup(SmallGroup(81, 7)); # Case 7
false
gap> IsRegularPGroup(SmallGroup(78125, 684)); # Case 8
true
gap> IsRegularPGroup(SmallGroup(243, 51)); # Case 10 (no case 9 found)
false
gap> IsRegularPGroup(SmallGroup(2187, 663)); # Case 11, takes 3 seconds
true

#
gap> STOP_TEST("pgroups.tst", 1);

0 comments on commit b2506e1

Please sign in to comment.