About the existence of the diagonal set of Cantor The classic proof of the Cantor set start with the assumption that the set
$$B=\{x\in A:x\notin f(x)\}$$
exists, where $f: A\to\mathcal P(A)$ is a bijective function. I understand the proof but I dont understand the assumptions where you start to make this proof.
To be clear, why a set $B$ can be constructed? How you can justify this assumption? To me the proof of the Cantor theorem is far to be clear or complete if there are not an explanation about why $B$ must be possible.
Then, can someone explain to me or justify, via other theorems if possible, why $B$ must exist? Thank you in advance.
P.S.: can someone explain to me the downvotes in the question?
 A: Actually one should not assume in advance that the function is bijective; rather one should prove that it's not, by showing that the set
$$
B = \{ x \in A : x\notin f(x)\}
$$
is not in its image.
Let's try an example: $A=\{1,2,3\}$ and $\begin{cases} f(1) = \{1,2\}, \\ f(2) = \{1,3\}, \\
f(3) = \{2,3\}. \end{cases}$
Then $B = \{ x\in A:x\notin f(x) \} = \{2\}$, since $\Big( 1\in f(1) \text{ and } 2\notin f(2) \text{ and } 3\in f(3)\Big)$.
For each element $x$ we see that either $x\in f(x)$ or $x\notin f(x)$.  Those for which the latter alternative holds are members of the set $B$.
The above is not a logical argument to the conclusion that I would like to support, but is presented in case setting forth a concrete instance might clarify your thinking about this definition of the set $B$.
A: The existence of the set $B$ is an immediate consequences of one of the basic axioms (technically, an axiom schema) of set theory, called variously the axiom of subsets, or separation, or specification, or comprehension. It says that, given any set $A$ and any condition (technically, a condition expressed by a first-order formula in the language of set theory), there is a set $B$ containing exactly the elements of $A$ that satisfy the condition.
The axiom of subsets is the basis for almost every set defined in mathematics. You don't like it, fine. But why drag Cantor's diagonal set into the argument, you might as well ask, what is the justification for the set of odd numbers.
A: Here is an example on a finite set:
$S = \{1,2,3\}$,
$P\left(S\right)=\{\phi,S,\{1\},\{2\},\{3\},\{1,2\},\{1,3\},\{2,3\}\}$
take for example:
\begin{eqnarray}
f\left(1\right)=\{1,2\}\\
f\left(2\right)=\{1,3\}\\
f\left(3\right)=\{1\}
\end{eqnarray}
$B=\{x\in S; x\notin f\left(x\right)\}$
\begin{eqnarray}
1\notin B\\
2\in B\\
3\in B
\end{eqnarray}
$B=\{2,3\}\in P\left(S\right)$
A: Another example, from the infinite set of natural numbers:
\begin{eqnarray}
S=\mathbb{N}\\
P\left(S\right)=\{\phi, S, \forall U\neq\phi;U\subset S\}\\
f\left(x\right)=\{x\}
\end{eqnarray}
Then f is 1-1.
$B=\{x\in S;x\notin f\left(x\right)\}$
Then
$\forall x\notin B$
$B=\phi \in P\left(S\right)$
Which exists and again is not in the image of $f$.
