Opened 13 years ago

Closed 12 years ago

#8446 closed defect (fixed)

avoid 0^0 in number fields

Reported by: Robert Miller Owned by: David Loeffler
Priority: major Milestone: sage-4.4
Component: number fields Keywords:
Cc: John Cremona Merged in: sage-4.4.alpha2
Authors: Robert Miller Reviewers: David Loeffler
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Robert Miller)

In the case of a trivial number field, such as

K.<a> = NumberField(polygen(QQ))

the Selmer group function doesn't work, since the generator a of the number field is 0, and when we're constructing polynomials we use the form coeff*a**i. However, if i==0, we get an ArithmeticError since Sage does not have conventions for 0^0.

I found several places where this comes up, and I've fixed them where I can.

Attachments (2)

trac_8446.patch (5.1 KB) - added by Robert Miller 13 years ago.
trac_8446_microfix.patch (1.2 KB) - added by David Loeffler 12 years ago.
apply over previous patch

Download all attachments as: .zip

Change History (9)

comment:1 Changed 13 years ago by Robert Miller

Status: newneeds_review

comment:2 Changed 13 years ago by Robert Miller

Description: modified (diff)
Summary: avoid 0^0 in Selmer groups of number fieldsavoid 0^0 in number fields

Changed 13 years ago by Robert Miller

Attachment: trac_8446.patch added

Changed 12 years ago by David Loeffler

Attachment: trac_8446_microfix.patch added

apply over previous patch

comment:3 Changed 12 years ago by David Loeffler

Looks fine, and all doctests pass. FWIW, I think that there should be a doctest in _S_class_group_and_units, not just in selmer_group, as that's where the problem actually occurs; and the docstring for selmer_group contains the literal string \t so it should be a raw string. Hence the tiny second patch. I'm giving this a positive review modulo that, so please set it to positive review if you're happy with the second patch.

BTW, I tried using this for some some relative extensions and discovered two separate new bugs in the process, #8721 and #8722. Neither of these actually has anything to do with this patch as such, it's preexisting brokenness. I know what's causing #8722; I'll upload a patch shortly -- any chance you could review it for me?

comment:4 Changed 12 years ago by Robert Miller

Reviewers: David Loeffler
Status: needs_reviewpositive_review

comment:5 Changed 12 years ago by Robert Miller

Re #8722 - I will be happy to review it eventually, but no guarantees at this very moment, since I'm finishing up my dissertation and preparing to defend it next month.

comment:6 Changed 12 years ago by David Loeffler

Understood -- hope it goes well!

comment:7 Changed 12 years ago by John Palmieri

Merged in: sage-4.4.alpha2
Resolution: fixed
Status: positive_reviewclosed

Merged into 4.4.alpha2:

  • trac_8446.patch
  • trac_8446_microfix.patch
Note: See TracTickets for help on using tickets.