In chapter 4 of Analysis I by Terence Tao, we have the following note about the set theoretic construction of the integers:
In the language of set theory, what we are doing here is starting with the space N × N of ordered pairs (a, b) of natural numbers. Then we place an equivalence relation ∼ on these pairs by declaring (a, b) ∼ (c, d) iff a + d = c + b. The set-theoretic interpretation of the symbol a — b is that it is the space of all pairs equivalent to (a, b): a — b := {(c, d) ∈ N × N : (a, b) ∼ (c, d)}; the existence of the set Z = {a — b : (a, b) ∈ N × N} of integers then follows from two applications of the axiom of replacement. However, this interpretation plays no role in how we manipulate the integers and we will not refer to it again. A similar set-theoretic interpretation can be given to the construction of the rational numbers later in this chapter, or the real numbers in the next chapter.
What caught my eye in this note is that Tao suggests we need to apply the Axiom of Replacement twice in order to justify the existence of Z, but Z may be constructed with a single application of replacement: for every (a, b) ∈ N × N, we replace it by a — b and thus get Z. This reasoning seems plausible, but something still feels off about it. Is this proof really correct, and hence a simplification of Tao's idea? Or is there some error in the logic behind it?