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

Comment (by ncohen):

 Hmmmmmm... Must be because my original patch fixed several things, and two
 of these fixes are not compatible with each other : I also made
 `.hasse_diagram()` return a `HasseDiagram` object.
 In the patch you imported with git, this modification is not made anymore.
 So you compare `DiGraph` objects, and not `HasseDiagram` objects. Perhaps
 it still works if you compare the results of `.hasse_diagram()` instead of
 `._hasse_diagram` directly.

 Arggggggg ! No, I think I understood ! I think that it is incorrect to
 compare the `._hasse_diagram` digraphs, because they are always labelled
 with integers, so when you do that you do not compare the vertice' labels
 :

 {{{
 sage: list(posets.IntegerCompositions(3))
 [[3], [1, 2], [2, 1], [1, 1, 1]]
 sage: list(posets.IntegerCompositions(3).hasse_diagram())
 [[3], [1, 2], [1, 1, 1], [2, 1]]
 sage: list(posets.IntegerCompositions(3)._hasse_diagram)
 [0, 1, 2, 3]
 }}}

 And of course as you compare digraphs defined on integers there is no
 problem, for they don't have parents. But it may say that two posets are
 equal even if they are defined on disjoint sets of elements.

 Nathann

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

Reply via email to