#11895: Make p-adic numbers unhashable
-------------------------------------+-------------------------------------
Reporter: mmasdeu | Owner: roed
Type: defect | Status: needs_work
Priority: critical | Milestone: sage-6.4
Component: padics | Resolution:
Keywords: p-adic, hash | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues: one pickle from the
Branch: | pickle jar does not unpickle
u/saraedum/ticket/11895 | correctly
Dependencies: #11670, #15897, | Commit:
#15898, #15956, #16122, #16124, | 42afa4d47da18d38095cd54313731f856ae5f083
#16129, #16250, #16251, #16316, | Stopgaps:
#16317, #16318, #16321, #16339, |
#16341, #16342 |
-------------------------------------+-------------------------------------
Comment (by vbraun):
The ticket description mentions a problem when comparing `x==0`, but that
is incorrect. Comparison first coerces both sides to a common parent, and
if the rhs is a Python int then this will be the same padic ring as `x`.
So if `==` were to compare both sides including the precision we'd still
be fine. Of course when comparing two padics you coerce to the lower
precision, so the main issue remains.
Just making elements not hashable is also terrible, many algorithms use
sets and dicts. E.g. if the coefficient field is not hashable then you
can't compute groebner bases in polynomial rings, rendering it essentially
useless.
--
Ticket URL: <http://trac.sagemath.org/ticket/11895#comment:43>
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.
For more options, visit https://groups.google.com/d/optout.