# A discontinuous function $f: X \rightarrow Y$ satisfying: for each closed ball $B$ of $Y, f^{-1}(B)$ is closed in $X$

Find a function $f: X \rightarrow Y$ between metric spaces $X$ and $Y$ that is not continuous but has the property that for each closed ball $B$ of $Y, f^{-1}(B)$ is closed in $X$

Solution Attempt:

A continuous function $f : X \rightarrow Y$ is defined as : For every open set $V$ in $Y$, there's an open set $U \in X$ such that $f(U) \subseteq V$.

Strategy: The issue with closed sets while defining continuity can be that a closed set $U_o \in X$ can also contain limit points which may not get mapped to the closed set $V_o$.

EDIT: Let $f: X \rightarrow Y$ be a an identity function where $X$ is a non-discrete metric space and $Y$ is a metric space with the discrete metric. (As far as it's set elements were concerned, $X$=$Y$..)So, $f(x) = x ~\forall x \in X$. $X$ is non discrete metric space $\implies$ there is atleast one subset of $X$ which is closed but not open in $X$. Could you please explain how these arguments tell us that $f^{-1}(x_{|Y}) = x_{|X}$ is closed in $X$? . Thank you!

• If you endow $Y$ with the discrete metric, the balls have a particularly simple structure. – Daniel Fischer Aug 26 '15 at 13:16
• If $f^{-1}(B) \subseteq X$ were closed for any closed set $B \subseteq Y$, then the function is continuous. So you need to make sure that there are many closed sets that aren't balls. As Daniel Fischer points out in the above comment, putting the discrete metric (all distances that aren't $0$ are $1$) on $Y$ works nicely. – Arthur Aug 26 '15 at 13:18
• Interesting (at least for me) side question: Can we stil find a counter example if we insist on $Y=\Bbb{R}^d$ with the usual Euclidean metric? At least any such function will be Borel measurable, but is it continuous? – PhoemueX Aug 26 '15 at 17:57
• "But, what makes the pre-image of the singleton sets closed in $X$?" Simply define the function that way! Just make sure that in your example there's at least one closed set (not a closed ball) in $Y$ such that $f^{-1}(Y)$ is not closed. – Riley Jan 17 '18 at 4:25
• Whether the preimages of singletons are closed depends on $X$ and $f$ of course. But if $f$ is injective, the preimage of a singleton is either a singleton or empty, thus closed (since $X$ shall be a metric space, and singletons are closed in $T_1$-spaces). And that makes it easy to find such an $f$. Let $X$ be any non-discrete metric space, $Y$ the same set, but endowed with the discrete metric, and $f$ the identity. – Daniel Fischer Jan 17 '18 at 13:44