\documentclass[10pt,addpoints]{exam}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{pgfplots}
\usepackage{tikz}
\usepackage{mathtools}
\usepackage{mathrsfs}
\usepackage{enumerate}
\usepackage{circuitikz}

\pagestyle{head}

\begin{document}
\noindent \underline{Homework 5 -- MATH 4590 Spring 2018} \\

\begin{enumerate}
\item Let $(M,d)$ be a metric space and let $U \subset M$. Prove that $U$ is open if and only if none of its points are a limit of its complement. \\
\textit{Proof}: ($\longrightarrow$) We need to prove ``if $U$ is open, then none of its points are a limit of $U^c$." Assume that $U$ is open. We must show that none of its points are a limit of its complement. Assume that $p \in U$ is the limit of a sequence $(p_n)$ lying in $U^c$. This means that $\forall \epsilon > 0 \exists N \in \mathbb{N}$ such that $n \geq N$ implies $d(p_n,p)<\epsilon$. Since $U$ is open, we know there exists some $r > 0$ such that the set of all points $q$ that are a distance less than $r$ from $p$ all lie in $U$, i.e. $B=\{q \in M \colon d(p,q)<r \} \subset U$. However, if we take $\epsilon = r$, the convergence of $(p_n)$ implies that there is a $N \in \mathbb{N}$ so that for all $n \geq N$, $d(p_n,p)<\epsilon=r$. By definition of $B$, this means that $p_n \in B$. But this is a contradiction, because $B \subset U$ while $p_n \in B$ and $p_n \in U^c$. Therefore no such sequence $(p_n)$ can exist.

($\longleftarrow$) We need to prove ``if none of the points of $U$ are a limit of $U^c$, then $U$ is open". Suppose that $U$ is not open. Then there is a point $p \in U$ such that for \textbf{any} $r>0$, the collection $\{ q \in M \colon d(p,q)<r\} \not\subset U$, from which we may conclude that $\{ q \in M \colon d(p,q)<r\} \cap U^c \neq \emptyset$. Let $r_n=\dfrac{1}{n}$ and choose any $p_n \in \{q \in M \colon d(p,q) < r_n \} \cap U^c$. This gives us a sequence $(p_n)$ in $U^c$. Notice in particular, that $d(p_n,p) < \dfrac{1}{n}$.  \\
\hspace*{2em}\underline{Claim}: $(p_n)$ converges to $p$ \\
\hspace*{2em}\textbf{Proof of claim}: Let $\epsilon > 0$ choose $N \in \mathbb{N}$ with $N > \dfrac{1}{\epsilon}$. Then for any $n \geq N$, we have $\dfrac{1}{n} \leq \dfrac{1}{N} < \epsilon$, \\
\hspace*{2em} so calculate
\[d(p_n,p) < \dfrac{1}{n} < \epsilon. \]
\hspace*{2em} completing the proof of the claim. \\
But this is a contradiction to our hypothesis, because $(p_n)$ is a sequence lying in $U^c$ that converges to $p$. In other words, $p \in U$ is a limit of $U^c$. Therefore our assumption that $U$ was not open is invalid, hence $U$ is open, completing the proof. $\blacksquare$

\item Prove that the union of finitely many closed sets is a closed set. \\
\textit{Proof}: Let $n \in \{1,2,3,\ldots\}$ be fixed and let $C_1, C_2, \ldots, C_n$ be closed sets in a metric space $(M,d)$. We need to show that $\mathcal{C}=\displaystyle\bigcup_{k=1}^n C_k$ is closed. Consider the sets $C_1^c, C_2^c, \ldots C_n^c$. By Theorem~4 in Chapter 2 (complement of open set is closed set and complement of closed set is open set), we know that $C_1^c, \ldots, C_n^c$ are open sets. By Theorem~5 in Chapter 2 (set of all open subsets of $M$ is a topology), we know that any intersection of finitely many open sets is an open set. Therefore we know that $\displaystyle\bigcap_{k=1}^n C_k^c$ is an open set. Again by Theorem~5, we know that $\left( \displaystyle\bigcap_{k=1}^n C_k^c \right)^c$ is a closed set. By deMorgan's law for sets and the fact that that complements cancel each other, we compute
\[\left( \displaystyle\bigcap_{k=1}^n C_k^c \right)^c\stackrel{\text{deMorgan}}{=} \displaystyle\bigcup_{k=1}^n (C_k^c)^c=\displaystyle\bigcup_{k=1}^n C_k.\]
So, since we knew already that $\left( \displaystyle\bigcap_{k=1}^n C_k^c \right)^c$ was a closed set and we just saw that $\left( \displaystyle\bigcap_{k=1}^n C_k^c \right)^c=\displaystyle\bigcup_{k=1}^n C_k$, we must conclude that $\displaystyle\bigcup_{k=1}^n C_k$ is a closed set. In other words, the union of finitely many closed sets is a closed set, completing the proof. $\blacksquare$
\item Consider $(M,d)=(\mathbb{R}^2,d)$, where $d$ is the Euclidean metric. We define the distance between two nonempty sets $A, B \subset \mathbb{R}^2$ by the following:
$$\mathrm{dist}(A,B)=\inf \{ d(a,b) \colon a \in A, b \in B\}.$$
Give an example of two nonempty \textit{disjoint} sets $A, B \subset \mathbb{R}^2$ such that $\mathrm{dist}(A,B)=0$. \\
\textit{Solution}: 
\begin{tikzpicture}[scale=2]
\draw (0,-1) -- (0,1);
\draw (-1,0) -- (1,0);
\draw[dashed,fill=blue,opacity=0.5] (-0.5,0) circle (0.5);
\draw[dashed,fill=red,opacity=0.5] (0.5,0) circle (0.5);
\end{tikzpicture} \\
Call the {\color{blue} blue disk} $A$ and the {\color{red} red disk} $B$. Notice that the boundaries of $A$ and $B$ are not included (this is necessary to satisfy $A \cap B = \emptyset$, i.e. that $A$ and $B$ are disjoint). We claim that $\mathrm{dist}(A,B)=0$. To see this, let $(a_n)$ in $A$ be the sequence $a_n=\left( -\dfrac{1}{n}, 0 \right)$ and let $(b_n)=\left( \dfrac{1}{n},0 \right)$. Then, 
\[ d(a_n,b_n) = \sqrt{ \left( -\dfrac{1}{n} - \dfrac{1}{n} \right)^2 - (0-0)^2 } = \sqrt{ \dfrac{4}{n^2} } = \dfrac{2}{n}.\]
Since the limit as $n \rightarrow \infty$ of this distance is zero, we conclude that $\inf \{ d(a_n,b_n) \colon n=1,2,3,\ldots \} = 0$ and hence $\mathrm{dist}(A,B)=0$.
\end{enumerate}

\end{document}