# Mathematical Proof and the Principles of Mathematics/Sets/Classes

Jump to navigation Jump to search

So far, the only set we've actually proved to exist is ∅. We'd like to continue on to build up more sets such as {∅}, {{∅}}, {∅, {∅}}, etc., and define important set operations such as union and intersection. Informally, the way to do this is using formulas such as:

${\displaystyle \{a\}=\{x:x=a\}}$
${\displaystyle \{a,b\}=\{x:x=a\operatorname {or} x=b\}}$
${\displaystyle a\cup b=\{x:x\in a\operatorname {or} x\in b\}}$

The empty set can be made to fit this pattern using

${\displaystyle \varnothing =\{x:False\}}$

More generally, given a predicate P(x), we would like to use the formula

${\displaystyle \{x:P(x)\}}$

To mean the set containing those x for which P(x) is true. As seen in the history section though, using any predicate you want for this willy-nilly leads to paradoxes. So every time the formula is used there must be a theorem which states that there is such a set and a theorem that says that such as set is unique. We'll need some machinery to streamline this process.

## Classes

Although the notion of a class is not defined formally in Zermelo-Fraenkel set theory, it is worthwhile to define it informally since it is a useful concept. Specifically, if P(x) is a predicate, then define the class P to be

${\displaystyle P=\{x:P(x)\}}$

Logically, a class ${\displaystyle P}$ is just a predicate ${\displaystyle P(x)}$ for which ${\displaystyle x\in P}$ is shorthand for ${\displaystyle P(x)}$. We informally think of a class as the collection of all sets that satisfy its defining formula.

Much of what can be said about sets applies to classes as well, as long as you remember that restrictions apply. For one thing a class can only appear on the right side of the ∈ symbol. Also, since classes aren't objects in our universe of discourse, they can't be used in quantifiers. Finally, the = symbol is only defined between sets. We can make a similar definition which applies to classes:

P=Q when for all x, P(x) iff Q(x)

But keep in mind that the Axiom of Substitution does not apply for this type of equality.

Example: If Q(x) denotes the predicate

not ${\displaystyle (x\in x)}$

then Q is the "set" which causes the problem with Russel's paradox. The paradox is avoided because the statement QQ, which puts Q to the left of the ∈ symbol, cannot even be formed legally.

If a is a fixed set, then we can define the predicate A(x) to be

${\displaystyle x\in a}$

Then the class A and the set a have the same elements, in other words:

${\displaystyle (x\in A)\operatorname {iff} \ (x\in a)}$

In some sense you could say that A=a, but we're stepping on shaky ground here because A and a are different types; a is a set while A is technically still a predicate.

## Collectivizing predicates

Contrary to what you might be thinking, this has nothing to do with early 20th century Soviet agriculture. A predicate ${\displaystyle P(x)}$ is called collectivizing when

For some ${\displaystyle y}$, for all ${\displaystyle x}$, ${\displaystyle x\in y}$ iff ${\displaystyle P(x)}$.

(This is an example of a second order predicate, meaning a predicate which applies to predicates rather than objects. Such things don't exist in the logic we've been using so far, but you can think if it as just shorthand for the phrase above.) In less formal language, ${\displaystyle P(x)}$ is collectivizing when there is a set ${\displaystyle y}$ whose elements are the ${\displaystyle x}$ for which ${\displaystyle P(x)}$ is True.

For example the predicate

For all ${\displaystyle y}$, not ${\displaystyle y\in x}$

is collectivizing since it holds for ∅. On the other hand

Not ${\displaystyle x\in x}$

can't be collectivizing because it would allow Russell's paradox discussed in the introduction to this chapter.

To see how this is useful, define the predicate ${\displaystyle Q(y)}$ to mean

For all ${\displaystyle x}$, ${\displaystyle x\in y}$ iff ${\displaystyle P(x)}$.

Then ${\displaystyle P(x)}$ is collectivizing is the same as the existence property for ${\displaystyle Q(y)}$. If, in addition, we have the uniqueness property then

The ${\displaystyle Y}$ for which ${\displaystyle Q(Y)}$

is well defined. To prove the uniqueness property, we need

For all ${\displaystyle y}$, ${\displaystyle z}$, ${\displaystyle Q(y)}$ and ${\displaystyle Q(z)}$ imply ${\displaystyle y=z}$.

Expanded, this is

Theorem SO1: For all ${\displaystyle y}$, ${\displaystyle z}$, if for all ${\displaystyle x}$, ${\displaystyle x\in y}$ iff ${\displaystyle P(x)}$ and for all ${\displaystyle x}$, ${\displaystyle x\in z}$ iff ${\displaystyle P(x)}$, then ${\displaystyle y=z}$.

This may seem complicated, but proving it isn't hard. We'll start an outline and leave the details to the reader.

Choose arbitrary ${\displaystyle b}$ and ${\displaystyle c}$, we must now prove that if for all ${\displaystyle x}$, ${\displaystyle x\in b}$ iff ${\displaystyle P(x)}$ and for all ${\displaystyle x}$, ${\displaystyle x\in c}$ iff ${\displaystyle P(x)}$, then ${\displaystyle b=c}$. Assume for all ${\displaystyle x}$, ${\displaystyle x\in b}$ iff ${\displaystyle P(x)}$ and for all ${\displaystyle x}$, ${\displaystyle x\in c}$ iff ${\displaystyle P(x)}$. So the new goal is to prove ${\displaystyle b=c}$. Axiom S4 says we can do this by showing ${\displaystyle b\subseteq c}$ and ${\displaystyle c\subseteq b}$. To prove ${\displaystyle b\subseteq c}$ we need to prove that for all x, ${\displaystyle x\in b}$ implies ${\displaystyle x\in c}$. But for arbitrary ${\displaystyle a}$ we have ${\displaystyle a\in b}$ iff ${\displaystyle P(a)}$ and ${\displaystyle P(a)}$ iff ${\displaystyle a\in c}$ so ${\displaystyle a\in b}$ implies ${\displaystyle a\in c}$ by Prop. 9 in the Logical equivalence section.

## Defining sets by comprehension

We can now make the following definition:

Definition SO2: If ${\displaystyle P(x)}$ is collectivizing, then define
${\displaystyle \{x:P(x)\}}$
As the set for which
For all ${\displaystyle z}$, ${\displaystyle z\in \{x:P(x)\}}$ iff ${\displaystyle P(z)}$.

The resulting set is said to be defined by comprehension. For the next few sections we'll follow the same plan; state an axiom or prove a theorem which makes a certain predicate collectivizing, then define notation for the corresponding set.

If ${\displaystyle P(x)}$ is not collectivizing, and that can happen as we've been stressing, then technically

${\displaystyle \{x:P(x)\}}$

is undefined. It's useful though to think if it as a set-like object called a class.

## Unions

In order to get from singletons and pairs to triples, we'll use a more general method of combining sets. It's usual to start by defining the union of two sets, but this is actually a special case of a more basic operation, namely the union over a set.

Axiom SO3 (Axiom of unions): For all ${\displaystyle z}$, the predicate
For some ${\displaystyle y}$, ${\displaystyle x\in y}$ and ${\displaystyle y\in z}$
is collectivizing.

Less formally, this says that, given ${\displaystyle z}$, there is a set ${\displaystyle u}$ so that ${\displaystyle x\in u}$ iff ${\displaystyle x}$ is an element of some element of ${\displaystyle z}$.

This allows us to make the definition

Definition SO7: ${\displaystyle \bigcup z:=\{x:\operatorname {for\ some} y,x\in y\operatorname {and} y\in z\}}$

The expression ${\displaystyle \bigcup z}$ is read "the union over ${\displaystyle z}$.

We leave the proofs of the following as exercises:

Theorem SO8: For all ${\displaystyle x}$, ${\displaystyle z}$, ${\displaystyle x\in z}$ implies ${\displaystyle x\subseteq \bigcup z}$
Theorem SO9: For all ${\displaystyle x}$, ${\displaystyle y}$, ${\displaystyle z}$, ${\displaystyle (x\in z\operatorname {implies} x\subseteq y)\operatorname {implies} \bigcup z\subseteq y}$

Informally, ${\displaystyle \bigcup z}$ contains every element of ${\displaystyle z}$ as a subset and is the smallest such set.

To get the usual union of two sets, combine this union with a pair:

Definition SO10: ${\displaystyle x\cup y:=\bigcup \{x,y\}}$

We can then prove as a theorem the usual definition:

Theorem SO11: For all ${\displaystyle x}$, ${\displaystyle y}$, ${\displaystyle x\cup y=\{z:z\in x\operatorname {or} z\in y\}}$

As usual, the proof is left as an exercise.

It's now possible to define triples, quadruples, etc. for as many elements as needed:

Definition SO12: ${\displaystyle \{x,y,z\}:=\{x,y\}\cup \{z\}}$
Definition SO13: ${\displaystyle \{x,y,z,u\}:=\{x,y,z\}\cup \{u\}}$

Etc.

The proofs of the following are left as exercises:

Theorem SO14: ${\displaystyle \bigcup \varnothing =\varnothing }$
Theorem SO15: For all ${\displaystyle x}$, ${\displaystyle \bigcup \{x\}=x}$
Theorem SO16: For all ${\displaystyle x}$, ${\displaystyle y}$, ${\displaystyle \bigcup (x\cup y)=(\bigcup x)\cup (\bigcup y)}$
Theorem SO17: For all ${\displaystyle x}$, ${\displaystyle y}$, ${\displaystyle z}$, ${\displaystyle \{x,y,z\}=\{x,z,y\}=\{y,z,x\}}$

Here, ${\displaystyle x=y=z}$ is shorthand for ${\displaystyle x=y}$ and ${\displaystyle y=z}$.

## Axiom of separation

Before going on to intersections, we need yet another axiom to guarantee they exist. This is a restricted version of comprehension, the idea that any predicate defines a set. This gives it its alternate name, the axiom of restricted comprehension. The unrestricted, and incorrect version says, using the language of classes, that any class is a set. The restricted version says, in effect, any subclass of a set is a set. Written out a bit more formally, this says that for predicates ${\displaystyle P(x)}$ and ${\displaystyle Q(x)}$, if for all ${\displaystyle x}$${\displaystyle P(x)}$ implies ${\displaystyle Q(x)}$ and ${\displaystyle Q(x)}$ is collectivizing, then ${\displaystyle P(x)}$ is collectivizing. Yet more formally:

Axiom SO18 (Separation): For all ${\displaystyle z}$, if for all x, ${\displaystyle P(x)}$ implies ${\displaystyle x\in z}$ then ${\displaystyle P(x)}$ is collectivizing.

If ${\displaystyle R(x)}$ is a predicate then ${\displaystyle P(x)}$ defined as ${\displaystyle R(x)}$ and ${\displaystyle x\in z}$ has the required property, so we can make the definition

${\displaystyle \{x\in z:R(x)\}:=\{x:x\in z\operatorname {and} R(x)\}}$

with no restriction on ${\displaystyle R(x)}$. The fact that any predicate can be used here makes the axiom very powerful, but not so powerful that is leads to a contradiction (at far as anyone knows anyway).

It may be helpful to attempt to use this axiom to reproduce Russell's paradox; presumably the attempt will fail since the idea to avoid contradictions. Let ${\displaystyle c}$ be a set and define

${\displaystyle b:=\{x\in c:\operatorname {not} x\in x\}}$

Now suppose ${\displaystyle b\in b}$. Then ${\displaystyle b}$ fails to meet the criterion not ${\displaystyle b\in b}$ and so not ${\displaystyle b\in b}$ a contradiction. Assume, on the other hand, not ${\displaystyle b\in b}$. Then one of ${\displaystyle b\in c}$ or not ${\displaystyle b\in b}$ must be false. The second possibility is true by assumption, so we have not ${\displaystyle b\in c}$. But this is far from a contradiction and there is no paradox this time.

## Intersections

Intersections are similar to unions except that the 'For some' is replaced by 'for all'. We define intersections following the same plan as for unions. In this case though, we can use the axiom of separation to prove a theorem which replaces the axiom of unions.

Theorem SO19 (existence of intersections): For all ${\displaystyle z}$ not equal to ∅, the predicate
For all ${\displaystyle y}$, ${\displaystyle y\in z}$ implies ${\displaystyle x\in y}$
is collectivizing.

Less formally, this says that, given ${\displaystyle z}$, there is a set ${\displaystyle n}$ so that ${\displaystyle x\in n}$ iff ${\displaystyle x}$ is an element of every element of ${\displaystyle z}$. The assumption ${\displaystyle z}$ not equal to ∅ will be needed in the proof.

Proof (outline): Let ${\displaystyle Q(x)}$ be the predicate
For all ${\displaystyle y}$, ${\displaystyle y\in z}$ implies ${\displaystyle x\in y}$.
From not ${\displaystyle z=\varnothing }$, theorem S8 on the previous page says there is some ${\displaystyle w\in z}$. Pick one, say ${\displaystyle d\in z}$. One can now prove that ${\displaystyle Q(x)}$ implies ${\displaystyle x\in d}$, and therefore by the axiom of separation, ${\displaystyle Q(x)}$ is collectivizing.

This allows us to make the definition when ${\displaystyle z}$ is not ∅:

Definition SO20: ${\displaystyle \bigcap z:=\{x:\operatorname {for\ all} y,y\in z\operatorname {implies} x\in y\}}$

The expression ${\displaystyle \bigcap z}$ is read "the intersecion over ${\displaystyle z}$. ${\displaystyle \bigcap \varnothing }$ is left undefined.

To get the usual intersecion of two sets, combine this intersection with a pair:

Definition SO21: ${\displaystyle x\cap y:=\bigcap \{x,y\}}$

We can then prove as a theorem the usual definition:

Theorem SO22: For all ${\displaystyle x}$, ${\displaystyle y}$, ${\displaystyle x\cap y=\{z:z\in x\operatorname {and} z\in y\}}$

with the proof is left as an exercise.

Definition SO23: ${\displaystyle x}$ and ${\displaystyle y}$ are disjoint when ${\displaystyle x\cap y=\varnothing }$. A set ${\displaystyle z}$ (usually taken to be a set of other sets) is pairwise disjoint if for all ${\displaystyle x}$, ${\displaystyle y}$, ${\displaystyle x\in z}$ and ${\displaystyle y\in z}$ imply ${\displaystyle x=y}$ or ${\displaystyle x}$ and ${\displaystyle y}$ are disjoint.

In other words ${\displaystyle x}$ and ${\displaystyle y}$ are disjoint when they have no elements in common, and ${\displaystyle z}$ is pairwise disjoint if any two different elements are disjoint.