#13186: Equality of Factorizations
-------------------------------------+-------------------------------------
Reporter: caruso | Owner: tbd
Type: defect | Status: needs_work
Priority: minor | Milestone: sage-6.4
Component: factorization | Resolution:
Keywords: equality | Merged in:
factorization | Reviewers:
Authors: | Work issues:
Report Upstream: N/A | Commit:
Branch: u/chapoton/13186 | 84b36a2056754713bc05056b28e7bb9ab86b0f24
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by nbruin):
There are other problems too:
{{{
sage: R.<x>=QQ[]
sage: hash(x^2)
15360174650385708
sage: hash(factor(x^2))
-5999452984666080493
sage: factor(x^2).value()==x^2
True
}}}
If you want to equate factorizations with their values (a reasonable thing
to do) then their hashes should be equal too. I'd think a reasonable thing
to do is to set
{{{
factor(A) == B iff factor(A).value() == B
hash(factor(A)) == hash(factor(A).value())
}}}
and in fact to implement them by punting to the tests on values.
Note that if "factorizations" are ever returned in domains that do not
have unique factorizations, this might be confusing: after all, there are
supposed to be factorizations of the same value into irreducibles there
that are not mutually equal.
--
Ticket URL: <http://trac.sagemath.org/ticket/13186#comment:14>
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.