As for what should practically change in the docs IMO
-
Ord
documentation should mention "total preorder". IMO, it's okay to keep listing "total order", too, since that may help the intuition of people less familiar with more uncommon types of relations. In any case, the most important part is that the axioms - as stated in the docs - are correct. Which they are, except for... - the axioms for
PartialOrd
need to be fixed: I.e. the fix is either to addan axiom like "Edit: a set of axioms like “a == b
andb < c
andc == d
impliesa < d
"a == b
andb < c
impliesa < c
. And:a < b
andb == c
impliesa < c
”, or to require that<=
is transitive. Which is funny because once you require that<=
is transitive, a bunch of other stuff (i.e. everything that doesn't just specify how different methods are supposed to be defined in terms of each other) technically becomes really entirely redundant. In any case, I haven't thought about at all yet, what the best presentation here might be. I do like the appeal of keeping things really simple regarding "<=
ought to be transitive, and the rest has to be as-if defined in terms of<=
"; but these properties also have to stay straightforward to check if (which is commonly the case) you do not define all your stuff in terms of<=
.