## Exercise statement

Show that the axiom of replacement implies the axiom of specification.

## Hints

None.

## How to think about the exercise

What does it mean for one axiom to imply another? In this case, both axioms are about constructing sets, so we just want to show that any set that we can construct using the axiom of specification can be constructed using the axiom of replacement instead. The axiom of specification allows us to construct sets of the form . So our goal is, given some set and some property (predicate) , to construct the set using the axiom of replacement.

To use the axiom of replacement, we must feed it a two-place property and a set. The set can just be : we want to produce some subset of , so it makes sense that we start with and do some “replacement” on its elements somehow. So that leaves us to determine what the two-place property will be. Let’s call that property , since the variable is already taken. Once we define what is, the axiom of replacement allows us to construct the set .

How do we decide what to use? Well, we want to keep only those elements of such that is true. So it makes sense to require as part of . And the elements of this new set should be the same elements from , so we don’t want to apply any transformation to get the s. So we can just let . In other words, we can define to be “ and ” (it’s fine to say “ and ” as well). Thus we have the set .

There is another way to look at this exercise, assuming you are comfortable with functions. The axiom of replacement basically says that if is a set and is an operation on elements of , then is a set. Here the operation may return an undefined result (because for each , the statement is true for at most one rather than exactly one ). So to construct the set , we can define to be if is true, and leave undefined if is false.

If you feel uncomfortable about having undefined values, see Exercise 3.4.7, and also note that we can do everything with functions also: we split into cases depending on whether the resulting set will be empty. If is empty or is false for all then the resulting set will be empty so we don’t need to do anything to construct it. Otherwise, since is non-empty and is true for at least one , we can pick some element for which is true and let this element be the default output of for inputs we want to exclude. In other words, is the function defined by:

But the discussion involving is a bit informal, as we have not introduced functions at this point in the book. But nevertheless this way of looking at this problem provides good intuition.

## Model solution

Let be a set, and let be a statement pertaining to objects . To show that the axiom of replacement implies the axiom of specification, we will construct the set using just the axiom of replacement. Let be the statement “ and ”. To use the axiom of replacement, we must verify that for each , the statement is true for at most one . But for each , there is exactly one such that , so it follows that for the full statement of there is at most one satisfying the statement. The axiom of replacement thus allows us to construct the set . We claim that this is the same set as . We show the inclusion both ways:

- Suppose . Thus and is true. But this means that and for some ; specifically, there is such that and . Thus .
- Suppose . This means that for some , we have and . Since this means we have and as well. Thus .

Since both directions of the inclusion hold, this means that the two sets are equal.