# Category Theory/Categories of ordered sets

Definition (category of preordered sets):
The category ${\textbf {Ord}}$ of preordered sets is the category whose objects $\operatorname {Ob} ({\textbf {Ord}})$ are given by the preordered sets and whose morphisms are given by the order homomorphisms.
Definition (category of posets):
The category ${\textbf {Pos}}$ of posets is the category whose objects are the posets and whose morphisms are the order homomorphisms.
Directly from the definitions, we have:
Proposition (posets form full subcategory of preordered sets):
${\textbf {Pos}}$ is a full subcategory of ${\textbf {Ord}}$.
Proposition (products in the category of preordered sets):
Let $(S_{\alpha })_{\alpha \in A}$ be a family of preordered sets. Then a product of this family in the category ${\textbf {Ord}}$ is given by the set $\prod _{\alpha \in A}S_{\alpha }$ together with the product order, where the projections are given by the functions
    $p_{\beta }:\prod _{\alpha \in A}S_{\alpha }\to S_{\beta },p_{\beta }((s_{\alpha })_{\alpha \in A})=s_{\beta }$.
Proof: The functions $p_{\beta }$ are order homomorphisms, because if $\beta \in A$ and $(s_{\alpha })_{\alpha \in A}\leq (t_{\alpha })_{\alpha \in A}$, then $p_{\beta }((s_{\alpha })_{\alpha \in A})=s_{\beta }\leq t_{\beta }=p_{\beta }((t_{\alpha })_{\alpha \in A})$ by definition. Thus, we have a cone. Moreover, if the order homomorphisms $q_{\alpha }:Q\to S_{\alpha }$ define another cone, then as for the set product, the function given by
    $f:Q\to \prod _{\alpha \in A},f(x)=(q_{\alpha }(x))_{\alpha \in A}$
is the unique function from $Q$ to $\prod _{\alpha \in A}S_{\alpha }$ such that $q_{\alpha }=p_{\alpha }\circ f$ for all $\alpha \in A$, and it is an order homomorphism, because if $x\leq y$, then for all $\alpha \in A$ we have $q_{\alpha }(x)\leq q_{\alpha }(y)$. $\Box$
Proposition (coproducts in the category of preordered sets):
Let $(S_{\alpha })_{\alpha \in A}$ be a family of preordered sets. Then a coproduct of this family in the category ${\textbf {Ord}}$ is given by the parallel composition of the $S_{\alpha }$, where the inclusions are given by the functions
    $i_{\beta }:S_{\beta }\to \bigsqcup _{\alpha \in A}S_{\alpha },i_{\beta }(s_{\beta })=(s_{\beta },\beta )$.
Proof: The $i_{\beta }$ are order homomorphisms by definition of the parallel order, so that we do have a cocone. Suppose now that the maps $j_{\alpha }:S_{\alpha }\to D$ define another cocone in the category ${\textbf {Ord}}$. Then the unique function $f:\bigsqcup _{\alpha \in A}S_{\alpha }\to D$ such that $f\circ i_{\alpha }=j_{\alpha }$ for all $\alpha \in A$ is given by
    $f:\bigsqcup _{\alpha \in A}S_{\alpha }\to D,f((s,\alpha ))=j_{\alpha }(s)$
as in set theory, and it is an order homomorphism because if $(s,\beta )\leq (t,\beta )$, then $s\leq _{\beta }t$ by def. of the parallel order and consequently $f((s,\beta ))=j_{\beta }(s)\leq j_{\beta }(t)=f((t,\beta ))$. $\Box$
Proposition (products and coproducts in the category of posets):
In the category $\mathbf {Pos}$, products and coproducts are given by the respective products and coproducts in the category $\mathbf {Ord}$.
Proof: This follows since limits and colimits are preserved when restricting to a full subcategory. $\Box$