\documentclass{amsart}
\usepackage{amsmath, amscd, amssymb}

\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{claim}[theorem]{Claim}

\theoremstyle{definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{question}[theorem]{Question}

\begin{document}

\title{Limits of Functions}

\maketitle

Given $f:\mathbb{R}\to \mathbb{R}$,
$\displaystyle \lim_{x\to p}f(x)=q$ means that $|f(x)-q|<\epsilon$ whenever $0<|x-p|<\delta$.

\begin{theorem}
$\displaystyle \lim_{x\to p}f(x)=q$ if and only if $\displaystyle \lim_{n\to\infty}f(p_n)=q$ whenever $\displaystyle \lim_{n\to\infty}p_n=p$ with $p_n\neq p$.
\end{theorem}

\begin{proof}
Suppose $\displaystyle \lim_{x\to p}f(x)=q$ and let $\{p_n\}$ be any sequence of real numbers converging to $p$, but not equal to $p$.
Let $\epsilon>0$ be arbitrary.
Then there exists a $\delta>0$ such that $|f(x)-q|<\epsilon$ if $0<|x-p|<\delta$.
On the other hand, there is a natural number $N$ such that for all $n> N$, $0<|p_n-p|<\delta$.
Hence for all $n>N$, $|f(p_n)-q|<\epsilon$, and so $\{f(p_n)\}$ converges to $q$.

Suppose $\displaystyle \lim_{x\to p}f(x)\neq q$.
Then there exists some $\epsilon>0$ such that for every $\delta>0$ there exists some $x(\delta)\in\mathbb{R}$ for which $0<|x(\delta)-p|<\delta$ but $|f(x(\delta))-q|\geq\epsilon$.
Hence $\displaystyle \lim_{n\to\infty}f(x(\frac{1}{n}))\neq q$ but $\displaystyle \lim_{n\to\infty}x(\frac{1}{n})=p$.
\end{proof}


\end{document}
