# General Topology: the inverse of a constant function

We have always been taught that a function assigns to every element in the domain a single unique element in the range. If a rule of assignment assigns to one element in the domain more than one element in the range then it isn't a function.

Now in Munkres' Topology, on page 107, it says:

"If $f:X \rightarrow Y$ maps all of $X$ into the single point $y_0$ of $Y$, then $f$ is continuous."

But we cannot speak of the continuity of $f$ unless $f^{-1}$ is defined, because the topological definition of continuity (in Munkres and other textbooks) states that $f:X \rightarrow Y$ is continuous if for every open subset $V$ of $Y$, the set $f^{-1}(V)$ is open in $X$.

How then can the constant function above be continuous when $f^{-1}$ maps a single $y_0$ to ALL $x \in X$? How is it a function? Or is the elementary definition of "function" relaxed in topology?

• The $f^{-1}$ in that definition is not the compositional inverse of $f$, but the function $f^{-1}:P(Y)\to P(X)$ defined by $f^{-1}(A)=\{x\in X:\ f(x)\in A\}$ for $A\subset Y$, where $P(X)$ denotes the set of subsets of $X$. The same symbol is used for two things, but usually one can tell which is which from the context (the nature of the argument between parentheses). – arts Dec 2 '17 at 14:59
• If $f:\{1,2,3\}\to \{1,2,\{1,2\}\}$ is defined by $f(1)=1$, $f(2)=2$, and $f(3)=\{1,2\}$, I don't know how to tell what is $f^{-1}(\{1,2\})$. :-p But well ... In those cases ask the writer. – arts Dec 2 '17 at 15:06

$f^{-1}(U)=\{x\in X | f(x)\in U\}$, here we do not need that the function $f^{-1}$ there exist, we only use definition of the pre-image of set by $f,$ and off course any constant function is continuous because given any pen set $U$ in $Y$ we have two possibilites, $y_0\in U$ in this case $f^{-1}(U)=X$ which is open and if $y_0\notin U$ then $f^{-1}(U)=\emptyset$ which is open.
$f^{-1}$ denoting a function needs not to be defined.
$f^{-1}(V)$ denoting the preimage of $V$ w.r.t. $f$ needs to be defined (and is) for every set $V\subseteq Y$.
It is defined as: $$f^{-1}(V):=\{x\in X\mid f(x)\in V\}$$
If $f$ is constant then $f^{-1}(V)\in\{\varnothing, X\}\subseteq\tau_X$ for every $V\subseteq Y$ so $f$ is continuous.