Approximation of subset of Hilbert space by finite-dimensional functions I cannot come up with an answer to the following problem, which I came across:
Let $H$ be a separable, real Hilbert space with ONB $\{e_n\}_{n \in \mathbb{N}}$ and let $U \subseteq H$ be open (if it helps, we may instead consider $U$ closed). Then it is commonly known that there exist continuous, non-negative functions $f_n: H \to \mathbb{R}$, $n \in \mathbb{N},$ such that $f_n$ converges monotonically increasing pointwise to $\mathbf{1}_U$.
My question is: Can I choose these functions such that $f_n \in C_b(\mathbb{R}^d)$ for each $n$, where $d=d_n$ is of course allowed to depend on $n$? In saying so, I identify functions $f \ \in C_b(\mathbb{R}^d)$ with the function $f \circ P_d:H \to \mathbb{R},$ where $P_d$ denotes the projection on the linear span of $e_1,...e_d$.
I have tried a number of fruitless attempts. Roughly speaking, most of them failed due to the fact that $\underset{n \in \mathbb{N}}{\cup}span(e_1,...,e_n) \neq H$.
I would appreciate any reasonable input on this! Thank you in advance!
 A: If you want monotonically increasing functions of the form $f \circ P_d$ then the answer is no. The reason is that if $f:H \to \Bbb R$ is any nonzero function, $f\circ P_d$ is necessarily nonzero on an unbounded set of values in $H$ (in turn because $P_d^{-1}(S)$ is unbounded for any set $S$). In particular if we take $U$ to be bounded, then the claim is impossible.
Now suppose you just want any such collection of functions without requiring that they are monotonically increasing. In this case I only have a partial answer. Specifically we can find a sequence of functions $g_n$ of the form $f_n \circ P_n$ (with $f_n$ continuous) such that $g_n \to 1$ on $U$ and $g_n \to 0$ on the interior of $U^c$, however I cannot ensure that $g_n \to 0$ on $\partial U$. Indeed, let $f_n(x): = \min\{1, n \cdot $dist$(x,U^c)\}$, and let $g_n = f_n\circ P_n$. Fix $x \in U$. Let $\epsilon = $dist$(x,U^c)$. Then choose $N_1$ so that $n \ge N_1$ implies $\|P_nx-x\|<\epsilon/2$. Then for $n \ge \max\{N_1,\frac2{\epsilon}\}$ we see that dist$(P_nx,U^c) > \epsilon/2>n^{-1}$ so that $f_n(P_nx)=1$. A similar argument shows that for $x\in $ Int$(U^c)$, one has $f_n(P_nx) \to 0$.
