Cardinality of Surjection

Theorem
Let $S$ be a set.

Let:
 * $\left\lvert{S}\right\rvert = n$

where $\left\lvert{S}\right\rvert$ denotes the cardinality of $S$.

Let $f: S \to T$ be a surjection.

Then $\left\lvert{T}\right\rvert \le n$.

The equality:
 * $\left\lvert{T}\right\rvert = n$

occurs $f$ is a bijection.

Proof
We have that $\left\lvert{S}\right\rvert = n$.

Then by definition of cardinality:
 * there is a surjection from $S$ to $T$


 * there is a surjection from $\N_n$ to $T$.
 * there is a surjection from $\N_n$ to $T$.

So we need consider the case only when $S = \N_n$.

By definition of surjection:
 * $\forall x \in T: f^{-1} \left[{\left\{{x}\right\}}\right] \ne \varnothing$

where $f^{-1} \left[{\left\{{x}\right\}}\right]$ denotes the preimage of $\left\{{x}\right\}$ under $f$.

From the Well-Ordering Principle, $\N$ is well-ordered.

Therefore by Subset of Well-Ordered Set is Well-Ordered, $S = \N_n$ is well-ordered.

We have that $f^{-1} \left[{\left\{{x}\right\}}\right] \subseteq S$.

Therefore $f^{-1} \left[{\left\{{x}\right\}}\right]$ is also well-ordered.

Therefore, by definition of well-ordered set, $f^{-1} \left[{\left\{{x}\right\}}\right]$ has a smallest element.

Let $g: T \to S$ be the mapping defined as:


 * $\forall x \in T: g \left({x}\right) =$ the smallest element of $f^{-1} \left[{\left\{{x}\right\}}\right]$

Let $x \in T$.

Then:
 * $g \left({x}\right) \in f^{-1} \left[{\left\{{x}\right\}}\right]$

so:
 * $f \left({g \left({x}\right)}\right) = x$

Thus:
 * $f \circ g = I_T$

and by Identity Mapping is Bijection:
 * $I_T: T \to g \left[{T}\right]$ is a bijection.

By Cardinality of Subset of Finite Set:
 * $\left\lvert{g \left[{T}\right]}\right\rvert \le n$

Let $\left\lvert{g \left[{T}\right]}\right\rvert = m$.

By Set Equivalence is Equivalence Relation:
 * $\left\lvert{T}\right\rvert = m$

elements.

Suppose $m = n$.

Then by Cardinality of Subset of Finite Set:
 * $g \left[{T}\right] = S$

so $g: T \to S$ is a bijection.

Therefore:

So $f: S \to T$ is a bijection.