How to prove that if $x,y\in(a,b)$, then $|x-y|Let $(a, b)$ be the open interval $\left\{z\in\mathbb{R} : a < z < b\right\}$. 
Write the theorem "If $x,y\in(a,b)$ then $|x − y| < b − a$" in logic form, and then prove the theorem.
 A: Let $x,y \in (a,b)$.
By definition,
$$ a<x<b , a<y<b$$
so $$ -b< -x<-a, a<y<b.$$
$$-b+a<y-x<b-a \mbox{ similary } -b+a<x-y<b-a$$
so $$\left | x-y \right| < b-a.$$
A: Here is an alternative form of the first answer, with some suggestions on how this proof could be designed.$
\newcommand{\calc}{\begin{align} \quad &}
\newcommand{\op}[1]{\\ #1 \quad & \quad \unicode{x201c}}
\newcommand{\hints}[1]{\mbox{#1} \\ \quad & \quad \phantom{\unicode{x201c}} }
\newcommand{\hint}[1]{\mbox{#1} \unicode{x201d} \\ \quad & }
\newcommand{\endcalc}{\end{align}}
\newcommand{\Ref}[1]{\text{(#1)}}
\newcommand{\then}{\Rightarrow}
\newcommand{\when}{\Leftarrow}
\newcommand{\true}{\text{true}}
\newcommand{\false}{\text{false}}
\newcommand{\abs}[1]{\lvert #1 \rvert}
$
You know something about $\;x\;$ and $\;y\;$ separately, and you have to prove something about the combination of the two.  Therefore seem easiest to start with the conclusion $\;\abs{x-y} < b-a\;$, and try and split this into a part about $\;x\;$ and a part about $\;y\;$.
Therefore we calculate:
$$\calc
    \abs{x-y} < b-a
\op\equiv\hint{basic property of $\;\abs{\cdot}\;$}
    x-y < b-a \;\land\; y-x < b-a
\op\when\hints{arithmetic: $\;p<q \land r<s \;\then\; p+r<q+s\;$, twice}
        \hint{-- this seems the simplest way to separate $\;x\;$ and $\;y\;$}
    x < b \land -y < -a \;\land\; y < b \land -x <-a
\op\equiv\hint{arithmetic, reorder}
    a < x < b \;\land\; a < y < b
\op\equiv\hint{definition of open interval}
    x \in (a,b) \;\land\; y \in (a,b)
\endcalc$$
