Ticket #8446 (closed defect: fixed)
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
Change History
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 davidloeffler
-
attachment
trac_8446_microfix.patch
added
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
