Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3673 closed defect (fixed)

[with patch, with positive review] NumberFieldElement

Reported by: fwclarke Owned by: was
Priority: major Milestone: sage-3.1
Component: number theory Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

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 (1)

sage-3673.patch (4.4 KB) - added by fwclarke 9 years ago.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by fwclarke

comment:1 Changed 9 years ago 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!

comment:2 Changed 9 years ago by mabshoff

  • Milestone changed from sage-3.1.1 to sage-3.1
  • Resolution set to fixed
  • Status changed from new to closed

Merged in Sage 3.1.alpha1

comment:3 Changed 9 years ago 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

Note: See TracTickets for help on using tickets.