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 PrimePGroup for direct products of trivial groups #1754

Merged
merged 1 commit into from
Oct 2, 2017

Conversation

wilfwilson
Copy link
Member

In PR #1722, I resolved issue #1719: there was a bug in an Assert in PrimePGroup for a direct product of groups.

I have discovered a further problem in PrimePGroup for a direct product of groups, which was present both before and after my earlier PR. In particular, PrimePGroup for trivial group should return fail, however for a direct product of trivial groups, PrimePGroup triggers an error. I don't think I fully appreciated before that a trivial group is a p-group in GAP.

This PR resolves the problem.

This is an example of the problem:

gap> G := DirectProduct(TrivialGroup(IsPcGroup), TrivialGroup(IsPcGroup));
<pc group of size 1 with 0 generators>
gap> PrimePGroup(G);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
The 1st argument is 'fail' which might point to an earlier problem
Error, no 1st choice method found for `IsPGroup' on 1 arguments at /Users/Wilf/GAP/lib/methsel2.g:241 called from
<compiled or corrupted statement>  called from
PrimePGroup( First( groups, function ( G )
        return PrimePGroup( G ) <> fail;
    end ) ) at /Users/Wilf/GAP/lib/gprd.gi:269 called from
<function "unknown">( <arguments> )

This is now fixed:

gap> G := DirectProduct(TrivialGroup(IsPcGroup), TrivialGroup(IsPcGroup));
<pc group of size 1 with 0 generators>
gap> PrimePGroup(G);
fail

@wilfwilson wilfwilson added the kind: bug Issues describing general bugs, and PRs fixing them label Sep 29, 2017
@codecov
Copy link

codecov bot commented Sep 29, 2017

Codecov Report

Merging #1754 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1754      +/-   ##
==========================================
+ Coverage   63.43%   63.44%   +<.01%     
==========================================
  Files        1000     1000              
  Lines      322760   322766       +6     
  Branches    13015    13038      +23     
==========================================
+ Hits       204757   204764       +7     
+ Misses     115361   115360       -1     
  Partials     2642     2642
Impacted Files Coverage Δ
lib/gprd.gi 49.62% <100%> (+0.31%) ⬆️
src/funcs.c 70.86% <0%> (-0.29%) ⬇️
src/hpc/threadapi.c 34.17% <0%> (-0.29%) ⬇️
src/stats.c 73.36% <0%> (-0.14%) ⬇️
src/hpc/traverse.c 78.29% <0%> (+0.08%) ⬆️
src/lists.c 55.08% <0%> (+0.11%) ⬆️
src/hpc/thread.c 46.64% <0%> (+0.19%) ⬆️
src/objset.c 82.59% <0%> (+0.23%) ⬆️
lib/rwspcgrp.gi 74.49% <0%> (+1.01%) ⬆️

@markuspf
Copy link
Member

markuspf commented Oct 2, 2017

Thanks for catching this. I think this is something I was trying to provoke when testing your last PR and then got distracted by the definition of IsPGroup. 👍

@fingolfin fingolfin merged commit 4a25b3c into gap-system:master Oct 2, 2017
@wilfwilson wilfwilson deleted the fix-PrimePGroup branch October 19, 2017 12:03
@olexandr-konovalov olexandr-konovalov added the release notes: added PRs introducing changes that have since been mentioned in the release notes label Jan 22, 2018
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 release notes: added PRs introducing changes that have since been mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants