The cardinality of a (finite and infinite) set S is written as ∣S∣.
Definition. Given 2 sets S and T, the comparison of cardinalities of sets are defined as follow:
∣S∣≤∣T∣ iff there exists an injection f:S↪T
∣S∣=∣T∣ iff there exists an bijection f:S→T
∣S∣<∣T∣ iff ∣S∣≤∣T∣ and ∣S∣=∣T∣ (that is, does not exists a bijection from S to T)
Property. Given a set S, ∣S∣<∣2S∣ holds where ∣2S∣ is defined as {f:S→{0,1}}.
Obviously S↪2S, s↦δs gives a injection.
If there exists a bijection, then there exists a surjection f:S↠2S as bijections are surjections.
Consider the projection g:S→{0,1} mapping s↦1−f(s)(s), then g differs from any f(s) and lands in 2S. Therefore there does not exist such bijection. That is, ∣S∣<∣2S∣ holds.
Theorem. Given 2 sets S and T that holds both ∣S∣≤∣T∣ and ∣T∣≤∣S∣, ∣S∣=∣T∣ holds.
Consider injections as edges, then for each s∈S and t∈T, the out degree of each node is exactly 1 while the in degree is at most 1.
Consider all paths of the graph. There are 2 types of paths:
Those with a starting point. We pick the edges with the same direction as the first edge.
Those without a starting point. We pick all edges from S to T.
Each node is paired exactly once, hence there exists a bijection.
Here are some examples:
∣2N∣=∣R∣
∣N∣=∣N2∣=∣Q∣
∣RN∣=∣R∣
Theorem (Continuum Hypothesis). The following statement is independent from ZFC:
There exists a set S holding ∣N∣<∣S∣<∣R∣.
There are some non-trival proporties of cardinities over infinite sets. By acknowledging the Axiom of Choise (AC), the following statements all holds.
Definition: A set S is called Dedekind-finite iff all of its subsets T⊊S have cardinality strictly smaller than S (that is, ∣T∣<∣S∣).
Poposition. A non-empty set is Dedekind-finite iff it is finite.
Poposition. For 2 arbitary sets S and T, either ∣S∣≤∣T∣ or ∣T∣≤∣S∣ holds.
Poposition. For an infinite set S, ∣S∣=∣S∣×∣S∣.
Many of the statments above are equivlant to the Well-Ordering Theorem, which is equivlant to the Axiom of Choise.
Theorem (Well-Ordering Theorem): Every set S can be well-ordered. That is, exists a well-order (binary relation) ≤ over S such that the following holds:
a≤a
a≤b, b≤c⟹a≤c
a≤b, b≤a⟹a=b
either a≤b or b≤a holds
for all non-empty set T⊆S, there exists a∈S such that ∀b∈S, a≤b
Well-order is kind of like the order of natural numbers. A well-order over R cannot be constructed without using the Axiom of Choise.
PROP ⊆Σ∗: the set of all valide sentences defined recursively as follow:
Any atomic propositions Pi,⊥∈ PROP
Valied sentences connected by connectivities, like (ψ∨φ), ¬φ, (φ→ψ)∈ PROP, where φ,ψ∈ PROP
We can define some kind of “isomorphism” F: PROP →Ω over PROP by giving its value on atomic propositions, and on operations as PROP can be written as a infix notation (中缀表达) by looking at brackets.
Now we can define an evaluation as a “isomorphism” v: PROP →{0,1} over PROP:
v((φ∧ψ))=min{v(φ),v(ψ)}
v((φ∨ψ))=max{v(φ),v(ψ)}
v((φ→ψ))=1−v(φ)(1−v(ψ))
v((φ←ψ))=1−v(ψ)(1−v(φ))
v(¬φ)=1−v(φ)
v(⊥)=0
v(φ) is also written as [[φ]]v.
Note that v(Pi) is not limited.
If all evaluations v satisfying [[ψ]]v=1 for all ψ∈Γ, holds [[φ]]v=1, then we say Γ⊨φ, that is, in human language, .
If [[φ]]v=1 holds for all v, (that is, ∅⊨φ), we call φ a tautology (重言式).
Many propositions are “equivlant”, which means they has the same behavior over evaluations. φ and ψ are called equivlant iff φ⊨ψ and ψ⊨φ.
A trival propoty is that if ⊨φ then ⊨φ[ψ/P] (replacing all P with ψ).
Syntax
Natural Deduction
The character ⊢ stands for some deduction, or some logistic steps.
We can reduce ∨ to ¬ and ∧ and reduce ¬φ to φ→⊥
The following are some appearent rules.
ψφφ→ψ(→E)
φ→ψψ[φ](→I) (here [φ] means an assumption)
φφ∧ψ(→E)
φ⊥[φ](→RAA)
Example. Proof ⊢(P→Q)→(¬Q→¬P).
System K
A different system.
System K is based on “possibility”. The syntax φ1,…,φk⟹ψ1,…,ψm is the base unit of the system. Semantically it means “if all φi holds, at least one of ψi holds”. The axioms are defined based on it. (See textbook).
The system is “better” than natural deduction because it no longer depend on big steps (as natural deduction uses deduction itself as steps), in the contrary, it can store mass information on ψi.
Another important proporty is that by applying axioms in the system, the length of the statement only increases. Therefore there exists an algorithm that only use finite time to decide whether a statement holds.
Syntax and Semantic
One can observe the similarity between Γ⊨φ and Γ⊢φ.
We care about 2 things between the systems:
Soundness. This is to say Γ⊢φ⟹Γ⊨φ.
Completeness. This is to say Γ⊨φ⟹Γ⊢φ.
Soundness is trival while completeness is more interesting.
Lemma. if Γ,ψ⊢φ and Γ,¬ψ⊢φ, then Γ⊢φ.
By applying the lemma recursively over all atomic propositions. We need to prove Γ,(¬)P1,(¬)P2,…,(¬)Pn⊢φ. This gives a unique valuation [[⋅]]v.
If [[ψ]]v=0 holds for some ψ∈Γ, we would have to prove v⊢¬φ. By doing this, we get ⊥, thus implying φ.
If [[ψ]]v=1 holds for all ψ∈Γ, we need to prove V⊢φ.
It all boils down to “evaluate” a proposition in proposition logic.
Lemma. Let P1,…,Pn be atomoc proposition sympols in φ. Let v be a evalueation and Pi∈V iff [[Pi]]v=1, ¬Pi∈V iff [[Pi]]v=0. Then [[φ]]v=1 iff V⊢φ.
We proof this using reduction.
Appearentally the statement holds for all atomic propositions (including ⊥).
φ can be written as ψ1→ψ2. By discussing whether ψ1 and ψ2 holds(according to reductive assumption, they fit there evaluation values), one can say ψ1→ψ2 syntaxally iff ψ1→ψ2 semantically.
Note that the length of the proposition ∣ψ1∣,∣ψ2∣<∣φ∣. The mathmatical induction gives the correctness of the lemma. □
As semantics are consistant, Natural Deduction is also consistant.
In the section above we treat ors (∨) as combinations of nots(¬) and ands(∧). We can also introduce axioms involving ∨ as if the way we introduce ∧.
Intuitionistic Logic and Kripke model
Intuitionistic Logic, or Constructive Logic, is a different system that does not acknowledge RAA (or its equivlent form, such as law of excluded middle).
It is not easy to prove that some propositions cannot be applied without RAA until the emergence of Pripke model.
Definition. A Kripke model is a partially-ordered set (W,≤) paired with a evaluation V:W× Atomic Prop. →{0,1} satisfying the following:
For w1,w0∈W, w1≥w0 holds iff V(w1,Pi)≥V(w0,Pi) for all atomic proposition Pi.
V(w,⊥)=0
The evaluation of a statement ψ→φ is defined as:
V(w,ψ→φ)={10v(w′,φ)≥v(w′,ψ)∀w′≥woth.
Theorem. Intuitionistic logic is consistent with the Kripke model.
Type Theory
胡振江最喜欢的。
Dependent Type Theory 和程序性证明。
Preidcate Logic
Alphabet:
Constants
Variables: x,y,z,… or x1,x2,…
Functions: f,g,h,… or f1,f2,…
Predicates: ⊥, =, P,Q,… or P1,P2,…
Connectives: ∧,∨,¬,→,↔
Auxillaries: (, ) and ,
Quantifier: ∀,∃
Definition: TERM is the set that describes all “valid” value sentences generated by the alphabet as the rules following:
for any constants c and variable x, c,x∈ TERM
if t1,t2,…,tn∈ TERM, given any function f that accepts n variables, f(t1,t2,…,tn)∈ TERM
Definition: FORM is the set that describes all “valid” formulas generated by the following ruls:
for any n terms t1,t2,… and any predicate P that accepts n terms, P(t1,…,tn)∈ FORM
for any φ,ψ∈ FORM, ¬φ,φ∘ψ∈ FORM, where ∘ is a binary connective.
for any formula φ∈ FORM any variable x, ∀xφ∈ FORM and ∃xφ∈ FORM.
Note the subtle difference between the x in ∀x,x=x and x=x where the first one is “bounded” and the second one is “free”.
Note: a variable is free iff there is no quantifier to describe it.
Definition. A structure is a tuple of the following:
a universe (a set Ω),
functions (each defined over Ωn→Ω)
predicates (a n-nary relationship P⊂Ωn)
constants (c1,…,cn∈Ω
A structure is written as A=⟨Ω;f1,…,fn;P1,…,Pm;c1,…,ck⟩
In real life, one have to “fill in the blanks”, that is, use predicates, functions and variables with “real” meanings.
An example is the structure ⟨R;×R,−1;=,<;{0,1}⟩ where one can do multiplications and -1, use 0 and 1 as constants.
Note: we use a overlined symbol to indicate the character in FOR and TERM like x1→x1.
Definition: An evaluation of a structure A is defined as follow:
for t∈ TERM:
[[c]]A=c
[[x]]A=x
[[f(t1,t2)]]=f([[t1]]A,[[t2]]A)
for φ∈ FOR:
[[P(t1,t2)]]=P([[t1]]A,[[t2]]A)
[[φ→ψ]]A=max{1−[[φ]]A,[[ψ]]A}
… (other connectives)
[[∀xφ(x)]]A=minc∈Ω[[φ]]A∣x=c
[[∃xφ(x)]]A=maxc∈Ω[[φ]]A∣x=c
Definition. let x1,x2,…,xn be free variables in φ, A⊨φ means ∀x1∀x2…∀xnφ; ⊨φ means A⊨φ holds for all A with the same type; Γ⊨φ if A⊨Γ⟹A⊨φ for all A.
Given a set of axioms Γ (like Peano Axioms). We call Γ consistent iff Γ⊢⊥.
Theorems T over Γ are defined as all sentences φ that Γ⊢φ.
T is a Henkin theorem if for each sentence ”∃xφ(x)”∈T there exists constant symbol c s.t. φ(c)∈T.
Let T′⊃T be an extension of T (here Σ is also extended). T′ is a conservative extension over T iff T′∩L=T (that is, new theorems contain new constants).
In the old system we sometimes cannot introduce a x0 that satisfies ”∃xφ(x)”. We can extende this by adding these x0 into the constants’ set.
Formally, let T∗ be theorems over language L∗ where L∗ introduced constants cφ for all ”∃xφ(x)” ∈T.
We claim T∗ is a conservative extension.
This is to say T,∃φ(x)→φ(cφ)⊢ψ and ψ∈L, then ψ∈T.
As there is no cφ in ψ, we can replace all cφ with another variable y, after which one can say:
T⊢(∃φ(x)→φ(cφ))→ψ
T⊢(∃φ(x)→φ(y))→ψ
T⊢∀y(∃φ(x)→φ(y))→ψ(∀ I)
T⊢∃y(∃φ(x)→φ(y))
T⊢(∃xφ(x)→∃yφ(y)) (after some steps)
which appearentally holds.
Back to consistency. If Γ is consistent, then there exists a model A s.t. A⊨Γ.
Extend T to Te as above.
This can be given where Ω={closed term t∈Le} (that is, a term that only contains constants and functions) and evaluations are given as [[f(t1,…,tn)]]=f(t1,…,tm) and [[P(t1,t2)]]=[P(t1,t2)∈Te].
This might cause problem when neither Γ⊢φ nor Γ⊢¬φ holds. But in this case adding one of them will not give ⊥.
By applying Zorn’s Lemma or by lining up and examing sentences one at a time, one can get Te∗ where either φ or ¬φ holds.
There will be more problems with ”=”. We say t1∼t2 iff t1=t2∈Te∗, by making Ω′=Ω/∼ we solve the problem of ”=“s.
We mainly talk about countable sentences. An interesting fact about this is that almost all real numbers cannot be described(as languages are countable).
ZFC set theory
Axiom of extensionality(外延公理): ∀x∀y(∀zz∈x↔z∈y)→x=y
Axiom of schema of specification(分离公理) ∀x,w1,…,wt∃y∀z(z∈y↔(z∈x∧φ(z,w1,…,wt))); This gives empty set and intersection of sets.
Axiom of pairing(配对公理): ∀x,y∃z(x∈z∧y∈z)
Axiom of union(并集公理): ∀x∃y∀z,w(z∈x∧w∈z→w∈y)
Axiom of power set(幂集公理): ∀x∃y∀z(z⊂x→z∈y) (here x⊂y⟺∀z(z∈x→z∈y))
Axiom of infinity(无穷公理): ∃N(∅∈N∧(∃y,y∈N→y∪{y}∈N)
Axiom schema of replacement(替换公理): ∀A,w1,…,wt(∀xx∈A→∃!yφ(y,x,w1,…,wt))→∃y(∀x(x∈A)→∃yφ(y,x,w1,…,wt)∧y∈B
Axiom of regularity(正则公理): ∀x(x=∅→∃y(y∈x∧x∩y=∅))
Axiom of choise(选择公理): For any set of sets S, there exists a projection f:S→∪S where f(a)∈a holds for all a∈S
Cartesian product: for all sets S,T there exists a set S×T:={(x,y):x∈S,y∈T} where (x,y):={{x},{x,y}}. This is because S×T⊂2S∪T.
Given the cartesian product, we can define a relationship R⊂S×T where aRb⟺(a,b)∈R. A function if defined as a relationship where ∀a∃!baRb
However, ZFC is incomplete, meaning some true statements cannot be proved.
Imcomplete theorem
We can encode statements (which are finite strings) into integers as there will only be finite variables in a statement.
Note that ZFC is strong enough to hold natural numbers(or Peano Axioms).
Consider a statement that decides whether a encoded sentence is a TERM