Proof that in a metric space $X$, if $\phi \in \mathbb{R}^X$ is not continuous, then $\{ x \ | \ \phi(x) \geq \alpha \}$ is not necessarily closed In the last few days I already posted two alternative proofs (here and the other available link) of the basic result in metric spaces that, given a continuous function $\phi \in \mathbb{R}^X$, the set $\{ x \ | \ \phi(x) \geq \alpha \}$ is closed for any $\alpha \in \mathbb{R}$. As explained there, I am doing the following because I realized my grasp of metric spaces and continuity arguments there is really not as it should be.
In the book I am studying, I found as a natural extension of that proposition the following point:
the continuity of $\phi$ is necessary for the proposition to hold.
Hence, here there is the "proof" I came up with. I am particularly interested about feedback concerning it, because I framed it as an existential proof, and this is another topic I am really (really!) bad at, both in terms of intuition and writing skills.
Of course, it would be nice to know overall if – beyond the proof itself – the strategy behind this specific proof is correct, or basically it is just all wrong.
Concerning the notation, $\delta (\varepsilon, x)$, for an arbitrary $x \in X$ denotes a $\delta$ that can possibly depend on $\varepsilon$ and $x$, while $N_{\varepsilon, X} (x)$ denotes the $\varepsilon$-nhood of $x \in X$.

Proposition: In an arbitrary metric space $X$, if the function $\phi \in \mathbb{R}^X$ is not continuous, then the set $\{ x \ | \ \phi(x) \geq \alpha \}$ is not necessarily closed.
Proof:
We prove that the set $G:= \{ x \ | \ \phi(x) < \alpha \}$ is not open. Hence, we have to show that there is a $\alpha \in \mathbb{R}$ and a $\bar{x} \in G$ such that, for all $\bar{\delta} >0$, there is a $w \in N_{\bar{\delta}, X} (\bar{x})$ such that $w \notin G$.
Let $\bar{\delta} >0$ be arbitrary. By assumption, $\phi \in \mathbb{R}^X$ is not continuous, hence there is a $z^* \in X$ and a $\varepsilon^* > 0$ such that for every $\delta (\varepsilon^*, z^*) >0$ there is a $y \in \phi (N_{ \delta, X} (z^*))$ such that $y \notin N_{\varepsilon^*, \mathbb{R}} (\phi (z^*))$. This is equivalent to write that there is a $t \in N_{ \delta, X} (z^*)$ such that $t \notin \phi^{-1} ( N_{\varepsilon^*, \mathbb{R}} (\phi (z^*)) )$.
By setting $\delta ( \varepsilon^*, z^*)=\bar{\delta}$, $\alpha = \phi (z^*) + 2\varepsilon^*$, $\bar{x} = z^*$, and $w = t$ the result follows. $\square$

I am really looking forward to any feedback concerning this proof, because I have some points that still leave me a bit insecure.
As always thank you for your time.
 A: At the end of your proof, you set $\alpha = \phi(\bar{z}) - \epsilon$, $x^*=\bar{z}$, but $x^* \not\in G : = \{ \phi(x) < \phi(\bar{z}) - \epsilon\}$.
Edit: I believe you want to set $\alpha = \phi(z) + \epsilon$, that way at least
$z=x\in G$ and for each $B_\delta(x)$, there exists $t\in B_\delta(x)$ such that $$\phi(t) \not\in (\phi(z) - \epsilon, \phi(z) + \epsilon)$$
However, we can not say $t\not\in G$ since we still can have $\phi(t) <\phi(z) - \epsilon$, and have $t\in G$.
A: Suppose $f$ is not continuous, then there is $x_0\in X$ and a sequence $x_n\in X$ such that $x_n\to x_0$, but $|f(x_n)-f(x_0)|>\varepsilon>0,\forall n\in\mathbb{N}$. Without loss of generality, let $f(x_n)\geq f(x_0)$,for each $n\in \mathbb{N}$(else we could work with a subsequence or work with $\leq \alpha$). let $\alpha=f(x_0)+\varepsilon/2$, the set $B=\{x\in X:f(x)\geq\alpha\}$ is not closed, since $(x_n)_n\subseteq B$, but $x_0\notin B$.
A: Let A be any set that isn't closed.  Define $\phi$(x) = $\alpha$  if x is in A; =  $\alpha$ - 1 is x is not in A.  Then $\{ x \ | \ \phi(x) \geq \alpha \}$ = A which is not closed.
