Cantor's Theorem/Proof 2

Proof
Let $S$ be a set.

Let $\mathcal P \left({S}\right)$ be the power set of $S$.

Let $f: S \to \mathcal P \left({S}\right)$ be a mapping.

Let $T = \left\{{x \in S: \neg \left({x \in f \left({x}\right)}\right)}\right\}$.

Then $T \subseteq S$, so $T \in \mathcal P \left({S}\right)$ by the definition of power set.

We will show that $T$ is not in the image of $f$ and therefore $f$ is not surjective.

Aiming for a contradiction, suppose that:
 * $\exists a \in S: T = f \left({a}\right)$

Suppose that:
 * $a \in f \left({a}\right)$

Then by the definition of $T$:
 * $\neg \left({a \in T}\right)$

Thus since $T = f \left({a}\right)$:
 * $\neg \left({a \in f \left({a}\right) }\right)$

By Rule of Implication:


 * $(1) \quad a \in f \left({a}\right) \implies \neg \left({ a \in f \left({a}\right) }\right)$

Suppose instead that:
 * $\neg \left({a \in f \left({a}\right)}\right)$

Then by the definition of $T$:
 * $a \in T$

Thus since $T = f \left({a}\right)$:
 * $a \in f \left({a}\right)$

By Rule of Implication:


 * $(2) \quad \neg \left({ a \in f \left({a}\right) }\right) \implies a \in f \left({a}\right)$

By Non-Equivalence of Proposition and Negation, applied to $(1)$ and $(2)$, this is a contradiction.

As the specific choice of $a$ did not matter, we derive a contradiction by Existential Instantiation.

Thus by Proof by Contradiction, the supposition that $\exists a \in S: T = f \left({a}\right)$ must be false.

It follows that $f$ is not a surjection.