This article includes a list of general references, but it remains largely unverified because it lacks sufficient corresponding inline citations. (March 2013) (Learn how and when to remove this template message)
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 . 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 as set , akin to .
The axiom schema of replacement is not necessary for the proofs of most theorems of ordinary mathematics. Indeed, Zermelo set theory (Z) already can interpret second-order arithmetic and much of type theory in finite types, which in turn are sufficient to formalize the bulk of mathematics. Although the axiom schema of replacement is a standard axiom in set theory today, it is often omitted from systems of type theory and foundation systems in topos theory.
At any rate, the axiom schema drastically increases the strength of ZF, both in terms of the theorems it can prove - for example the sets shown to exist - and also in terms of its proof-theoretic consistency strength, compared to Z. Some important examples follow:
The axiom schema of collection is closely related to and frequently confused with the axiom schema of replacement. Over the remainder of the ZF axioms, it is equivalent to the axiom schema of replacement. The axiom of collection is stronger than replacement in the absence of the power set axiom or its constructive counterpart of ZF but weaker in the framework of IZF, which lacks the law of excluded middle.
While replacement can be read to say that the image of a function is a set, collection speaks about images of relations and then merely says that some superclass of the relations image is a set. In other words, the resulting set has no minimality requirement, i.e. this variant also lacks the uniqueness requirement on . That is, the relation defined by is not required to be a function--some may correspond to many 's in . In this case, the image set whose existence is asserted must contain at least one such for each in the original set, with no guarantee that it will contain only one.
Suppose that the free variables of are among ; but neither nor is free in . Then the axiom schema is:
The axiom schema is sometimes stated without prior restrictions (apart from not occurring free in ) on the predicate, :
In this case, there may be elements in that are not associated to any other sets by . However, the axiom schema as stated requires that, if an element of is associated with at least one set , then the image set will contain at least one such . The resulting axiom schema is also called the axiom schema of boundedness.
for each formula in the language of set theory in which is not free.
The proof is as follows. Begin with a formula that does not mention , and a set . If no element of satisfies then the set desired by the relevant instance of the axiom schema of separation is the empty set. Otherwise, choose a fixed in such that holds. Define a class function such that, for any element , if holds and if is false. Then the image of under , i.e., the set , exists (by the axiom of replacement) and is precisely the set required for the axiom of separation.
This result shows that it is possible to axiomatize ZFC with a single infinite axiom schema. Because at least one such infinite schema is required (ZFC is not finitely axiomatizable), this shows that the axiom schema of replacement can stand as the only infinite axiom schema in ZFC if desired. Because the axiom schema of separation is not independent, it is sometimes omitted from contemporary statements of the Zermelo-Fraenkel axioms.
Separation is still important, however, for use in fragments of ZFC, because of historical considerations, and for comparison with alternative axiomatizations of set theory. A formulation of set theory that does not include the axiom of replacement will likely include some form of the axiom of separation, to ensure that its models contain a sufficiently rich collection of sets. In the study of models of set theory, it is sometimes useful to consider models of ZFC without replacement, such as the models in von Neumann's hierarchy.
The proof above uses the law of excluded middle in assuming that if is nonempty then it must contain an element (in intuitionistic logic, a set is "empty" if it does not contain an element, and "nonempty" is the formal negation of this, which is weaker than "does contain an element"). The axiom of separation is included in intuitionistic set theory.
The axiom schema of replacement was not part of Ernst Zermelo's 1908 axiomatisation of set theory (Z). Some informal approximation to it existed in Cantor's unpublished works, and it appeared again informally in Mirimanoff (1917).
Its publication by Abraham Fraenkel in 1922 is what makes modern set theory Zermelo-Fraenkel set theory (ZFC). The axiom was independently discovered and announced by Thoralf Skolem later in the same year (and published in 1923). Zermelo himself incorporated Fraenkel's axiom in his revised system he published in 1930, which also included as a new axiom von Neumann's axiom of foundation. Although it is Skolem's first order version of the axiom list that we use today, he usually gets no credit since each individual axiom was developed earlier by either Zermelo or Fraenkel. The phrase "Zermelo-Fraenkel set theory" was first used in print by von Neumann in 1928.
Zermelo and Fraenkel had corresponded heavily in 1921; the axiom of replacement was a major topic of this exchange. Fraenkel initiated correspondence with Zermelo sometime in March 1921. His letters before the one dated 6 May 1921 are lost though. Zermelo first admitted to a gap in his system in a reply to Fraenkel dated 9 May 1921. On 10 July 1921, Fraenkel completed and submitted for publication a paper (published in 1922) that described his axiom as allowing arbitrary replacements: "If M is a set and each element of M is replaced by [a set or an urelement] then M turns into a set again" (parenthetical completion and translation by Ebbinghaus). Fraenkel's 1922 publication thanked Zermelo for helpful arguments. Prior to this publication, Fraenkel publicly announced his new axiom at a meeting of the German Mathematical Society held in Jena on 22 September 1921. Zermelo was present at this meeting; in the discussion following Fraenkel's talk he accepted the axiom of replacement in general terms, but expressed reservations regarding its extent.
Thoralf Skolem made public his discovery of the gap in Zermelo's system (the same gap that Fraenkel had found) in a talk he gave on 6 July 1922 at the 5th Congress of Scandinavian Mathematicians, which was held in Helsinki; the proceedings of this congress were published in 1923. Skolem presented a resolution in terms of first-order definable replacements: "Let U be a definite proposition that holds for certain pairs (a, b) in the domain B; assume further, that for every a there exists at most one b such that U is true. Then, as a ranges over the elements of a set Ma, b ranges over all elements of a set Mb." In the same year, Fraenkel wrote a review of Skolem's paper, in which Fraenkel simply stated that Skolem's considerations correspond to his own.
Zermelo himself never accepted Skolem's formulation of the axiom schema of replacement. At one point he called Skolem's approach "set theory of the impoverished". Zermelo envisaged a system that would allow for large cardinals. He also objected strongly to the philosophical implications of countable models of set theory, which followed from Skolem's first-order axiomatization. According to the biography of Zermelo by Heinz-Dieter Ebbinghaus, Zermelo's disapproval of Skolem's approach marked the end of Zermelo's influence on the developments of set theory and logic.
Early hints of the Axiom of Replacement can be found in Cantor's letter to Dedekind  and in Mirimanoff . Maddy cites two papers by Mirimanoff, "Les antinomies de Russell et de Burali-Forti et le problème fundamental de la théorie des ensembles" and "Remarques sur la théorie des ensembles et les antinomies Cantorienne", both in L'Enseignement Mathématique (1917).