In set theory, the axiom schema of replacement is a schema of axioms in Zermelo–Fraenkel set theory (ZF) that asserts that the image 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 ; will also be a proper class if is. Consider the (possibly proper) class defined such for every set , if and only if there is an with . is called the image of under , and denoted or (using set-builder notation) .