#21069: comparison of permutation and list: unexpected result
----------------------------+------------------------
       Reporter:  dkrenn    |        Owner:
           Type:  defect    |       Status:  new
       Priority:  major     |    Milestone:  sage-7.3
      Component:  coercion  |   Resolution:
       Keywords:            |    Merged in:
        Authors:            |    Reviewers:
Report Upstream:  N/A       |  Work issues:
         Branch:            |       Commit:
   Dependencies:            |     Stopgaps:
----------------------------+------------------------
Changes (by tscrim):

 * cc: sage-combinat, darij (added)


Comment:

 I think this is more an issue with the default `_cmp_` in `ClonableArray`
 wanting to have a common parent, but there are not coercions between most
 combinatorial objects (nor should there be typically). IMO, this is even
 worse:
 {{{
 sage: Permutations([1])[0] == Permutation([1])
 False
 }}}
 However, I don't agree with the argument that "same representation =>
 equality". Should the partition `[2, 1]` equal the permutation `[2, 1]`?
 (Currently they do, but I think that is a small issue and you should not
 rely on this behavior.) We run into a major notation problem as there is
 not enough valid syntax and math notation to separate the two clearly;
 context (or their parents) separate them.

--
Ticket URL: <https://trac.sagemath.org/ticket/21069#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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to