Is $C^\infty$ Urysohn lemma true for infinite dimensional Banach spaces? 
$C^\infty$ Urysohn Lemma
Let $K$ be a compact subset of $\mathbb{R}^n$ and $U$ be open in $\mathbb{R}^n$ such that $K\subset U$. Then, there exists $f_\in C_c^\infty(\mathbb{R}^n)$ such that $0\leq f\leq 1$ and $f(K)=1$ and $supp(f)\subset U$.

I'm curious this can be generalized to infinite-dimensional Banach spaces. However, infinite dimension Banach spaces are not locally compact hence the argument proving the above theorem cannot be applied in this case. So the above statement should be weakened. To sum up, my question is,


*

*Let $A,B$ be arbitrary disjoint closed subsets of $\mathbb{R}^n$. Then, does there exists a $C^\infty$ function $f$ (not necessarily compactly supported), such that $f(A)=0$ and $f(B)=1$?


*Let $X$ be an infinite-dimensional Banach space over $\mathbb{R}$. Then, is there a theorem that plays a similar role of "$C^\infty$-Urysohn Lemma for finite-dimensional spaces"?

Thank you in advance.
 A: I would like to call what you post at the beginning  "$C_c^\infty$ Urysohn Lemma", because the function $f$ here has compact support.
Actually, we do have a version of "$C^\infty$ Urysohn Lemma" on any (finite dimensional) smooth manifold. See Proposition 2.25 in Lee's book. I post it below.

Theorem 1 ($C^\infty$ Urysohn Lemma). Let $M$ be a smooth manifold. For any closed subset $A\subset M$ and any open subset $U$ containing $A$, there exist a function $f\in C^\infty(M)$ such that $0\le f\le1$, $f\equiv1$ on $A$, and $\mathtt{supp}f \subset U$.

Note that the function $f$ in this lemma need not have compact support. Applying this lemma, you can easy get the answer of your first question.
As you can see in Lee's book, this lemma is a direct consequence of the existence of partition of unity (POU) on smooth manifold. Hence, if we can find the POU for infinite-dimensional Banach spaces or Banach manifolds, then your second question can be solved.
Follow this idea, we can find a version of the existence of POU for Hilbert manifolds in Corollary 3.8 in Serge Lang's book (it seems to be more complicated for the Banach cases), as follows.

Theorem 2 (Existence of POU for Hilbert Manifolds). Let $X$ be a paracompact manifold of class $C^k$ ($k\ge1$), modeled on a separable Hilbert space $H$. Then $X$ admits a partition of unity of class $C^k$. 

