Before that exercise I've solved that:
Show there is exists smooth function $\psi: \mathbb{R} \to [0,1]$ s.t. $\psi (x) = 0$ for all $x \leq 0$ and $\psi(x)=1$ for all $x\geq 1 $.
And now they want us to solve that question with the exercise above.
- Exercise:
$M$ is smooth compact manifold and $C_0,C_1$ disjoint closed subsets of $M$ so there is exists smooth func $f:M \to [0,1]$ s.t $f(C_0)={0},f(C_1)={1}$
I've seen similar questions but the solution were with unity of partition or tangent bundle, And I need to solve that only with atlas and mapping.
My attempt: I want to find a smooth map (in local coordinates) $g: M \to \mathbb{R}$ s.t. $g(C_0) = (-\infty ,0]$ and $g(C_1) = [1,\infty)$ and $G(M \setminus (C_0 \cup C_1))=(0,1)$ and after I constructed that function I'll composite that function with $\psi$ and i've done.
But unfortunately I have no clue how to define a function like $g$ with the use of compactness of $C_0$ and $C_1$
I'll be glad if someone can give me any hint to do what I want or give me another idea to solve that question with the exercise i mentioned, Thank you all in advance.
This is a bit cheating, since in the proof of existence of partition of unity we have similar constructions, but here we go.
First recall that by an open ball in $M$, we mean an open set $U$ together with a local coordinates chart $$\varphi : U \to B_1,$$ where $B_1$ is the open unit ball in $\mathbb R^n$.
Since $C_0$, $C_1$ are closed, they are compact since $M$ is. Then there are open balls $$ U^0_1, \cdots, U_k^0$$ and $$ U^1_1, \cdots, U^1_l$$ such that $U^0_i \cap U^1_j = \emptyset$ for all $i, j$, and the "half balls" $$ V^0_1, \cdots, V_k^0$$ and $$ V^1_1, \cdots, V^1_l$$ still covers $C_0$, $C_1$ respectively. Here the half balls are $$V^\alpha_i = (\varphi^\alpha_i)^{-1} (B_{1/2}).$$
Now there is a smooth functions $\phi : \mathbb R^n \to \mathbb R$ so that $0\le \phi \le 1$, $\phi(y) = 1$ for all $|y|\le 1/2$ and $\phi(y) = 0$ for all $|y|>3/4$ (You may try to construct this $\phi$ using your $\psi$). Then for each $\alpha=0, 1$ and $i$, we can define a smooth function $\phi^\alpha_i$ on $M$ by
$$ \phi^\alpha _i (p) = \begin{cases} \phi (\varphi^\alpha_i (p)) & \text{ if } p \in U^\alpha_i, \\ 0 &\text{ otherwise}.\end{cases}.$$
Let $g : M\to \mathbb R$ be the smooth function on $M$ defined by $$ g = -\sum_{i=1}^k \phi^0_i + \sum _{j=1}^l \phi^1_j. $$
Then $g(p) \le -1$ for all $p\in C_0$ and $g(p)\ge1$ for all $p\in C_1$. This is what you want.