TITLE: Definition of $\limsup$ and $\liminf$ for functions
QUESTION [6 upvotes]: In my notes, I have written that
\begin{align}
\limsup_{x\to a} f(x) & = \inf_{\delta\to0}\sup\left[f(x): \Vert x-a \Vert < \delta \right] \\
 & = \inf_{n\to \infty}\sup\left[ f(x): \Vert x-a \Vert <\frac{1}{n} \right] \\
 & = \lim_{n\to \infty}\sup\left[ f(x): \Vert x-a\Vert < \frac{1}{n} \right]
\end{align}
Can someone help me understand the first line? I thought that the supremum is always a number, so why we are taking the infimum of a number?
Also I tried drawing a picture to illsute what the heck is going on. But basically my gist is that given an interval around $a$, as $\delta \to 0$, that supremum over that interval is the limit supremum

REPLY [5 votes]: For some $a$ and for every $\delta>0$, consider the set $A(\delta,a)=\left\{f(x): 0<\Vert x-a \Vert < \delta \right\}$ and the number $g(\delta,a)=\sup A(\delta,a)$. 
Then, $\limsup\limits_{x\to a} f(x)$ is, equivalently, $\inf\limits_{\delta>0}g(\delta,a)$ or $\lim\limits_{\delta\to0}g(\delta,a)$. (But note that $\inf\limits_{\delta\to0}$ does not exist, only $\inf\limits_{\delta>0}$ does.)