Ticket #8446 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

avoid 0^0 in number fields

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

Description (last modified by rlm) (diff)

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

trac_8446.patch Download (5.1 KB) - added by rlm 3 years ago.
trac_8446_microfix.patch Download (1.2 KB) - added by davidloeffler 3 years ago.
apply over previous patch

Change History

comment:1 Changed 3 years ago by rlm

  • Status changed from new to needs_review

comment:2 Changed 3 years ago by rlm

  • Description modified (diff)
  • Summary changed from avoid 0^0 in Selmer groups of number fields to avoid 0^0 in number fields

Changed 3 years ago by rlm

Changed 3 years ago by davidloeffler

apply over previous patch

comment:3 Changed 3 years ago by davidloeffler

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 3 years ago by rlm

  • Status changed from needs_review to positive_review
  • Reviewers set to David Loeffler

comment:5 Changed 3 years ago by rlm

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 3 years ago by davidloeffler

Understood -- hope it goes well!

comment:7 Changed 3 years ago by jhpalmieri

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to sage-4.4.alpha2

Merged into 4.4.alpha2:

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