Union of Overlapping Convex Sets in Toset is Convex

Theorem
Let $\left({ S, \preceq }\right)$ be a totally ordered set.

Let $U$ and $V$ be convex sets in $S$.

Let $U \cap V \ne \varnothing$.

Then $U \cup V$ is also convex.

Proof
Let $a,b,c \in S$

Let $a,c \in U \cup V$.

Let $a \prec b \prec c$.

If $a,c \in U$ then $b \in U$ because $U$ is convex.

Thus $b \in U \cup V$ by the definition of union.

Similarly, if $a,c \in V$ then $b \in U \cup V$.

Otherwise, suppose WLOG that $a \in U$ and $c \in V$.

Since $U \cap V$ is nonempty by the premise, it has an element $p$.

Since $\preceq$ is a total ordering:
 * $b \preceq p$ or $p \preceq b$.

If $b \preceq p$, then since $a \prec b$, $a,p \in U$, and $U$ is convex, we can conclude that
 * $b \in U$

so $b \in U \cup V$.

A similar argument shows that it $p \preceq b$ then $b \in V$, so $b \in U \cup V$.

Thus in all cases we can conclude that $b \in U \cup V$, so $U \cup V$ is convex.