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

correction of IsMonomial, mainly for reducible characters #2113

Merged
merged 1 commit into from
Feb 8, 2018

Conversation

ThomasBreuer
Copy link
Contributor

@ThomasBreuer ThomasBreuer commented Jan 24, 2018

correction of IsMonomial, mainly for reducible characters

  • change the TestMonomialQuick and TestMonomial methods
    for characters such that also reducible characters are handled correctly

  • restrict the IsPrimitiveCharacter method that relies on
    quasi-primitivity to irreducible characters

  • define IsSubnormallyMonomial only for irreducible characters

  • add tests

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks quite good to me. I just have some very minor comments and questions.

Also, could you please edit the commit message to start with a single short summary (ideally with <= 60 characters), followed by an empty line, followed by a longer description (e.g. the list you have now)? That is the recommend format for git commit messages; git, GitHub and many other tools display the first line of a commit in many contexts, so having a meaningful short summary in it is very helpful

@@ -357,6 +364,10 @@ end );
##
#M TestQuasiPrimitive( <chi> ) . . . . . . . . . . . . . . . for a character
##
## This works also for reducible <chi>.
## Note that a representation affording <chi> maps the centre of <chi>
## to scalar matrices.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the relevance of this comment (on the centre) at this point? To me, a comment here is for somebody who wants to call the function without caring what it does... Wouldn't this factoid about the centre be more helpful below, perhaps near the "proof" comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.
Somebody who wants to call the function should look at the documentation
in the corresponding .gd file.
Comments in the implementation part are intended for somebody who wants to look at the code.

lib/ctblmono.gi Outdated
@@ -1013,6 +1015,8 @@ InstallMethod( IsMonomialNumber,
##
#M TestMonomialQuick( <chi> ) . . . . . . . . . . . . . . . for a character
##
## We may assume that <chi> is an irreducible character.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"We may assume"? This makes it sound as if it was optional, or as if there was some underlying reason... Remove "may"?, resp. say "Assumes that..." ?

Or even clarify: "This function assumes that is an irreducible character, but does not verify this. Other inputs may thus leading to nonsensical output." ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O.k.

lib/ctblmono.gi Outdated
# Start with elementary tests for monomiality.
if IsIrreducibleCharacter( chi ) then
test:= TestMonomialQuick( chi );
elif HasIsMonomialCharacter( chi ) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should that HasIsMonomialCharacter perhaps be first, given that it'll be the quickest test by far?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O.k.

@fingolfin
Copy link
Member

Something went wrong there -- you now have two commits with identical (?) content and a merge commit in this PR. Perhaps try to git rebase master (if that fails with an error, you can always git rebase --abort)?

@fingolfin
Copy link
Member

@ThomasBreuer Unfortunately, this PR causes multiple test failures, already in testinstall, e.g. tst/testinstall/ctblmono.tst now fails. You can reproduce this locally by reading the file tst/testinstall.g from the GAP root directory into GAP.

@fingolfin
Copy link
Member

The tests pass now, but this PR contains duplicates of all kinds of commits on master. You'll have to git rebase master once again -- and make sure your master really is in sync with the master branch of gap-system/gap...

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires a rebase.

@fingolfin fingolfin added kind: bug Issues describing general bugs, and PRs fixing them topic: tests issues or PRs related to tests labels Feb 5, 2018
- change the 'TestMonomialQuick' and 'TestMonomial' methods
  for characters such that also reducible characters are handled correctly

- restrict the 'IsPrimitiveCharacter' method that relies on
  quasi-primitivity to irreducible characters

- define 'IsSubnormallyMonomial' only for irreducible characters

- added tests

    TB
@codecov
Copy link

codecov bot commented Feb 5, 2018

Codecov Report

Merging #2113 into master will increase coverage by 0.09%.
The diff coverage is 92.45%.

@@            Coverage Diff             @@
##           master    #2113      +/-   ##
==========================================
+ Coverage   69.58%   69.67%   +0.09%     
==========================================
  Files         482      482              
  Lines      254628   254639      +11     
==========================================
+ Hits       177182   177432     +250     
+ Misses      77446    77207     -239
Impacted Files Coverage Δ
lib/ctblmono.gi 81.6% <92.45%> (+18.96%) ⬆️
src/stats.c 85.04% <0%> (-0.14%) ⬇️
lib/ctbl.gi 68.95% <0%> (+0.03%) ⬆️
lib/claspcgs.gi 42.2% <0%> (+0.08%) ⬆️
src/funcs.c 78.44% <0%> (+0.13%) ⬆️
lib/grppc.gi 71.52% <0%> (+0.15%) ⬆️
src/hpc/threadapi.c 36.9% <0%> (+0.18%) ⬆️
lib/clashom.gi 56.01% <0%> (+0.18%) ⬆️
lib/gpprmsya.gi 65.42% <0%> (+0.29%) ⬆️
lib/ctblfuns.gi 60.54% <0%> (+0.32%) ⬆️
... and 5 more

@fingolfin fingolfin merged commit d8c2534 into gap-system:master Feb 8, 2018
@fingolfin fingolfin added this to the GAP 4.10.0 milestone Feb 8, 2018
@ThomasBreuer ThomasBreuer deleted the TB_IsMonomial branch February 12, 2018 14:45
@fingolfin fingolfin added the release notes: added PRs introducing changes that have since been mentioned in the release notes label Sep 20, 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 topic: tests issues or PRs related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants