Preorders and relations [00JW]
- January 21, 2024
- Jon Sterling, with contributions from Marcelo Fiore
Definition Preorder [00JX]
- January 21, 2024
- Jon Sterling, with contributions from Marcelo Fiore
A preorder {\mathopen {}\left (P,\sqsubseteq \right )\mathclose {}} consists of a set P and a relation {\sqsubseteq } \colon P\mathbin {\nrightarrow } P satisfying the following two axioms:
- Reflexivity. \forall x: P\mathpunct {.} x\sqsubseteq x
- Transitivity. \forall x,y,z: P\mathpunct {.} {\mathopen {}\left (x\sqsubseteq y\land y \sqsubseteq z\right )\mathclose {}}\implies x\sqsubseteq z
In other words, a preorder is a directed graph such that the edge relation is both reflexive and transitive.
Example Examples of preorders [00JY]
- January 21, 2024
- Jon Sterling, with contributions from Marcelo Fiore
Preorders are everywhere in both general mathematics and computer science.
- The real numbers equipped with their inequality relation form a preorder \mathbb {R},\leq . The converse relation {\mathopen {}\left (\mathbb {R},\geq \right )\mathclose {}} of course also forms a preorder. This example can be specialised to different classes of numbers, such as integers or naturals.
- Subsets with their inclusion and containment relations form preorders {\mathopen {}\left (\mathcal {P}(A),\subseteq \right )\mathclose {}} and {\mathopen {}\left (\mathcal {P}(A),\supseteq \right )\mathclose {}}. This example can be specialised to other examples that have additional structure, such as the preorder \mathcal {P}_f(A) of finite subsets of a given set A, or the preorder \mathcal {O}(X) of open sets of a topological space X.
- A slightly more nontrivial example is furnished by the preorder {\mathopen {}\left (\mathbb {Z},{\mid }\right )\mathclose {}} of the integers and the divisibility relation, where m\mid n if and only if \exists k:\mathbb {Z}\mathpunct {.} m k = n: indeed, we certainly have n divides n, and if l divides m and m divides n, then l divides m.
The first example above happen to be total orders (meaning that the underlying directed graph is connected): so {\mathopen {}\left (\mathcal {P}{\mathopen {}\left (A\right )\mathclose {}},\subseteq \right )\mathclose {}} and {\mathopen {}\left (\mathbb {Z},{\mid }\right )\mathclose {}} are example of non-total preorders.
All the examples we have seen so far are, furthermore, partial orders: a preorder is a partial order when we have a \sqsubseteq b \land b \sqsubseteq a if and only if a=b. In fact, there are arguably very few useful preorders that are not partial orders, and it is always possible to replace a preorder by an equivalent partial order; we do not pursue this here.
Theorem Reflexive-transitive closure and path relation [00JZ]
- January 21, 2024
- Jon Sterling, with contributions from Marcelo Fiore
The path relation R^{\circ *} of an endo-relation R\colon A\mathbin {\nrightarrow } A is, by definition, a preorder. We will show that R^{\circ *} enjoys a universal property as the smallest preorder containing R as a subrelation; in other words, it is the reflexive-transitive closure.
To be more precise, let \mathcal {F}_R be the set of preorders on A that contain R as a subrelation:
\mathcal {F}_R = {\mathopen {}\left \{Q\colon A\mathbin {\nrightarrow } A\,\middle \vert \,R\subseteq Q \land \text {Q is a preorder}\right \}\mathclose {}}Then we have R^{\circ *}=\bigcap \mathcal {F}_R, and so the path relation is the smallest preorder containing R as a subrelation. (Indeed, recall that the intersection of an intersection-closed class of relations is the smallest relation in that class.)
Proof.
- January 21, 2024
- Jon Sterling
To show that R^{\circ *}=\bigcap \mathcal {F}_R, it suffices to check that \bigcap \mathcal {F}_R\subseteq R^{\circ *} and R^{\circ *}\subseteq \bigcap \mathcal {F}_R.
We must first show that \bigcap \mathcal {F}_R\subseteq R^{\circ *}. Because \bigcap \mathcal {F}_R is the smallest preorder containing R, it suffices to show that R^{\circ *} is a preorder containing R, i.e. that R^{\circ *}\in \mathcal {F}_R. This holds almost by definition:
- We first need to show that R\subseteq R^{\circ *}, i.e. that when a\mathrel {R}b we have a\mathrel {R}^{\circ *}b. This is evident, as b\mathrel {R}b is a path of length 1 in R and R^{\circ *} contains all finite paths in R.
- Next, we need to show that R^{\circ *} is a preorder. But this holds because R^{\circ *} contains the empty path from an element to itself, and because a path of length m from a to b can be concatenated with a path of length n from b to c to obtain a path (of length m+n) from a to c.
Our second goal is to prove R^{\circ *}\subseteq \bigcap \mathcal {F}_R; by the definition of intersections, this holds if and only if \forall Q\in \mathcal {F}_R\mathpunct {.} R^{\circ *}\subseteq Q.
Fixing such a preorder Q over A containing R as a subrelation, we must prove that R^{\circ *}\subseteq Q. Recalling that R^{\circ *} is the union \bigcup _{n :\mathbb {N}}R^{\circ n}, we see by the definition of unions that that R^{\circ *}\subseteq Q if and only if for each n:\mathbb {N}, we have R^{\circ n} \subseteq Q. This we prove by induction on n:\mathbb {N}.
- In the base case, we must show that R^{\circ 0} = \mathsf {id}_{A} is a subrelation of Q. This is equivalent to Q being reflexive, which we deduce from our assumption that Q is a preorder.
- In the inductive step, we may assume R^{\circ n}\subseteq Q and we must prove that R^{\circ {\mathopen {}\left (n+1\right )\mathclose {}}}=R\circ R^{\circ n} is a subrelation of Q. For any a,b:A, we have a\mathrel {{\mathopen {}\left (R\circ R^{\circ n}\right )\mathclose {}}} b if and only if there exists some c:A such that a\mathrel {R}c and c\mathrel {R^{\circ n}} b. Because we have assumed that R\subseteq Q, we have a\mathrel {Q}c; by our inductive hypothesis, we have c\mathrel {Q}b. Because Q is a preorder and therefore transitive, we therefore have a\mathrel {Q}b.
Therefore, R^{\circ *} is indeed the intersection of \mathcal {F}_R.