Incomplete draft: do not cite!

Sets are the most fundamental kind of object in (most) mathematics.  Everything else gets built up from sets in the same way the CS builds everything up from byte arrays. 

Sets are collections of objects, in the same way lists and arrays are.  The objects are referred to as it its members or elements.  A set is defined purely by its elements.1 If two sets have exactly the same elements, then they aren't two sets at all; they're two names for the same set.

Anything can be a member of a set, including other sets.

For most purposes, that's what you need to know about sets.

For programmers: sets vs. arrays

Sets are different from arrays in that there's no notion of the position of a member within the set.  Similarly, a member can't be a member of the set "more than once."  An object either is a member of the set or it isn't.  End of story.

The equivalent of an array is a tuple, which we'll talk about shortly.  Members of a tuple have positions within the tuple and objects can appear multiple times in the same tuple.


  1. This is known as the principle of extensionality and the members of a set are also referred to as the set's extension.