Does every directed set admit a totally ordered quotient of the same size?

A set $P$ with a transitive and relfexive relation $\leq_{1}$ is called a directed set (upward directed set in this case) if for all $a,b\in P$ there is a $c\in P$ such that $a\leq_{1} c$ and $b\leq_{1} c$.

Assume that the relation $\leq_{1}$ is also antisymmetric (that $(P,\leq_{1})$ is a poset). Is there a totally ordered set $(S,\leq_{2})$ and a surjective monotone function $f:P\rightarrow S$ such that if $a,b\in P$ are distinct elements such that $a\leq_{1} b$, then $f(a)$ and $f(b)$ are also distinct elements of $S$.

I suspect that such an $S$ and such an $f$ exist for every poset, but I haven't found a reference. Any help would be appreciated.


Yes - this can be proved using the axiom of choice in the form of Zorn's lemma. The result is called Szpilrajn's extension theorem, and many further results along these lines are known; for example, every well-founded partial order can be extended to a well-order.

Interestingly, the use of choice is unavoidable: Szpilrajn's theorem is not provable in $\mathsf{ZF}$ (= set theory without the axiom of choice) alone. Specifically, it is consistent with $\mathsf{ZF}$ that there are amorphous sets (= sets which cannot be partitioned into two infinite pieces); no amorphous set can be linearly ordered, but every set can be partially ordered (just make all elements incomparable to each other).