# set

basic set

## 1 Introduction

A set is a collection, , or conglomerate11However, not every collection has to be a set (in fact, all collections can’t be sets: there is no set of all sets or of all ordinals for example). See proper class for more details..

Sets can be of “” objects or mathematical objects, but the sets themselves are purely conceptual. This is an important point to note: the set of all cows (for example) does not physically exist, even though the cows do. The set is a “gathering” of the cows into one conceptual that is not part of physical reality. This makes it easy to see why we can have sets with an infinite number of elements; even though we may not be able to point out infinitely many objects in the real world, we can construct conceptual sets which an infinite number of elements (see the examples below).

The symbol $\in$ denotes set membership. For example, $s\in S$ would be read “$s$ is an element of $S$”.

We write $A\subset B$ if for all $x\epsilon A$ we have $x\epsilon B$ and we then say $B$ contains $A$. We sometimes write “$S$ contains $s$” when $S$ contains the set whose only element is $s$.

Mathematics is thus built upon sets of purely conceptual, or mathematical, objects. Sets are usually denoted by upper-case roman letters (such as $S$). Sets can be defined by listing the members, as in

 $S:=\{a,b,c,d\}.$

Or, a set can be defined from a predicate (called “set builder notation”). This type of statement defining a set is of the form

 $S:=\{x\in X:P(x)\},$

where $S$ is the symbol denoting the set, $x$ is the variable we are introducing to represent a generic element of the set (note that, by the so called axiom of comprehension (or axiom of subsets), $x$ must be a member of some set which has already been defined. This is necessary in order to avoid Russell’s paradox22One needs to be careful when defining a set by a predicate only, since (for example) “$x$ is not in $x$” is a perfectly good predicate. Either one needs to restrict the kind of predicate, or, more commonly, one needs to define only subsets by predicates. So while one cannot do $\{x\colon x\not\in x\}$, if one already has a set $U$, one can do $\{x:x\in U,x\not\in x\}$..) and $P(x)$ is some property which must be true for any element $x$ of the set (that is, $x\in S$ is equivalent to $x\in X$ and $P(x)$ holds.) Sometimes, we write a set definition as $S:=\{f(x)\in X:P(x)\}$, where $f(x)$ is a transformation of that variable. In this case, we can simply replace the set $X$ by $Y$, where $Y:=\{y\in X:\exists x\in X,y=f(x)\}$ in order to define the set as above.

Sets are, in fact, completely specified by their elements. If two sets have the same elements, they are equal. This is called the axiom of extensionality, and it is one of the most important characteristics of sets that distinguishes them from predicates or properties.

Some examples of sets are:

• The standard number sets $\mathbb{N}$, $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$.

• The set of all even integers: $\{x\in\mathbb{Z}:2\!\mid\!x\}.$

• The set of all prime numbers (sometimes denoted $\mathbb{P}$): $\{p\in\mathbb{N}:p>1,\forall x\in\mathbb{N}\;\;x\!\mid\!p\Rightarrow x\in\{1,p\}\}$, where $\Rightarrow$ denotes implies and $\mid$ denotes divides.

• The set of all real functions of one real parameter (sometimes denoted by $\mathbb{R}^{\mathbb{R}}$): $\{f(x)\in\mathbb{R}:x\in\mathbb{R}\}$ or, more formally, $\{f\subset\mathbb{R}^{2}:\left[\forall x\in\mathbb{R},\exists y\in\mathbb{R},(% x,y)\in f\right]\wedge\left[(x,y),(x,y^{\prime})\in f\Rightarrow y=y^{\prime}% \right]\}$.

• The unit circle $\mathbb{S}^{1}$: $\{z\in\mathbb{C}:|z|=1\}$, where $|z|$ is the modulus of $z$.

The most basic set is the empty set (denoted $\varnothing$, $\emptyset$ or $\{\}$).

The astute reader may have noticed that all of our examples of sets utilize sets, which does not suffice for rigorous definition. We can be more rigorous if we postulate only the empty set, and define a set in general as anything which one can construct from the empty set and the ZFC axioms. The non-negative integers, for instance, are defined by $0:=\varnothing$ and the successor of $x$, $s(x)=x\cup\{x\}.$ A non-negative integer is thus the set of all its predecessors (for example, we have $3=\{0,1,2\}=\{\varnothing,\{\varnothing\},\{\varnothing,\{\varnothing\}\}\}$)33Note however that the existence of the set of non-negative integers needs an additional axiom beside those which are required to define its members: the axiom of infinity..

All objects in modern mathematics are constructed via sets. An important point to be made about this is that the construction of the object is less important than the way it will behave. As an example, we usually define an ordered pair $(x,y)$ as the set $\{x,\{x,y\}\}$: what matters here is that, for two ordered pairs $(x,y)$ and $(x^{\prime},y^{\prime})$, we have $(x,y)=(x^{\prime},y^{\prime})$ if and only if $x=x^{\prime}$ and $y=y^{\prime}$, and this is true with the given definition, as one can easily see. We could, however, also have taken $\{x,\{x,\{y\}\}\}$ as the definition of $(x,y)$, in which case the needed property also holds and we have a valid definition (we chose the first only because it is simpler).

## 2 Set Notions

An important set notion is cardinality. Cardinality is roughly the same as the intuitive notion of “size” or number of elements. While this intuitive definition works well for finite sets, intuition breaks down for sets with an infinite number of elements. The cardinality of a set $S$ is denoted $|S|$ (sometimes $\#S$ or $\operatorname{card}S$) and we say that sets $A$ and $B$ have the same cardinality if and only if there is a bijection from one to the other. For more detail, see the cardinality entry.

Another important set concept is that of subsets. A subset $B$ of a set $A$ is any set which contains only elements that appear in $A$. Subsets are denoted with the $\subseteq$ symbol, i.e. $B\subseteq A$ (in which case $A$ is called a superset of B). Also useful is the notion of a proper subset, denoted $B\subsetneq A$ (or sometimes, $B\subset A$)44Beware — some authors use $\subset$ to mean proper subset, while most use it to mean subset with equality (the same as $\subseteq$), which can make the $B\subset A$ notation ambiguous., which adds the restriction that $B$ must also not be equal to $A$. The set of all subsets of a set $S$ is called the power set of $S$, denoted $\mathcal{P}(S)$ (the existence of this set is also axiomatic: it is guaranteed by the axiom of the power set). Note that $B$ does not need to have a lower cardinality than $A$ to be a proper subset, i.e., $\{1,2,3,\ldots\}$ is a proper subset of $\{0,1,2,3,\ldots\}$, but both have the same cardinality, $\aleph_{0}$ (In fact, a set is infinite if and only if it has the same cardinality as some proper subset).

## 3 Set Operations

There are a number of standard (common) operations which are used to manipulate sets, producing new sets from combinations of existing sets (sometimes with entirely different types of elements). These standard operations are:

• union (http://planetmath.org/Union)

• power set (http://planetmath.org/PowerSet)

 Title set Canonical name Set Date of creation 2013-03-22 12:15:09 Last modified on 2013-03-22 12:15:09 Owner Mathprof (13753) Last modified by Mathprof (13753) Numerical id 24 Author Mathprof (13753) Entry type Definition Classification msc 03E99 Related topic ZermeloFraenkelAxioms Related topic Mapping Related topic SetTheory Related topic Class Related topic DeMorgansLaws Related topic NotationInSetTheory Related topic CardinalityOfAFiniteSetIsUnique Related topic OneToOneFunctionFromOntoFunction Related topic Collection Related topic FunctorCategory2 Related topic Algebras2 Related topic SetMembership Defines contains Defines subset Defines proper subset