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$.
EDIT:
$I_n = \{ j \in \mathbb{N} ; 1 \leq j \leq n \}$
EDIT 2:
Going into more detail as per the guidance in the comments. I have only proven statement $(1)$ as the proof for statement $(2)$ is similar.
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)$
Proof of this statement:
Select an arbitrary element $b \in I_m$. Assume that $f(a_1) = b$ and $f(a_2) = b$ where $a_1 \neq a_2$. But since $f$ is injective we know that $f(a_1) = f(a_2) \Rightarrow a_1 = a_2$. Therefore every element in $I_m$ corresponds at most to a single element in $I_n$.
By my training, this would not be considered a correct proof.
This is just a statement of a definition and the statement of a conclusion. There isn't any reasoning connecting the two. I would start by choosing an arbitrary element of $I_m$ and proving, based on the fact that $f$ is injective, that there cannot exist more than one corresponding element of $I_n$. I can't say much more without giving the answer away; it's pretty simple.
If this were part of a more complex proof, you wouldn't need to be so explicit with every logical inference of something so simple and tangential, but then again, in a more complex proof, you would probably just take this as given. If you're doing this as an exercise in proofwriting, I'd recommend being more thorough.