Given a topological space $X$ and a Banach space $V$, I wonder for which open sets $U$ it is possible to construct a continuous function $f: X \to V$ such that $f^{-1}[B(0, 1)] = U$ - or maybe there is some nonempty open $V \subseteq U$ such that $f^{-1}[B(0, 1)] = V$. Perhaps some separation properties can ensure this, but I do not see an obvious way to construct this (maybe some Urysohn's lemma argument?).


The main goal is to construct a function that is continuous, but not continuous with respect to an algebra. The definition for this is given an algebra $\mathcal A$ on $X$, we say that $f: X \to V$ is $\mathcal A$-continuous at $x \in X$ if for every $\varepsilon > 0$ there are $A\_1, \dots, A\_n \in \mathcal A$ such that $\bigcup A\_i$ is a neighborhood for $x$ and $\mathrm{diam}(f[A\_i]) < \varepsilon$ for each $i$.



Constructing a continuous function with a prescribed preimage
Open sets with the required property are exactly functionally open sets.


Let us recall that a subset $U$ of a topological space $X$ is *functionally open in* $X$ if $U=f^{-1}[V]$ for some continuous function $f:X\to \mathbb R$ and some open set $V\subseteq \mathbb R$. It is well-known that an open subset $U$ of a normal space $X$ is functionally open if and only if $U$ is of type $F\_\sigma$.


**Theorem.** For a subset $U$ of a topological space $X$, the following conditions are equivalent:


1. $U$ is functionally open in $X$;
2. For any Banach space $Y\ne\{0\}$ there exists a continuous function $f:X\to Y$ such that $f^{-1}[B]=Y$ where $B=\{y\in Y:\|y\|<1\}$ is an open unit ball in $Y$.


*Proof* The implication (2)$\Rightarrow$(1) is trivial becase the real line is a Banach space. To prove the implication (1)$\Rightarrow$(2), assume that the set $U$ is functionally open in $X$. Then $U=g^{-1}[V]$ for some continuous function $g:X\to\mathbb R$ and some open set $V\subseteq \mathbb R$. If $V=\mathbb R$, then $U=X$ and then $U=X=f^{-1}[B]$ for the constant function $f:X\to \{0\}\subset Y$.


So, we assume that $V\ne \mathbb R$. In this case, consider the continuous function $h:\mathbb R\to[0,1]$, $h:t\mapsto \min\{1,\min\_{s\in \mathbb R\setminus V}|t-s|\}$. Observe that $h^{-1}(0)=\mathbb R\setminus V$. Choose any point $y\_1\in Y$ with $\|y\_1\|=1$ and consider the function $f:X\to Y$, $f:x\mapsto (1-h\circ g(x))y\_1$. It is easy to check $f^{-1}[B]=U$. $\square$


