Cantor's theorem: no surjection onto the power set
ProvedFamousTheorems.cantor_surjectivemathlibset-theory
No map from a set onto its power set is surjective.
For every , is not surjective — so always.
The diagonal set is not in the image: if then . Two lines, and it applies to every set, finite or infinite.
The consequence is that there is no largest cardinal — the cardinals form a proper hierarchy — and the same diagonal device reappears in Russell's paradox, Gödel's incompleteness theorems and the undecidability of the halting problem.
Preamble
import Mathlib
Formal statement
namespace FamousTheorems
theorem cantor_surjective : ∀ {α : Type*} (f : α → Set α), ¬ Function.Surjective f := by sorry
end FamousTheoremsSource
One of Freek Wiedijk's "100 theorems"; formalized in Mathlib. Proof here reduces to the corresponding Mathlib result.