Opened 12 years ago

Closed 12 years ago

#4820 closed defect (fixed)

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

Reported by: cremona Owned by: was
Priority: minor Milestone: sage-3.3
Component: number theory Keywords: elliptic curves
Cc: Merged in:
Authors: Reviewers:
Report Upstream: 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 cremona 12 years ago.

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by cremona

comment:1 Changed 12 years ago by cremona

  • Summary changed from Type inconsistency in rational points on elliptic curves to [with patch, needs review] Type inconsistency in rational points on elliptic curves

comment:2 Changed 12 years ago by ncalexan

  • Summary changed from [with patch, needs review] Type inconsistency in rational points on elliptic curves to [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 12 years ago by mabshoff

  • Milestone changed from sage-3.4.1 to sage-3.3
  • Owner changed from was to mabshoff
  • Status changed from new to assigned

Merged in Sage 3.3.alpha1

Cheers,

Michael

comment:4 Changed 12 years ago by mabshoff

  • Owner changed from mabshoff to was
  • Status changed from assigned to new

comment:5 Changed 12 years ago by mabshoff

  • Resolution set to fixed
  • Status changed from new to closed

Merged in Sage 3.3.alpha1

Cheers,

Michael

Note: See TracTickets for help on using tickets.