Sets
Basic Definition
A set is an unordered collection of distinct objects.
- 无序
- 唯一
The objects in a set are called the elements / members of the set.
is not a set due to duplicated objects is a set because the objects in the set are unordered and distinct
Power set is set of all subsets of
Let
Defining Sets by Properties
背景: 有时候只靠列出所有 elements 来定义一个 sets 是不可能的,因此我们可以用公式来定义 sets,只要 element 符合公式,则为 set 的元素
Define the set by
e.g.
e.g.
e.g.
Membership
: is an element of : is not an element of : is a subset of - For any
, we have - 通俗来说:
在 里面, 可能等于
- For any
: and : is proper subset of and - 通俗来说:
在 里面,但是 不等于
Operations on Sets
- Intersection
- Two sets are disjoint if
- Union
-
- Complement
- If
- Difference
-

Indexed Collection of Sets
Indexed collection of sets 跟上文的 intersection 和 union 无异。
区别在于其支持批量运算,可以求一大堆 sets 的 intersection 和 union。
- Union 是至少任一一个 set 里面有
- Intersection 是每一个 set 里面都有
Example
For each positive integer
, let
Equivalently,
a. Findand
b. Findand
Partitions of Sets
A collection of non-empty sets
are mutually disjoint / pairwise disjoint

Cartesian Products
Given 2 sets
It can be generalized to any number of sets
For ordered pairs, the ordering is important, i.e.
- If
and , - then
- If
, then
- then
Example
Set Identities
- Distributive Law
- Associative Law
- De Morgan's Law
- Complement Law
- Commutative Law
- Identity Law
- Set Difference Law
Example
- Prove
- Prove
- Prove
Russell's Paradox 罗素悖论
以下内容由 AI 基于 Lecture Note 撰写,作者仅进行小幅度的修改。
即 “
现在问:
- 假设
:那么 就属于 ,而 是"不包含自己的集合的集合",所以 应该不包含自己,矛盾。 - 假设
:那么 不属于 ,说明 是"不包含自己的集合",按 的定义,这种集合就应该属于 ,矛盾。
两条假设都推出矛盾——这就是著名的罗素悖论。它告诉我们: "任意性质都能定义出一个集合"是错的。比如"所有集合的集合"、"所有不包含自己的集合"这种"过于庞大"的定义,会落入自指的陷阱。
用"理发师悖论"帮助理解
一个理发师声称:“我给所有不自己剃头的人剃头,但我不给那些自己剃头的人剃头。”
问:理发师给不给自己剃头?
如果他给自己剃头,那按规矩他就不该给自己剃头——矛盾。
如果他不给自己剃头,那按规矩他就应该给自己剃头——矛盾。
只需记住:不能把"任意满足性质的全体"都默认成集合。
一点延伸:与停机问题的关系
罗素悖论和 Propositional Logic 中所提到的停机问题 (Halting Problem) 在推理结构上非常相似。