Does there exist a set X such that for any set Y, there exists a surjective function f : X → Y

discrete mathematicsfunctionsproof-verification

I was thinking about this question and I have my own thoughts on this, please do let me know if my reasoning is correct.

The question asks if I can pick an $X$ such that this condition is fulfilled for all $Y$.

If the function $f$ is to be surjective, it must mean that every element must be an output of $f$. So if $X$ was countably infinite, this would not be possible, since I can pick $Y$ an uncountably infinite set. So $X$ would have to be uncountably infinite set, but then this set $X$ would not work if $Y$ was the null set, because a function only exists from $f:X \rightarrow \emptyset $ only if $X$ is the null set.

So this statement is false. Is my reasoning correct?

Best Answer

There's a straight answer to this question :
For any set $X$, there is no surjection from $X$ onto the power set $\mathcal{P}(X)$.
Proof: Assume for contradiction that $f:X \mapsto \mathcal{P}(X)$ is a surjection.
Consider the subset $Y = \{x \in X \big| x \notin f(x) \}$. Since $f$ is surjective, there is some $x_0 \in X$ such that $f(x_0) = Y$.
But one has $x_0 \in Y \Longleftrightarrow x_0 \notin Y$ by definition of $Y$, a contradiction!