Every proof so far has spoken of "the even integers" or "the primes" as collections, and none has said what a collection is, when two of them are the same, or how to build new ones from old.
The previous lesson completed the stock of proof methods with induction, but the objects the proofs talk about have been informal, and this lesson makes them precise. It assumes the connectives, including the rule that a conditional with a false hypothesis is vacuously true, the quantifiers and , and induction.
Membership and set builder notation
A set is a collection of objects, its elements, and it is determined by nothing except which objects those are. " is an element of " is written , and its negation . So and , with , , and standing as before for the natural numbers (starting at ), the integers, the rationals and the reals.
A small set can be listed between braces: is the set of primes below . A large one is described by a property, in set builder notation:
read "the set of in such that ". Here is a set already known and an open sentence, and the result is the set of elements of that make true. So , since is below and is not. A second form puts an expression first: is the even integers.
The notation comes with one rule, and proofs use it constantly: belongs to exactly when and is true. The insistence on a surrounding set looks like pedantry, and the last section shows that it is not.
Subsets and equality
is a subset of , written , when every element of is an element of :
To prove this universal conditional, let be an arbitrary element of and show, using only what membership in means, that . One element of outside disproves it.
Two sets are equal when they have the same elements. So : each element of either side, or , lies in the other. Order is not an element, and writing twice names the same element twice. The definition also gives the method this lesson is built round: exactly when and , so a proof that two sets are equal is two subset proofs, called a proof by double inclusion.
Keep and apart: and , but , since the set is not one of the numbers and . Yet .
Example. Prove that .
Call the sides and . First, . Let . Then is an even integer and for some integer . If were odd, would be a product of odd numbers and so odd, contradicting even; hence for some integer , and . So , and . Second, . Let , so for some integer . Then and , so and , and . Each set is a subset of the other, so .
Now you. Prove that .
Answer
Call the left side ; note . First, . Let , so . A product of two reals is negative only when one factor is positive and the other negative, and since , the positive one is . So and , and . Second, . Let . Then and , so their product is negative and . Hence .
Union, intersection, difference and complement
Four operations build new sets from old, each a connective in disguise. is in the union when or , with the inclusive "or"; in the intersection when and ; and in the difference when and . With and these are , and .
The complement of is everything not in , and "everything" needs a limit: a universe , fixed in advance and containing every set under discussion, with . The universe is part of the meaning: the complement of the even integers is the odd integers when , but also contains and when .
The intersection of and has no elements at all. It is the empty set , and it is a subset of every set . The claim means . The hypothesis is false for every , so the conditional is vacuously true. The same argument shows there is only one empty set, since two sets with no elements are each a subset of the other. But is not empty: it has one element.
Proving an identity by double inclusion
An identity between sets claims that two sets are equal for every choice of , and . A drawing of overlapping circles shows one arrangement; double inclusion covers them all, one arbitrary element at a time.
Example. Prove that for all sets , and , .
First, left in right. Let . Then , and or . If , then ; if , then . Either way is in the right side. Second, right in left. Let . If , then and , so ; the case is the same with for . Each side contains the other, so they are equal.
An "or" in the hypothesis became a proof by cases, and an "or" in the conclusion needed only one of its parts. That is the pattern of most identity proofs.
Now you. Prove that for all sets , and , .
Answer
First, left in right. Let . If , or if is in both and , then is in and in , so in the right side. Second, right in left. Let . If , it is in the left side. If not, then forces and forces , so , and again is in the left side. The sets are equal.
De Morgan's laws for sets
Augustus De Morgan's laws for statements, from 1847, say that is equivalent to , and to . Since union is "or", intersection "and" and complement "not", the same laws hold for subsets of a universe :
Example. Prove that for all subsets and of .
First, left in right. Let , so and . If were in , it would be in , so ; likewise . Hence and , so . Second, right in left. Let , so , and . Then " or " is false, so and . The sets are equal.
The middle of each half is De Morgan's law for statements, applied to and . Every identity here is an equivalence of statements with "" written in front.
Now you. Prove that for all subsets and of .
Answer
First, left in right. Let , so and . Then " and " is false, so or , that is, or , and . Second, right in left. Let . If , then , so ; if , the same holds with . Either way . The sets are equal.
Power sets and products
The power set is the set of all subsets of . For it has eight elements: , three one-element sets, three pairs, and itself. Writing for the number of elements of a finite set, the pattern is general: if , then .
The proof is by induction on . When , , whose only subset is , and . Suppose every set of elements has subsets, and let . Choose and let , which has elements. A subset of either omits , and is then a subset of , or contains , and is then for exactly one subset of . There are of each kind and none of both, so has subsets.
An ordered pair differs from the set : exactly when and . The Cartesian product is the set of all pairs with and , named after Descartes because is the coordinate plane. For finite sets : sort the pairs by first coordinate, and each of the choices of gives a row of exactly pairs, with no pair in two rows. So has elements.
Unions and intersections of many sets
A family of sets , one for each , has a union and an intersection defined by the quantifiers:
Take . The intersection of to is , never empty, yet the intersection over all is . Suppose lies in every . Then , so some natural number exceeds (a property of the reals proved in a later lesson), and for it , so , a contradiction. What holds at every finite stage can fail for the whole family.
Russell's paradox
Georg Cantor, who founded the theory, defined a set in 1895 as any collection of definite, distinct objects into a whole. Read literally, that allows for any property , with no surrounding set. In 1901 Bertrand Russell took the property and formed
By the membership rule, exactly when , and no statement can be equivalent to its own negation. Russell's letter of June 1902 reached Gottlob Frege as the second volume of his foundations of arithmetic, built on exactly this kind of set, went to press.
The repair, due to Ernst Zermelo in 1908, is the rule this lesson has used throughout: a property may only carve a subset out of a set already known, as . Run Russell's argument on . If were in , then exactly when , so . The paradox becomes a theorem: no set contains every set, which is why a complement needs a universe.
Sets now have a precise language and a method of proof, but a set on its own does nothing. Mathematics is mostly about processes that turn one thing into another, a number into its square or a point into its reflection, and the next lesson makes those processes precise as functions.