# Prove that if $n \in \Bbb N$, $f: I_n \to B$, and $f$ is onto, then $B$ is finite and $|B|\leq n$.

Prove that if $n \in \Bbb N$, $f: I_n \to B$, and $f$ is onto, then $B$ is finite and $|B|\leq n$.

Notes on notation:

For each natural number $n$, $I_n = \{i \in \mathbb{Z} \mid i \leq n\}$.

$A \sim B$ indicates that $A$ is equinumerous to $B$.

$f: I_n \rightarrow B$ means there is a function from $I_n$ to $B$.

-
I think you mean that $I_n=\{i\in\Bbb Z^+:i\le n\}$. –  Brian M. Scott Dec 3 '12 at 23:34
What have you got so far? Which bit did you get stuck on? –  Magpie Dec 4 '12 at 0:50

For each $b\in B$ let $g(b)=\min\{i\in I_n:f(i)=b\}$; since $f$ maps $I_n$ onto $B$, $g$ is well-defined. Now show that $g$ is one-to-one and conclude that $|B|\le|I_n|=n$.
@Eev: In words: let $g(b)$ be the smallest integer in $I_n$ that is mapped to $b$ by $f$. –  Brian M. Scott Dec 3 '12 at 23:43