Sum of open/closed/compact sets in $\mathbb{R}^n$ open/closed/compact I know that the following exercise you can find on internet maybe with solution too, but I want to know, if my "solutions" are correct.
Let $X,Y\subset \mathbb{R}^n$, $X+Y=\{x+y;x\in X, y\in Y\}$. Prove it or find a counterexample.
1) If X, Y open, then X+Y is open
2) If X, Y closed, then X+Y is closed
3) If X, Y compact, then X+Y is compact
My ideas: 
1) is true. Could you have a look if my solution is correct? My try: We know that for all $x\in X \exists \epsilon >0: B_{\epsilon}(x)=\{b\in X; \|b-x\|<\epsilon\}\subset X$, and for all $y\in Y \exists \epsilon' >0: B_{\epsilon'}(x)=\{b'\in X; \|b'-x\|<\epsilon'\}\subset Y$, because $X$ and $Y$ are open. Now: $\|z-(x+y)\|=\|z-x-y\|=\|z'-z'+z-x-y\|=\|z'-x+z-z'-y\|\le\|z'-x\|+\|z-z'-y\|<\epsilon+\epsilon'$. Define $\eta =\epsilon +\epsilon'$. We have: for $x+y\in X+Y \exists \eta >0, \eta =\epsilon +\epsilon': B_{\eta}(x+y)=\{z\in X+Y; \|z-(x+y)\|<\eta\}\subset X+Y$.
I'm not sure, if this is correct. If my "solution" is false, could you help to correct?
2) First I said that this is true, but after googeling I found out that you can find a counterexample. Could you help me to find the mistake of my "solution"? My try:
For every sequence $(x_n)\subseteq X$ such that $x_n\to x_0$, $x_0\in \mathbb{R}^n$, it is $x_0\in X$, because X is closed. For every sequence $(y_n)\subseteq Y$, such that $y_n\to y_0$, $y_0\in \mathbb{R}^n$, it is $y_0\in Y$, because Y is closed.
Let $(z_n)\subseteq X+Y$ be a sequence, $z_n=x_n+y_n$ for every $n\in\mathbb{N}$ and let $z_n\to z_0 \in \mathbb{R}^n$. But it is $z_n=x_n+y_n\to x_0+y_0$ and by the uniqueness of limits $z_0=x_0+y_0\in X+Y$, because X and Y are closed.
But my try has to be wrong I think, because you find counterexamples for 2).
And I don't find the mistake :(, could you help me?
3) Is it correct? I would say yes. Maybe I can prove it with a continuous function and $X+Y$ as it's compact image.
Regards
 A: Something really useful to learn for these type of exercises is the following piece of information.
Let $y\in \mathbb{R}^{n}$ be fixed and define $\varphi_{y}:\mathbb{R}^{n}\to \mathbb{R}^{n}$ by setting $\varphi_{y}(x)=x+y$. Now $\varphi_{-y}\circ \varphi_{y}(x)=(x+y)-y=x$ and similarly $\varphi_{y}\circ \varphi_{-y}(x)=x$. Hence $\varphi_{y}$ is a bijection and $\varphi_{y}^{-1}=\varphi_{-y}$. Both $\varphi_{y}$ and $\varphi_{-y}$ are continuous functions so $\varphi_{y}$ is a homeomorphism.
Using the above property, many exercises of this sort become much easier. 


*

*In particular, for any open set $X\subseteq \mathbb{R}^{n}$ the set $X+y$ is an open set for all $y\in\mathbb{R}^{n}$ (since $\varphi_{y}$ is a homeomorphism). In particular,
\begin{align*}
X+Y=\bigcup_{y\in Y}(X+y)
\end{align*}
is an open set as the union of open sets.

*Since arbitrary unions of closed sets aren't closed, we can't apply the above reasoning. But there is a standard counter example for this part. Take $X=\{-n+\frac{1}{n}:n\in\mathbb{N}\}$ and $Y=\mathbb{N}$. Both $X$ and $Y$ are closed but $X+Y=\left\{(m-n)+\frac1n\:;\:m,n\in\mathbb{N}\right\}$ has a subset $A:=\{\frac{1}{n}:n\in\mathbb{N}\}$, which has a limit point at zero but $0\notin X+Y$. Hence $X+Y$ is not closed.

*Since $X$ and $Y$ are compact then $X\times Y\subseteq\mathbb{R}^{2n}$ is compact, and use the continuity of the function $(x,y)\mapsto x+y$ and the fact that continuous images of compact sets are compact, to conclude that $X+Y$ is compact.
A: 3)The sum is a continuous operation. The image $X+Y$ of the compact set $X×Y$ is therefore compact
A: A famous counterexample is the sum of the ice-cream cone
$$
A=\{x\in \mathbb R^3: x_2^2 + (x_3-x_1)^2 \le x_1^2, \ x_1\ge 0\}
$$
and the line
$$
B=\{x\in \mathbb R^3: x_2=x_3=0\}.
$$
Then
$$
A+B = \{ x\in \mathbb R^3: \ x_3>0 \text{ or } x_2=x_3=0\},
$$
which is not closed: $x\in A+B$ means there is $t\in \mathbb R$ 
such that $x- \pmatrix{t\\0\\0}\in A$, that is, $x_1-t\ge0$ and
$$
x_2^2 + (x_3-(x_1-t))^2 \le (x_1-t)^2,
$$
which is equivalent to 
$$
0\le (x_1-t)^2 - (x_3-(x_1-t))^2- x_2^2 
= 2x_3(x_1-t)- x_3^2 - x_2^2 .
$$
Hence the point $(0,1,0)$ is not in $A+B$,
but
$$
\pmatrix{ 0\\ 1 \\ 1/n} = \pmatrix{n+1\\1\\1/n} + \pmatrix{-(n+1)\\0\\0} \in A+B.
$$

As you might already know, the sume $A+B$ can be proven to be closed if $A$ is compact and $B$ is closed.
A: The set of integers,Z and qZ where q is a  rational number, are closed subset of R
but Z+qZ is not closed in R as it is dense in R.
A: A set $U$ is open if and only if every sequence converging to a point in $U$ is eventually in $U$. Let $A$ be open and $B$ be any subset. Let $x_n\rightarrow a+b\in A+B$. Then $x_n-b\rightarrow a\in A$. Since $A$ is open it means $x_n-b\in A\forall n\geq N$ or $x_n\in A+B\forall n\geq N$. Hence $A+B$ is open.
$A=\{(x,\frac{1}{x}):x>0\}$ and $B=\{(x,-\frac{1}{x}):x<0\}$ are closed sets. Now $(n,\frac{1}{n})+(-n,\frac{1}{n})=(0,\frac{2}{n})\rightarrow(0,0)\notin A+B$ shows that $A+B$ is not closed.
A metric space is compact if and only if sequentially compact. Let $A,B$ be compact and $(a_n+b_n)$ be any sequence in $A+B$. Then $(a_n)$ has a convergent subsequence $(a_{n_k})$. The sequence $(b_{n_k})$ also has a convergent subsequence $(b_{n_{k_l}})$. Then $(a_{n_{k_l}}+b_{n_{k_l}})$ is a convergent subsequence of $(a_n+b_n)$. Hence $A+B$ is compact.
