Ch2 Basic Structures

本篇笔记介绍了集合的基本概念,包括集合的定义、表示方法、集合之间的关系、集合的操作以及函数的基本性质。我们探讨了集合的基数、可数性以及康托定理等重要主题。通过这些内容,读者将能够理解离散数学中集合和函数的基本结构和性质。(由 gpt-4o-mini 生成摘要)

Word Table

  • 符号(notation)
  • 省略号(ellipse)
  • 括号(brace)

1. 集合 Sets

1.1. 引言 Introduction

集合(set):A set is an unordered collection of objects.

  • The objects in a set are call the 元素(elements),or members, of the set.
  • A set is said to 包含(contain) its elements.
    • aAa \in Aaa is the member of the set AA.
    • a∉Aa \not\in Aaa is not the member of the set AA.
  • 空集(empty set)\varnothing.

集合的表示方式:The descriptions of a set

  • Roster method: listing all its members between braces, e.g. S={1,3,5,7,9}S=\{1,3,5,7,9\}.
  • Brace notation with ellipses: e.g. S={1,2,,99}S=\{1,2,\ldots,99\}.
  • Specification using set builder: S={xP(x)}S=\{x\mid P(x)\}, which means SS contains all the elements from UU (全集(universal set)) which have the property PP.
  • 维恩图(Venn diagrams)

罗素悖论 Russell Paradox

Suppose there is a town with just one male barber; and that every man in the town keeps himself clean-shaven: some by shaving themselves, some by attending the barber. The barber obeys the following rule: he shaves all and only those men in town who do not shave themselves. Does the barber shave himself?

1.2. 集合之间的关系 Relations between Sets

1.2.1. Subset

ABA\subseteq B: AA is a 子集(subset) of the set BB.

ABx(xAxB)A \subseteq B \Leftrightarrow \forall x (x \in A \rightarrow x \in B)

1.2.2. Equal

A=BA=B: AA is 等于(equal) to BB.

A=BABBAA=B \Leftrightarrow A \subseteq B \land B \subseteq A

1.2.3. Proper Subset

ABA\subset B: A is a 真子集(proper subset) of the set BB.

ABABABx(xAxB)(xBx∉A)A \subset B \Leftrightarrow A \subseteq B \land A \neq B \Leftrightarrow \forall x (x \in A \rightarrow x \in B) \land \exists (x \in B \land x\not\in A)

1.2.4. The Size of Sets

Let SS be a set. If there are exactly nn distinct elements in SS where nn is a nonnegative integer, we say that SS is a 有限集(finite set) and that nn is the cardinality of SS.

1.2.5. Power Sets

Given a set S, the 幂集(power set) of S is the set of all subsets of the set S. P(x)\mathcal{P}(x) denotes the power set of SS.

证明:P(A)P(B)AB\mathcal{P}(A) \in \mathcal{P}(B) \Rightarrow A\in B.

1.2.6. Cartesian Products

The 有序 nn 元组(ordered nn-tuple) (a1,a2,,an)(a_1,a_2,\cdots ,a_n) is the ordered collection that has a1a_1 as its first element, a2a_2 as its second element, … , and ana_n as its nth element.

A1,A2,,AnA_1,A_2,\cdots,A_n卡特兰积(cartesian product) 定义为

A1×A2×An={(a1,a2,,an)aiAifor i=1,2,n}A_1 \times A_2 \times \cdots A_n = \{(a_1,a_2,\cdots,a_n) \mid a_i \in A_i \quad\text{for }i=1,2,\cdots n\}
  • If A=m, B=n|A|=m,\ |B|=n, then A×B=B×A=mn|A\times B|=|B\times A|=mn.
  • A×BB×AA\times B\neq B\times A
  • A×=×A=A\times \varnothing = \varnothing \times A= \varnothing

1.2.7. Truth Sets of Quantifiers

Given a predicate PP and a domain DD. The 真集(truth set) of PP is PP is the set of elements xx in DD for which P(x)P(x) is true. Namely, the power set of PP is {xDP(x)}\{x \in D\mid P(x)\}

1.3. 集合操作 Set Operations

1.3.1. Union

AB={xxAxB}A\cup B = \{x \mid x \in A \lor x \in B\}

1.3.2. Intersection

AB={xxAxB}A\cap B = \{x \mid x \in A \land x\in B\}

1.3.3. Difference

AB={xxAx∉B}A-B = \{x \mid x\in A \land x \not\in B\}: The difference of AA and BB.

1.3.4. Complement

A={xx∉AxU}\overline{A} = \{x \mid x \not\in A \land x\in U\}: A\overline{A} is the 补集(complement) of the set AA.

1.3.5. Symmetric difference

AB=(AB)(AB)A\oplus B = (A\cup B) - (A\cap B)

按出现与否统计的话就类似于异或操作。

1.4. 集合恒等式 Set Indentities

更多集合恒等式(set indentities) 可以参考逻辑恒等式。

证明集合相等的一些方法 Ways to Prove Set Identities

  • 将证明恒等式转化为证两次子集。Show that ABA\subseteq B and that BAB\subseteq A.
  • 转化为 set builder 的形式,然后用逻辑恒等式证明。Use logical equivalences to prove equivalent set definitions.
  • 类似于真值表的做法。Use a membership table.
  • 从已有的恒等式中推演。Use previously proven identities.

2. 函数 Functions

2.1. 引言 Introduction

Let AA and BB be nonempty sets. A 函数(function) (mapping or transformations) ff from AA to BB:

f:ABf:A\rightarrow B
a(aA!b(bBf(a)=b))\forall a (a \in A \rightarrow \exists ! b (b \in B \land f(a) = b))
  • AA is called the 定义域(domain) of ff
  • BB is called the 值域(codomain) of ff

If f(a)=bf(a) = b,

  • bb is called the image of aa under ff.
  • aa is called a preimage of bb.

Let ff be a function from the set AA to the set BB. The 图(graph) of the function ff is the set of ordered pairs

{(a,b)aAf(a)=b}\{(a,b) \mid a \in A \land f(a) = b\}

2.2. 单射与满射 One-to-One and Onto Functions

A function f is 单射函数(one-to-one function = injection) (denoted 1-1), or 单射的(injective) if

ab(f(a)=f(b)a=b)\forall a \forall b (f(a) = f(b) \rightarrow a = b)

A function ff from AA to BB is called 满射函数(onto function = surjection), or 满射的(surjective) if

bBaA(f(a)=b)\forall b \in B \exists a \in A (f(a) = b)

The function f is a 一一对应的(one-to-one correspondence), or a 双射(bijection), if it is both one-to-one and onto.

Showing that ff is one-to-one or onto

2.3. 反函数 Inverse Functions

Let ff be a bijection from AA to BB. Then the 反函数(inverse function) of ff, denoted as f1f^{-1}, is the function from BB to AA defined as

f1(y)=x iff f(x)=yf^{-1} (y) = x \text{ iff } f(x) = y
  • 函数 ff 的反函数存在当且仅当函数 ff 是双射函数。Function ff is 可逆的(invertible) if and only if ff is bijective. No inverse function exists unless ff is a bijection.

2.4. 函数的复合 Compositions of Functions

Let gg be a function from the set AA to the set BB and let ff be a function form the set BB to the set CC. The composition of the functions ff and gg denoted by fgf \circ g is defined by:

fg(a)=f(g(a))f \circ g (a) = f(g(a))
  • fgf\circ g can’t be defined unless the range of gg is a subset of the domain of ff.

2.5. 高斯函数 Floor and Ceiling Functions

关于高斯函数的实用性质 Useful Properties of the Floor and Ceiling Functions

3. 数列 Sequence

3.1. 引言 Introduction

A 数列(sequence) is a function from a subset of the set of integers (usually either the set {0,1,2,}\{0, 1, 2, \ldots\} or the set {1,2,3,}\{1, 2, 3,\ldots\}) to a set SS. We use the notation ana_n to denote the image of the integer nn. We call an a term of the sequence.

A 等比数列(geometric progression) is a sequence of the form

a, ar, ar2, , arna,\ ar,\ ar^2,\ \ldots,\ ar^n

where the initial term aa and the 公比(common ratio) rr are real numbers.

An 等差数列(arithmetic progression) is a sequence of the form

a, a+d, a+2d, a+nda,\ a+d,\ a+2d\, \ldots,\ a+nd

where the initial term aa and the 公差(common difference) dd are real numbers.

3.2. 和式 Summations

sSf(s)\sum_{s\in S} f(s)

SS: the subset of the domain of the function ff

Some Useful Summation Formulae

4. 集合的基数 Cardinality of Sets

4.1. 引言 Introduction

  • The cardinality of a set AA is equal to the cardinality of a set BB, denoted A=B| A | = | B |, iff there exists a bijection from AA to BB.
  • If there is an injection from AA to BB, the cardinality of AA is less than or the same as the cardinality of BB and we write AB|A| \le |B|. When AB|A| \le |B| and AA and BB have different cardinality, we say that the cardinality of AA is less than the cardinality of BB and write A<B|A|<|B|.

所以说,比较集合的基数(cardinality of set) 的大小最关键的步骤就在于找到一个集合 SS 到另一个集合 TT单射,如果这样的单射能够找到,就有 ST|S|\le |T|

4.2. 可数的 Countable

  • A set that is either 有限的(finite) or has the same cardinality as the set of positive integers called 可数的(countable).
  • A set that is not countable is called 不可数的(uncountable).
  • When an infinite set SS is countable, we denote the cardinality of SS by 0\aleph_0 (阿列夫零(aleph null)).
  • If A=Z+|A| = | \mathbb{Z}_+ |, the set AA is 可数无穷(countable infinite).

证明:正有理数集 Q+\mathbb{Q}_+ 是可数的。

(1) Q+S|\mathbb{Q}_+| \le |S|x=p/q(p,q)x=p/ q \rightarrow (p,q)

(2) S=Z+|S| = |\mathbb{Z}_+|:沿着对角线取——TBD

(3) Z+Q+|\mathbb{Z}_+| \le |\mathbb{Q}_+|xx/1x\rightarrow x/1

证明:0011 之间的实数集是不可数的。

证明:[0,1][0,1](0,1)(0,1) 是等势的。

证明:N\mathbb N 的所有有限子集是可数的。

先直接给出一种数数方法:数集合的二进制表示。

再给出一个证明:

4.3. 康托定理 Cantor's Theorem

Theorem: 康托定理(Cantor's Theorem)

The cardinality of the powerset of an arbitrary set has a greater cardinality than the original arbitrary set.

实际上有:P(k)=k+1|\mathcal P(\aleph_k)| = |\aleph_{k+1}|

评论

TABLE OF CONTENTS

1. 集合 Sets
1.1. 引言 Introduction
1.2. 集合之间的关系 Relations between Sets
1.3. 集合操作 Set Operations
1.4. 集合恒等式 Set Indentities
2. 函数 Functions
2.1. 引言 Introduction
2.2. 单射与满射 One-to-One and Onto Functions
2.3. 反函数 Inverse Functions
2.4. 函数的复合 Compositions of Functions
2.5. 高斯函数 Floor and Ceiling Functions
3. 数列 Sequence
3.1. 引言 Introduction
3.2. 和式 Summations
4. 集合的基数 Cardinality of Sets
4.1. 引言 Introduction
4.2. 可数的 Countable
4.3. 康托定理 Cantor's Theorem