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

Some improvements for LatticeByCyclicExtension #905

Merged
merged 5 commits into from
Oct 7, 2016

Conversation

fingolfin
Copy link
Member

According to the documentation of LatticeByCyclicExtension, the optional
second argument can be either a function, or a list of two functions.
The latter did not actually work, which is now fixed

I guess @hulpke is the person best qualified to evaluate this change.

According to the documentation of LatticeByCyclicExtension, the optional
second argument can be either a function, or a list of two functions.
The latter did not actually work, which is now fixed.
@fingolfin fingolfin added the kind: bug Issues describing general bugs, and PRs fixing them label Sep 27, 2016
@codecov-io
Copy link

codecov-io commented Sep 27, 2016

Current coverage is 49.22% (diff: 75.00%)

Merging #905 into master will increase coverage by 0.03%

@@             master       #905   diff @@
==========================================
  Files           423        423          
  Lines        229156     229171    +15   
  Methods        3448       3448          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits         112717     112815    +98   
+ Misses       116439     116356    -83   
  Partials          0          0          

Powered by Codecov. Last update d60d5c3...d3f5e45

These are based on the assumption that computing the order
of a group element cannot be harder than computing the size
of the group, and in general is faster
This variant of Zuppos is currently undocumented, but used internally by
LatticeByCyclicExtension. This change speeds it as follows:

1. If Zuppos(G) is already known, it is faster to simply filter that list.
2. It replaces Group(c) by Subgroup(G,[c]), which makes things faster if
   G is a IsHandledByNiceMonomorphism group (such as an automorphism group).
3. In addition, it only creates this subgroup once (not twice as before),
   which can lead to further improvements.
Note that there are immediate methods which set IsTrivial suitably as
soon as the Size is known, hence these changes do not break any existing
use case. However, there are examples where computing Size is
infeasible, but computing IsTrivial is possible, sometimes even trivial.
@fingolfin
Copy link
Member Author

I added some more changes, which make the fixed variants of LatticeByCyclicExtension faster, and also added a simple test case.

@hulpke
Copy link
Contributor

hulpke commented Sep 28, 2016

I'm very happy with the changes.

@fingolfin fingolfin changed the title Fix LatticeByCyclicExtension when second arg is a list Some improvements for LatticeByCyclicExtension Oct 7, 2016
@fingolfin fingolfin merged commit 8cec39f into gap-system:master Oct 7, 2016
@olexandr-konovalov
Copy link
Member

This PR caused a diff in the manual example - I am going to update it to match the new output.

########> Diff in [ "./../../lib/oper.g", 466, 485 ]
# Input is:
Size( g );
# Expected output:
#I  immediate: IsNonTrivial
#I  immediate: Size
#I  immediate: IsFreeAbelian
#I  immediate: IsTorsionFree
#I  immediate: IsNonTrivial
#I  immediate: GeneralizedPcgs
#I  immediate: IsPerfectGroup
#I  immediate: IsEmpty
6
# But found:
#I  immediate: IsPerfectGroup
#I  immediate: IsNonTrivial
#I  immediate: Size
#I  immediate: IsFreeAbelian
#I  immediate: IsTorsionFree
#I  immediate: IsNonTrivial
#I  immediate: IsPerfectGroup
#I  immediate: GeneralizedPcgs
#I  immediate: IsEmpty
6
########

olexandr-konovalov pushed a commit that referenced this pull request Oct 15, 2016
@olexandr-konovalov olexandr-konovalov added this to the GAP 4.9.0 milestone Nov 1, 2016
@fingolfin fingolfin deleted the mh/fix-grplatt branch November 9, 2016 11:58
@olexandr-konovalov olexandr-konovalov added the release notes: added PRs introducing changes that have since been mentioned in the release notes label Jan 29, 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.

4 participants