134. Orderings

An ordering is a special sort of relation that is the mathematical formulation of the concept of comparison or priority. It includes as special cases the relation “$\leq$” between numbers and the relation of inclusion between subsets of a set. Here is the formal definition:

134.1 Definition: ordering

A relation $\alpha$ on a set $A$ is an ordering if it is antisymmetric and transitive. If it is also reflexive, it is a weak ordering, and if it is also irreflexive, it is a strict ordering.

134.1.1 Example The relation “$\leq$” on a set of numbers is a weak ordering, and “$<$” is a strict ordering.

134.1.2 Example An example of an ordering $\alpha$ on a set $S$ that is neither weak nor strict is the relation

$$\{\langle 1,1\rangle,\langle 1,2\rangle,\langle 2,3\rangle,\langle 1,3\rangle\}$$

on the set $\{1,2,3\}$. It is not reflexive because 2 is not related to itself, but it is not irreflexive because 1 is related to itself.

134.1.3 Remark Essentially all the orderings considered in this text are either weak orderings or strict orderings, but the more general concept is occasionally useful.

134.2 Definition: ordered set

If $\alpha$ is an ordering on $A$, then $(A,\alpha)$ is an ordered set. If $\alpha$ is a weak ordering, $(A,\alpha)$ is a poset.

134.2.1 Example $(\mathrm{R},\leq)$ and $(\mathrm{R},\geq)$ are posets, and so is $(\mathcal{P}A,\subseteq)$ for any set $A$. The set of all relations on a set $S$ is ordered by inclusion; it is the poset $(\mathcal{P}(S\times S),\subseteq)$.

134.2.2 Usage In many texts, a weak ordering is called a partial ordering, and “poset” is short for “partially ordered set”.

134.2.3 Example Not only are “$\leq$” and “$<$” orderings on $\mathrm{R}$, but so are “$\geq$” and “$>$”.

134.2.4 Example The relation $m\mid n$ on $\mathrm{N}$ is a weak ordering; thus $(\mathrm{N},\mid)$ is a poset. Reflexivity is the obvious fact that $n\mid n$ for any $n\in\mathrm{N}$, transitivity requires proving that if $m\mid n$ and $n\mid p$ then $m\mid p$, and antisymmetry is the almost obvious fact that if $m\mid n$ and $n\mid m$ then $m=n$.

I will prove antisymmetry and leave the others to you. By definition, $m\mid n$ means that $n=hm$ for some positive integer $h$. Likewise $n\mid m$ means that $m=kn$ for some positive integer $k$. Thus $m=kn=khm$. If $m\neq 0$ you can cancel $m$ and get $kh=1$. Since $k$ and $h$ are positive integers, that means $k=h=1$. Hence $m=n$. As for the case $m=0$, the fact that $n=hm$ means $n=0$, so $m=n$ again.

134.2.5 Example If you have a collection $\mathcal{T}$ of tasks, there is a natural ordering of $\mathcal{T}$ defined this way: $t\,\alpha\, u$ if task $t$ must be done before task $u$ can be started. This is obviously transitive. If $\alpha$ were not antisymmetric, that would say there are two different tasks $t$ and $u$, each of which had to be done before the other, so that it is in fact impossible to perform the set of tasks. Thus for any reasonable collection $\mathcal{T}$ of tasks, $(\mathcal{T},\alpha)$ is antisymmetric as well as transitive and therefore an ordering.

134.3 Theorem

Let $\alpha$ be an ordering. Then $\alpha^{\mathrm{op}}$ (see Section 54.2, page 77) is also an ordering. Moreover, $\alpha^{\mathrm{op}}$ is strict if $\alpha$ is strict and weak if $\alpha$ is weak.

134.3.1 How to think of orderings If $\alpha$ is an ordering on a set $S$ and $a\,\alpha\, b$, one says that “$a$ is smaller than $b$”. This phraseology has to be used with caution — one would not use it, for example, for the relation “$\geq$” on $\mathrm{R}$. More subtle problems with this terminology arise with other orderings. For example, in the poset $(\mathrm{N},\mid)$, 3 is smaller than 6 but 3 is not smaller than 5. Nor, for that matter, is 5 smaller than 3. You have to be very clear that “smaller” here is not the usual relation “$\leq$” on $\mathrm{N}$. The following Theorem, whose proof is left to you, shows that a relationship analogous to that between “$<$” and “$\leq$” holds for all orderings.

134.4 Theorem

For any ordering $\alpha$ on a set $S$, $\alpha-\Delta_S$ is a strict ordering of $S$ and the reflexive closure $\alpha^R$ is a weak ordering.

Pages 206–208 of the book (PDF).