I was thinking about a proof I read of the statement, that no bijections exist from a set $X$ onto its power set $P(X)$ exists:
Proof (by contradiction)
Let $X$ be a nonempty set, $f:X\rightarrow P(X)$ be a bijection, and $A\subset X$ be defined as $A:=\{x\in X|\;x\not\in f(x)\}$. Consequently, for $x_0\in X$ with $f(x_0)=A$ (which exists since f is bijective) we get $x\in A\Leftrightarrow x\not\in A$, a contradiction. Therefore $f$ cannot be bijective.
End of proof.
I would like to know if there isn't any restriction or rule against the definition of $A$, since it seems to me that if it is permissible, then you should also be allowed to define a set $B:=\{x\in X|\; x\not\in B\}$ for every set X. This would always lead to the contradiction $x\in B\Leftrightarrow x\not\in B$.
I know I probably am just confused, but I need someone to explain to me what I got wrong. Where is the mistake?
That rule is fine. If you defined $B = \{x \in X\ |\ x \not\in X\}$, then $B$ would simply be the empty set.
Defining $B = \{x \in X\ |\ x \not\in B\}$ is problematic since it is self-referential.