Cantor Theorem assumes set is non-empty? Cantor's Theorem:

For any set $X$, there is no onto function $f:X\to \mathcal{P}(X)$

While I was looking at the proof for this, my head decided to stop understanding it. I mean, I think I understand the proof itself, but doesn't it assume that the subset of the objects that aren't in the defined function is non-empty? Looking at it, I think that it only proves that that subset has no element. Doesn't it derive a contradiction from an assumption made earlier?
Can you guys help me understand?
 A: Assuming this is your formulation of Cantor's Theorem:

For any set $S$, there is no onto mapping from $S$ to its power set.

or some equivalent formulation, let's see what happens if $S$ is empty.
If $S$ is empty, that is, of cardinality zero, then we see that its power set contains one element - the empty set. We can see no surjection exists from $\emptyset$ to $\mathcal{P}(\emptyset)$ through some work.
If this doesn't help, I suggest updating your question with the formulation of Cantor's Theorem you are looking at and details of the proof you see.
A: No. The proof assumes nothing.
If $f\colon A\to\mathcal P(A)$ is any function, then $A_f=\{a\in A\mid a\notin f(a)\}$ is not in the range of $f$.


*

*If $A=\varnothing$, then the only function with the empty domain is $\varnothing$ itself, which has an empty range. Then $A_f=\varnothing$, but $\varnothing\notin\operatorname{rng}(\varnothing)$. So we're fine.

*If $A_f$ is empty, e.g. $f(a)=\{a\}$, then it just means that no element is mapped to the empty set. This is an extension of the first case, where indeed no element is mapped to the empty set.


In either case, it's fine, since $\varnothing$ is indeed a subset of $A$ and therefore an element of $\mathcal P(A)$.
A: Actually your observation on the emptiness of the set $B=\{a\in A\mid a\notin f(a)\}$ is good. Following your argument one could still prove the theorem along the following lines:
Assume $f:A\to \mathcal{P}(A)$ is surjective. Let $B=\{a\in A\mid a\notin f(a)\}$ and $B^c=\{a\in A\mid a\in f(a)\}$. Then $A = B\cup B^c$ since for every element $a\in A$ we know that either $a\in f(a)$ or $a\notin f(a)$. By Cantor's argument (as you pointed out) it follows $B = \emptyset$. Thus $A=B^c$, i.e. $\forall a \in A \Rightarrow a\in f(a)$. But this means that each $f(a)\in \mathcal{P}(A)$ is not empty. Consequently $f$ cannot be surjective since the empty set is not in the range of $f$ and $\emptyset$ is always member of $\mathcal{P}(A)$.
"Never stop thinking critically :)"  
