Question about size of a set Suppose you have a non empty set $X$, and suppose that for every function $f : X \rightarrow X$, if $f$ is surjective, then it is also injective.  Does it necessarily follow that $X$ is finite ?
Every example I've been able to think of leads me to believe this is true.  Is it ? Or could anyone provide a counterexample?
 A: Yes. This is a variation on the notion of Dedekind finiteness.
A set is Dedekind-finite if and only if every injection $X \to X$ is a surjection. This is one of many equivalent definitions of finiteness.
We can prove without using the axiom of choice that if all surjections $X \to X$ are injections, then $X$ is Dedekind finite.
Suppose that every surjection $X \to X$ is also an injection. Then consider an injection $f : X \to X$.
Define $g : X \to X$ by
$g(x) = \begin{cases}
 y & f(y) = x \\
 x & x \notin f(X)
\end{cases}$
Note that $g$ is only well-defined because $f$ is an injection.
Then $g$ is surjective, since for all $x$, $g(f(x)) = f(x)$. Then $g$ is an injection.
Now suppose $x \notin f(X)$. Then $g(x) = g(f(x))$. Then $x = f(x)$; then $x \in f(X)$; contradiction. Therefore, $f$ is a surjection. Thus, $X$ is Dedekind-finite.
We require a weak version of the axiom of countable choice to show that if $X$ is Dedekind-finite, then there is some $n \in \mathbb{N}$ such that $|x| = n$.
A: If $X$ is infinite, then there exists a proper subset $Y\subsetneq X$ that is equinumerous with $X$. So there exists a bijection
$$f:\ Y\ \longrightarrow\ X.$$
Then we can extend this map to all of $X$ as follows:
$$g:\ X\ \longrightarrow\ X:\ x\ \mapsto\ \begin{cases}x&\text{ if }x\notin Y\\f(x)&\text{ if }x\in Y\end{cases}.$$
Then $g$ is surjective but not injective.
Hence if every surjection from a set $X$ to itself is injective,then $X$ is not infinite.
