-
-
Notifications
You must be signed in to change notification settings - Fork 401
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
SmallPermutationGroups #35225
SmallPermutationGroups #35225
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use libgap rather than gap? I.e.
self._gap_small_group = libgap.SmallGroup(order,gap_id)
@@ -87,7 +89,9 @@ | |||
from pathlib import Path | |||
|
|||
from sage.rings.all import Integer | |||
from sage.interfaces.gap import gap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please no more dependencies on pexpect gap. We are trying to get rid of it in #26902
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do the suggested self._gap_small_group = libgap.SmallGroup(order,gap_id) then we lose some functionality, needed for an application (FusionDouble, probably an upcoming PR). We need the methods conjugacy_classes_representatives and centralizer.
I haven't figured out why these do not work when we use libgap. I tried making SmallPermutationGroup inherit from PermutationGroup_generic since that class has the needed methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is FusionDouble
a new functionality, not in Sage yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, analogous to FusionRing one can construct the Fusion Rings of the Drinfeld Double of a finite group.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #35225 +/- ##
===========================================
- Coverage 88.62% 88.61% -0.02%
===========================================
Files 2148 2148
Lines 398653 398868 +215
===========================================
+ Hits 353308 353450 +142
- Misses 45345 45418 +73
... and 126 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
is this code available somewhere? I can try to port it to libgap. |
Working code exists (written by Wenqi Li and myself) but work needs to be done before it is ready for review. Particularly, I think Willie Aboumrad and Travis Scrimshaw were going to try to refactor it into the existing FusionRing class. I think what is needed now is an understanding as to why changing gap to libgap here breaks the centralizer and conjugacy_class_representatives methods. |
On Thu, 2 Mar 2023, 19:32 Daniel Bump, ***@***.***> wrote:
is this code available somewhere? I can try to port it to libgap.
Working code exists (written by Wenqi Li and myself) but work needs to be
done before it is ready for review. Particularly, I think Willie Aboumrad
and Travis Scrimshaw were going to try to refactor it into the existing
FusionRing class.
I think what is needed now is an understanding as to why changing gap to
libgap here breaks the centralizer and conjugacy_class_representatives
methods.
it could be that the latter need porting to libgap.
Can you point at more precise code location?
—
… Reply to this email directly, view it on GitHub
<#35225 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJXYHHQ3U24CQ5P67OX76DW2DRTRANCNFSM6AAAAAAVNN2MVE>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
it could be that the latter need porting to libgap. |
I added a doctest at line 3479 of the file, to compute some centralizers. So if you uncomment line 3487, changing gap to libgap, that breaks the doctest. The centralizer and conjugacy_classes_representatives methods are implemented in the PermutationGroup_generic class, in permgroup.py. |
thanks - I'll look at it after the conference in Luminy I'm attending ends, tomorrow. |
Some issues with this PR: It might be worth mentioning in the docs that this group isn't fixed -- while it will always be isomorphic to the SmallGroup in question, it can change over time. Also, in many cases [n,k] will be a permutation group on n points -- but that won't always be true. Also, there is a practical issue. Instead you want to call |
b8eacec
to
a1a3084
Compare
as explained by @ChrisJefferson: Image(IsomorphismPermGroup(g)) doesn't return what you want (always) -- as it can return a larger group (this behaviour may be changed in a future version of GAP to what you want, but it isn't that right now -- gap-system/gap#5355 ). Instead you want to call Image(IsomorphismPermGroup(g),g)
fixed by a57a9c0 |
I edited the docstring to mention these points. The other comment on Image was addressed by a commit by dimpase. |
the immediate |
It doesn't seem related to this point. I say this because for some k the group [12,k] is of degree 12 and for other k it is of degree 7, but in every case the libgap version of the group fails this test. |
On Fri, Mar 3, 2023 at 5:20 PM Daniel Bump ***@***.***> wrote:
the immediate libgap issue is that the group in the docstring is not
converted to a permutation group, it's a just a GAP integer 6. Is it
related to in many cases [n,k] will be a permutation group on n points --
but that won't always be true. ?
It doesn't seem related to this point. I say this because for some k the
group [12,k] is of degree 12 and for other k it is of degree 7, but in
every case the libgap version of the group fails this test.
I don't understand how the gap version works.
Ineed, you pass the number of moved points to the constructor of
PermutationGroup_generic, but its signature is
def __init__(self, gens=None, gap_group=None, canonicalize=True,
domain=None, category=None):
and in the code I don't see whether there is any provision for handling
this number of moved points.
Could you please explain what you're trying to do here. As well, we better
pass gap_group, not gens.
And it would help if you used explicit parameter names...
… —
Reply to this email directly, view it on GitHub
<#35225 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJXYHAXERIHSFZAHZKRV2TW2IK5BANCNFSM6AAAAAAVNN2MVE>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
You are right, for the libgap group we do not want to pass the degree of the permutation representation, we want to pass the gap group. This seems to be the key to fixing the libgap group, which I'll have to take care of later but thanks for noticing this. |
@dimpase @fingolfin Is this a positive review or not? It seems like the PR is approved, but the status badge wasn't changed. Also, what about #35225 (comment)? |
I'd like to hear about your opinion on #35225 (comment) - why do you recompute known group orders? |
that's why I kept the tag "needs review" on. |
Which "you"? Me or @dwbump? |
Well, someone who knows the code involved. |
So the current implementation uses what is available by default in Sage for permutation groups. In particular, it does eventually call GAP's Now the order is passed to the constructor within Sage, but @dwbump has done is just store that as an attribute, which I said was okay as writing a custom Well...I would push the change overriding the |
…o small-permutation-groups
I added an order method that just returns
|
Documentation preview for this PR is ready! 🎉 |
Thank you. I think this takes care of the last comments by @dimpase. Are there any objections to setting a positive review? |
lgtm |
Tries to download stuff from the internet:
|
[ 1 1 -1 1 -1 -1] | ||
[ 2 0 -2 -1 0 1] | ||
[ 2 0 2 -1 0 -1] | ||
sage: all(SmallPermutationGroup(n,k).id()==[n,k] for n in [1..64] for k in [1..oeis(1)[n]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test needs to be marked with # optional - internet
and/or replaced by something that is manually inputted. (I would at least include part of the latter since it means it will get more regularly tested.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does it query data from OEIS that is part of the very small groups library that is eing wrapped here in the first place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I replaced the oeis(1) by a call to libgap.NumberSmallGroups.
Volker removed the Positive Review flair because of the oeis(1) call. I fixed that, so I added Needs Review. I am not sure why the pdf documentation is failing to build. |
LGTM modulo one trivial whitespace thing: -sage: def numgps(n) : return ZZ(libgap.NumberSmallGroups(n))
+sage: def numgps(n : return ZZ(libgap.NumberSmallGroups(n)) I’m not sure why the pdf docs build is failing either. Did you check locally? |
I think you meant to delete the space before the colon and instead deleted the paren.
On my machine, make doc-pdf runs to completion and does not fail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's right. Thank you.
📚 Description
GAP has a database of Small Groups identified by a pair of numbers [n,k] where n is the order and k is an integer used to differentiate different groups of the same order. Thus k is bounded by oeis(1)[n], the number of isomorphism classes of groups of order n. Since Sage PermutationGroups have many useful methods, it is good to have PermutationGroup realizations of GAP SmallGroups. The docstring verifies that the new SmallPermutationGroup class is able to construct all groups of order <= 64, though of course groups of order >64 are also available.
📝 Checklist
⌛ Dependencies