I am trying to work out how the axiom of substitution on the set $\omega $ of all natural numbers can be used to construct the set of all successors of $\omega$ (as in the set {$\omega,\omega^+,(\omega^+)^+... $}. On page 74, Halmos writes:
"Let us say that a function f whose domain is the set of strict predecessors of some natural number n (in other words, dom f = n) is an $\omega$-successor function if $f(0) = \omega$ (provided that $n \neq 0$, so that $0 < n$), and $f(m^+) = (f(m))^+$ whenever $m^+ < n$."
And then constructs the sentence $S(n,x)$ to be "$n$ is a natural number and $x$ belongs to the range of the $\omega$-successor function with domain $n$".
Now the first part of confusion for me comes up when he says, "We know that for each natural number $n$ we are permitted to form the set {$x: S(n, x)$}.
Question #1: For $n=0$, isn't the set either equal to the empty-set or undefined since $x$ belongs to $f(n)$ where $n<0$ or equivalently $n \in \emptyset$, and therefore $f$ cannot map to anything since there are no elements in the domain of $f$.
From there the Axiom of Substitution is given which permits us to form a a function $F$ such that $F(n) =$ {$x:S(n,x)$} $\forall n \in \omega$. Halmos says the range of this function is to be the set of all successors of $\omega$ with $F(0) = \omega$ and $F(n^+)=(F(n))^+$.
Question #2: Going back to the first question, how could $F(0) = \omega$?
Note: This is my first post so feel free to comment on anything I am doing wrong. Also, I thank anybody in advanced who is willing to take the time to read and answer my questions.
Yes, this appears to have been botched slightly. As written literally, we have $$ F(0) = 0\\F(1) = \{\omega\}\\F(2)=\{\omega, \omega+1\},$$ etc. (The answer to your first question is "the empty set".)
Notice that taking the union of each of these with $\omega$ gives what you want ($F(n) = \omega+n$). So one way to fix the exposition would be to change the definition of $S(n,x)$ to "$n\in\omega$, and either $x\in \omega$ or $x$ is in the range of the $\omega$-successor function with domain $n$."
Alternatively, and probably closer to what was intended, would be to define $S(n,x)$ as "$n\in \omega$ and $x$ is an element of a member of the range of the $\omega$-successor function with domain $n+1$." In other words, if $f_n$ is the $\omega$ successor function with domain $n+1$ (i.e. $f_0(0)=\omega,$ and $f_1(0)=\omega,$ $f_1(1)=\omega+1,$ etc.), then we let $\{x:S(n,x)\} = \cup\operatorname{range}(f_n).$