Proof verification: $|x-y|<ε\Leftrightarrow y-ε<x<y+ε$

126 Views Asked by At

Is the Following Proof Correct?

Let $x,y$ be real numbers and let $ε>0$ be a positive real. Show that $|x-y|<ε$ if and only if $y-ε<x<y+ε$.

Proof. Assume that $|x-y|<ε$, proposition 5.4.7 implies that either $x=y$, $x>y$ or $x<y$. In the first case the claim in question simplifies to $x-ε<x<x+ε$ which is evident when we consider that $ε>0$.

In the event $x>y$ it follows that $|x-y| = x-y<ε$ or equivalently $x<y+ε$. In addition since $y<x$ and $ε>0$ it follows that $y-ε<x$ in conclusion $y-ε<x<y+ε$. Likewise in the event where $x<y$ it follows that $|x-y| = y-x<ε$, adding $x-ε$ to both sides gives $y-ε<x$. In addition since $x<y$ and $ε>0$ it follows that $x<y+ε$ thus $y-ε < x < y+ε$.

Conversely assume that $y-ε<x<y+ε$ or equivalently $-ε<x-y<ε$. Again by trichotomy $x-y=0$ or $x-y<0$ or $x-y>0$. Addressing each case in order we see that if $x-y=0$ then $|x-y| = |0|=0<ε$. Now if $x-y<0$ then $|x-y| = -(x-y)=y-x$ but $-ε<x-y$ or equivalently $y-x<ε$, thus $|x-y|<ε$. Finally if $x-y>0$ then $|x-y| = x-y<ε$.

$\blacksquare$

3

There are 3 best solutions below

1
On BEST ANSWER

I think our OP Atif Farook's proof is OK, but following all the cases is a somewhat complex task. If we define $\vert z \vert$ as

$z \ge 0 \Longrightarrow \vert z \vert = z, \tag 1$

$z < 0 \Longrightarrow \vert z \vert = -z, \tag 2$

which it seems he does, then we can proceed in shorter order with aid of the

Lemma: $\vert z \vert < \epsilon \Longleftrightarrow -\epsilon < z < \epsilon$.

Proof of Lemma:

$\Longrightarrow:$ Given $\vert z \vert < \epsilon$, for $z \ge 0$, $-\epsilon < z = \vert z \vert < \epsilon$; for $z < 0$, $-\epsilon < -z = \vert z \vert < \epsilon \Longrightarrow -\epsilon < z < \epsilon$; so in both cases, $-\epsilon < z < \epsilon$;

$\Longleftarrow:$ Given $-\epsilon < z < \epsilon$, we have $-\epsilon < -z < \epsilon$; so $z \ge 0 \Longrightarrow \vert z \vert = z < \epsilon$; $z < 0 \Longrightarrow \vert z \vert = -z < \epsilon$.

End: Proof of Lemma.

Now taking $z = x - y$ we see that

$\vert x - y \vert < \epsilon \Longleftrightarrow -\epsilon < x - y < \epsilon \Longleftrightarrow y - \epsilon < x < y + \epsilon. \tag 3$

As my colleague Mohammad Riazi-Kermani affirmed, the proof is shortened using properties of $\vert \cdot \vert$, one of which we developed here in the Lemma.

0
On

Your proof could have been shorter using absolute value properties.

Note that $$ |x-y|<\epsilon\iff -\epsilon < x-y < \epsilon\iff y-\epsilon < x < y+ \epsilon$$

0
On

$% \require{begingroup} \begingroup \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{\eps}{\varepsilon} \newcommand{\equiv}{\Leftrightarrow} %$

You seem to be using the following definition or basic property of absolute value: if $\;z \ge 0\;$ then $\;|z| = z\;$ and else $\;|z|=-z\;$.

So a direct calculation could go as follows: $$\calc |x-y| < \eps \op\equiv\hints{case split on $\;x-y \ge 0\;$; use the above definition}\hints{-- we choose $\;(P \then \ldots) \land (\lnot P \then \ldots)\;$ over the}\hints{equivalent $\;(P \land \ldots) \lor (\lnot P \land \ldots)\;$ for the case split,}\hint{so that we have $\;\land\;$ at the outer level, as in our goal} (x-y \ge 0 \then x-y < \eps) \;\land\; (x-y < 0 \then -(x-y) < \eps) \op\equiv\hint{logic: expand $\;\then\;$; isolate $\;x\;$, as in our goal} (x < y \lor x < y+\eps) \;\land\; (y \le x \lor y-\eps < x) \op\equiv\hint{arithmetic: simplify using $\;\eps > 0\;$} x < y + \eps \;\land\;y - \eps < x \endcalc$$

$% \endgroup %$