#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
-------------------------------------+-------------------------------------
Changes (by andrew.mathas):

 * commit:   => a1a85ff09dcc34a56b9362a9d4461d907296718e


Comment:

 Hi Nathann,

 I moved your patch over to git and I found a hack which stops the infinite
 loop: it turns out that posets have an attribute {{{_hasse_diagram}}} and
 checking this seems to be better for some (unknown) reason. A few of the
 doctests still fail
 {{{
 sage -t posets.py
 **********************************************************************
 File "posets.py", line 456, in sage.combinat.posets.posets.Poset
 Failed example:
     P1 == P2
 Expected:
     False
 Got:
     True
 **********************************************************************
 File "posets.py", line 838, in
 sage.combinat.posets.posets.FinitePoset.__eq__
 Failed example:
     p3 == p1
 Expected:
     False
 Got:
     True
 **********************************************************************
 File "posets.py", line 842, in
 sage.combinat.posets.posets.FinitePoset.__eq__
 Failed example:
     p3 == p5
 Expected:
     False
 Got:
     True
 **********************************************************************
 File "posets.py", line 1133, in
 sage.combinat.posets.posets.FinitePoset.hasse_diagram
 Failed example:
     Q.hasse_diagram()
 Expected:
     Hasse diagram of a poset containing 6 elements
 Got:
     Digraph on 6 vertices
 **********************************************************************
 }}}
 I guess that the two equality tests are bad, but I am happy that the
 infinite loop is gone.

 Florent, Nicolas: it would be good if you take some time to look at this
 too as this has been sitting around unloved for quite awhile.

 Andrew
 ----
 New commits:
 ||[[http://git.sagemath.org/sage.git/commit/?id=a1a85ff|a1a85ff]]||Importing
 Nathann's patch||
 ||[[http://git.sagemath.org/sage.git/commit/?id=8c2aeff|8c2aeff]]||trac
 #15479: Finite Words should be proud of their finiteness||

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