Let $M$ be a smooth manifold. Let $A$ and $B$ be disjoint closed sets of $M$. Show there exists a smooth function $f$ such that $f^{-1}(0)=A$ and $f^{-1}(1)=B$.
This is my idea so far,
Since $A$ and $B$ are disjoint closed subsets $\{M-A,M-B\}$ is an open cover for $M$. Therefore there exists a partition of unity $\{\psi_{1},\psi_{2}\}$ with $\psi_{1}$ supported in $M-A$ and $\psi_{2}$ supported in $M-B$. Furthermore $\psi_{1}+\psi_{2}=1$. Then $\psi_{1}(1-\psi_{2})$ is zero on $A$ and $1$ on $B$. I get the inclusions $A\subset f^{-1}(0)$ and $B\subset f^{-1}(1)$. I've tried adding a few more open sets to the cover like $M-(A\cup B)$ and $(M-A)-B$ and $(M-B)-A$ but I still can't ensure that the function only vanishes at $A$.
Then I moved on to attempt to find any bump function that is 1 only on $A$ and ran into the same problem.
Am I missing something here or do I just need to be clever with how I define a function. Any hints would be much appreciated. Thanks.
Best Answer
You can construct a proof using the following steps: