1.1.7: Summary
A set is a collection of objects, the elements of the set. We write \(x \in A\) if \(x\) is an element of \(A\) . Sets are extensional —they are completely determined by their elements. Sets are specified by listing the elements explicitly or by giving a property the elements share ( abstraction ). Extensionality means that the order or way of listing or specifying the elements of a set doesn’t matter. To prove that \(A\) and \(B\) are the same set ( \(A = B\) ) one has to prove that every element of \(X\) is an element of \(Y\) and vice versa.
Important sets include the natural ( \(\Nat\) ), integer ( \(\Int\) ), rational ( \(\Rat\) ), and real ( \(\Real\) ) numbers, but also strings ( \(X^*\) ) and infinite sequences ( \(X^\omega\) ) of objects. \(A\) is a subset of \(B\) , \(A \subseteq B\) , if every element of \(A\) is also one of \(B\) . The collection of all subsets of a set \(B\) is itself a set, the power set \(\Pow{B}\) of \(B\) . We can form the union \(A \cup B\) and intersection \(A \cap B\) of sets. An ordered pair \(\tuple{x, y}\) consists of two objects \(x\) and \(y\) , but in that specific order. The pairs \(\tuple{x, y}\) and \(\tuple{y, x}\) are different pairs (unless \(x = y\) ). The set of all pairs \(\tuple{x, y}\) where \(x \in A\) and \(y \in B\) is called the Cartesian product \(A \times B\) of \(A\) and \(B\) . We write \(A^2\) for \(A \times A\) ; so for instance \(\Nat^2\) is the set of pairs of natural numbers.