I am trying to improve my proof-writing skills.

Would the following proof be correct for the $ f:I_n \rightarrow I_m \Rightarrow n = m$ bit?

**Problem:**

Prove that the notion of number of elements of a nonempty finite set is a well defined concept. More precisely, prove that there exists a bijection $ f:I_n \rightarrow I_m $ if and only if $ n = m$ .

**Attempt:**

First prove $ f:I_n \rightarrow I_m \Rightarrow n = m$ .

Assume that $ f $ is a bijective function such that $ f:I_n \rightarrow I_m $

By definition, since $ f$ is injective, $ \forall a, b \in I_n, f(a) = f(b) \Rightarrow a = b $ , where $ f(a), f(b) \in I_m $ . Therefore every element in $ I_m$ corresponds to at most one element in $ I_n$ . $ \quad (1)$

Also by definition, since $ f$ is surjective, $ \forall b \in I_m, \exists a \in I_n $ . That is every element in $ I_m$ corresponds to at least one element in $ I_n$ . $ \quad (2)$

Now if $ n > m$ , then by $ (2)$ some element in $ I_n$ corresponds to an element in $ I_m$ which is already mapped to. This cannot be true.

Likewise, if $ n < m$ then by $ (1)$ some element in $ I_n$ corresponds to more than one element in $ I_m$ . Again, this cannot be true.

Therefore $ n = m$ .