Loading…
Build the language of membership, subset proofs, and standard set constructions that later chapters repeatedly rely on.
Sets are the basic objects that let us talk about collections without constantly repeating the same description. In this course, sets are not a side topic. They are the language behind logic, functions, relations, and the later number constructions.
Definition 2.1.1
(A set)
A set is a collection of things.
If is an element of a set , we write . If is not an element of , we write .
Examples:
{Hong Kong Island, Kowloon, New Territories} is a set.The same object may be written in different ways, but a set is determined only by its elements.
Theorem 2.1.2
(Extensionality)
Two sets are equal if and only if they have exactly the same elements.
In symbols:
This is the rule that makes set equality practical. To prove , the standard method is to prove both inclusions:
Common mistake
(Do not confuse equal sets with equal descriptions)
and are the same set, because they have the same elements. The order of listing does not matter.
Common mistake
(Subset notation varies across books)
This course uses to mean “every element of is in ”. Some books write for that idea and reserve for strict subset. Always check the local convention.
After predicate logic, the most common way to define a set is to start with a known set and then keep exactly the elements satisfying a condition:
This notation should be read carefully. The symbol before the vertical bar tells you where the variable is allowed to live; the predicate after the bar tells you which of those allowed elements survive. For example,
is the set of even integers.
Common mistake
(Do not ignore the ambient set)
The expression is often convenient shorthand, but the rigorous version is bounded inside a set already under discussion. This prevents the definition from pretending that every verbal description automatically creates a safe mathematical object.
Common mistake
(Sets are not multisets)
A set remembers whether an object is present, not how many times it was listed. Thus and describe the same set, even though they would be different multisets.
Once we know some sets, we usually want to build more. The standard operations do exactly that.
| Operation | Symbol | Definition |
|---|---|---|
| Union | elements in or in | |
| Intersection | elements in both and | |
| Difference | elements in but not in | |
| Complement | elements outside in a chosen universal set |
The complement depends on a universal set . In this unit we usually assume all sets live inside some fixed , so means .
Worked example 2.1.3
(Track elements through several set operations)
Let
and take the universal set
Then:
is not an intrinsic property of alone. It depends on what counts as “everything” in the current discussion. That is why the universal set has to be understood first.
For a fixed element , membership in a union is a disjunction and membership in an intersection is a conjunction. The identities of propositional logic therefore become set identities when they hold for every .
Theorem 2.1.4
(Basic algebra of sets)
For sets , , and :
Take an arbitrary element and translate membership into logical conditions. To prove an inclusion, start with in the left-hand set and derive membership in the right-hand set. To prove equality, establish both directions. For example:
which is equivalent to
and therefore to
Assume .
To show , it is enough to show both inclusions.
First, if , then or . If , then because . So in either case , which gives .
Conversely, if , then automatically . So .
Hence .
The statement
holds if and only if .
For sufficiency, assume . If belongs to the left side, then either , or . In the second case the inclusion gives , so in either case and . Thus the left side is contained in the right side. Conversely, if , then and either or . In the first case ; in the second case . Hence is in the left side, proving equality.
For necessity, assume the displayed equality and take any . Then , so equality puts in . In particular . Therefore every element of belongs to , which is exactly . Equivalently, if one had , that element would belong to the left side but not the right side, giving a counterexample to the equality.
The symmetric difference is
For every element ,
Thus membership means that exactly one of and contains . Applying the same rule once more, belongs to exactly when an odd number of the three statements , , and is true: the first symmetric difference records whether the first two statements have odd parity, and the second toggles that parity when . The expression has the same odd-parity condition, with the grouping reversed. Therefore
This is a membership proof, so it does not depend on a particular Venn diagram.
Let and assume . For , if then the inclusion would imply , a contradiction. Thus and . The common universe ensures that both complements compare elements of the same ambient set.
Counterexample mode
The implication holds, but its converse fails. Take , , . Then both unions equal while . Adding conceals the witness 1. One valid repair is to assume also : every then belongs to but not to , so it belongs to .
Set operations select or combine elements already present. Other constructions let us treat ordered pairs, tuples, and subsets as objects in their own right. These are the objects on which functions and relations will be defined.
is the set of ordered pairs with and . Order matters: and are different unless .
If and , then .
is the Cartesian plane.
The -fold product is the set of all -tuples with entries in . This is just the repeated Cartesian product of with itself.
is the set of all subsets of .
If has elements, then has elements. A useful way to think about this is the indicator-function viewpoint: every subset of can be encoded by a function .
For example,
Sometimes two sets may overlap as raw collections, but we still want to keep track of where each element came from. The disjoint union does that by tagging the elements with their origin.
A concrete realization is
If an element belongs to both and , its two tagged copies are still distinct.
There need not be a bijection between
Take and . The left set is , so it has two elements. The right set is , so it has four ordered pairs. Their cardinalities differ, and therefore no bijection exists in this example.
At this stage of the course, a set identity should be read as a statement about membership, not as a picture to be memorized.
The standard proof pattern is:
Worked example 2.1.5
(Prove )
Start with
This means:
But that is exactly the condition for
Since the reasoning can be read in either direction, the two sets are equal.
This is the same idea used for De Morgan’s laws, distributive laws, and later proofs about relations and number constructions.
Venn diagrams are useful for organizing a situation, but the proof still comes from membership conditions. A diagram can suggest that a region is empty, inside another region, or split into several pieces; the written argument must then say which inclusion, disjointness condition, or counting equation that picture represents.
For three sets, a statement such as means every element of lies in at least one of or . It does not say that , and it does not say that . Keeping those possibilities separate is a good test of whether the diagram is being read logically rather than visually only.
Worked example 2.1.6
(Translate four Venn conditions into regions)
Assume , , and are non-empty sets. The following common practice conditions are best read as region instructions, not as vague pictures.
| Condition | What the diagram must show |
|---|---|
| , , and | Both and sit inside , but they do not overlap each other. The set may still have points outside both of them. |
| , , , and | Each pair overlaps, but the central triple-overlap region is empty. The three pairwise overlaps must be separate regions. |
| and | Since , the intersection is just . Thus lies inside , and lies inside . |
| , not , and not | No point of is outside , but must have at least one point in and at least one point in . |
The fourth line is the easiest one to misread. It does not merely say that touches both circles. It says that is completely covered by and , while still failing to be contained in either one alone.
The language of sets also controls counting.
For finite sets:
The last formula matters because elements in the intersection are counted twice if you simply add and .
Worked example 2.1.7
(Count a union and a power set)
Suppose , , and .
Then
Now let . Each element either belongs to a subset or does not, so there are
possible subsets. Hence .
Worked example 2.1.8
(A Venn-diagram count without drawing the diagram)
Ten students go hiking. Seven use sunscreen, six wear a hat, and two use no sun protection.
Let be the sunscreen set and the hat set. Since two students use neither form of protection,
By inclusion-exclusion,
So five students use both sunscreen and a hat.
Common mistake
(A complement is a difference relative to the universe)
For , the complement consists of the elements inside the chosen universe but outside . In contrast, consists of the elements inside but outside . A complement is therefore a set difference whose left operand is the universe, not the part outside the universe.
Common mistake
(The universal set cannot be ignored)
If you write a complement, you must know what universe you are working in. Otherwise the symbol is ambiguous.
Common mistake
(Order matters in products)
and usually contain different ordered pairs. This is why products are the correct language for functions and relations.
Quick check
(Why is not defined until a universal set is chosen?)
Ask what the complement is supposed to be taken inside.
Because the same set has different complements in different universes.
Quick check
(If , what do and simplify to?)
Use the subset characterizations from the theorem above.
and .
Quick check
(Suppose , but is not a subset of and not a subset of . Which two parts of must be non-empty?)
Turn each failed subset statement into an existential statement.
There must be at least one element of in , and at least one element of in . The condition rules out any element of outside both and .
A Cartesian product supplies pairs; a relation specifies which pairs are connected. Functions and relations shows how an equivalence relation partitions a set into classes. The integer construction then applies this to pairs of natural numbers, and the rational construction uses classes to identify different representations of the same number. At each stage, the proof of set equality returns to the same question: which elements belong to each side?
Toggle membership and read set operations
Toggle an element in either set. Read the union, intersection and directional difference of the current sets.
| U | A | B |
|---|---|---|
| 1 | ∈ A | ∉ B |
| 2 | ∈ A | ∈ B |
| 3 | ∉ A | ∈ B |
| 4 | ∈ A | ∈ B |
| 5 | ∉ A | ∉ B |
Holds: The intersection is contained in the union
Every element in both A and B is in at least one of A or B. The same membership checks drive the board and all three results.
NoticeA∖B keeps elements of A that are not in B; reversing A and B can change the result. {} is the empty set. The board lists the membership of every element of the universe.
Work out your answer, then check it. You can revise and try again.
Loading…
This section can be read on its own.