文章目录
- set
- Function 函数
- Cardinality of Sets
- relation
set
set 集合
A set is an unordered collection of distinct objects, called elements or members of the set. A
set is said to contain its elements. We write a ∈ A to denote that a is an element of the set A.
The notation a ∉ A denotes that a is not an element of the set A
equal 集合的相等
Two sets are equal if and only if they have the same elements. Therefore, if A and B are sets,
then A and B are equal if and only if ∀x(x ∈ A ↔ x ∈ B). We write A = B if A and B are equal
sets
任何一个元素,如果在A中,那么一定在B中。
empty set 空集合
There is a special set that has no elements. This set is called the empty set,
or null set, and is denoted by ∅. The empty set can also be denoted by { }
空集合与 singleton set 不同。∅,和{∅}也不同,前者是空集,里面没有元素;后者是包含空集的集合,里面有一个元素。
cardinality 基数
Let S be a set. If there are exactly n distinct elements in S where n is a nonnegative integer,
we say that S is a finite set and that n is the cardinality of S. The cardinality of S is denoted
by |S|.
包含 n 个不同的元素,则基数为n。
trust set
Given a predicate P, and a domain D, we define the truth set of P to be the set of elements x in D for which P(x) is true. The truth set of P(x) is denoted by {x ∈ D ∣ P(x)}
Function 函数
函数
Let A and B be nonempty sets. A function f from A to B is an assignment of exactly one
element of B to each element of A. We write f(a) = b if b is the unique element of B assigned
by the function f to the element a of A. If f is a function from A to B, we write f : A → B.
建立从集合A到集合B的映射,只能映射到B中的一个元素。
domain, codomain, image, preimage, range,maps
If f is a function from A to B, we say that A is the domain of f and B is the codomain of f.
If f(a) = b, we say that b is the image of a and a is a preimage of b. The range, or image, of f is the set of all images of elements of A. Also, if f is a function from A to B, we say that f
maps A to B.
injection, one-to-one
A function f is said to be one-to-one, or an injection, if and only if f(a) = f(b) implies that a = b for all a and b in the domain of f. A function is said to be injective if it is one-to-one.
一一对应,每个A中元素映射的值唯一,不一定能把B中所有元素都映射到。
surjective, onto
A function f from A to B is called onto, or a surjection, if and only if for every element b ∈ B there is an element a ∈ A with f(a) = b. A function f is called surjective if it is onto.
每个B中的元素,都有A中的元素可以映射过去,但不一定用到A中所有元素。
bijection, one-to-one correspondence
The function f is a one-to-one correspondence, or a bijection, if it is both one-to-one and onto. We also say that such a function is bijective.
一一对应,且每个定义域A中的元素和值域B中的元素都被用到了。
inverse function
Let f be a one-to-one correspondence from the set A to the set B. The inverse function of f is the function that assigns to an element b belonging to B the unique element a in A such that f(a) = b. The inverse function of f is denoted by f − 1 f ^{−1} f−1. Hence, f − 1 ( b ) = a f ^{−1}(b) = a f−1(b)=a when f(a) = b.
前提是 f 是一一对应的。
composition
Let g be a function from the set A to the set B and let f be a function from the set B to the set C. The composition of the functions f and g, denoted for all a ∈ A by f ◦g, is the function from A to C defined by
( f ◦ g ) ( a ) = f ( g ( a ) ) ( f ◦g)(a) = f(g(a)) (f◦g)(a)=f(g(a))
函数复合。
graph of function
Let f be a function from the set A to the set B. The graph of the function f is the set of ordered pairs ( a , b ) ∣ a ∈ A a n d f ( a ) = b {(a, b) ∣ a ∈ A and f(a) = b} (a,b)∣a∈Aandf(a)=b.
partial function
A partial function f from a set A to a set B is an assignment to each element a in a subset of A, called the domain of definition of f , of a unique element b in B. The sets A and B are called the domain and codomain of f , respectively. We say that f is undefined for elements in A that are not in the domain of definition of f . When the domain of definition of f equals A, we say that f is a total function
没有用到A中的所有元素,而是A的子集,被称为the domain of definition。
Cardinality of Sets
same cardinality
The sets A and B have the same cardinality if and only if there is a one-to-one correspondence from A to B. When A and B have the same cardinality, we write |A| = |B|
如果集合A,B之间可以建立一个一一映射的函数,那么就称A,B是等势的。
不等关系
If there is a one-to-one function from A to B, the cardinality of A is less than or the same as the cardinality of B and we write |A| ≤ |B|. Moreover, when |A| ≤ |B| and A and B have different cardinality, we say that the cardinality of A is less than the cardinality of B and we write |A| < |B|.
存在一个一到一的函数,从A映射到B(不一定覆盖所有B的元素),那么就有小于等于关系。只要他俩的基数不等,那就是小于关系。
Countable Sets
A set that is either finite or has the same cardinality as the set of positive integers is called
countable. A set that is not countable is called uncountable. When an infinite set S is countable, we denote the cardinality of S by ℵ0 (where ℵ is aleph, the first letter of the Hebrew alphabet). We write |S| = ℵ0 and say that S has cardinality “aleph null.
有有限个元素的集合或者与正整数有相同基数的集合是可数的。当一个集合是可数的时候,我们用 ℵ0表示他的基数。
一个无限的集合是可数的,当且仅当它可以将元素拍成一个序列(下标是正整数),因为一一映射的函数 f 会将正整数映射到另一个集合的元素。
所有整数的集合是可数的,可以将他按照 0 , 1 , − 1 , 2 , − 2 , . . . {0,1,-1,2,-2,...} 0,1,−1,2,−2,...的顺序排列。
有理数是可数的。可以将有理数看成
p
q
\frac{p}{q}
qp,然后用列表示所有有理数中分母为q的,行表示所有有理数中分子为p的。然后按照先p+q=2的,再p+q=3的顺序排列这些有理数。具体如图,箭头表示排列的方向。如果发现
p
q
\frac{p}{q}
qp的值出现了重复,那么就舍弃。圆圈表示被选来用来排列的那些数。
这样我们就找到了一个方法,可以按照顺序排列所有有理数,所以有理数是可数的。
Uncountable Set
实数是不可数集合,证明方法为 Cantor diagonalization argument,即对角线方法。
如果实数是可数的,那么0-1之间的实数应该也是可数的。那么我们假设0-1之间的实数可以按照某种顺序排列,比如:
r
1
=
0.
d
11
d
12
d
13
d
14
…
r
2
=
0.
d
21
d
22
d
23
d
24
⋯
r
3
=
0.
d
31
d
32
d
33
d
34
⋯
r
4
=
0.
d
41
d
42
d
43
d
44
…
⋮
\begin{aligned} &r_{1}=0 . d_{11} d_{12} d_{13} d_{14} \ldots \\ &r_{2}=0 . d_{21} d_{22} d_{23} d_{24} \cdots \\ &r_{3}=0 . d_{31} d_{32} d_{33} d_{34} \cdots \\ &r_{4}=0 . d_{41} d_{42} d_{43} d_{44} \quad \ldots \\ &\quad \vdots \end{aligned}
r1=0.d11d12d13d14…r2=0.d21d22d23d24⋯r3=0.d31d32d33d34⋯r4=0.d41d42d43d44…⋮
其中
d
i
j
∈
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
}
.
d_{i j} \in\{0,1,2,3,4,5,6,7,8,9\} .
dij∈{0,1,2,3,4,5,6,7,8,9}. (例如,假设
r
1
=
0.23794102
…
r_{1}=0.23794102 \ldots
r1=0.23794102…, 有
d
11
=
d_{11}=
d11=
2
,
d
12
=
3
,
d
13
=
7
2, d_{12}=3, d_{13}=7
2,d12=3,d13=7以此类推)
然后,根据下面的规则生成这样的一个实数
r
=
0.
d
1
d
2
d
3
d
4
…
r=0 . d_{1} d_{2} d_{3} d_{4} \ldots
r=0.d1d2d3d4…其中:
d
i
=
{
4
if
d
i
i
≠
4
5
if
d
i
i
=
4
d_{i}=\left\{\begin{array}{l} 4 \text { if } d_{i i} \neq 4 \\ 5 \text { if } d_{i i}=4 \end{array}\right.
di={4 if dii=45 if dii=4
假设
r
1
=
0.23794102
…
r
2
=
0.44590138
…
r
3
=
0.09118764
…
r
4
=
0.80553900
…
r_{1}=0.23794102 \ldots \\r_{2}=0.44590138 \ldots\\ r_{3}=0.09118764 \ldots \\ r_{4}=0.80553900 \ldots
r1=0.23794102…r2=0.44590138…r3=0.09118764…r4=0.80553900…
那么有
r
=
0.
d
1
d
2
d
3
d
4
…
=
0.4544
…
r=0 . d_{1} d_{2} d_{3} d_{4} \ldots=0.4544 \ldots
r=0.d1d2d3d4…=0.4544…,
d
1
=
4
d_{1}=4
d1=4 因为
d
11
≠
4
,
d
2
=
5
d_{11} \neq 4, d_{2}=5
d11=4,d2=5 因为
d
22
=
4
,
d
3
=
4
d_{22}=4, d_{3}=4
d22=4,d3=4 因为
d
33
≠
4
,
d
4
=
4
d_{33} \neq 4, d_{4}=4
d33=4,d4=4 因为
d
44
≠
4
d_{44} \neq 4
d44=4以此类推。
每个无理数都有一个独特的十进制展开,r应该也一样。但构造的这个r不等于任何的
r
1
,
r
2
,
.
.
.
r_1,r_2,...
r1,r2,...。假设他等于
r
i
r_i
ri,那么理论上小数点后的每一位数都应该相同。但是如果
r
i
i
r_{ii}
rii等于5,则
r
r
r中
d
i
=
4
d_i=4
di=4,所以二者不相等,矛盾。
所以r不会在上面的列表中出现,所以假设所有0-1的实数都可以被排列出来不成立。所以有理数不可数。
Result about cardinality
可数集合的并仍可数
If A and B are countable sets, then A ∪ B is also countable.
CHRODER-BERNSTEIN THEOREM
If A and B are sets with |A| ≤ |B| and |B| ≤ |A|, then |A| = |B|. In other words, if there are one-to-one functions f from A to B and g from B to A, then there is a one-to-one correspondence between A and B
Uncomputable Functions
We say that a function is computable if there is a computer program in some programming
language that finds the values of this function. If a function is not computable we say it is
uncomputable
relation
Let A and B be sets. A binary relation from A to B is a subset of A × B
关系是A和B的笛卡尔积的子集。(a,b)表示a和b之间具有关系R,R表示什么可以自己去定义。比如A表示学生,B表示课程,R表示学生选了某个课程,那么(小明,物理)就可以表示小明选了物理课。
函数可以用关系表示。如果R是关于A,B的关系,并且A的元素是有序数对的第一个元素,且唯一是,那么R也可以表示成函数的graph。二者的不同是,关系可以一对多。
relation on set
Let A and B be sets. A binary relation from A to B is a subset of A × B
Let A be the set {1, 2, 3, 4}. Which ordered pairs are in the relation R = {(a, b) ∣ a divides b}?
R = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 4), (3, 3), (4, 4)}
reflexive 自反的
A relation R on a set A is called reflexive if (a, a) ∈ R for every element a ∈ A
symmetric/antisymmetric 对称/反对称的
A relation R on a set A is called symmetric if (b, a) ∈ R whenever (a, b) ∈ R, for all a, b ∈ A. A relation R on a set A such that for all a, b ∈ A, if (a, b) ∈ R and (b, a) ∈ R, then a = b is called antisymmetric
whenever:无论何时
symmetric:只要a和b满足关系,那么b和a必定满足关系。
antisymmetric:如果a和b满足关系,且b和a满足关系,那么a和b一定相等。
transitive 传递的
A relation R on a set A is called transitive if whenever (a, b) ∈ R and (b, c) ∈ R, then (a, c) ∈ R, for all a, b, c ∈ A
composite
Let R be a relation from a set A to a set B and S a relation from B to a set C. The composite of R and S is the relation consisting of ordered pairs (a, c), where a ∈ A, c ∈ C, and for which there exists an element b ∈ B such that (a, b) ∈ R and (b, c) ∈ S. We denote the composite of R and S by S ◦R
degree
Let A1, A2, … , An be sets. An n-ary relation on these sets is a subset of A1 × A2 × ⋯ × An. The sets A1, A2, … , An are called the domains of the relation, and n is called its degree.
selection
Let R be an n-ary relation and C a condition that elements in R may satisfy. Then the selection operator sC maps the n-ary relation R to the n-ary relation of all n-tuples from R that satisfy the condition C.
从满足关系R的元素中再选出满足条件C的。
projection
The projection P i 1 i 2 , … , i m P_{i_{1} i_{2}, \ldots, i_{m}} Pi1i2,…,im where i 1 < i 2 < ⋯ < i m i_{1}<i_{2}<\cdots<i_{m} i1<i2<⋯<im, maps the n n n-tuple ( a 1 , a 2 , … , a n ) \left(a_{1}, a_{2}, \ldots, a_{n}\right) (a1,a2,…,an) to the m m m-tuple ( a i 1 , a i 2 , … , a i m ) \left(a_{i_{1}}, a_{i_{2}}, \ldots, a_{i_{m}}\right) (ai1,ai2,…,aim), where m ≤ n m \leq n m≤n
也就是从n元关系里面,去掉一些。原来是n个元素组成的元组,现在减少到m个了。
join
Let R R R be a relation of degree m m m and S S S a relation of degree n . n . n. The join J p ( R , S ) J_{p}(R, S) Jp(R,S) where p ≤ m p \leq m p≤m and p ≤ n p \leq n p≤n, is a relation of degree m + n − p m+n-p m+n−p that consists of all ( m + n − p ) (m+n-p) (m+n−p)-tuples ( a 1 , a 2 , … , a m − p , c 1 , c 2 , … , c p , b 1 , b 2 , … , b n − p ) , \left(a_{1}, a_{2}, \ldots, a_{m-p}, c_{1}, c_{2}, \ldots, c_{p}, b_{1}, b_{2}, \ldots, b_{n-p}\right), \quad (a1,a2,…,am−p,c1,c2,…,cp,b1,b2,…,bn−p), where the m m m-tuple ( a 1 , a 2 , … , a m − p , c 1 , c 2 , … , c p ) \left(a_{1}, a_{2}, \ldots, a_{m-p}, c_{1}, c_{2}, \ldots, c_{p}\right) (a1,a2,…,am−p,c1,c2,…,cp) belongs to R R R and the n n n-tuple ( c 1 , c 2 , … , c p , b 1 , b 2 , … , b n − p ) \left(c_{1}, c_{2}, \ldots, c_{p}, b_{1}, b_{2}, \ldots, b_{n-p}\right) (c1,c2,…,cp,b1,b2,…,bn−p) belongs to S S S.
也就是R和S中有公共部分(c相关的),然后找出来有公共部分的所有组合。
closure
If R is a relation on a set A, then the closure of R with respect to P, if it exists, is the relation S on A with property P that contains R and is a subset of every subset of A × A containing R with property P.
也就是满足关系R,同时具有性质P。
equivalence relation
A relation on a set A is called an equivalence relation if it is reflexive, symmetric, and transitive.
equivalent
Two elements a and b that are related by an equivalence relation are called equivalent. The notation a ∼ b is often used to denote that a and b are equivalent elements with respect to a particular equivalence relation
如果a和b在某个等价关系下存在关系,那么就说a和b是equivalent的。a ~ b 表示在某个equivalence关系下a和b是equivalent的。
equivalence class
Let R R R be an equivalence relation on a set A . A . A. The set of all elements that are related to an element a a a of A A A is called the equivalence class of a a a. The equivalence class of a a a with respect to R R R is denoted by [ a ] R . [a]_{R} . [a]R. When only one relation is under consideration, we can delete the subscript R R R and write [ a ] [a] [a] for this equivalence class.
[ a ] R = { s ∣ ( a , s ) ∈ R } [a]_{R}=\{s \mid(a, s) \in R\} [a]R={s∣(a,s)∈R}
和a存在关系的所有元素构成的集合被称为等价类。
Theorem 等价关系
Let R R R be an equivalence relation on a set A . A . A. These statements for elements a a a and b b b of A A A are equivalent:
(i) a R b a R b aRb
(ii) [ a ] = [ b ] [a]=[b] [a]=[b]
(iii) [ a ] ∩ [ b ] ≠ ∅ [a] \cap[b] \neq \emptyset [a]∩[b]=∅
partial ordering
A relation R on a set S is called a partial ordering or partial order if it is reflexive, antisymmetric, and transitive. A set S together with a partial ordering R is called a partially ordered set, or poset, and is denoted by (S, R). Members of S are called elements of the poset.
偏序关系:自反的,反对称的,传递的。
comparable
The elements a a a and b b b of a poset ( S , ≼ ) (S, \preccurlyeq) (S,≼) are called comparable if either a ≼ b a \preccurlyeq b a≼b or b ≼ a b \preccurlyeq a b≼a. When a a a and b b b are elements of S S S such that neither a ≼ b a \preccurlyeq b a≼b nor b ≼ a , a b \preccurlyeq a, a b≼a,a and b b b are called incomparable.
比如在偏序集 ( Z + , ∣ ) (Z^+,|) (Z+,∣)中,| 表示整除关系。3和9是课比较的,因为3整除9,但是5和7不是可比较的,因为5不整除7,7也不整除5.
linearly ordered set, chain
If ( S , ≼ ) (S, \preccurlyeq) (S,≼) is a poset and every two elements of S S S are comparable, S S S is called a totally ordered or linearly ordered set, and ≼ \preccurlyeq ≼ is called a total order or a linear order. A totally ordered set is also called a chain.
偏序集合中任何两个元素都是可比的,那么就可以把这个集合称为先行顺序集合\全序。
( Z + , ≤ ) (Z^+,\leq) (Z+,≤)就是全序的,因为集合中任何两个数a,b要么a≤b,要么b≤a
well-ordered
( S , ≼ ) (S, \preccurlyeq) (S,≼) is a well-ordered set if it is a poset such that ≼ \preccurlyeq ≼ is a total ordering and every nonempty subset of S S S has a least element.
lattice
A partially ordered set in which every pair of elements has both a least upper bound and a
greatest lower bound is called a lattice.
boolean variable, boolean function
Let B = { 0 , 1 } . B=\{0,1\} . B={0,1}. Then B n = { ( x 1 , x 2 , … , x n ) ∣ x i ∈ B B^{n}=\left\{\left(x_{1}, x_{2}, \ldots, x_{n}\right) \mid x_{i} \in B\right. Bn={(x1,x2,…,xn)∣xi∈B for 1 ≤ i ≤ n } \left.1 \leq i \leq n\right\} 1≤i≤n} is the set of all possible n n n-tuples of 0 s 0 \mathrm{~s} 0 s and 1 s 1 \mathrm{~s} 1 s. The variable x x x is called a Boolean variable if it assumes values only from B B B, that is, if its only possible values are 0 and 1. 1 . 1. A function from B n B^{n} Bn to B B B is called a Boolean function of degree n . n . n.
boolean expression
Boolean functions can be represented using expressions made up from variables and Boolean operations. The Boolean expressions in the variables x 1 , x 2 , … , x n x_{1}, x_{2}, \ldots, x_{n} x1,x2,…,xn are defined recursively as
0 , 1 , x 1 , x 2 , … , x n 0,1, x_{1}, x_{2}, \ldots, x_{n} 0,1,x1,x2,…,xn are Boolean expressions;
if E 1 E_{1} E1 and E 2 E_{2} E2 are Boolean expressions, then E ˉ 1 , ( E 1 E 2 ) \bar{E}_{1},\left(E_{1} E_{2}\right) Eˉ1,(E1E2), and ( E 1 + E 2 ) \left(E_{1}+E_{2}\right) (E1+E2) are Boolean expressions.