# Metamath Proof Explorer

## Axiom ax-rep

Description: Axiom of Replacement. An axiom scheme of Zermelo-Fraenkel set theory. Axiom 5 of TakeutiZaring p. 19. It tells us that the image of any set under a function is also a set (see the variant funimaex ). Although ph may be any wff whatsoever, this axiom is useful (i.e. its antecedent is satisfied) when we are given some function and ph encodes the predicate "the value of the function at w is z ". Thus, ph will ordinarily have free variables w and z - think of it informally as ph ( w , z ) . We prefix ph with the quantifier A. y in order to "protect" the axiom from any ph containing y , thus allowing us to eliminate any restrictions on ph . Another common variant is derived as axrep5 , where you can find some further remarks. A slightly more compact version is shown as axrep2 . A quite different variant is zfrep6 , which if used in place of ax-rep would also require that the Separation Scheme axsep be stated as a separate axiom.

There is a very strong generalization of Replacement that doesn't demand function-like behavior of ph . Two versions of this generalization are called the Collection Principle cp and the Boundedness Axiom bnd .

Many developments of set theory distinguish the uses of Replacement from uses of the weaker axioms of Separation axsep , Null Set axnul , and Pairing axpr , all of which we derive from Replacement. In order to make it easier to identify the uses of those redundant axioms, we restate them as axioms ax-sep , ax-nul , and ax-pr below the theorems that prove them. (Contributed by NM, 23-Dec-1993)

Ref Expression
Assertion ax-rep ${⊢}\forall {w}\phantom{\rule{.4em}{0ex}}\exists {y}\phantom{\rule{.4em}{0ex}}\forall {z}\phantom{\rule{.4em}{0ex}}\left(\forall {y}\phantom{\rule{.4em}{0ex}}{\phi }\to {z}={y}\right)\to \exists {y}\phantom{\rule{.4em}{0ex}}\forall {z}\phantom{\rule{.4em}{0ex}}\left({z}\in {y}↔\exists {w}\phantom{\rule{.4em}{0ex}}\left({w}\in {x}\wedge \forall {y}\phantom{\rule{.4em}{0ex}}{\phi }\right)\right)$

### Detailed syntax breakdown

Step Hyp Ref Expression
0 vw ${setvar}{w}$
1 vy ${setvar}{y}$
2 vz ${setvar}{z}$
3 wph ${wff}{\phi }$
4 3 1 wal ${wff}\forall {y}\phantom{\rule{.4em}{0ex}}{\phi }$
5 2 cv ${setvar}{z}$
6 1 cv ${setvar}{y}$
7 5 6 wceq ${wff}{z}={y}$
8 4 7 wi ${wff}\left(\forall {y}\phantom{\rule{.4em}{0ex}}{\phi }\to {z}={y}\right)$
9 8 2 wal ${wff}\forall {z}\phantom{\rule{.4em}{0ex}}\left(\forall {y}\phantom{\rule{.4em}{0ex}}{\phi }\to {z}={y}\right)$
10 9 1 wex ${wff}\exists {y}\phantom{\rule{.4em}{0ex}}\forall {z}\phantom{\rule{.4em}{0ex}}\left(\forall {y}\phantom{\rule{.4em}{0ex}}{\phi }\to {z}={y}\right)$
11 10 0 wal ${wff}\forall {w}\phantom{\rule{.4em}{0ex}}\exists {y}\phantom{\rule{.4em}{0ex}}\forall {z}\phantom{\rule{.4em}{0ex}}\left(\forall {y}\phantom{\rule{.4em}{0ex}}{\phi }\to {z}={y}\right)$
12 5 6 wcel ${wff}{z}\in {y}$
13 0 cv ${setvar}{w}$
14 vx ${setvar}{x}$
15 14 cv ${setvar}{x}$
16 13 15 wcel ${wff}{w}\in {x}$
17 16 4 wa ${wff}\left({w}\in {x}\wedge \forall {y}\phantom{\rule{.4em}{0ex}}{\phi }\right)$
18 17 0 wex ${wff}\exists {w}\phantom{\rule{.4em}{0ex}}\left({w}\in {x}\wedge \forall {y}\phantom{\rule{.4em}{0ex}}{\phi }\right)$
19 12 18 wb ${wff}\left({z}\in {y}↔\exists {w}\phantom{\rule{.4em}{0ex}}\left({w}\in {x}\wedge \forall {y}\phantom{\rule{.4em}{0ex}}{\phi }\right)\right)$
20 19 2 wal ${wff}\forall {z}\phantom{\rule{.4em}{0ex}}\left({z}\in {y}↔\exists {w}\phantom{\rule{.4em}{0ex}}\left({w}\in {x}\wedge \forall {y}\phantom{\rule{.4em}{0ex}}{\phi }\right)\right)$
21 20 1 wex ${wff}\exists {y}\phantom{\rule{.4em}{0ex}}\forall {z}\phantom{\rule{.4em}{0ex}}\left({z}\in {y}↔\exists {w}\phantom{\rule{.4em}{0ex}}\left({w}\in {x}\wedge \forall {y}\phantom{\rule{.4em}{0ex}}{\phi }\right)\right)$
22 11 21 wi ${wff}\left(\forall {w}\phantom{\rule{.4em}{0ex}}\exists {y}\phantom{\rule{.4em}{0ex}}\forall {z}\phantom{\rule{.4em}{0ex}}\left(\forall {y}\phantom{\rule{.4em}{0ex}}{\phi }\to {z}={y}\right)\to \exists {y}\phantom{\rule{.4em}{0ex}}\forall {z}\phantom{\rule{.4em}{0ex}}\left({z}\in {y}↔\exists {w}\phantom{\rule{.4em}{0ex}}\left({w}\in {x}\wedge \forall {y}\phantom{\rule{.4em}{0ex}}{\phi }\right)\right)\right)$