-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What is called "partial order" is in fact merely a preorder. #66
Comments
-- | A partial ordering on sets
-- (<http://en.wikipedia.org/wiki/Partially_ordered_set>) is a set equipped
-- with a binary relation, `leq`, that obeys the following laws
--
-- @
-- Reflexive: a ``leq`` a
-- Antisymmetric: a ``leq`` b && b ``leq`` a ==> a == b
-- Transitive: a ``leq`` b && b ``leq`` c ==> a ``leq`` c
-- @ Your |
What I meant is that this interface may be split to the part that describes a preorder, and the part that makes an assumption that it is also antisymmetric and operates on this assumed partial order. The preorder part would then be more widely useful per se. |
I see. Do you have good examples or preorders which aren't partial? https://en.wikipedia.org/wiki/Preorder mentions subtyping relation, but I wonder what the type-system would look like where subsuming relation isn't antisymmetric. One example is record permutation as in http://www.cs.cornell.edu/courses/cs6110/2013sp/lectures/lec28-sp13.pdf. EDIT: from my POV I'd rather design a type-system where subsuming relation is partiial order, it's good property to have. Another question: does |
TL;DR I can be convinced |
One thing I like about preorders is that there may be three different kinds of relation between any two objects, that a suitable combination of
This is what both Then, one may throw away some of these options and call it a subclass:
I don't have an immediate example of a type that is a useful preorder. The First, let us call something a proper preorder when it is a preorder but not a poset, by analogy with the notion of a "proper subset".
|
|
Of course it is a partial order on |
I see, but we have already different partial order on lists: I really want to be convinced there is practical benefit, not only theoretical correctness. (That's why I'm hesitant to add |
Maybe it's a chicken and egg problem. Haskell was also practically useless for the first decade of its existence. Anyway, I'm out of arguments. |
@phadej wrote (ping @kindaro):
You can alway quotient a preorder to get a partial order, that is what is going on in this argument. ATTEMPT 1: ATTEMPT 2: Appropos practical benefit: I am not arguing for a direct application I am desperately needing here. But this is due to the fact that I have problems with the class |
I have a problem with this.
According to some notes, that seem to me correct in this point, a partial order is a preorder that is antisymmetric. What I claim is that it's undecidable whether a preorder relation on an arbitrary datatype is antisymmetric. (Kindly do point out if I am wrong.)
In other words:
— May fail.
Consider the following example:
This
leq :: Soup -> Soup -> Bool
relation on a set of as many as four elements I believe to be reflexive and transitive. Can you see where it fails to be antisymmetric?What I am suspicious about is that:
Example, again:
(I thought partial orders were antisymmetric!)
Another example:
(I thought
lfpFrom
was safe!)The text was updated successfully, but these errors were encountered: