This article examines the implementation of mathematical concepts in set theory. The implementation of a number of basic mathematical concepts is carried out in parallel in ZFC (the dominant set theory) and in NFU, the version of Quine's New Foundations shown to be consistent by R. B. Jensen in 1969 (here understood to include at least axioms of Infinity and Choice).

What is said here applies also to two families of set theories: on the one hand, a range of theories including Zermelo set theory near the lower end of the scale and going up to ZFC extended with large cardinal hypotheses such as "there is a measurable cardinal"; and on the other hand a hierarchy of extensions of NFU which is surveyed in the New Foundations article. These correspond to different general views of what the set-theoretical universe is like, and it is the approaches to implementation of mathematical concepts under these two general views that are being compared and contrasted.

It is not the primary aim of this article to say anything about the relative merits of these theories as foundations for mathematics. The reason for the use of two different set theories is to illustrate that multiple approaches to the implementation of mathematics are feasible. Precisely because of this approach, this article is not a source of "official" definitions for any mathematical concept.

Preliminaries

The following sections carry out certain constructions in the two theories ZFC and NFU and compare the resulting implementations of certain mathematical structures (such as the natural numbers).

Mathematical theories prove theorems (and nothing else). So saying that a theory allows the construction of a certain object means that it is a theorem of that theory that that object exists. This is a statement about a definition of the form "the x such that exists", where is a formula of our language: the theory proves the existence of "the x such that " just in case it is a theorem that "there is one and only one x such that ". (See Bertrand Russell's theory of descriptions.) Loosely, the theory "defines" or "constructs" this object in this case. If the statement is not a theorem, the theory cannot show that the object exists; if the statement is provably false in the theory, it proves that the object cannot exist; loosely, the object cannot be constructed.

ZFC and NFU share the language of set theory, so the same formal definitions "the x such that " can be contemplated in the two theories. A specific form of definition in the language of set theory is set-builder notation: means "the set A such that for all x, " (A cannot be free in ). This notation admits certain conventional extensions: is synonymous with ; is defined as , where is an expression already defined.

Expressions definable in set-builder notation make sense in both ZFC and NFU: it may be that both theories prove that a given definition succeeds, or that neither do (the expression fails to refer to anything in any set theory with classical logic; in class theories like NBG this notation does refer to a class, but it is defined differently), or that one does and the other doesn't. Further, an object defined in the same way in ZFC and NFU may turn out to have different properties in the two theories (or there may be a difference in what can be proved where there is no provable difference between their properties).

Further, set theory imports concepts from other branches of mathematics (in intention, all branches of mathematics). In some cases, there are different ways to import the concepts into ZFC and NFU. For example, the usual definition of the first infinite ordinal in ZFC is not suitable for NFU because the object (defined in purely set theoretical language as the set of all finite von Neumann ordinals) cannot be shown to exist in NFU. The usual definition of in NFU is (in purely set theoretical language) the set of all infinite well-orderings all of whose proper initial segments are finite, an object which can be shown not to exist in ZFC. In the case of such imported objects, there may be different definitions, one for use in ZFC and related theories, and one for use in NFU and related theories. For such "implementations" of imported mathematical concepts to make sense, it is necessary to be able to show that the two parallel interpretations have the expected properties: for example, the implementations of the natural numbers in ZFC and NFU are different, but both are implementations of the same mathematical structure, because both include definitions for all the primitives of Peano arithmetic and satisfy (the translations of) the Peano axioms. It is then possible to compare what happens in the two theories as when only set theoretical language is in use, as long as the definitions appropriate to ZFC are understood to be used in the ZFC context and the definitions appropriate to NFU are understood to be used in the NFU context.

Whatever is proven to exist in a theory clearly provably exists in any extension of that theory; moreover, analysis of the proof that an object exists in a given theory may show that it exists in weaker versions of that theory (one may consider Zermelo set theory instead of ZFC for much of what is done in this article, for example).

Empty set, singleton, unordered pairs and tuples These constructions appear first because they are the simplest constructions in set theory, not because they are the first constructions that come to mind in mathematics (though the notion of finite set is certainly fundamental). Even though NFU also allows the construction of set ur-elements yet to become members of a set, the empty set is the unique set with no members:

For each object , there is a set with as its only element:

For objects and , there is a set containing and as its only elements:

The union of two sets is defined in the usual way:

This is a recursive definition of unordered -tuples for any concrete (finite sets given as lists of their elements:)

In NFU, all the set definitions given work by stratified comprehension; in ZFC, the existence of the unordered pair is given by the Axiom of Pairing, the existence of the empty set follows by Separation from the existence of any set, and the binary union of two sets exists by the axioms of Pairing and Union ().

Ordered pair

First, consider the ordered pair. The reason that this comes first is technical: ordered pairs are needed to implement relations and functions, which are needed to implement other concepts which may seem to be prior. The first definition of the ordered pair was the definition proposed by Norbert Wiener in 1914 in the context of the type theory of Principia Mathematica. Wiener observed that this allowed the elimination of types of n-ary relations for n > 1 from the system of that work. It is more usual now to use the definition , due to Kuratowski. Either of these definitions works in either ZFC or NFU. In NFU, these two definitions have a technical disadvantage: the Kuratowski ordered pair is two types higher than its projections, while the Wiener ordered pair is three types higher. It is common to postulate the existence of a type-level ordered pair (a pair which is the same type as its projections) in NFU. It is convenient to use the Kuratowski pair in both systems until the use of type-level pairs can be formally justified. The internal details of these definitions have nothing to do with their actual mathematical function. For any notion of ordered pair, the thing that matters is that it satisfies the defining condition

…and that it be reasonably easy to collect ordered pairs into sets.

Relations Relations are sets whose members are all ordered pairs. Where possible, a relation (understood as a binary predicate) is implemented as (which may be written as ). When is a relation, the notation means .

In ZFC, some relations (such as the general equality relation or subset relation on sets) are 'too large' to be sets (but may be harmlessly reified as proper classes). In NFU, some relations (such as the membership relation) are not sets because their definitions are not stratified: in , and would need to have the same type (because they appear as projections of the same pair), but also successive types (because is considered as an element of ).

Related definitions Let and be given binary relations. Then the following concepts are useful:

The converse of is the relation .

The domain of is the set .

The range of is the domain of the converse of . That is, the set .

The field of is the union of the domain and range of .

The preimage of a member of the field of is the set (used in the definition of 'well-founded' below.)

The downward closure of a member of the field of is the smallest set containing , and containing each for each (i.e., including the preimage of each of its elements with respect to as a subset.)

The relative product of and is the relation .

Notice that with our formal definition of a binary relation, the range and codomain of a relation are not distinguished. This could be done by representing a relation with codomain as , but our development will not require this.

In ZFC, any relation whose domain is a subset of a set and whose range is a subset of a set will be a set, since the Cartesian product is a set (being a subclass of ), and Separation provides for the existence of . In NFU, some relations with global scope (such as equality and subset) can be implemented as sets. In NFU, bear in mind that and are three types lower than in (one type lower if a type-level ordered pair is used).

Properties and kinds of relations A binary relation is: Reflexive if for every in the field of . Symmetric if . Transitive if . Antisymmetric if . Well-founded if for every set which meets the field of , whose preimage under does not meet . Extensional if for every in the field of , if and only if and have the same preimage under .

Relations having certain combinations of the above properties have standard names. A binary relation is:

An equivalence relation if is reflexive, symmetric, and transitive. A partial order if is reflexive, antisymmetric, and transitive. A linear order if is a partial order and for every in the field of , either or . A well-ordering if is a linear order and well-founded. A set picture if is well-founded and extensional, and the field of either equals the downward closure of one of its members (called its top element), or is empty.

Functions A functional relation is a binary predicate such that Such a relation (predicate) is implemented as a relation (set) exactly as described in the previous section. So the predicate is implemented by the set . A relation is a function if and only if It is therefore possible to define the value function as the unique object such that  – i.e.: is -related to such that the relation holds between and  – or as the unique object such that . The presence in both theories of functional predicates which are not sets makes it useful to allow the notation both for sets and for important functional predicates. As long as one does not quantify over functions in the latter sense, all such uses are in principle eliminable.

Outside of formal set theory, we usually specify a function in terms of its domain and codomain, as in the phrase "Let be a function". The domain of a function is just its domain as a relation, but we have not yet defined the codomain of a function. To do this we introduce the terminology that a function is from to if its domain equals and its range is contained in . In this way, every function is a function from its domain to its range, and a function from to is also a function from to for any set containing .