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

Performance additions to generic 2-cohomology and Automorphism group/Isomorphism test #4219

Merged
merged 7 commits into from
Feb 9, 2021

Conversation

hulpke
Copy link
Contributor

@hulpke hulpke commented Jan 21, 2021

Changes for Release notes:

  • Fix IntermediateGroup to not return fail if the index is large but subgroups exist
  • Add CompositionSeriesThrough

Changes that do not require release notes:

  • Speed up collection process for 2-cohomology
  • If factor permrep is large, do first try for stabilizer
  • when computing permdegree, avoid the bold first attempt to be too bad.
  • Better composition series choice in SubgroupConditionAbove -- move known parts on bottom.
  • Improvements in normalizers in SubgroupConditionAbove. Use NormalizerViaRadical if there is huge radical bit.
  • Delay bottom permrep, if bounded orbit algorithms will do the job.
  • Allow forcing old isomorphism test
  • Redo generators when searching for trick relators
  • Require to stabilize sets of normal subgroups (may reduce in factor)
  • Also added option for ContainedConjugates (does not merit mentioning in release notes)

Also Typo fix/remove outdated comment in gpfpiso

Resolves #4240.

@hulpke hulpke added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes kind: performance labels Jan 21, 2021
@hulpke hulpke force-pushed the additions branch 2 times, most recently from af07733 to f0d7eda Compare January 22, 2021 19:53
@hulpke hulpke added release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes and removed release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes labels Feb 7, 2021
@wilfwilson wilfwilson added the kind: bug Issues describing general bugs, and PRs fixing them label Feb 8, 2021
Copy link
Member

@wilfwilson wilfwilson left a comment

Choose a reason for hiding this comment

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

Everything seems alright to me, nice. It would be good if you could provide test cases for the brand new functionality, i.e. the 4-argument ContainedConjugates and the CompositionSeriesThrough. Otherwise I made two incredibly minor comments on your comments... 😬

lib/autsr.gi Outdated Show resolved Hide resolved
lib/autsr.gi Outdated Show resolved Hide resolved
hulpke and others added 6 commits February 8, 2021 12:48
- Speed up collection process for 2-cohomology
- If factor permrep is large, do first try for stabilizer
- when computing permdegree, avoid the bold first attempt to be too bad.
- Better composition series choice in `SubgroupConditionAbove` -- move known
  parts on bottom
- Improvements in normalizers in `SubgroupConditionAbove`.
  Use NormalizerViaRadical if there is huge radical bit.
- Delay bottom permrep, if bounded orbit algorithms will do the job.
- Allow forcing old isomorphism test
- Redo generators when searching for trick relators
- Require to stabilize sets of normal subgroups (may reduce in factor)

Also Typo fix/remove outdated comment in gpfpiso

Co-authored-by: Wilf Wilson <wilf@wilf-wilson.net>
Co-authored-by: Wilf Wilson <wilf@wilf-wilson.net>
@hulpke hulpke merged commit 6532f3b into gap-system:master Feb 9, 2021
@@ -94,13 +94,24 @@ local C,M,p,all,gens,sub,q,hom,fp,rels,new,pre,sel,i,free,cnt;
fi;
p:=SmallestPrimeDivisor(Size(M));
all:=[];
gens:=SmallGeneratingSet(Image(nat));
if newgens=true then
# so generators new
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this comment, "so generators new"? Maybe "compute new generators for C" or so?

function(elm)
if abort then
return true; # are we bailing out since it behaves too badly?
fi;
# would it contribute to avoid outside S?
if elm in avoid or
ForAny(Set(Factors(Order(elm))),e->elm^e in avoid and not elm^e in S)
Copy link
Member

Choose a reason for hiding this comment

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

Purely optional suggestion:

Suggested change
ForAny(Set(Factors(Order(elm))),e->elm^e in avoid and not elm^e in S)
ForAny(PrimeDivisors(Order(elm)),e->elm^e in avoid and not elm^e in S)


SortBy(normals,x->-Size(x));
# check that this is a valid series
Assert(0,ForAll([2..Length(normals)],i->IsSubset(normals[i-1],normals[i])));
Copy link
Member

Choose a reason for hiding this comment

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

Just out of curiosity, is there a specific reason to use IsSubset instead of IsSubgroup here?

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps there should also be a second assertion (perhaps run only at a higher assertion level) which verifies that normals truly consists of normal subgroups; and/or add a warning to the documentation that passing non-normal subgroups may result in wrong output?

if not IsSubset(rev[Length(rev)],cs[i]) then
c:=ClosureGroup(cs[i],j);
if Size(c)>Size(rev[Length(rev)]) then
# proper down step
Copy link
Member

Choose a reason for hiding this comment

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

Why is adding a larger group a "down step"?

# first in cs that does not contain j
pre:=PositionProperty(cs,x->not IsSubset(x,j));
# first contained in j.
post:=PositionProperty(cs,x->Size(j)>=Size(x) and IsSubset(j,x));
Copy link
Member

Choose a reason for hiding this comment

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

Minor optimization possible?

Suggested change
post:=PositionProperty(cs,x->Size(j)>=Size(x) and IsSubset(j,x));
post:=PositionProperty(cs,x->(Size(j) mod Size(x) = 0) and IsSubset(j,x));

Comment on lines +462 to +463
## If the optional fourth argument <A>onlyone</A> is given as <A>true</A>,
## then only one pair (or <A>fail</A> if none exists) is returned.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
## If the optional fourth argument <A>onlyone</A> is given as <A>true</A>,
## then only one pair (or <A>fail</A> if none exists) is returned.
## If the optional fourth argument <A>onlyone</A> is given as <K>true</K>,
## then only one pair (or <K>fail</K> if none exists) is returned.

Comment on lines +3190 to +3195
DoContainedConjugates:=function(arg)
local G,A,B,onlyone,l,N,dc,gens,i;
G:=arg[1];
A:=arg[2];
B:=arg[3];
if Length(arg)>3 then onlyone:=arg[4]; else onlyone:=false;fi;
Copy link
Member

Choose a reason for hiding this comment

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

Could also do this:

Suggested change
DoContainedConjugates:=function(arg)
local G,A,B,onlyone,l,N,dc,gens,i;
G:=arg[1];
A:=arg[2];
B:=arg[3];
if Length(arg)>3 then onlyone:=arg[4]; else onlyone:=false;fi;
DoContainedConjugates:=function(G,A,B,onlyone...)
local l,N,dc,gens,i;
if Length(onlyone)>0 then onlyone:=onlyone[1]; else onlyone:=false;fi;

Copy link
Member

Choose a reason for hiding this comment

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

Or this

Suggested change
DoContainedConjugates:=function(arg)
local G,A,B,onlyone,l,N,dc,gens,i;
G:=arg[1];
A:=arg[2];
B:=arg[3];
if Length(arg)>3 then onlyone:=arg[4]; else onlyone:=false;fi;
DoContainedConjugates:=function(G,A,B,onlyone)
local l,N,dc,gens,i;

and then change one InstallMethod below to use the following function instead: {G,A,B}->DoContainedConjugates(G,A,B,false)

@fingolfin
Copy link
Member

Argh, terrible timing :-)

I just was about to submit my review when you merged :-(.

Sorry, i was extremely busy the past couple weeks and missed this one.

@hulpke
Copy link
Contributor Author

hulpke commented Feb 9, 2021

@fingolfin
Sorry -- if you know how to unmerge, I will go through your suggestions.

@fingolfin
Copy link
Member

No, you can't "unmerge", and I think it's fine. I am sorry for being late to the game; and there was nothing terribly important. If you think any of my comments deserve an adjustment, you can just open a new PR. Or ignore them

@ThomasBreuer ThomasBreuer self-assigned this Feb 16, 2021
@ThomasBreuer ThomasBreuer added release notes: added PRs introducing changes that have since been mentioned in the release notes and removed release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels Feb 16, 2021
@ThomasBreuer ThomasBreuer removed their assignment Feb 16, 2021
@fingolfin fingolfin added topic: performance bugs or enhancements related to performance (improvements or regressions) and removed kind: performance labels Apr 21, 2021
@fingolfin fingolfin added release notes: multiple PRs introducing changes that require multiple entries in the release notes (TO BE AVOIDED!!!) release notes: added PRs introducing changes that have since been mentioned in the release notes and removed release notes: added PRs introducing changes that have since been mentioned in the release notes labels Aug 17, 2022
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 kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements release notes: added PRs introducing changes that have since been mentioned in the release notes release notes: multiple PRs introducing changes that require multiple entries in the release notes (TO BE AVOIDED!!!) topic: performance bugs or enhancements related to performance (improvements or regressions)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

conjugate a subgroup into a given one
4 participants