There is a generalization to Cantor's Theorem that you might find interesting.
Theorem ( Cantor's Diagonal Argument )
Let f be a function with domain A
Then D = { x∈A| x∉f(x) }∉Rang(f)
Proof:
Assume otherwise ( RAA)
Then D = f(a) for some a∈A ( as it is in the range of f )
Notice:
a∈D → a∉f(a)=D so a∉D
and
a∉D → a∈f(a)=D so a∈D
thus, a∈D ⟺ a∉D Contradiction
So D is not in the range of f
You can prove all kinds of things with this theorem.
A cute example: In ZF - Foundation, we can prove that if ∀y∈x(y∉y) then x∉x
Proof:
Assume ∀y∈x(y∉y)
Consider the identity function ( maps every element to itself): Id:x → x
Let D = {y∈x| y∉I(y)} = {y∈x| y∉y} by assumption D = x
By Cantor's Diagonal Argument x∉rang(Id) = x
Thus, x∉x.
In some sense, we just proved that sets can "inherit" properties from their elements. If every element in a set is not an element of itself, then the set is not an element of itself either.
Note: This leads us to Russell's Paradox.
As, if R = {y| y∉y)} were a Set, by the above Results
R∉R, but this is a contradiction ( famously) as then R∈R.