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

Degree() method of permutation group should (always) return a sage integer #10883

Closed
sagetrac-nborie mannequin opened this issue Mar 6, 2011 · 3 comments
Closed

Degree() method of permutation group should (always) return a sage integer #10883

sagetrac-nborie mannequin opened this issue Mar 6, 2011 · 3 comments

Comments

@sagetrac-nborie
Copy link
Mannequin

sagetrac-nborie mannequin commented Mar 6, 2011

There is some cases for which the degree method for PermutationGroup return a GapElement and not a sage integer.

sage: G = PermutationGroup([[(1,2,3,4)]])
sage: type(G.degree())
<type 'int'>
sage: H = G._gap_()
sage: H
Group( [ (1,2,3,4) ] )
sage: I = PermutationGroup(gap_group=H)
sage: type(I.degree())
<class 'sage.interfaces.gap.GapElement'>
sage: I == G
True
sage: G = TransitiveGroup(6,3)
sage: type(I.degree())
<class 'sage.interfaces.gap.GapElement'>

CC: @sagetrac-sage-combinat

Component: group theory

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

@sagetrac-nborie sagetrac-nborie mannequin self-assigned this Mar 6, 2011
@sagetrac-nborie
Copy link
Mannequin Author

sagetrac-nborie mannequin commented Mar 6, 2011

@sagetrac-nborie
Copy link
Mannequin Author

sagetrac-nborie mannequin commented Mar 6, 2011

comment:1

That is a very small bug... It came out when running another feature over Transitive Groups coming from the Gap database. I propose a very small patch to fix that (as Integer ring is already imported in the file permgroup.py). As I don't really know how this deserves to be done and documented, feel free to give advises and comments to fix it.

@sagetrac-nborie
Copy link
Mannequin Author

sagetrac-nborie mannequin commented Mar 6, 2011

comment:2

Whhaaaaa!

I managed to report a bug which is not in Sage!

The quoting behavior was obtained with a very special state of Sage-Combinat. Effectively, with no patch applied, there is no problem. The method works fine.

sage: G = TransitiveGroup(6,3)
sage: type(G.degree())
<type 'sage.rings.integer.Integer'>
sage: G = PermutationGroup([[(1,2,3,4)]])
sage: H = G._gap_()
sage: I = PermutationGroup(gap_group=H)
sage: type(I.degree())
<type 'sage.rings.integer.Integer'>

I just realize it when the buildbot said the apply failed... For this reason, I think this ticket should be closed.

@sagetrac-nborie sagetrac-nborie mannequin removed the s: needs review label Mar 6, 2011
@sagetrac-nborie sagetrac-nborie mannequin closed this as completed Mar 6, 2011
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

0 participants