Building a function with codomain equal to a given set of reals.

26 Views Asked by At

I was discussing with friends the astounding fact that $\mathbb R$ and the set of real continuous functions were equipotent.

I asked for a proof that $\mathbb R$ and $\mathbb R ^{\mathbb R}$ are not equipotent. Someone asserted that given any set $A \subset \mathbb R$, there exists a function $f\in \mathbb R ^{\mathbb R}$ such that the codomain of $f$ is exactly $A$.

Is that true ?

1

There are 1 best solutions below

0
On BEST ANSWER

Here's something that comes immediately to mind:

Give some set $A\subset \mathbb{R}$, pick any element $a\in A$ and define the function $f\in \mathbb{R}^{\mathbb{R}}$ by:

$$ f(x) = \left\{ \begin{array}{lr} x & : x \in A\\ a & : x \notin A \end{array} \right. $$