Opened 8 years ago
Closed 8 years ago
#3275 closed defect (fixed)
[with patch, positive review] Make SL2Z distinct
Reported by: | craigcitro | Owned by: | craigcitro |
---|---|---|---|
Priority: | minor | Milestone: | sage-3.0.2 |
Component: | modular forms | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
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]
Attachments (1)
Change History (3)
Changed 8 years ago by
comment:1 Changed 8 years ago by
- Summary changed from [with patch, needs review] Make SL2Z distinct to [with patch, positive review] Make SL2Z distinct
comment:2 Changed 8 years ago by
- Resolution set to fixed
- Status changed from new to closed
Merged in Sage 3.0.2.rc0. Testall long passes.
Note: See
TracTickets for help on using
tickets.
looks good to me, but i haven't tried applying the patch or testing...