Closed and open sets through a function between metric spaces

continuityfunctional-analysisfunctionsmetric-spaces

My professor started an exercise in class with various points. He did not finish it though: he left some of the points as homework and said that he will finish the last one in class. I'm trying it and I would like to have some hints (not full answers, he is going to solve it anyway) and maybe some clarification.

I shall write the previous point first, since the other starts from there:

  1. Let $(X, d_x)$ and $(\Bbb R, \vert \cdot \vert)$ be metric spaces where $\vert \cdot \vert $ is the absolute value function, let $f:X \to \Bbb R$ be a function between these two metric spaces.
    Let $ A= \{(x,y) \in X\times \Bbb R \mid y\gt f(x)\} $ and $ B=\{(x,y) \in X\times \Bbb R \mid y\ge f(x) \} $. Show that, if $f$ is continuous, then $A$ is open and $B$ is closed.

I managed to prove this, and I'm interested in the next request.

  1. Show that, in general, the converse is not true

I interpeted it as : "give an example of a non continuous function such that $A$ is open and $B$ is closed, thus showing that the fact that $A$ is open and $B$ is closed does not imply that $f$ must be continuous"

However, I'm having some problems finding such a function. I tried choosing $X=\Bbb R$, but it seems to me that the only good candidate would be a step-like function, and this kind fails to induce both the closed and the open set at the same time, only one of the two. This makes me think that with $(X,d_x)=(\Bbb R,d_x)$ the double implication holds, but I did not try to prove this: does it? If yes, where should I look for finding such function? If no, what am I doing wrong in $\Bbb R$? In general, is my approach correct or I should use something else?

Thank you.

Edit: As we all suspected, and as the user Jochen kindly showed in one of the replies, with the phrase "show that in general the converse is not true" he meant that we had to assume only one of the two hypothesis (i.e. assuming either that $A$ is open or that $B$ is closed, not both at the sames time), and in that case using the step function mentioned above it becomes trivial.

Best Answer

I do not believe your Prof. If $A=\{(x,y)\in X\times \mathbb R: y> f(x)\}$ is open, and $t\in \mathbb R$ is fixed, then $A_t=\{x\in X: t>f(x)\}$ is open in $X$: Indeed, for $x\in A_t$, we have $(x,t)\in A$ and hence there is a neighbourhood $U$ of $(x,t)$ in the product topology of $X\times \mathbb R$ with $U\subseteq A$. But $U$ contains $B(x,\varepsilon)\times (t-\varepsilon,t+\varepsilon)$ for some $\varepsilon>0$ (where $B(x,\varepsilon)$ is a ball in the metric space $X$) so that, in particular $(\xi,t)\in U\subseteq A$ for all $\xi\in B(x,\varepsilon)$ and thus $t>f(\xi)$. This shows $B(x,\varepsilon)\subseteq A_t$, and hence $A_t$ is open. (Another argument would be the continuity of $X\to X\times \mathbb R$, $x\mapsto (x,t)$.)

Since the complement $B^c=\{(x,y)\in X\times \mathbb R: y< f(x)\}$ is open, the same argument shows that $\{x\in X:r<f(x)\}$ is open for every $r\in\mathbb R$. Hence the intersection $\{x\in X: f(x)\in (r,t)\}$ is open and therefore, the preimage of every open subset of $\mathbb R$ is open, which is the continuity of $f$.

Anything wrong with this argument?


Edit. Perhaps the question is to be interpreted that neither the openess of $A$ nor the closedness of $B$ alone imply continuity. It seems that openess of $A$ is upper semi-continuity (which does not imply continuity as, e.g., the zero function on $\mathbb R$ modified to $f(0)=-1$ shows) and closedness of $B$ is lower semi-continuity.

Anyway, don't forget to tell us the solution of your Prof.

Related Question