#14019: equality is broken for Posets
-------------------------------------+-------------------------------------
       Reporter:  ncohen             |        Owner:  sage-combinat
           Type:  defect             |       Status:  needs_info
       Priority:  major              |    Milestone:  sage-6.4
      Component:  combinatorics      |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Nathann Cohen      |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/andrew.mathas/ticket/14019       |  d10a6efa75561632cdc76b2c98c5eca4312372ec
   Dependencies:                     |     Stopgaps:  #14185
-------------------------------------+-------------------------------------

Comment (by tscrim):

 `relabel()` does return a new poset. The issue is a little more subtle in
 regards to the ordering on the set of elements of the poset:
 {{{
 sage: list(p1)
 [3, 2, 1]
 sage: list(p2)
 [2, 3, 1]
 }}}
 because
 {{{
 sage: p1._elements
 (3, 2, 1)
 sage: p2._elements
 (2, 3, 1)
 }}}
 That is why they don't compare as equal (as it is part of the construction
 data). The simplist change (FTR, I don't consider this to be a bug, but
 instead a lack of documentation) would be to make the Hasse diagram the
 only part of the construction info, however this would mean we'd have to
 relabel the Hasse diagram at construction time rather than when calling
 `hasse_diagram()`. This also has the drawback of not being able to use the
 same digraph for all relabelings of a poset, which is probably used by the
 linear extensions and creates a much larger memory usage (and data
 duplication).

 Hopefully before you have gotten angry, I think better standardization
 could be used here too.

 I'm also not quite sure #17051 is because of this behavior, but I haven't
 really looked into it.

--
Ticket URL: <http://trac.sagemath.org/ticket/14019#comment:33>
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.

Reply via email to