I'm doing some self-study on Banach spaces and this statement came up in a proposition: Let $X$ be locally compact and $C_0(X)$ be the set of all continuous functions $f:X\to\mathbb{C}$ such that for all $\varepsilon>0$, $\{x:|f(x)|\geq \varepsilon\}$ is compact. Then $C_0(X)$ is Banach space with norm $\|\cdot\|_{C_b(X)}$.
First, I need to show that $C_0(X)\subset C_b(X)$, but I'm a little unsure of my proof, so I'm posting to see what is incorrect about the logic. Since $A_{\varepsilon}:=\{x:|f(x)|\geq \varepsilon\}$ is compact, $\cap_{\varepsilon=1}^{\infty}A_{\varepsilon}=\{x:|f(x)|=\infty\}$ is compact. Therefore, $f(\cap_{\varepsilon=1}^{\infty}A_{\varepsilon})$ is compact. So, we can find $M$ such that $|f(y)|\leq M$ for all $y\in \cap_{\varepsilon=1}^{\infty}A_{\varepsilon}=\{x:|f(x)|=\infty\}$. Hence, $\{x:|f(x)|=\infty\}=\emptyset$. Do you believe the proof for containment is sound, or is there something big I'm missing here?
I am slightly confused about the notation $\{x : |f(x)| =\infty\}$ notation. Indeed, a function could be infinity nowhere and yet be unbounded, the best example being $f(x) = x$ on $\mathbb R$. Next, what is $|f(\cap_\epsilon A_\epsilon)|$? You have said it is some compact set, but we want to show it is empty, if at all. So there are issues.
The answer is even simpler. If $f \in C_0(X)$, then fix $\epsilon > 0$, so that the set $\{x : |f(x)| \geq \epsilon\}$ is compact. Now, every continuous function attains its maximum and minimum on a compact set, therefore so does $|f(x)|$ on $\{x : |f(x)| \geq \epsilon\}$. But on the rest, $|f(x)| < \epsilon$. Hence, $|f(x)|$ is bounded everywhere on $X$, therefore $f \in C_b(X)$.
EDIT : We claim that $f \in C_b(X)$. We will do this using notation established by the OP himself.
Indeed, let $f$ be unbounded. Then there exist $x_n \in X$ so that $|f(x_n)| > n$. Now, note that $x_n \in A_{n}$.
Hence, $A_n$ are non-empty and compact for all $n$, and are contained in the compact space $A_1$. By the finite intersection property of non-empty compact sets, some element $x \in A_n$ for all $n$, which is a contradiction since $f(x)$ is some fixed real number so $|f(x)| < n$ for some $n$. Consequently , it follows that $A_n$ is empty for some $n$, and hence $f$ is bounded.