Show that a set is finite if and only if every linear ordering on it is a well-ordering
What i have done so far:
$\Rightarrow$: Let $(X,\prec)$, where X is finite and $\prec$ is linear ordering. Consider a subset $A\subset X$. Since $X$ is finite, $A$ is also finite. Hence, there exists some $f:I(x)\rightarrow A$ bijective, where $I(x)$ is a finite subset of the natural numbers. We redefine $f$ in a such way that it is an increasing function. Given $a,b\in A$, we have that $f(m)=a$ and $f(n)=b$, for some $m,n\in I(x)$. Since $\prec$ is linear ordering we have that $a\prec b$ or $b\prec a$. Considering the firt case $a\prec b$ (ie, $f(m)\prec f(n)$), we redefine $f$ only if $n<m$, and put $f(m)=b$ and $f(n)=a$. Similarly we redefine $f$ for $b\prec a$. Doing this process for all pairs $a,b\in A$, we ensure that $f$ is increasing and, recalling that every subset of the natural numbers has a minmal ement, we have that $A$ also has a minimal element. Since $A$ was arbitrary, this proves that $\prec$ is well-ordering.
That's what i could do. Is it correct? Any hints on the $\Leftarrow$ part?