An Issue with problem Definition Consider the following definition

Suppose $B\subseteq\mathbf{Z^+}$ and $B$ is infinite. We now define a
  function $f :\mathbf{Z^+}\to B$ by recursion as follows: For all
  $n\in\mathbf{Z^+}$, $f (n) = the\ smallest\ element\ of\ B \backslash\{ f (m) |m \in \mathbf{Z^+},m < n\}$ .
Of course, the definition is recursive because the specification of
  $f(n)$ refers to $f (m)$ for all $m < n$.

Does the above definition make sense if so could you explain how am i to determine $f(n)$ given any n ? 
 A: It sure does make sense.
We may write $B=\{a_1,a_2,a_3,\ldots\}$ with $a_1<a_2<a_3<\ldots$, so $f(1)=\left(\text{the smallest element of } B \right)=a_1$.
Now $f(2)=\left(\text{the smallest element of } B \backslash\{ f (1)\}=\{a_2,a_3,\ldots\}\right)=a_2$.
Then $f(3)=\left(\text{the smallest element of } B \backslash\{ f (1),f(2)\}=\{a_3,\ldots\}\right)=a_3$, etc.
So we see that $f(n)=a_n$ for any $n\geq 1$.
A: You can also state the recursion as below:


*

*$f(0)=\min B$

*$f(n+1)=\min\{b\in B\mid b>f(n)\}$


I feel it is easier to grasp at first lecture.
You could even cheat the initialisation step by defining $f(0)=-1$ for instance and consider only $f(1)$ and its successors as worthy of interest.
A: Let's think.
What is $f(1)$?  $f(1)$ is the smallest element of $B\setminus \{f(m)|m < 1; m \in \mathbb Z^+\} = B\setminus  \{f(m)|m< 1; m\ge 1\}=B\setminus \emptyset = B$.
So $f(1) = $ smallest element of $B$.  As $B \subset \mathbb Z^+$ then by the well-ordered principal $B$ does have a smallest element so that is well defined.
What is $f(2)?$  $f(2)$ is the smallest element of $B\setminus \{f(m)|m < 2; m\in\mathbb Z^=\} = B\setminus\{f(1)\}$.  As $B$ is infinite $B \setminus \{f(1)\}$ is not empty and as it is a subset of $\mathbb Z^+$ then $B\setminus \{f(1)\}$ has a least element.
And we can continue this forever.  $K_n = \{f(m)|m < n\}$ will always be finite and well defined if $f(m)|m < n$ is well-defined.  As $B$ is infinite $B \setminus K_n$ will never be empty.  And as $B\setminus K_n \subset \mathbb Z^+$ it will always have a least element so $f(n)$ will be well defined so long as $f(m)|m < n$ are.  And by strong induction they will be, as $f(1)$ is.
So this is well defined.
Another way to put this:
$B \subset Z^{+}$ and so $B$ is countable we can index $B= \{b_1, b_2, b_3,.....\}$.  $B$ is infinite.  $B \subset \mathbb Z^{+}$ and by the well ordering principle we can order $\{b_1,b_2,.....\}$ as $\{c_1,c_2,c_3,....\}$ where $c_1 < c_2 < c_3 < ....$.
Than $f(n) = c_n$.  
That's all it is.
