The uniqueness quantifier is denoted as !∃, the statement !∃xP(x) states "There exists a unique x such that P(x) is true."
Quantifiers with Restricted Domains
∀P(x)Q(x)≡∀x(P(x)→Q(x))
and
∃P(x)Q(x)≡∃x(P(x)∧Q(x))
Tip
Note that for existential quantification, here is P(x)∧Q(x) but not P(x)→Q(x)
推理规则
Tautology
Name
(p∧(p→q))→q
Modus ponens
(¬q∧(p→q)→¬p)
Modus tollens
((p→q)∧(q→r))→(p→r)
Hypothetical syllogism
((p∨q)∧¬p)→q
Disjunctive syllogism
p→(p∨q)
Addition
(p∨q)→p
Simplification
((p)∧(q))→(p∧q)
Conjunction
((p∨q)∧(¬p∨r))→(q∨r)
Resolution
证明方法
Proof by Contraposition
Proofs by contraposition make use of the fact that the conditional statement p→q is equivalent to tis contrapositive, ¬q→¬p. This means that the conditional statement p→q can be proved by showing that its contrapositive, ¬q→¬p, is true. In a proof by contraposition of p→q, we take ¬q as a premise, and using axioms, definitions, and previously proven theorems, together with rules of inference, we show that ¬p must follow.
Proof by Contradiction
Suppose we want to prove that a statement p is true. Furthermore, suppose that we can find a contradiction q such that ¬p→q is true. Because q is false, but ¬p→q is true, we can conclude that ¬p is false, which means that p is true.
To find a contradiction q, we consider the statement r∧¬r, which is a contradiction whenever r is a proposition. We can prove that p is true if we can show that ¬p→(r∧¬r) is true for some proposition r.
集合
幂集(Power Sets)
Given a setS, the power set of S is the set of all subsets of the set S. The power set of S is denoted as P(S)
A×B={(a,b)∣a∈A∧b∈B}A1×A2×⋯×An={(a1,a2,…,an)∣ai∈Ai for i=1,2,…,n}
Relation
A subsetR of the Cartesian Product A×B is called a relation from set A to the set B. A relation from A to itself is called a relation onA
重集(Multisets)
The multiset denoted by {a,a,a,b,b} is the multiset that contains the element a thrice and b twice. There is another notation {m1⋅a1,m2⋅a2,…,mr⋅ar} denotes the multiset with ai occurs mi times.
The numbers mi are called the multiplicities of the elements ai. (Elements not in a multiset are assigned 0 as their multiplicities in this set)
势(基数, Cardinality)
The sets A and B have the same cardinality if and only if there is one-to-one correspondence from A to B. When A and B have the same cardinality, we write ∣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∣.
If A and B are sets with ∣A∣≤∣B∣ and ∣B∣≤∣A∣, then ∣A∣=∣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. We write ∣S∣=ℵ0 and say that S has cardinality "aleph null"
If A and B are countable sets, then A∪B is also countable.
The Continuum Hypothesis
Cantor states that the cardinality of a set is always less than the cardinality of its power set. Hence, ∣Z+∣<∣P(Z+)∣. We can rewrite this as ℵ0<2ℵ0. We denote 2ℵ0=ℵ1
We have ∣R∣=ℵ1
The continuum hypothesis is that there is no cardinal number X between these numbers:
ℵ0<ℵ1<ℵ2<⋯
where ℵn+1=2ℵn
矩阵
01矩阵
A 0-1 Matrix is a matrix whose elements are either 0 or 1.
Let A=(aij)m×n,B=(bij)m×n be 0-1 matrices, we define
The modular inverse of a in the ring of integers modulo m is an integer x such that
ax≡1(modm)
Euler定理
i if n is a positive integer, and let a be an integer that is relatively prime to n. Then
aϕ(n)≡1(modn)
where ϕ(n) is Euler's totient function, which counts the number of positive integers less than n that is also relative prime to n
Fermat小定理(Euler定理的一个特例)
If p is a prime, then ϕ(p)=p, then Euler's Theorem becomes Fermat's Little Theorem
ap−1≡1(modp)
伪素数
Let b be a positive integer. If n is a composite positive integer, and bn−1≡1(modn), then n is called a pseudo-prime to be base b
Among the positive integer not exceeding x, where x is a positive real number, compared to primes there are relatively few pseudo-primes to the base b. So determining whether bn−1≡1(modn) is a useful test that provides some evidence concerning whether n is prime.
However, there are some composite n that satisfies the congruence bn−1≡1(modn) for all positive integers b with gcd(b,n)=1 is called a Carmichael number. For example, the integer 561 is a Carmichael number.
Exgcd
For example, calculate exgcd(108,68)
a(ri)
b
xi=xi−2−xi−1qi−1
yi=yi−2−yi−1qi−1
0
108
1
0
108
68
0
1
68
40
1
-1
40
28
-1
2
28
12
2
-3
12
4
-5
8
4
0
this gives
−5×108+8×68=gcd(108,8)=4
中国剩余定理
Let n1,…,nk be integers greater than 1, and N=∏i=1kni. If the ni are pair-wise co-prime, and if a1,…,ak are any integers, then the system
xx≡a1(modn1)⋮≡ak(modnk)
has a solution, and any two solutions, say x1 and x2, satisfy x1≡x2(modN)
To construct a solution, let Ni=N/ni be the product of all moduli but one. As the ni are pair-wise co-prime, Ni and ni are co-prime. Thus Bezout's identity applies, and there exist integers Mi and mi such that
MiNi+mini=1
A solution of the system of congruences is
x=i=1∑kaiMiNi
In fact, as Nj is a multiple of ni for i=j, we have
x≡aiMiNi≡ai(1−mini)≡ai(modni)
原根和离散对数
A primitive root module a prime p is an integer r in Zp such that every non-zero element of Zp is a power of r.
We can say here r can generate the space of Zp
An important fact is that there is a primitive root module p for every prime p. Suppose this primitive root is r, and a is an integer between 1 and p−1 inclusive. If remodp=a and 0≤e≤p−1, we say that e is the discrete logarithm of a module p to the base r and we write logra=e
例题
T1
Prove that (0,1) and [0,1] have the same cardinality
Using Hilbert's Hotel. Let H={n1:n∈N}, then define f:(0,1)→[0,1] so that
21→0,31→1,n1→n−21
and
x→x,x∈/H
Tip
We can also construct a bijection from (0,1) to [0,1) by letting 21→0 and n1→n−11
T2
Let S⊂{1,2,3,…,98,99,100} where ∣S∣=62. Prove that there exist x,y∈S such that x−y=23
First we prove that we can select 23 elements at most from A such that there are no x,y in this selection satisfying x−y=23. To conclude this, we further divide A into pairs
A={1,24}∪{2,25}∪⋯∪{23,46}
We can select no more than 1 element in each pair, so we can select no more than 23 elements in A.
Similarly, we can select no more than 23 elements in B. Therefore, we can select no more than 23+23+8=54 elements in {1,2,…,100}