In set theory, the axiom schema of replacement is a schema of axioms in Zermelo–Fraenkel set theory (ZF) that asserts that the of any set under any definable mapping is also a set. It is necessary for the construction of certain infinite sets in ZF.
The axiom schema is motivated by the idea that whether a class is a set depends only on the cardinality of the class, not on the rank of its elements. Thus, if one class is "small enough" to be a set, and there is a surjection from that class to a second class, the axiom states that the second class is also a set. However, because ZFC only speaks of sets, not proper classes, the schema is stated only for definable surjections, which are identified with their defining formulas.
Suppose is a definable binary relation (which may be a proper class) such that for every set there is a unique set such that holds. There is a corresponding definable function , where if and only if . Consider the (possibly proper) class defined such that for every set , if and only if there is an with . is called the image of under , and denoted or (using set-builder notation) .
The axiom schema of replacement states that if is a definable class function, as above, and is any set, then the image is also a set. This can be seen as a principle of smallness: the axiom states that if is small enough to be a set, then is also small enough to be a set. It is implied by the stronger axiom of limitation of size.
Because it is impossible to quantify over definable functions in first-order logic, one instance of the schema is included for each formula in the language of set theory with free variables among ; but is not free in . In the formal language of set theory, the axiom schema is:
For the meaning of , see uniqueness quantification.
For clarity, in the case of no variables , this simplifies to:
So whenever specifies a unique -to- correspondence, akin to a function on , then all reached this way can be collected into a set , akin to .
The axiom schema of replacement is not necessary for the proofs of most theorems of ordinary mathematics.