Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#6879 closed defect (fixed)

[with patch, positive review] Elliptic curve constructor does not check if the base is a field properly

Reported by: cremona Owned by: davidloeffler
Priority: minor Milestone: sage-4.1.2
Component: elliptic curves Keywords: elliptic curve
Cc: JCooley Merged in: Sage 4.1.2.alpha4
Authors: John Cremona Reviewers: Mike Hansen
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Example:

sage: E = EllipticCurve(QQbar,[1,0])
sage: E.base_field()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)

/home/jec/sage/isog50.py in <module>()

AttributeError: 'EllipticCurve_generic' object has no attribute 'base_field'

This is because the curve constructed is an ell_generic and not an ell_field, despite {{{QQbar.is_field()}} returning True.

Similarly with RR and CC in place of QQbar.

All that is required is a two-line addition around line 213 of elliptic_curves/constructor.py.

Patch up soon.

Attachments (1)

trac_6879-ell_field.patch (2.3 KB) - added by cremona 12 years ago.
Applies to 4.1.1

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by cremona

Applies to 4.1.1

comment:1 Changed 12 years ago by cremona

  • Authors set to John Cremona
  • Summary changed from Elliptic curve constructor does not check if the base is a field properly to [with patch, needs review] Elliptic curve constructor does not check if the base is a field properly

Patched applies to 4.1.1. All sage/schemes/elliptic_curves tests ok.

comment:2 Changed 12 years ago by cremona

  • Cc JCooley added

comment:3 Changed 12 years ago by mhansen

  • Reviewers set to Mike Hansen
  • Summary changed from [with patch, needs review] Elliptic curve constructor does not check if the base is a field properly to [with patch, positive review] Elliptic curve constructor does not check if the base is a field properly

Looks good to me.

comment:4 Changed 12 years ago by mvngu

  • Merged in set to Sage 4.1.2.alpha3
  • Resolution set to fixed
  • Status changed from new to closed

comment:5 Changed 12 years ago by mvngu

  • Merged in changed from Sage 4.1.2.alpha3 to Sage 4.1.2.alpha4

There is no 4.1.2.alpha3. Sage 4.1.2.alpha3 was William Stein's release for working on making the notebook a standalone package.

Note: See TracTickets for help on using tickets.