#14366: Zero does not belong to zero ideal of a number field
---------------------------------+------------------------------------------
Reporter: olitb | Owner: davidloeffler
Type: defect | Status: new
Priority: major | Milestone: sage-5.9
Component: number fields | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Comment (by robharron):
It seems to me that there is generic code in sage/rings/ideal.py for
`__contains__` and this code shouldn't be touched. Basically, what it does
is punts to the specific case's implementation of `_contains_`. I think
the bug you point out means that for number field ideals, `_contains_` is
buggy. So, the type of fix you suggest I think makes sense. Though, rather
than `x == 0`, it should probably be `x == self.number_field().zero()`,
otherwise anything that is 0 will evaluate as True.
(I do wonder why the code for `__contains__` in sage/rings/ideal.py
doesn't just return True for the zero element).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14366#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.