Ticket #3673 (closed defect: fixed)

Opened 5 months ago

Last modified 4 months ago

[with patch, with positive review] NumberFieldElement

Reported by: fwclarke Assigned to: was
Priority: major Milestone: sage-3.1
Component: number theory Keywords:
Cc:

Description

The present definition of the NumberFieldElement class unreasonably privileges the polynomial variable 'x'. As a result the following fails:

sage: y = polygen(QQ, 'y'); K.<a> = NumberField(y^2 - 2)
sage: S = K.subfields()
sage: S[0][1]

The patch amends the definition of __init__ for the NumberFieldElement class to deal with this.

An extra doctest for the subfields method has been included. Two other doctests have been adjusted to match the revised code.

Attachments

sage-3673.patch (4.4 kB) - added by fwclarke on 07/18/2008 04:54:11 AM.

Change History

07/18/2008 04:54:11 AM changed by fwclarke

  • attachment sage-3673.patch added.

08/10/2008 06:18:17 AM changed by cremona

  • summary changed from [with patch, needs review] NumberFieldElement to [with patch, with positive review] NumberFieldElement.

The patch applies cleanly to 3.1.alpha0. It does what it says, and all doctests in sage.rings.number_field pass. Publish!

08/11/2008 12:37:40 AM changed by mabshoff

  • status changed from new to closed.
  • resolution set to fixed.
  • milestone changed from sage-3.1.1 to sage-3.1.

Merged in Sage 3.1.alpha1

08/11/2008 12:40:00 AM changed by mabshoff

  • summary changed from [with patch, with positive review] NumberFieldElement to [with patch, with positive review] NumberFieldElement.

By the way: Report 11 did not pick up this ticket since there is an extra space between "positive" and "review".

Cheers,

Michael