# Set Theory

The Use of Sets
Sets are the most simple, yet non-trivial structures in mathematics. Many other mathematical objects and properties can be defined by them. Initially, they were used to investigate the foundations of mathematics, especially the notion of infinity. For us, sets are useful to understand the principles of counting and probability theory.

Some Important Sets
= {1, 2 , 3, … } The set of natural numbers: The set of integers: = {… , − 3 , − 2 , − 1 , 0 , 1 , 2 , 3 , … + The set of positive integers: = {1, 2,3,…}
The set of Rational Numbers (fractions): 1 2 , 2 3 , 5 7 , etc ∈ More formally:
=

}

{a b

a,b ∈

, b ≠ 0

}

The set of Irrational Numbers:

2 , π , o r e a re irra tio n a l

The Real numbers =

= the union of the rational numbers with the irrational numbers

Sets and Their Elements
A set A is a collection of elements. If x is an element of A, we write x∈A; if not: x∉A. We say: “x is a member of A” or “x is in A”. We use lowercase letters for elements and capitals for sets. Notation: use set braces “{“,”}” around the elements. Example: 2 ∈ A = {0,1,2,3,4} and 6 ∉ A = {0,1,2,3,4} Or A = {x | x is an integer between 0 and 4}.

This can be done by: 1.Defining Sets A set is well-defined if we can tell if any element belongs to the set or isn’t an element of the set. Listing ALL elements of the within the braces. Listing enough elements to show the pattern then an ellipsis. . 3. 2. Use set builder notation to define “rules” for determining membership in the set.

3. …} 2. A = {1. Listing ALL elements.Defining Sets Examples: 1. 4} = {1. Using set builder notation. Demonstrating a pattern. 3. P = {x x∈ and x ∉ } . 2. 3. 2.

Set-Builder Notation .

{ x x is an odd positive integer} represents the set {1. …} { x x is an odd positive integer} is read as "the set consisting of all x such that x is an odd positive integer". " ". 7. For instance.Some Symbols Used With Set Builder Notation The standard form of notation for this is called "set builder notation". 3. 5. stands for "such that" Other "short-hand" notation used in working with sets "∀" stands for "for every" "∃" stands for "there exists" " ∪ " stands for "union" " ⊆ " stands for "is a subset of" " ⊄ " stands for "is a not a (proper) subset of" "∈" stands for "is an element of" "× " stands for "cartesian cross product" " ∩ " stands for "intersection" " ⊂ " stands for "is a (proper) subset of" "∅" stands for the "empty set" "∉" stands for "is not an element of" " = " stands for "is equal to" . The vertical bar. 9.

If A is not a subset of B.Subsets A set A is a subset of B if and only if all elements of A are also elements of B: Notation: A⊆B or B⊇A. we write A⊄ B. .

Proper Subsets If A⊆B and B contains an element that is not in A. then we say “A is a proper subset of B”: A⊂B or B⊃A. For all sets: A⊆A. Formally: A⊆B means ∀x [x∈A → x∈B]. .

Equal Sets The sets A and B are equal (A=B) if and only if each element of A is an element of B and vice versa. . Formally: A=B means ∀x [x∈A ↔ x∈B].

Empty Sets The empty set ∅ or {} but not {∅} is the set without elements. A ∪ A’ = U U’ = ∅. A ∩ ∅ = ∅ A ∩ A’ = ∅. ∅’ = U . Note: • • • • Empty set has no elements Empty set is a subset of any set There is exactly one empty set Properties of empty set: A ∪ ∅ = A.

a} = {a} All that matters is: “Is x an element of A or not?” The size of A is thus the number of different elements Yes. hence {a.a} The elements of a set do not have multitudes. hence {a.c} = {b.c. x∉A .b.a.a} = {a.How to Think of Sets The elements of a set do not have an ordering. x∈A x∈U x∈A? No.

which proves that indeed A⊆C. . Example: Prove that if A⊆B and B⊆C. then A⊆C. Proof: By the assumptions (and the definition of ⊆) we know that ∀x[x∈A → x∈B] and ∀x[x∈B → x∈C]. Using syllogism. we have that ∀x[x∈A → x∈C]. We see that for all x∈A we have x∈B hence x∈C.Proofs and Sets Sets are ideal to hone your proving skills.

To be entirely correct we should say ∀x∈U [x∈A ↔ x∈B] instead of ∀x [x∈A ↔ x∈B] for A=B. x∈Q } . Note that { x | 0<x<5} is can be ambiguous. x∈N } with { x | 0<x<5. which consists of all possible elements. Compare { x | 0<x<5.Universal Set Typically we consider a set A a part of a universal set U.

Union The union of two sets A and B.A3.… ∪A j∈T j = { x | x ∈ A j for a j ∈ T } . Notation: A∪B = { x | x∈A or x∈B} Unions for several sets A1. is the set A∪B of elements x such that x∈A or x∈B.A2.

A-B= { x | (x∈A and x∉B) Equivalently: A . .B = { x | x∈A∪B and x∉A∩B }.B is the set of elements that are in A but not in B.Difference The difference A .

.Disjoint Sets Sets A and B are disjoint if A∩B=∅.

.Complement of a set The complement A’ (or Ac or Ā) of a set A are the elements of U that are not elements of A Hence A’= { x | x∈U and x∉A }.

is the set A∩B of elements x such that both x∈A and x∈B.… ∩A j∈T j = { x | x ∈ A j for all j ∈ T} .A3.Intersection The intersection of two sets A and B.A2. Notation: A∩B = { x | x∈A and x∈B} Intersection for several sets A1.

The previous definitions can be made very succinct: x∉A if and only if ¬(x∈A) A⊆B if and only if (x∈A → x∈B) is True x ∈ (A∩B) if and only if (x∈A ∧ x∈B) x ∈ (A∪B) if and only if (x∈A ∨ x∈B) x ∈ A–B if and only if (x∈A ∧ x∉B) x ∈ A Δ B if and only if (x∈A ∧ x∉B) ∨ (x∈B ∧ x∉A) x ∈ A’ if and only if ¬(x∈A) X ∈ P(A) if and only if X⊆A .Sets and Logic Logic and set theory go very well together.

Laws of Set Theory De Morgan: (A∩B)’ = A’∪B’ and (A∪B)’ = A’∩B’ Commutativity: A∩B = B∩A and A∪B = B∪A Double complement: (A’)’ = A Associativity: A∩(B∩C) = (A∩B)∩C and A∪(B∪C) = (A∪B)∪C Distributivity: A∩(B∪C) = (A∩B)∪(A∩C) and A∪(B∩C) = (A∪B)∩(A∪C) .

Laws of Set Theory Idempotence: A∩A = A∪A = A Identity: A∪∅ = A and A∩U = A Inverse: A∪A’ = U and A∩A’ = ∅ Domination: A∪U = U and A∩∅ = ∅ Absorption: A∪(A∩B) = A∩(A∪B) =A .

of set A in set B is the set of all elements of B that are not in A: B–A = { x | x∈B and x∉A} Note: A∩A’ = ∅ .relative complement The relative complement. B–A.

of sets: . subsets.Venn Diagrams Venn diagrams are used to depict the various unions. intersections etc. complements.

Many other mathematical objects and properties can be defined by them. yet non-trivial structures in mathematics. Sets are also useful to understand the principles of counting and probability theory. .The Use of Sets Sets are the most simple. especially the notion of infinity. They are used to investigate the foundations of mathematics.

.Logic and Sets are closely related Tautology p∨q ↔q∨ p p∧q ↔ q ∧ p p ∨ (q ∨ r ) ↔ ( p ∨ q ) ∨ r p ∧ (q ∧ r ) ↔ ( p ∧ q ) ∧ r p ∨ (q ∧ r ) ↔ ( p ∨ q ) ∧ ( p ∨ r ) p ∧ (q ∨ r ) ↔ ( p ∧ q ) ∨ ( p ∧ r ) p ∧ ¬q ↔ p ∧ ¬ ( p ∧ q ) p ∧ ¬(q ∨ r ) ↔ ( p ∧ ¬q ) ∧ ( p ∧ ¬r ) p ∧ ¬(q ∧ r ) ↔ ( p ∧ ¬q ) ∨ ( p ∧ ¬r ) p ∧ (q ∧ ¬r ) ↔ ( p ∧ q ) ∧ ¬ ( p ∧ ¬r ) p ∨ (q ∧ ¬r ) ↔ ( p ∨ q ) ∧ ¬ ( r ∧ ¬p ) p ∧ ¬ ∨ (q ∧ ¬r ) ↔ ( p ∧ ¬q ) ∨ ( p ∧ r ) Set Operation Identity A∪B = B ∪ A A∩B = B ∩ A A ∪ (B ∪ C ) = ( A ∪ B ) ∪ C A ∩ (B ∩ C ) = ( A ∩ B ) ∩ C A ∪ (B ∩ C ) = ( A ∪ B ) ∩ ( A ∪ C ) A ∩ (B ∪ C ) = ( A ∩ B ) ∪ ( A ∩ C ) A − B = A − ( A ∩ B) A − (B ∩ C ) = ( A − B ) ∪ ( A − C ) A − (B ∪ C ) = ( A − B ) ∩ ( A − C ) A ∩ (B − C ) = ( A ∩ B) − ( A ∩ C ) A ∪ ( B − C ) = ( A ∪ B ) − (C − A ) A − (B − C ) = ( A − B ) ∪ ( A ∩ C ) The above identities serve as the basis for an "algebra of sets".

.Logic and Sets are closely related Tautology p∧p ↔ p p∨ p ↔ p p ∧ ¬(q ∧ ¬q ) ↔ p p ∨ ¬(q ∧ ¬q ) ↔ p Contradiction p ∧ ¬p p ∧ ( q ∧ ¬q ) p ∧ ¬p Set Operation Identity A∩A = A A∪A = A A−∅ = A A∪∅ = A Set Operation Identity A−A =∅ A∩∅ = ∅ A−A =∅ The above identities serve as the basis for an "algebra of sets".

Using the Set Laws Simplify the set (((A∪B)∩C)’∪B’)’= = ((A∪B)∩C)’’∩B’’ = ((A∪B)∩C)∩B = (A∪B)∩(C∩B) = (A∪B)∩(B∩C) = ((A∪B)∩B)∩C = B∩C [DeMorgan] [Double Complement] [Associativity of ∩] [Commutativity of ∩] [Associativity of ∩] [Absorption] .

Cartesian Cross Product A cartesian cross product of two sets creates a set of ordered pairs where: • The first element of the ordered pair comes from the first set. . • The second element of the ordered pair comes from the second set.

7 ) ( 3. 7 ) (1.8 ) ( 2.8 ) ( 3. 7.9 ) ⎬ ⎪ ⎪ ⎩( 3. 6 ) (1. 9} the cartesian cross product of A and B is ⎧(1.9 ) ⎫ ⎪ ⎪ A × B = ⎨( 2. 3} and B = {6.8 ) (1. 7 ) ( 2. 8. 2.Cartesian Cross Product Example A = {1. 6 ) ( 2. 6 ) ( 3.9 ) ⎭ .

. is any rule or process by which each element of set A is associated with exactly one element of set B AND each element of set B is associated with exactly one element of set A. A and B.One-to-One Correspondence A one-to-one correspondence between two sets.

we mean that they are equivalent.Equivalent Sets Two sets. A and B. . When we say sets “have the same size”. are equivalent if there exists a one-to-one correspondence between them.

3.Finite Sets A set A is finite if it is empty or if there is a natural number n such that set A is equivalent to {1. . . n}. . . 2.

{z}. the power set P(A) is the set of all subsets of A.Power Sets Given the set A.y}.y.{x. Hence P(A) = { B | B⊆A} Example: P({x.z}} .z}.y.{x.z}) = {{}.z}.{x.{x}.{y.{y}.

. 3. Infinite sets are uncountable. . n}.Infinite Sets A set A is infinite if there is NOT a natural number n such that set A is equivalent to {1. Are all infinite sets equivalent? A set is infinite if it is equivalent to a proper subset of itself! . 2. .

Cardinality. Example: |∅|=0. |{2. Cardinal Number The size or cardinality |A| of a finite set A is the number of (distinct) elements.16}| = 4.4.8. . et cetera.

then P(A) ⊆ P(B) .) • If A ⊆ B. (This is the definition of P(A). Formally: X={x}∈P(A) ⇔ X⊆A.Power Sets • If A is a finite set with |A|=n. then |P(A)|=2n.

.The set of natural numbers. aleph null. 3. … } is an infinite set. The cardinal number or cardinality of is ℵ0 . = {1. is countable or denumerable. 2.

. Examples: . the set of prime numbers . the set of Integers.Countable or denumerable set An infinite set that is equivalent (can be put into a 1to-1 correspondence with) to is countable or denumerable or countably infinite. the set of rational numbers. the set of odd integers.

. the cardinal number of the natural numbers.Aleph Null. the smallest infinite cardinal number.

There are infinitely many different sizes of infinity! . If S is the cardinal number that represents the size of set S. and let S be the set of all subsets of A [the power set of A.Cantor’s Theorem Let A be any cardinal number. P(A)]. then A < S. with reference set A.

if a set has size ℵn then the set of all its subsets has size ℵn+1. More generally.The Continuum Hypothesis If a set has size ℵ0 then the set of all its subsets has size ℵ1. .

Transfinite numbers ℵ0 is the smallest transfinite number. c = ℵ1 . ℵ0 < ℵ1 < ℵ2 < … < ℵn < … c is the size of the power set of the natural numbers. Each transfinite number has an immediate successor. a “next larger” transfinite number (with no other transfinite in between).