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

Make SL2Z distinct #3275

Closed
craigcitro opened this issue May 23, 2008 · 3 comments
Closed

Make SL2Z distinct #3275

craigcitro opened this issue May 23, 2008 · 3 comments

Comments

@craigcitro
Copy link
Member

This patch changes SL2Z to be a distinct object, as opposed to a class. The following error was brought up on sage-support:

sage: S = SL2Z()([0,-1,1,0])
sage: T = SL2Z()([1,1,0,1])
sage: S*T
...
<type 'exceptions.RuntimeError'>: There is a bug in the coercion code in SAGE.

The issue (as the poster pointed out) is that the parents of S and T are distinct copies of SL2Z, when they don't need to be. Indeed, I don't see any difference between this and other distinct rings in Sage (such as ZZ, QQ, etc), so I've made it distinct.

Now the above becomes:

sage: S = SL2Z.([0,-1,1,0])
sage: T = SL2Z.([1,1,0,1])
sage: S*T
[ 0 -1]
[ 1  1]

Component: modular forms

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

@craigcitro
Copy link
Member Author

Attachment: trac-3275.patch.gz

@rlmill
Copy link
Mannequin

rlmill mannequin commented May 23, 2008

comment:1

looks good to me, but i haven't tried applying the patch or testing...

@rlmill rlmill mannequin added the s: positive review label May 23, 2008
@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented May 23, 2008

comment:2

Merged in Sage 3.0.2.rc0. Testall long passes.

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed May 23, 2008
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

1 participant