Prove that if $A \sim I_n$ and $A \sim I_m$ then $n=m$ Some definitions:
Definition of equinumerous sets
Two sets are equinumerous if there exists a bijection $f: A \rightarrow B$. We write $A \sim B $ if $A$ is equinumerous to $B$
Definition of finite set and cardinality
A set $A$ is said finite if $A \sim I_n$  where $I_n=\{k \in \mathbb{N} | k \leq n\}$ and $\mathbb{N}=\{1,2...\}$
If $A$ is finite the unique number $n$ such that $A \sim I_n$ is called the cardinality of $A$
Now the question:
Prove the cardinality of A is well-defined (that is if $A \sim I_n$  and $A \sim I_m$  then $n=m$ )
Suggestion: prove first that if $n \neq m$ then there exist no bijection between $I_n$ and $I_m$.
So, if I assume by absurd that $m \neq n$, let's say $m < n$
There exists an injective but not surjective mapping  $i:I_m \rightarrow I_n$.
Now since this is so obvious I am having trouble going forward. Actually, I don't know if the previous statement, provided it is needed, is too far a step into the proof, given that what I want to prove is as much as obvious.
Can someone enlighten me?
 A: Proving the statement in the suggestion is not trivial. What you’ve done isn’t nearly enough: the existence of an injection from one set to another that is not a surjection does not prove that there is no bijection between the two sets. For instance, the map $f:\Bbb N\to\Bbb N:n\mapsto n+1$ is a non-surjective injection from $\Bbb N$ to itself, but obviously there are bijections from $\Bbb N$ to $\Bbb N$! It’s only for finite sets that the existence of a non-surjective injection implies that there is no bijection, and that’s essentially what you’re supposed to be proving here.
Let $B$ be the set of $n\in\Bbb N$ such that there is a bijection from $I_n$ to some $I_m$ with $m<n$. Suppose that $B\ne\varnothing$; by the well-ordering principle we can let $n=\min B$. Let $f:I_n\to I_m$ be a bijection, where $m<n$, and let $k=f(n)$. Let $g$ be the restriction of $f$ to $I_{n-1}$; $g$ is a bijection from $I_{n-1}$ to $I_m\setminus\{k\}$.
Now define a function $h:I_m\setminus\{k\}\to I_{m-1}$ as follows:
$$h(i)=\begin{cases}
i,&\text{if }1\le i<k\\
i-1,&\text{if }k<i\le m\;.
\end{cases}$$
It’s easy to verify that $h$ is a bijection. But then $h\circ g$ is a bijection from $I_{n-1}$ to $I_{m-1}$, so $n-1\in B$, contradicting the choice of $n$ as the smallest member of $B$. This contradiction shows that $B$ must be empty and hence that no $I_n$ can be mapped bijectively to an $I_m$ with $m<n$.
A: First:  For any injective $f: I_m \to I_n$
Claim 1: we can define a bijection $j: f(I_m)\to f(I_m)$ so that $j(k) < j(l) \iff k < l$
and therefore then function $j\circ f:I_m \to I_n$ is an injection so that $k < l\implies j(f(k)) < j(f(l))$ and and $f$ is a bijection if and only if $j\circ f$ is a bijection.
Claim 2: $j\circ f$ can not be surjective and therefore can not be  a bijection.
=====
Proof of claim 1: By well ordered principal $f(I_m)$ has a minimal element.  Let $j(f(1)) = \min f(I_m)$.  And $f(I_m) \setminus \{j(f(1))\}$ has a minimum element so let $j(f(2)) = \min f(I_m) \setminus \{j(f(1))\}$ and continue buy induction.
Claim 2:  If $j(f(1))\ne 1$ then $f(j(1)) \ge 2$  But then for any any $k> 1$ then  $f(j(k)) = f(j(1)) \ge 2$ and there is no $f(j(k)) = 1$ so $j\circ f$ is not surjective.
If all $j(f(k)) = k$ then there is no $j(f(k)) = m+1$ and $j\circ f$ is not surjective.  (Note this argument would not hold between two infinite sets as infinite sets will not have max elements.)
If not all $j(f(k)) = k$ there must, by well order pricipal by a least $k$ where $j(f(k)) = k$.  We considered this least $k$ being equal to 1) in the first line and showed that meant $j\circ f$ is not surjective.  So lets consider if these least such $k> 1$>
Then $j(f(k-1)) = k-1$ and $j(f(k)) > j(f(k-1)) = k-1$ and $j(f(k)) \ne k$.  That means $j(f(k)) > k$ and for all $m > k$ we have $j(f(m)) >j(f(k)) > k$ and for all $l \le k-1$ we have $j(f(l)) \le j(f(k-1)) = k-1 < k$.  So there is no $w$ where $j(f(w)) = k$ and so $j\circ f$ is not surjective.
A: Let $m<n$. Suppose that there is a bijection $f: I_m\to I_n$. Write
$$ I_n=f(I_m)\cup A, f(I_m)\cap A=\emptyset, A\neq\emptyset. $$
For $y\in A$, since $f: I_m\to I_n$ is bijection, there is $x\in I_m$ such that $f(x)=y\in f(I_m)$. From this one can see that $y\in f(I_m)\cap A$ which is absurd since $f(I_m)\cap A=\emptyset$.
