Loading [MathJax]/jax/output/CommonHTML/jax.js

Supplement to Set Theory

Basic Set Theory

Sets are well-determined collections that are completely characterized by their elements. Thus, two sets are equal if and only if they have exactly the same elements. The basic relation in set theory is that of elementhood, or membership. We write aA to indicate that the object a is an element, or a member, of the set A. We also say that a belongs to A. Thus, a set A is equal to a set B if and only if for every a, aA if and only if aB. In particular, there is only one set with no elements at all. This set is called, naturally, the empty set, and is represented by the symbol .

We say that A is a subset of B, written AB, if every element of A is an element of B. Thus, A=B if and only if AB and BA. Notice that A, for every set A.

Given sets A and B, one can perform some basic operations with them yielding the following sets:

  • The set AB, called the union of A and B, whose elements are the elements of A and the elements of B.

  • The set AB, called the intersection of A and B, whose elements are the elements common to A and B.

  • The set AB, called the difference of A and B, whose elements are those elements of A that are not members of B.

It is routine to check that those operations satisfy the following properties:

  • Associativity:

    • A(BC)=(AB)C

    • A(BC)=(AB)C

  • Commutativity:

    • AB=BA

    • AB=BA

  • Distributivity:

    • A(BC)=(AB)(AC)

    • A(BC)=(AB)(AC)

  • Idempotency:

    • AA=A

    • AA=A

    • A=A

    • A=

    • AA=

  • If AB, then

    • AB=A(BA)=B

    • AB=A

Given an object a we can form the set that has a as its only element. This set is denoted by {a}. More generally, given a,b,c,, we can form the set having a,b,c, as its elements, which we denote by {a,b,c,}. Of course, we can actually write down all the elements of the set when there are not too many of them. In the case of infinite sets this is clearly not possible.

If a=b, then {a,b}={a}. Also, for any a and b, the pair {a,b} is the same as the pair {b,a}. So, if we wish to take into account the order in which the two elements of a pair are given, we need to find another way of representing the pair. Thus, we define the ordered pair (a,b) as the set {{a},{a,b}}. One can easily check that two ordered pairs (a,b) and (c,d) are equal if and only if a=c and b=d. The order is now important, for if ab, then (a,b)(b,a).

The Cartesian product A×B of two sets, A and B, is defined as the set of all ordered pairs (a,b) such that aA and bB.

Having defined ordered pairs, one can now define ordered triples (a,b,c) as (a,(b,c)), or in general ordered n-tuples (a1,,an) as (a1,(a2,,an)).

The Cartesian product A1××An, of the sets A1,,An is the set of all n-tuples (a1,,an) such that aiAi, for every 1in. In particular, for n2, the n-times Cartesian product of a set A, denoted by An, is the set of all n-tuples of elements of A.


1. Relations

A binary relation on a set A is a set of ordered pairs of elements of A, that is, a subset of A×A. In general, an n-ary relation on A is a subset of An.

A binary relation R on a set A is called reflexive if (a,a)R for every aA. It is called symmetric if (b,a)R whenever (a,b)R. And it is called transitive if (a,c)R whenever (a,b)R and (b,c)R. A relation that is reflexive, symmetric, and transitive is called an equivalence relation. The identity relation on any set A is the paradigmatic example of an equivalence relation. Another example is the relation on the set of all finite sets of natural numbers consisting of all the pairs (a,b) such that a and b have the same number of elements.

If R is an equivalence relation on a set A, and (a,b)R, then we say that that a and b are R-equivalent. For every aA, the equivalence class of a, usually denoted by [a]R, is the set of all elements of A that are R-equivalent to a. The set of all R-equivalence classes is called the quotient set and is denoted by A/R. One can easily check that A/R is a partition of A, that is, no element of A/R is empty, any two elements of A/R are disjoint, and every aA belongs to (exactly) one element of A/R, namely the class [a]R.

If R is a binary relation, then one usually writes aRb instead of (a,b)R.

A binary relation R on a set A is called antisymmetric if a=b whenever aRb and bRa. A relation R on a set A that is reflexive, antisymmetric, and transitive, is called a (reflexive) partial order. If we remove from R all pairs (a,a), for every aA, then we get a strict partial order. The relation on any set of sets is an example of a partial order. A partial order on a given set A is usually represented by the symbol , and the corresponding strict partial ordering by <. A partial order on a set A with the additional property that either ab or ba, for all elements a and b of A, is called a total order, or a linear order. The usual orderings of the set N of natural numbers, the set Z of the integers, the set Q of the rational numbers, or the set R of real numbers, are linear orders.

Notice that if is a linear order on a set A, and BA, then B2 is also a linear order on B. If is a linear order on a set A, then we say that aA is the -least element of A if there is no bA distinct from a such that ba. The number 0 is the least element of N, but Z has no least element.

A linear order on a set A is a well-order if every non-empty subset of A has a -least element. Equivalently, if there is no infinite strictly descending sequence <a2<a1<a0 of elements of A. Thus, the usual ordering of N is a well-order. But the usual order on Z is not, because it has no least element.

2. Functions

A (1-ary) function on a set A is a binary relation F on A such that for every aA there is exactly one pair (a,b)F. The element b is called the value of F on a, and is denoted by F(a). And the set A is called the domain of F. The notation F:AB indicates that F is a function with domain A and values in the set B. For n2, an n-ary function on A is a function F:AnB, for some B.

A function F:AB is one-to-one if for all elements a and b of A, if ab, then F(a)F(b). And is onto if for every bB there is some aA such that F(a)=b. Finally, F is bijective if it is one-to-one and onto. Thus, a bijection F:AB establishes a one-to-one correspondence between the elements of A and those of B, and A is bijectable with B if there is such a bijection. The identity function on a set A, denoted by Id:AA, and which consists of all the pairs (a,a), with aA, is trivially a bijection.

Given functions F:AB and G:BC, the composition of F and G, written GF, is the function GF:AC whose elements are all pairs (a,G(F(a))), where aA. If F and G are bijections, then so is GF.

3. Sets and formulas

The formal language of set theory is the first-order language whose only non-logical symbol is the binary relation symbol .

Given any formula φ(x,y1,,yn) of the language of set theory, and sets A,B1,,Bn, one can form the set of all those elements of A that satisfy the formula φ(x,B1,,Bn). This set is denoted by {aA:φ(a,B1,,Bn)}. The following are some examples

  • ={aA:¬a=a}

  • A={aA:a=a}

  • AB={aA:¬aB}.

  • AB={aA:aB}.

And if B and C are subsets of A, then

  • BC={aA:aBaC}.

Given a subset CA×B, the projection of C (on the first coordinate) is the set

{aA:bB((a,b)C)}.

It is not the case, however, that given any formula φ(x,y1,,yn), and sets B1,,Bn, one can form the set of all those sets that satisfy the formula φ(x,B1,,Bn). For let φ(x) be the formula ¬xx. If A were the set of all sets that satisfy the formula, then AA if and only if ¬AA. A contradiction! This contradiction is known as Russell’s paradox, after Bertrand Russell, who discovered it in 1901 (see the entry on Russell’s paradox).

4. Ordinals

The first ordinal number is . Given an ordinal α, the next bigger ordinal, called the (immediate) successor of α, is the set α{α}. Thus, the successor of α is just the set α together with one more element, namely, α itself. The finite ordinal numbers are those obtained by starting with and repeatedly taking the successor.

In set theory the natural numbers are defined as the finite ordinals. Thus,

  • 0=

  • 1={}={}

  • 2={}{{}}={,{}}

  • 3={,{}}{{,{}}}={,{},{,{}}}

Notice that 1={0}, 2={0,1}, 3={0,1,2}, and in general we have n={0,1,2,,n1}. So, every natural number n is just the set of its predecessors.

A set A is finite if there is a one-to-one correspondence between some natural number n and the elements of A, i.e., a bijection F:nA, in which case we say that A has n elements. A set is infinite if it is not finite.

The set of all finite ordinals is denoted by the Greek letter omega (ω). Thus, ω is just the set N of natural numbers. ω is also an ordinal, the first infinite ordinal. Notice that ω is not the successor of any ordinal, and so it is called a limit ordinal. Once we have ω we can continue generating more ordinals by taking its successor ω{ω}, then its successor (ω{ω}){ω{ω}}, and so on. All ordinal numbers greater than 0 are produced in this way, namely, either by taking the successor of the last produced ordinal, or, if there is no such last ordinal, by taking the set of all the ordinals produced so far, as in the case of ω which yields a new limit ordinal. Note, however, that one cannot take the set of all ordinals, for then this set would be a new limit ordinal, which is impossible, since we already had them all.

As with finite ordinals, every infinite ordinal is just the set of its predecessors. One consequence of this is that the relation is a strict well-order on any set of ordinals. Thus, for any ordinals α and β we define α<β if and only if αβ. Then the associated reflexive well-order is defined as αβ if and only if α<β or α=β. Let us now observe that αβ if and only if αβ.

5. Countable and uncountable sets

If A is a finite set, there is a bijection F:nA between a natural number n and A. Any such bijection gives a counting of the elements of A, namely, F(0) is the first element of A, F(1) is the second, and so on. Thus, all finite sets are countable. An infinite set A is called countable if there is a bijection F:ωA between the set of natural numbers and A. The set N of natural numbers is (trivially) countable. If A is an infinite subset of ω, then A is also countable: for let F:ωA be such that F(n) is the least element of A that is not in the set {F(m)A:m<n}. Then F is a bijection.

Every infinite subset of a countable set is also countable: for suppose F:ωA is a bijection and BA is infinite. Then the set {nω:F(n)B} is an infinite subset of ω, hence countable, and so there is a bijection G:ω{nω:F(n)B}. Then the composition function FG:ωB is a bijection.

The union of a countable set and a finite set is also countable. For given sets A and B, which without loss of generality we may assume they are disjoint, and given bijections F:ωA and G:nB, for some n<ω, let H:ωAB be the bijection given by: H(m)=G(m), for every m<n, and H(m)=F(mn), for every nm.

Moreover, the union of two countable sets is also countable: since we have already shown that the union of a countable set and a finite set is also countable, it is enough to see that the union of two disjoint countable sets is also countable. So, suppose A and B are countable sets and F:ωA and G:ωB are bijections, then the function H:ωAB consisting of all pairs (2n,F(n)), plus all pairs (2n+1,G(n)) is a bijection.

Thus, the set Z, being the union of two countable sets, namely N{1,2,3,4,} is also countable.

The Cartesian product of two infinite countable sets is also countable. For suppose F:ωA and G:ωB are bijections. Then, using the fact that the function J:ω×ωω given by J((m,n))=2m(2n+1)1 is a bijection, one has that the function H:ωA×B given by H(2m(2n+1)1)=(F(m),G(n)) is also a bijection.

Since any rational number is given by a pair of integers, i.e., a quotient mn, where m,nZ and n0, the set Q of rational numbers is also countable.

However, Georg Cantor discovered that the set R of real numbers is not countable. For suppose, aiming for a contradiction, that F:ωR is a bijection. Let a0=F(0). Choose the least k such that a0<F(k) and put b0=F(k). Given an and bn, choose the least l such that an<F(l)<bn, and put an+1=F(l). And choose the least m such that an+1<F(m)<bn, and put bn+1=F(m). Thus, we have a0<a1<a2< <b2<b1<b0. Now let a be the limit of the an. Then a is a real number different from F(n), all n, which is impossible because F is a bijection.

The existence of uncountable sets follows from a much more general fact, also discovered by Cantor. Namely, given any set A, the set of all its subsets, called the power set of A, and denoted by P(A), is not bijectable with A: for suppose that F:AP(A) is a bijection. Then the subset {aA:¬aF(a)} of A is the value F(a) of some aA. But then aF(a) if and only if ¬aF(a). Hence, if A is any infinite set, then P(A) is uncountable.

There are also uncountable ordinals. The set of all finite and countable ordinals is also an ordinal, called ω1, and is the first uncountable ordinal. Similarly, the set of all ordinals that are bijectable with some ordinal less than or equal to ω1 is also an ordinal, called ω2, and is not bijectable with ω1, and so on.

5.1 Cardinals

The cardinality, or size, of a finite set A is the unique natural number n such that there is a bijection F:nA.

In the case of infinite sets, their cardinality is given, not by a natural number, but by an infinite ordinal. However, in contrast with the finite sets, an infinite set A is bijectable with many different ordinal numbers. For example, the set N is bijectable with ω, but also with it successor ω{ω}: by assigning 0 to ω and n+1 to n, for all nω, we obtain a bijection between ω{ω} and ω. But since the ordinals are well-ordered, we may define the cardinality of an infinite set as the least ordinal that is bijectable with it.

In particular, the cardinality of an ordinal number α is the least ordinal κ that is bijectable with it. Notice that κ is not bijectable with any smaller ordinal, for otherwise so would be α. The ordinal numbers that are not bijectable with any smaller ordinal are called cardinal numbers. Thus, all natural numbers are cardinals, and so are ω, ω1, ω2, and so on. In general, given any cardinal κ, the set of all ordinals that are bijectable with some ordinal κ is also a cardinal; it is the smallest cardinal bigger than κ.

The infinite cardinals are represented by the letter aleph () of the Hebrew alphabet. Thus, the smallest infinite cardinal is ω=0, the next one is ω1=1, which is the first uncountable cardinal, then comes ω2=2, etc.

The cardinality of any set A, denoted by |A|, is the unique cardinal number that is bijectable with A. We saw already that |R| is uncountable, hence greater than 0, but it is not known what cardinal number it is. The conjecture that |R|=1, formulated by Cantor in 1878, is the famous Continuum Hypothesis.

Further Readings

  • Devlin, K., 1979, Fundamentals of Contemporary Set Theory, Undergraduate Texts in Mathematics, Springer, Second edition 1993, The Joy of Sets: Fundamentals of Contemporary Set Theory. Undergraduate Texts in Mathematics, New York: Springer.
  • Enderton, H.B., 1977, Elements of Set Theory, New York: Academic Press.
  • Jech, T. and K. Hrbaček, 1978 [1999], Introduction to set theory, New York: Marcel Dekker, 3rd edition 1999.

Copyright © 2023 by
Joan Bagaria <joan.bagaria@icrea.cat>

This is a file in the archives of the Stanford Encyclopedia of Philosophy.
Please note that some links may no longer be functional.