Surjection from Class to Proper Class

Theorem
Let $A$ be a class.

Let $\mathrm P$ be a proper class.

Let $f: A \to \mathrm P$ be a surjection.

Then $A$ is proper.

Proof
Aiming for contradiction, suppose that $A$ is not proper.

Then $A$ must be a set.

By the Axiom of Powers, $\mathcal P \left({A}\right)$ is also a set.

Let $g: f \left({A}\right) \to \mathcal P \left({A}\right)$ be defined as:
 * $g \left({f \left({a}\right)}\right) = f^{-1} \left({\left\{{f \left({a}\right)}\right\}}\right)$

It should be noted that $\forall a \in A: \left({g \circ f}\right) \left({a}\right) \ne \varnothing$.

Suppose that $g \left({f \left({a}\right)}\right) = g \left({f \left({b}\right)}\right)$.

Let $x \in f^{-1} \left({\left\{{f \left({a}\right)}\right\}}\right)$.

Then by the definition of a singleton:
 * $x \in f^{-1} \left({\left\{{f \left({a}\right)}\right\}}\right) \implies f \left({x}\right) \in \left\{{f \left({a}\right)}\right\} \implies f \left({x}\right) = f \left({a}\right)$

And also by the same argument $x \in f^{-1} \left({\left\{{f \left({b}\right)}\right\}}\right) \implies f \left({x}\right) = f \left({b}\right)$.

And so by the properties of equality, $f \left({a}\right) = f \left({b}\right)$.

It has been shown that $g$ is an injection.

Because $f$ is a surjection, it follows from Surjection iff Image equals Codomain that $f \left({A}\right) = \mathrm P$.

But this contradicts Injection from Proper Class to Class.

Thus by contradiction $A$ must be proper.

Hence the result.