Lexicographic Order on Pair of Totally Ordered Sets is Total Ordering

Theorem
Let $\left({S_1, \preceq_1}\right)$ and $\left({S_2, \preceq_2}\right)$ be ordered sets.

Let $\preccurlyeq$ be the lexicographic order on $S_1 \times S_2$''':
 * $\left({x_1, x_2}\right) \preccurlyeq \left({y_1, y_2}\right) \iff \left({x_1 \prec_1 y_1}\right) \lor \left({x_1 = y_1 \land x_2 \preceq_2 y_2}\right)$

Then:
 * $\preccurlyeq$ is a total ordering on $S_1 \times S_2$


 * both $\preceq_1$ and $\preceq_2$ are total orderings.

Proof
Note that from Lexicographic Order is Ordering we have that $\left({S_1 \times S_2, \preccurlyeq}\right)$ is an ordered set.

Necessary Condition
Let $\left({S_1, \preceq_1}\right)$ and $\left({S_2, \preceq_2}\right)$ be totally ordered sets.

Let $\left({x_1, x_2}\right), \left({y_1, y_2}\right) \in S_1 \times S_2$.

The following cases are to be examined:

$(1): \quad x_1 \ne y_1$

As $\preceq_1$ is a total ordering it follows that either $x_1 \preceq_1 y_1$ or $y_1 \preceq_1 x_1$.

Thus by definition of the lexicographic order on $S_1 \times S_2$:
 * either $\left({x_1, x_2}\right) \preccurlyeq \left({y_1, y_2}\right)$ or $\left({y_1, y_2}\right) \preccurlyeq \left({x_1, x_2}\right)$.

$(2): \quad x_1 = y_1$

As $\preceq_2$ is a total ordering it follows that one of the following holds:


 * $x_2 \preceq_2 y_2$ in which case $\left({x_1, x_2}\right) \preccurlyeq \left({y_1, y_2}\right)$
 * $y_2 \preceq_2 x_2$ in which case $\left({y_1, y_2}\right) \preccurlyeq \left({x_1, x_2}\right)$
 * $x = y$ in which case $\left({x_1, x_2}\right) = \left({y_1, y_2}\right)$

by definition of the lexicographic order on $S_1 \times S_2$,

In all cases $\left({x_1, x_2}\right)$ is comparable with $\left({y_1, y_2}\right)$.

That is, $\preccurlyeq$ is a total ordering on $S_1 \times S_2$

Sufficient Condition
Let $\left({S_1 \times S_2, \preccurlyeq}\right)$ be a totally ordered set.

There are two cases to address:

$(1): \quad$ Let $\left({x_1, x_2}\right), \left({y_1, y_2}\right) \in S_1 \times S_2$ such that $x_1 = x_2$.

As $\preccurlyeq$ is a total ordering it follows that one of the following holds:


 * $\left({x_1, x_2}\right) \preccurlyeq \left({y_1, y_2}\right)$ in which case $x_2 \preceq_2 y_2$
 * $\left({y_1, y_2}\right) \preccurlyeq \left({x_1, x_2}\right)$ in which case $y_2 \preceq_2 x_2$
 * $\left({x_1, x_2}\right) = \left({y_1, y_2}\right)$ in which case $x = y$

by definition of the lexicographic order on $S_1 \times S_2$.

As the above holds for all $x_2, y_2 \in S_2$, it follows that $\preceq_2$ is a total ordering on $S_2$.

$(2): \quad$ Let $\left({x_1, x_2}\right), \left({y_1, y_2}\right) \in S_1 \times S_2$ such that $x_1 \ne x_2$.

As $\preccurlyeq$ is a total ordering it follows that one of the following holds:


 * $\left({x_1, x_2}\right) \preccurlyeq \left({y_1, y_2}\right)$ in which case $x_1 \preceq_1 y_1$
 * $\left({y_1, y_2}\right) \preccurlyeq \left({x_1, x_2}\right)$ in which case $y_1 \preceq_1 x_1$

by definition of the lexicographic order on $S_1 \times S_2$.

As the above holds for all $x_1, y_1 \in S_1$, it follows that $\preceq_1$ is a total ordering on $S_1$.