SET:
In this course, we will use the following definition of a set:
- A set is an (unordered) collection of objects, called elements or members of the set. The set is said to contain its elements. The notation means that the object a is an element of the set . The notation means that a is NOT an element of set
- An “object” is never specified. The theory that results from this intuitive definition of a set as a collection of objects is called a naïve set theory. This theory leads to logical inconsistencies (paradoxes)
What are these paradoxes?
RUSSELL’S PARADOX:
The whole point of Russell’s paradox is to show that the above theory is flawed.
Before I explain what it is, let us use an infamous paradox that’ll help us understand this more, called the barber’s paradox:
The barber is the “one who shaves all those, AND ONLY THOSE, who do not shave themselves”, the question is here, who shaves the barber?
- The barber cannot shave himself, as he only shaves those who do NOT shave themselves. Thus, if he shaves himself, he is no longer the barber he claims to be
- But, if the barber does not shave himself, he then fits in the group of people who the barber said he would shave, and thus, the barber must shave himself
This is a paradox, because then who shaves the barber? (before you fucking geniuses say “erm maybe the barber can be a woman” no its a man filled town its an average cs class bro)
Since we never defined what an object is, this becomes a problem. Two properties emerge from naïve set theory:
- A set may contain other sets as elements
- A set may contain itself as an element (since sets can contain other sets, what is stopping the set to have itself as an element)
What Russell’s Paradox states it that:
- Let be a set
- This set contains ALL sets of a specific property
- The property of these elements it that they don’t contain themselves (i.e for all elements )
So, the question is, does contain itself then
Well, if we assume that , this contradicts the third statement, therefore, we reach a contradiction. Then,
Well, what if we assume that , but this contradicts the second statement, because it should have ALL sets, therefore,
This set stems due to the naïve set theory, which results in a paradox
AXIOMATIC VS. NAIVE:
There is a more proper axiomatic set theory which gets rid of the known paradoxes of naive set theory
However, since:
- Naïve set theory is enough for everyday use of set theory, it is much more user-friendly than the axiomatic set theory
- Naïve set theory is a useful stepping stone towards more formal set theories
So, long story, we will be using the naïve set theory although it results in paradoxes.
REPRESENTING SETS:
The elements of a set are listed like this: , since we said sets are unordered, the order does not matter here
It is better practice to NOT list one element more than once in a set
For larger (infinite or finite) sets, we list enough elements to highlight the pattern and then we use “…” to leave the other implied
So, if we had , although we did not list every single alphabets in there, we can establish that is the set of alphabets in the English language
If we had , you should be able to tell that is just the set of integers
There is also the weirdest way in mankind to define sets as well
We are basically saying is the set of the objects such that (which is denoted by | ) is an integer and
The variable is just a placeholder which can be changed to any other symbol to avoid clashes
- is not ideal, since is an actual character in the English alphabet
SET EQUALITY AND SUBSETS:
Two sets and are equal IF AND ONLY IF they have exactly the same elements:
A set is a subset of a set (notation: ) IF AND ONLY IF every element of is ALSO an element of
Example:
and , then we can say that is a subset of as all the elements in A are in B
since are not in the second set
EMPTY SET AND UNIVERSAL SET:
As the name states, an empty set is a set that contains no elements. It is usually denoted as or
However, if you were to do something like , this is not the same thing, this is saying a set containing an empty set.
The universal set is the set of all objects under consideration. Often denoted
When we use a universal set in terms of Venn Diagram, we usually represent it as a rectangle.
SUBSETS AND POWER SETS:
The empty set is a subset of any set, so
A set is always a subset of itself
The power set of a set is the set of ALL subsets of , including and . It has various notations, such as: and
Examples:
- The notation should make sense now. We have 2 elements in A, if we do , which clearly matches our power set. Wow notations (i’m so sleeeep deprived help)
INTERSECTION:
Basically the conjunction of 2 sets. The intersection of 2 sets and is the set of objects which are elements in both and (notation: )
Examples:
, you only want the elements that are in common between the two sets, so obviously 0 wouldn’t be in there since the second set does not contain 0
, since there are no common elements between the two sets, so it is simply the empty set. Sets with empty intersection are said to be disjoint
So, you want the intersection between which is in the set of all natural numbers such that is actually odd and such that is in the set . You would need to square the numbers on the right hand side of the intersection, and find the common elements between the two. Hopefully you know what natural numbers are…
PROPERTIES:
If we know that , then
- Take an example to visual this, if we had and , it is very obvious that . Now, if we wanted to find the intersection between the two which is clearly
Now, is this true for the converse? Is it true that if , then ?
- Well, naturally, this is also true. Once again, let us take an example. If we had and , the intersection would be: . Then, it is clearly obvious that
Now is this the correct way for proving theorems? No, but I’m giving an example to make stuff clearer.
UNION:
Basically the disjunction of 2 sets. The union of 2 sets and is the set of objects which are elements of either or of (notation: )
It is important to note, we do not add a duplicate elements when we do the union. This will make more sense in examples
Examples:
. DO NOT REPEAT THE SAME ELEMENT TWICE.
- If this doesn’t make sense, you basically need the union between
PROPERTIES:
If we know that , then
- Okay example time just so this makes things clearer. If we had and , then obviously, we can see that . Now, if we were to do the union between these two sets: , which is clearly
Now, is this also true for the inverse? Meaning, is it true that if , then ?
- Example, once again. If we had , we know this is true. Now, is it true that ? Well no shit just look. it is very obvious that
COMPLEMENT:
Basically elements that are not in a set . So, if you are given a universal set , the complement of set (with respect to ), is the set of elements of that are NOT in (notation: or )
Examples:
For any universe , and
In the universe of real numbers,
For any universe and any set , , how can we prove this?
- Let us assume we have an element , if is an element in , this means CANNOT be in . So, is going to be in the complement of
- , since and , this means
- So, this means
DIFFERENCE:
Given 2 sets and , the difference of in is the set of elements of which are NOT in (notation: ). It is not necessary that
Examples:
The difference with respect to the universe is the complement: . Let us prove this:
- Assume element , this means and , then, this means that and , which can be rewritten as
- This can be both ways:
, the elements in that are NOT in
NOTABLE SET IDENTITIES:
- Identity laws: ;
- Domination laws: ;
- Law of disjointness:
- Law of partition:
- Idempotent laws:
- Complementation laws:
- Associative laws:
- Commutative laws:
- Distributive laws:
- De Morgan’s Law:
If you ever forget, just think of , , , and
CARTESIAN PRODUCTS:
Let and be sets. The Cartesian product of and , denoted by , is the set of all ordered pairs , where and
Example:
(there is relation here but it makes more sense when we explain functions so wait)
CARDINALITY:
We say that a set if finite if it has elements of some natural number . Otherwise, we say that the set is infinite.
If you want to dumb it down, this means cardinality is simply the number of elements in the set. It is denoted by the absolute value symbol
Examples:
, and so on
For infinite sets (like all real numbers, all natural numbers, and so on), their cardinality is also infinite. But, there are different types of infinity. We don’t need to know them, but its good to know there are different types
The proper definition of cardinality of infinite sets requires functions, so when we cover functions we will see cardinality again
CARDINALITY OF UNION:
We are often interested in finding the cardinality of a union of two finite sets and . I hope you know what union means. So, the cardinality of A or B is:
Why? I think drawing it out makes a lot of sense:
The reason why we subtract , is because the number of elements is counted twice, once when we are counting and another time when we are counting
What if we wanted to find the cardinality of union of 3 sets? What would that be? The best way is to draw it out
So, this would be:
Why is it like this?
- When we count the number of elements in , we count the number of elements in once
- When we count the number of elements in , we count the number of elements in twice
- Naturally, in a union, we need to only count the number of elements in once, which is why we need to subtract the number of elements in once
- Similarly can be said about , when we count , the intersection is counted once, when we count , the intersection is counted again, so we need to subtract once
- Also, same said about , when we count , the intersection is counted once, when we count , the intersection is counted again. So we need to subtract once
- So, we are naturally counting 3 times with each time we count . The problem is, when we subtract , we are subtracting 3 TIMES. So, we need to add it back again