I am trying to understand this answer.
Context: we want to show that there exists a retract $C\to A$ where $C$ is the Cantor set and $A\subseteq C$ is a nonempty closed subset.
They suggest to take a certain distance, say$$d((a_n), (b_n)) = \sum_{n\ge 0} \frac{|a_n - b_n|}{3^n}$$(if not, just take the Euclidean distance with power series with numerator 0,2 in the Cantor set and triangle inequality gives this exact formula).
It turns out that if we have three points $a,a',b$ such that $d(a,b) = d(a',b)$ then $a=a'$. Why is that?
I reckon the obvious thing to try here is to show that the distance $d(a,a')=0$. So we begin:\begin{align}d(a,a') = \sum_{n\ge 0} \frac{|a_n - a'_n|}{3^n}=\sum_{n\ge 0} \frac{|a_n - b_n + b_n -a'_n|}{3^n}\leq \sum_{n\ge 0} \frac{|a_n - b_n|}{3^n}+\sum_{n\ge 0} \frac{|a'_n - b_n|}{3^n}=2d(a,b)\end{align}But this seems to lead nowhere...
Another question: have we used here the Cantor set? Can we say that every closed, nonempty subset of a compact space is a retract?