To show, that $\epsilon$-neighborhood is contained in Set I need some help. Can somebody check if I proved one statement correct. So there is an example 2.2.9 Examples(a) in the book G.Bartle R. Sherbert "Introduction to real analysis".
Let $U:=\{x:0<x<1\}.$ If $a \in U$, then let $\epsilon$ be the smaller of the two numbers $a$ and $1-a$. Then we have to show, that $V_\epsilon(a)$ is contained in $U$
$\textbf{Proof by contradiction}:$ Let be $a \in U$ and $\epsilon$ be the smaller of the two numbers $a$ and $1-a$. Suppose that $V_\epsilon(a)$ is $\textbf{not}$ contained in $U$, then $\exists$ some $x \in V_\epsilon(a)$, but $x \not\in U$. If $x \in V_\epsilon(a)$, then by definiton of neighborhood we have $|a-x|<\epsilon<a $or $|a-x|<\epsilon<1-a$, but since $x \not \in U$, $|a-x|>a>\epsilon$ or $|a-x|>1-a>\epsilon$. Contradiction. (With another words, I found an element $x$, such that if $x \not \in U,$ it can't be $\in V_\epsilon(a)$)
Is my proof correct? Thank you!
 A: Let $U=(0,1)$, $a\in U$ and $\epsilon=\min(a,1-a)$. You have to show that $(a-\epsilon,a+\epsilon)\subset U$ and you decided to prove it by contradiction, hence you assumed $(a-\epsilon,a+\epsilon)\not\subset U$, i.e. $(a-\epsilon,a+\epsilon)$ contains some $x\notin U$. Such an $x$ satisfies both:

*

*$|x-a|<\epsilon$, i.e. (by definition of $\epsilon$) $|x-a|<a$ and $|x-a|<1-a$

*$x\le0$ or $x\ge1$ (by definition of $U$).

Let's use cases.
Case 1: $x\le0$. Then, $|x-a|=a-x\ge a$, which contradicts $|x-a|<a$.
Case 2: $x\ge1$. Then, $|x-a|=x-a\ge1-a$, which contradicts $|x-a|<1-a$.
In both cases, we obtained the desired contradiction, which ends the proof.
A: $U:=\{x:0<x<1\}. a\in U. \epsilon=min(a,1-a)$
Let's use cases.
Case 1: $a<1-a\implies \epsilon=a$.
Since $a<1-a$ then $2a<1$.
$V_\epsilon(a)= \{x: a-\epsilon<x<a+\epsilon\}=\{x:0<x<2a\}$. But since $2a<1$ we see $V_\epsilon(a) \subset U$
Case 2: $1-a<a\implies \epsilon=1-a$
$1-a<a \implies 2a>1\implies 2a-1>0$.
$V_\epsilon(a)=\{ x:a-\epsilon<x<a+\epsilon  \}=\{ x:2a-1<x<1 \}$
By the above, we have $2a-1>0$ so again we have $V_\epsilon(a)\subset U$.
