Opened 14 years ago

Closed 14 years ago

#4820 closed defect (fixed)

[with patch, with positive review] Type inconsistency in rational points on elliptic curves

Reported by: John Cremona Owned by: William Stein
Priority: minor Milestone: sage-3.3
Component: number theory Keywords: elliptic curves
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Points on elliptic curves over Q which are not [0:1:0] have their last coordinate =1 but sometimes this is an int (not even an Integer) which breaks some code:

sage: E=EllipticCurve('37a1')
sage: [type(c) for c in E(0)]

[<type 'sage.rings.rational.Rational'>,
 <type 'sage.rings.rational.Rational'>,
 <type 'sage.rings.rational.Rational'>]
sage: [type(c) for c in E.gen(0)]

[<type 'sage.rings.rational.Rational'>,
 <type 'sage.rings.rational.Rational'>,
 <type 'sage.rings.rational.Rational'>]
sage: [type(c) for c in 2*E.gen(0)]

[<type 'sage.rings.rational.Rational'>,
 <type 'sage.rings.rational.Rational'>,
 <type 'int'>]

I am tracking this down and will post a patch soon.

Attachments (1)

trac-4820.patch (3.1 KB) - added by John Cremona 14 years ago.

Download all attachments as: .zip

Change History (6)

Changed 14 years ago by John Cremona

Attachment: trac-4820.patch added

comment:1 Changed 14 years ago by John Cremona

Summary: Type inconsistency in rational points on elliptic curves[with patch, needs review] Type inconsistency in rational points on elliptic curves

comment:2 Changed 14 years ago by ncalexan

Summary: [with patch, needs review] Type inconsistency in rational points on elliptic curves[with patch, with positive review] Type inconsistency in rational points on elliptic curves

Looks fine by me. I checked that (0 : 1 : 0) over a non-standard ring had the correct types.

comment:3 Changed 14 years ago by Michael Abshoff

Milestone: sage-3.4.1sage-3.3
Owner: changed from William Stein to Michael Abshoff
Status: newassigned

Merged in Sage 3.3.alpha1

Cheers,

Michael

comment:4 Changed 14 years ago by Michael Abshoff

Owner: changed from Michael Abshoff to William Stein
Status: assignednew

comment:5 Changed 14 years ago by Michael Abshoff

Resolution: fixed
Status: newclosed

Merged in Sage 3.3.alpha1

Cheers,

Michael

Note: See TracTickets for help on using tickets.