Hello,

> The real issue is the FinitePoset code:

Yes. It is possible that I mentionned it several times in this thread.

> sage: d = DiGraph({0:[2],1:[2]})
> sage: from sage.combinat.posets.posets import FinitePoset
> sage: P = FinitePoset(d,elements=[1,2,3])
> sage: Q = FinitePoset(d,elements=[2,1,3])
> sage: P == Q
> False
> sage: P.hasse_diagram() == Q.hasse_diagram()
> True

The authors of the code meant it to work like that, so this is not a bug.

You created the posets with different informations, and this
information is meant to make the posets non-equal.

That this is bad programming is correct, for a Poset is a very clearly
defined mathematical object and somebody merged inside informations
like an ordered list of elements or a linear extension, and that
breaks the features that one expects to find in the Poset objects when
they are used normally, without this additional information.

What I have been saying here repeatedly is that those features need to
be split apart, with one one hand the Poset class by itself and on the
other all these "linear extension related mess" (that includes the
ridiculous 'key' parameter).

> It has nothing to do with the relabel function.

There is something wrong with the relabelling function, which is the
only way I know to reproduce the bug at the moment. In your example
you specified a different input, and this is what the authors of that
code thought was sufficient to brea equality (you think that it is
wrong, I think that it is wrong, we agree here).

But that was not a bug. The bug is when a guy wants to work on a
simple poset, defined from its graph, and finds out that equality is
not behaving as it should.

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to