I'm struggling with a question regarding topology, specifically Tietze's extension theorem.
Suppose you have a finite collection of pairwise disjoint closed subsets ${A_i: i < n}$ of a compact Hausdorff space $X$. By Tietze's extension theorem and Urysohn's lemma, one could create a function $f:X \rightarrow \mathbb{R}$ where $f(A_i) = 0, f(A_j) = 1$ for any two $A_i, A_j$ in the finite set defined earlier.
My question is, how could one define a continuous function such that $f(A_i) = i$? I was thinking perhaps something like $f(X) = f_1(X)(f_2(X)(f_3(X) + 1) + 1)$ etc for $n$ many subset…