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 GAP interface problem in sylow_subgroup method #9621

Closed
simon-king-jena opened this issue Jul 28, 2010 · 17 comments
Closed

Fix GAP interface problem in sylow_subgroup method #9621

simon-king-jena opened this issue Jul 28, 2010 · 17 comments

Comments

@simon-king-jena
Copy link
Member

The following was reported by Kenny Brown:

sage: n = 3^2 * 7^2
sage: G = CyclicPermutationGroup(n)
sage: G.sylow_subgroup(3)
Traceback (most recent call last):
...

The problem is that in the sylow_subgroup method, it is attempted to get the string presentation of a permutation in GAP by calling gap.eval(...). However, GAP truncates the output. So, better use gap.eval('Print(...)') instead.

Moreover, the method uses quite generic variable names in the GAP interface. This is dangerous, as the use of variable names that any average user might choose as well can have nasty side effects.

Fixed by #10334.

Component: group theory

Keywords: GAP string representation

Reviewer: Simon King, Johan Sebastian Rosenkilde Nielsen, Mike Hansen

Issue created by migration from https://trac.sagemath.org/ticket/9621

@simon-king-jena
Copy link
Member Author

Attachment: trac-9621_permgroup_sylow_subgroup.patch.gz

Fixes GAP interface bug of sylow_subgroup method (with doctest)

@johanrosenkilde
Copy link
Contributor

comment:2

Bear with me as this is my first action on the ticket system :-)

It seems that some parsing functionality has already been built into the gap interface, so all the last lines of sylow_subgroups can be greatly simplified. I have added an extra patch file for this.

@johanrosenkilde
Copy link
Contributor

Simplification of the above patch

@simon-king-jena
Copy link
Member Author

Attachment: trac_9621_simplification.patch.gz

Replaces the other two patches

@simon-king-jena
Copy link
Member Author

Changed author from Simon King to Simon King, Johan Sebastian Rosenkilde Nielsen

@simon-king-jena
Copy link
Member Author

comment:3

Attachment: trac-9621_permgroup_sylow_subgroup_with_simplification.patch.gz

Hi Johan!

Replying to @johanrosenkilde:

It seems that some parsing functionality has already been built into the gap interface, so all the last lines of sylow_subgroups can be greatly simplified.

You have a misprint in your patch. You wrote self_element_class(), but it should be self._element_class().

However, your suggestion makes indeed sense. So, I created a patch that corrects that misprint and combines both of our patches into one.

Now the big question is: I think we are both Authors now (and I inserted your name in the corresponding field of this ticket). So, who will review??

Cheers,
Simon

@johanrosenkilde
Copy link
Contributor

comment:4

Ah, embarrassing; I had seen that mistake, but must have forgotten to remake the patch or something :-)

Thanks for adding me as author. I guess we'll have to wait for a nice person to come along and review the (final?) patch.

Regards,
Johan

Replying to @simon-king-jena:

Hi Johan!

Replying to @johanrosenkilde:

It seems that some parsing functionality has already been built into the gap interface, so all the last lines of sylow_subgroups can be greatly simplified.

You have a misprint in your patch. You wrote self_element_class(), but it should be self._element_class().

However, your suggestion makes indeed sense. So, I created a patch that corrects that misprint and combines both of our patches into one.

Now the big question is: I think we are both Authors now (and I inserted your name in the corresponding field of this ticket). So, who will review??

Cheers,
Simon

@simon-king-jena
Copy link
Member Author

comment:5

Apply trac-9621_permgroup_sylow_subgroup_with_simplification.patch

(For the patchbot)

Probably this patch is bit rotting and we need rebasing. But who knows, perhaps we are lucky...

@sagetrac-johanbosman
Copy link
Mannequin

sagetrac-johanbosman mannequin commented Nov 30, 2011

Work Issues: rebase

@sagetrac-johanbosman
Copy link
Mannequin

sagetrac-johanbosman mannequin commented Nov 30, 2011

comment:6

Replying to @simon-king-jena:

Apply trac-9621_permgroup_sylow_subgroup_with_simplification.patch

(For the patchbot)

Probably this patch is bit rotting and we need rebasing.

Indeed we do. :).

@mwhansen
Copy link
Contributor

comment:7

I think this can be closed as I fixed this problem in #10334.

@simon-king-jena
Copy link
Member Author

comment:8

Replying to @mwhansen:

I think this can be closed as I fixed this problem in #10334.

OK, I just tested that it works with sage-5.0.rc0. Hence, it is a duplicate (or sub-problem) of #10334.

@simon-king-jena
Copy link
Member Author

Reviewer: Mike Hansen

@jdemeyer
Copy link

Changed reviewer from Mike Hansen to Simon King, Johan Sebastian Rosenkilde Nielsen, Mike Hansen

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link

Changed author from Simon King, Johan Sebastian Rosenkilde Nielsen to none

@jdemeyer
Copy link

Changed work issues from rebase to none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants