TITLE: Is the axiom of choice necessary here?
QUESTION [16 upvotes]: In the book Analysis I by Terence Tao, there is the following exercise:
《Let $X $ be a set, show that $X $ is infinite if and only if there exists a proper subset $Y $ of $X $ which has the same cardinality as $X $. (This exercise requires the Axiom of Choice)》
My attempt:

If $X $ is finite, then it is trivial (by induction on the number of elements)
If $X $ is infinite, then pick $x_0 $ in $X $, we will show a bijection between $X $ and $Y=X\setminus \{x_0\} $.
Take a sequence $(x_n ) $ of distinct elements of $Y $: (the definition of the sequence is by induction)
If we have already defined $x_i  $ for all $0\leq i \leq n $ for some $n $, then take $x_{n+1} $ to be any element in the non-empty set $Y\setminus \{x_1,\ldots , x_n\} $. 
Then take the bijection $f:X\to Y  $ defined by $f (x)=x $ if $x\neq x_i  $ for all $i \geq 0$ and $f (x_i)=x_{i+1} $ otherwise.

I don't see where we used the axiom of choice...

REPLY [9 votes]: The other answers have correctly identified the issue. Let me highlight the difficulty: it is relatively consistent with the axioms of set theory except for the axiom of choice that there are infinite sets which do not contain a copy of the natural numbers (that is, there are infinite sets $X$ such that there is no injection $f\!:\mathbb N\to X$). 
This means that the suggested strategy fails for these sets, but it is even worse, since it is not true that these sets have a proper subset of the same size. Perhaps this feels too abstract, so let's drive the point home: 
Suppose $X$ is an infinite closed or open set of reals. We can explicitly find a countably infinite subset of $X$ in this case (without invoking the axiom of choice); this is a decent exercise you may want to attempt. The same is true if $X$ is slightly more complicated, for instance if $X$ is a countable union of closed sets or even a countable union of countable intersections of open sets (this is already challenging). 
However, one cannot even prove without using the axiom of choice that if $X$ is a countable intersection of countable unions of closed sets of reals then $X$ has a proper subset of the same size. These are still fairly concrete sets, and already the axiom of choice is needed here.