← back to proofs

Sets

Jim Hefferon · GFDL + CC BY-SA 2.5 · Introduction to Proofs

A set is a collection of distinct objects. The core proof technique for sets is element-chasing: to show A is a subset of B, pick an arbitrary element x in A and show x must be in B. To show A = B, show each is a subset of the other.

A B A n B

Set notation and membership

Sets are written with curly braces or set-builder notation. Membership is "x in A." The empty set has no elements. Two sets are equal when they have exactly the same elements, regardless of order or repetition.

Scheme

Subset and equality

A is a subset of B if every element of A is also in B. To prove A = B, prove A is a subset of B and B is a subset of A. This is the standard technique for proving set equality.

Scheme

Union, intersection, complement

Scheme

Power set and Cartesian product

The power set of A is the set of all subsets of A. It has 2^|A| elements. The Cartesian product A x B is the set of all ordered pairs (a, b) with a in A and b in B.

Scheme

Element-chasing: the core technique

Proof that A intersect (B union C) = (A intersect B) union (A intersect C). Pick x in the left side: x is in A and x is in B union C. Case 1: x is in B, so x is in A intersect B, so x is in the right side. Case 2: x is in C, so x is in A intersect C, so x is in the right side. The other direction is similar.

Scheme
Neighbors