Set Theory

Set theory is the mathematical study of collections, called sets, and their relationships.

Basic Definitions

  • Set: A well-defined collection of distinct objects called elements. Formally, a set is denoted by curly braces: where each is an element of .
  • Element: An individual object contained within a set. The symbol indicates membership in a set. For example, if , then but .
  • Empty Set: A set containing no elements, denoted by or {}.

Set Operations

  • Union (): The union of two sets and , denoted , is the set containing all elements that are in either , , or both.
  • Intersection (): The intersection of two sets and , denoted , is the set containing all elements common to both and .
  • Difference (- or \): The difference of two sets and , denoted , is the set containing all elements that are in but not in .
  • Subset (): Set is a subset of set (denoted ) if every element of is also an element of .

Union & Intersection:

Difference:

Subset:

Russell’s Paradox

Imagine a special set called “R” that contains all sets that don’t contain themselves as members. Sounds straightforward, right?

Now, here’s the mind-bending part: Does “R” contain itself?

  • If “R” does contain itself, then it breaks its own rule – it shouldn’t include sets that contain themselves!
  • If “R” doesn’t contain itself, well, that means it should be in the set because it fits the description of a set that doesn’t contain itself.

This paradox can be represented mathematically:

Let

where the notation denotes the set comprehension, meaning “the set of all such that…“.

  • Contradiction: We have a contradiction! If , then by definition . Conversely, if , then it should belong to according to its own definition.

This paradox demonstrates the danger of defining sets without strict rules. Mathematicians needed a more rigorous foundation for set theory to avoid such contradictions.

The Foundation: The Universe Set and Constructing Natural Numbers

Zermelo’s axiomatic set theory addressed these issues by introducing a Universe Set, denoted , which contains all possible sets. This provides a clear starting point and avoids the ambiguity of an undefined “all sets.” Crucially, we begin with the Empty Set, , as it requires no elements and acts as a fundamental building block for constructing other sets.

Within this framework, new sets are constructed using specific axioms. Two crucial concepts emerge:

  • The Empty Set: This set, denoted , contains no elements. It serves as the fundamental building block for constructing other sets within the Universe Set.

  • Natural Numbers: Using the empty set and the axiom of pairing (which allows us to create a set containing two given elements), we can define natural numbers recursively:

  • 0 =

  • 1 =

  • 2 =

  • 3 =

  • … and so on.

Each natural number is defined as a specific set, built from the empty set using pairing. This avoids the pitfalls of Russell’s Paradox because each set has a clear definition within the framework of the Universe Set and its axioms.

Zermelo’s approach provides a solid foundation for set theory, avoiding the pitfalls of Russell’s Paradox and enabling the construction of complex mathematical structures with precise definitions.

If we were delving deeper into traditional mathematics, we’d naturally progress to defining operations like addition and multiplication for these sets representing natural numbers. However, in computer science, our focus is more practical. We’re less concerned with the abstract theoretical underpinnings and more interested in how these concepts can be used to build and understand real-world systems.

Continue here: 07 Equality, Ordered Pairs, Cartesian Product, Power Set and Relationships