In mathematics, especially in order theory, a preorder or quasiorder is a binary relation that is reflexive and transitive.
Preorders are more general than equivalence relations and (non-strict) partial orders, both of which are special cases of a preorder: an antisymmetric preorder is a partial order, and a symmetric preorder is an equivalence relation.
The name  comes from the idea that preorders (that are not partial orders) are 'almost' (partial) orders, but not quite; they are neither necessarily antisymmetric nor asymmetric.
Because a preorder is a binary relation, the symbol \,\leq\, can be used as the notational device for the relation.
However, because they are not necessarily antisymmetric, some of the ordinary intuition associated to the symbol \,\leq\, may not apply.
On the other hand, a preorder can be used, in a straightforward fashion, to define a partial order and an equivalence relation.
Doing so, however, is not always useful or worthwhile, depending on the problem domain being studied.
In words, when a \leq b, one may say that b  a or that a  b, or that b  to a.
Occasionally, the notation ← or \,\lesssim\, is used instead of \,\leq.
To every preorder, there corresponds a directed graph, with elements of the set corresponding to vertices, and the order relation between pairs of elements corresponding to the directed edges between vertices.
The converse is not true: most directed graphs are neither reflexive nor transitive.
In general, the corresponding graphs may contain cycles.
A preorder that is antisymmetric no longer has cycles; it is a partial order, and corresponds to a directed acyclic graph.
A preorder that is symmetric is an equivalence relation; it can be thought of as having lost the direction markers on the edges of the graph.
In general, a preorder's corresponding directed graph may have many disconnected components.
Formal definition
Consider a homogeneous relation \,\leq\, on some given set P, so that by definition, \,\leq\, is some subset of P \times P and the notation a \leq b is used in place of (a, b) \in \,\leq.
Then \,\leq\, is called a  or  if it is reflexive and transitive; that is, if it satisfies:
Reflexivity: a \leq a for all a \in P, and
Transitivity: if a \leq b \text{ and } b \leq c \text{ then } a \leq c for all a, b, c \in P.
A set that is equipped with a preorder is called a preordered set (or proset).For "proset", see e.g. .
For emphasis or contrast to strict preorders, a preorder may also be referred to as a non-strict preorder.
If reflexivity is replaced with irreflexivity (while keeping transitivity) then the result is called a strict preorder; explicitly, a  on P is a homogeneous binary relation \,<\, on P that satisfies the following conditions:
Irreflexivity or Anti-reflexivity:  a < a for all a \in P; that is, \,a < a is  for all a \in P, and Transitivity: if a < b \text{ and } b < c \text{ then } a < c for all a, b, c \in P.
A binary relation is a strict preorder if and only if it is a strict partial order.
By definition, a strict partial order is an asymmetric strict preorder, where \,<\, is called  if a < b \text{ implies } \textit{ not } \ b < a for all a, b.
Conversely, every strict preorder is a strict partial order because every transitive irreflexive relation is necessarily asymmetric.
Although they are equivalent, the term "strict partial order" is typically preferred over "strict preorder" and readers are referred to the article on strict partial orders for details about such relations.
In contrast to strict preorders, there are many (non-strict) preorders that are  (non-strict) partial orders.
Related definitions
If a preorder is also antisymmetric, that is, a \leq b and b \leq a implies a = b, then it is a partial order.
On the other hand, if it is symmetric, that is, if a \leq b implies b \leq a, then it is an equivalence relation.
A preorder is total if a \leq b or b \leq a for all a, b \in P.
The notion of a preordered set P can be formulated in a categorical framework as a thin category; that is, as a category with at most one morphism from an object to another.
Here the objects correspond to the elements of P, and there is one morphism for objects which are related, zero otherwise.
Alternately, a preordered set can be understood as an enriched category, enriched over the category 2 = (0 \to 1).
A preordered class is a class equipped with a preorder.
Every set is a class and so every preordered set is a preordered class.
Examples
The reachability relationship in any directed graph (possibly containing cycles) gives rise to a preorder, where x \leq y in the preorder if and only if there is a path from x to y in the directed graph.
Conversely, every preorder is the reachability relationship of a directed graph (for instance, the graph that has an edge from x to y for every pair  with x \leq y.
However, many different graphs may have the same reachability preorder as each other.
In the same way, reachability of directed acyclic graphs, directed graphs with no cycles, gives rise to partially ordered sets (preorders satisfying an additional antisymmetry property).
Every finite topological space gives rise to a preorder on its points by defining x \leq y if and only if x belongs to every neighborhood of y.
Every finite preorder can be formed as the specialization preorder of a topological space in this way.
That is, there is a one-to-one correspondence between finite topologies and finite preorders.
However, the relation between infinite topological spaces and their specialization preorders is not one-to-one.
A net is a directed preorder, that is, each pair of elements has an upper bound.
The definition of convergence via nets is important in topology, where preorders cannot be replaced by partially ordered sets without losing important features.
Further examples:
The relation defined by x \leq y if f(x) \leq f(y), where f is a function into some preorder.
The relation defined by x \leq y if there exists some injection from x to y.
Injection may be replaced by surjection, or any type of structure-preserving function, such as ring homomorphism, or permutation.
The embedding relation for countable total orderings.
The graph-minor relation in graph theory.
A category with at most one morphism from any object x to any other object y is a preorder.
Such categories are called thin.
In this sense, categories "generalize" preorders by allowing more than one relation between objects: each morphism is a distinct (named) preorder relation.
In computer science, one can find examples of the following preorders.
Many-one and Turing reductions are preorders on complexity classes.
The subtyping relations are usually preorders.
Simulation preorders are preorders (hence the name).
Reduction relations in abstract rewriting systems.
The encompassment preorder on the set of terms, defined by s \leq t if a subterm of t is a substitution instance of s.
Example of a total preorder:
Preference, according to common models.
Uses
Preorders play a pivotal role in several situations:
Every preorder can be given a topology, the Alexandrov topology; and indeed, every preorder on a set is in one-to-one correspondence with an Alexandrov topology on that set.
Preorders may be used to define interior algebras.
Preorders provide the Kripke semantics for certain types of modal logic.
Preorders are used in forcing in set theory to prove consistency and independence results..
Constructions
Every binary relation R on a set S can be extended to a preorder on S by taking the transitive closure and reflexive closure, R^{+=}.
The transitive closure indicates path connection in R : x R^+ y if and only if there is an R-path from x to y.
Left residual preorder induced by a binary relation
Given a binary relation R, the complemented composition R \backslash R = \overline{R^\textsf{T} \circ \overline{R}} forms a preorder called the left residual,In this context, "\backslash" does not mean "set difference".
where R^\textsf{T} denotes the converse relation of R, and \overline{R} denotes the complement relation of R, while \circ denotes relation composition.
Preorders and partial orders on partitions
Given a preorder \,\lesssim\, on S one may define an equivalence relation \,\sim\, on S such that  a \sim b \quad \text{ if and only if } \quad a \lesssim b \; \text{ and } \; b \lesssim a.
The resulting relation \,\sim\, is reflexive since a preorder is reflexive, transitive by applying transitivity of the preorder twice, and symmetric by definition.
Using this relation, it is possible to construct a partial order on the quotient set of the equivalence, S / \sim, the set of all equivalence classes of \,\sim.
If the preorder is R^{+=}, S / \sim is the set of R-cycle equivalence classes:  x \in [y] if and only if x = y or x is in an R-cycle with y  In any case, on S / \sim, it is possible to define [x] \leq [y] \text{ if and only if } x \lesssim y.
By the construction of \,\sim, this definition is independent of the chosen representatives and the corresponding relation is indeed well-defined.
It is readily verified that this yields a partially ordered set.
Conversely, from a partial order on a partition of a set S one can construct a preorder on S.
There is a one-to-one correspondence between preorders and pairs (partition, partial order).
: Let S be a formal theory, which is a set of sentences with certain properties (details of which can be found in the article on the subject).
For instance, S could be a first-order theory (like Zermelo–Fraenkel set theory) or a simpler zeroth-order theory.
One of the many properties of S is that it is closed under logical consequences so that, for instance, if a sentence A \in S logically implies some sentence B, which will be written as A \Rightarrow B and as B \Leftarrow A, then necessarily B \in S.  The relation \,\Leftarrow\, is a preorder on S because A \Leftarrow A always holds and whenever A \Leftarrow B and B \Leftarrow C both hold then so does A \Leftarrow C.
Furthermore, for any A, B \in S, A \sim B if and only if A \Leftarrow B \text{ and } B \Leftarrow A; that is, two sentences are equivalent with respect to \,\Leftarrow\, if and only if they are logically equivalent.
This particular equivalence relation A \sim B is commonly denoted with its own own special symbol A \iff B, and so this symbol \,\iff\, may be used instead of \,\sim.
The equivalence class of a sentence A, denoted by [A], consists of all sentences B \in S that are logically equivalent to A (that is, all B \in S such that A \iff B).
The partial order on S / \sim induced by \,\Leftarrow,\, which will also be denoted by the same symbol \,\Leftarrow,\, is characterized by [A] \Leftarrow [B] if and only if A \Leftarrow B, where the right hand side condition is independent of the choice of representatives A \in [A] and B \in [B] of the equivalence classes.
All that has been said of \,\Leftarrow\, so far can also be said of its converse relation \,\Rightarrow.
\,  The preordered set (S, \Leftarrow) is a directed set because if A, B \in S and if C := A \wedge B denotes the sentence formed by logical conjunction \,\wedge,\, then A \Leftarrow C and B \Leftarrow C where C \in S.
The partially ordered set \left(S / \sim, \Leftarrow\right) is consequently also a directed set.
See Lindenbaum–Tarski algebra for a related example.
Preorders and strict preorders
Strict preorder induced by a preorder
Given a preorder \,\lesssim, a new relation \,<\, can be defined by declaring that a < b if and only if a \lesssim b \text{ and not } b \lesssim a.
Using the equivalence relation \,\sim\, introduced above, a < b if and only if a \lesssim b \text{ and not } a \sim b,  and so the following holds a \lesssim b \quad \text{ if and only if } \quad a < b \; \text{ or } \; a \sim b.
The relation \,<\, is a strict partial order and  strict partial order can be the result of such a construction.
the preorder \,\lesssim\, is antisymmetric (and thus a partial order) then the equivalence \,\sim\, is equality (that is, a \sim b if and only if a = b) and so in this case, the definition of \,<\, can be restated as:  a < b \quad \text{ if and only if } \quad a \leq b \; \text{ and } \; a \neq b \quad\quad (\text{assuming } \lesssim \text{ is antisymmetric}).
But importantly, this is  the general definition of the relation \,<\, (that is, \,<\, is  defined as:  a < b if and only if a \lesssim b \text{ and } a \neq b) because if the preorder \,\lesssim\, is not antisymmetric then the resulting relation \,<\, would not be transitive (think of how equivalent non-equal elements relate).
This is the reason for using the symbol "\lesssim" instead of the "less than or equal to" symbol "\leq", which might cause confusion for a preorder that is not antisymmetric since it may misleadingly suggest that a \leq b implies a < b \text{ or } a = b.
Preorders induced by a strict preorder
Using the construction above, multiple non-strict preorders can produce the same strict preorder \,<,\, so without more information (such knowledge of the equivalence relation \,\sim\, for instance), it might not be possible to reconstruct the original non-strict preorder from \,<.
\, Possible (non-strict) preorders that induce the given strict preorder \,<\, include the following:
Define a \leq b as a < b \text{ or } a = b (that is, take the reflexive closure of the relation).
This gives the partial order associated with the strict partial order "<" through reflexive closure; in this case the equivalence is equality, so we do not need the notations \,\lesssim\, and \,\sim.
Define a \lesssim b as "\text{ not } b < a" (that is, take the inverse complement of the relation), which corresponds to defining a \sim b as "neither a < b \text{ nor } b < a"; these relations \,\lesssim\, and \,\sim\, are in general not transitive; however, if they are, \,\sim\, is an equivalence; in that case "<" is a strict weak order.
The resulting preorder is connected (formerly called total), that is, a total preorder.
Number of preorders
As explained above, there is a 1-to-1 correspondence between preorders and pairs (partition, partial order).
Thus the number of preorders is the sum of the number of partial orders on every partition.
For example: Interval
For a \lesssim b, the interval [a, b] is the set of points x satisfying a \lesssim x and x \lesssim b, also written a \lesssim x \lesssim b.
It contains at least the points a and b.
One may choose to extend the definition to all pairs (a, b) The extra intervals are all empty.
Using the corresponding strict relation "<", one can also define the interval (a, b) as the set of points x satisfying a < x and x < b, also written a < x < b.
An open interval may be empty even if a < b.
Also [a, b) and (a, b] can be defined similarly.
See also
Partial order – preorder that is antisymmetric
Equivalence relation – preorder that is symmetric
Total preorder – preorder that is total
Total order – preorder that is antisymmetric and total
Directed set
Category of preordered sets
Prewellordering
Well-quasi-ordering
Notes
References
Schmidt, Gunther, "Relational Mathematics", Encyclopedia of Mathematics and its Applications, vol. 132, Cambridge University Press, 2011,
