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

Bad assertion in PrimePGroup for direct products #1719

Closed
wilfwilson opened this issue Sep 13, 2017 · 0 comments · Fixed by #1722
Closed

Bad assertion in PrimePGroup for direct products #1719

wilfwilson opened this issue Sep 13, 2017 · 0 comments · Fixed by #1722
Assignees
Labels
kind: bug Issues describing general bugs, and PRs fixing them topic: library

Comments

@wilfwilson
Copy link
Member

In lib/gprd.gi, the method for PrimePGroup for direct products of p-groups contains the following lines:

p := First (DirectProductInfo( D ).groups, G -> PrimePGroup (G) <> fail);
Assert (1, ForAll (DirectProductInfo( D ).groups, G -> PrimePGroup (G) in [fail, p]));

In the first line, p is defined to be a group; however the assertion is written as if p is instead the prime of that p-group. This leads to bad assertion failures:

Observed behaviour

gap> SetAssertionLevel(1);
gap> G := CyclicGroup(IsPcGroup, 5);;
gap> H := Range(IsomorphismPermGroup(G));
Group([ (1,2,3,4,5) ])
gap> PrimePGroup(H);
Error, Assertion failure in
  Assert( 1, ForAll( DirectProductInfo( D ).groups, function ( G )
        return PrimePGroup( G ) in [ fail, p ];
    end ) ); at /Users/Wilf/GAP/lib/gprd.gi:269 called from
<function "unknown">( <arguments> )

I'm working on this fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Issues describing general bugs, and PRs fixing them topic: library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant