本文最后更新于 2024年6月20日 晚上
1. Basic 基础组成
1.1 Domain 论域
The set of objects to be discussed is called Domain.
1.2 Constants 常元
The symbol to describe a concrete objects in domain is called constant.
e.g. Alice, Bob, 0, 1, …
1.3 Variables 变元
A symbol to represent an uncertain objects in domain is called variable.
e.g. x,y,z,w,…
1.4 Predicates 谓词
Predicates are symbols represents a property of an individual object or a relationship amon multiple individuals.
e.g. S(x) : x is a student; R(x,y) : x<bry.
The arity of predicates is the number of its arguments(参数):e.g. Q3 can receive three arguments written as Q(x,y,z).
1.5 Quantifiers 量词
-
Universal Quantifier ∀ : The value for variable ranges throughout the domain.
-
Existential Quantifier ∃ : The value for variable is limited to some objects in domain.
1.6 Functions 函词
A symbol represents the mapping from a set of individuals to an individual is called Function.
Like predicates, function has arity represents the numbers of input objects.
e.g. m(x,y) : the product of x and y.
2. Syntax 语义
2.1 Alphabet
Non-logical symbols :
- Constant symbols: c1,c2,…
- Predicates: P,Q,P12,…
- Functions: f,g,h,f21,g12,…
Logical symols :
- Quantifiers: ∀,∃
- Variables: x,y,z,x1,,x2,…,y1,…
- Connectives: ¬,∧,∨,→,↔
- Punctuations: (,) and ,
- Equality: =
2.2 Terms 项
- Constant symbols and variables are (atomic) terms.
- If f(n) is a function and t1,t2,…,tn∈Term(L), then f(n)(t1,t2,…,tn)∈Term(L)
2.3 Atom 原子公式
- P(t1,t2,…,tn)∈Atom(L) if t1,t2,…,tn∈Term(L) and P is an n-ary predicate.
- =(t1,t2) (or, t1=t2) ∈Atom(L) where t1,t2∈Term(L)
α∈Form(L) if and only if :
- Atom(L)∈Form(L).
- If α∈Form(L), then (¬α)∈Form(L).
- If α,β∈Form(L), then (α∗β)∈Form(L), where ∗ is one of ∧,∨,→,↔.
- If α∈Form(L) and x is a variable, then (∀xα),(∃xα)∈Form(L).
2.4.1 Precedence 优先顺序
- ∀x,∃x have the same precedence as ¬.
- The rest remains as in proposition logic.
2.4.2 Conventions
- Parenthese around quantifiers can be omitted.
- The order of priority in which to consider ¬,∃,∀ is determined by the order in which they are listed.
3. Semantics 语义
3.1 Basic
3.1.1 Scope 辖域
Formula α is the scope of the quatifier ∀x(∃x) if ∀x(∃x) is adjacent to α, and any proper prefix of α is not a formula.
e.g. ∀xP(x)∧Q(x), P(x) is the scope of ∀x.
3.1.2 Free and Bound Variables 自由变元和约束变元
- Free Variable : the variable is not within the scope of the relative quantifier.
- Bound Variable : the variable is within the scope of the relative quantifier.
3.1.3 Sentence 语句
A formula with no free variables is called closed formula, or a sentence.
e.g.
- ∀y∃xf(x)=y is a sentence.
Closure(封闭式) :
If {x1,x2,…,xn} are all the free variables of a formula α, then
- Universal closure: ∀x1…∀xnα
- Existential closure: ∃x1…∃xnα
3.2 Interpretation 解释
An interpretation I consists of :
- A non-empty domain D of I.
- Constant symbol cI in D.
- Function symbol fI.
- Predicate symbol PI.
e.g. Define an interpretation I by
- Domain: D={1,2,3}
- Constant: αI=1,bI=2,cI=3
- Function: fI:(x,y)↦min{x,y}
- Predicates: PI={1,3},QI={⟨1,2⟩,⟨3,3⟩,⟨3,1⟩}
3.3 Environment 环境
An environment E is a function that assigns a value in the domain to every symbol in the language.
The combination of interpretation and environment supplies a value for every formulas in FOL.
3.4.1 Valuation for Terms
-
If term t is a constant c, then t(I,E)=cI.
-
If term t is a free variable x, then t(I,E)=xE.
-
If term t is a function f(t1,t2,…,tn), then t(I,E)=fI(t1(I,E),t2(I,E),…,tn(I,E)).
3.4.3 Defination 定义
For any environment E and domain element d, the new environment E with x re-assigned to d, denoted E[x↦d], is given by:
E[x↦d](y)={dE(y)if y is xif y is not x
(∀x α)(I,E)={10if α(I,E[x↦d])=1 for every d∈dom(I)otherwise
(∃x α)(I,E)={10if α(I,E[x↦d])=1 for some d∈dom(I)otherwise
4. Entailment 蕴涵
4.1 Satisfaction and Validity 可满足性和永真性
An interpretation I and environment E satisfy a formula α, denoted I⊨Eα, iff α(I,E)=1.
Otherwise, they don’t satisfy α, denoted I⊨Eα if α(I,E)=0.
Typically, if I⊨Eα for every E, then I satisfy α, denoted I⊨α.
For a formula α:
- Valid: if I⊨Eα for every I and E (like tautology in proposition logic).
- Satisfiable: if I⊨Eα for some I and E.
- Unsatisfiable: if I⊨Eα for every I and E.
4.2 Semantic Entailment 语意蕴涵
Σ is a set of FOL formulas and α is a formula, we say Σ⊨α if and only if, for any I and E, if I⊨EΣ then I⊨Eα.
∅⊨α means α is valid.
4.2.1 Prove Entailment 蕴含证明
e.g. Prove that
∀x(¬y)⊨¬(∃x y)
Proof:
Assume I⊨E∀x(¬y), then we obtain
≡ For every a∈dom(I),I⊨E[x↦a](¬y)For every a∈dom(I),I⊨E[x↦a] y
by the entailment rules of negation, this means if I⊨E(∃x y), there will raise a contradiction for no a∈dom(I) such that I⊨E[x↦a] y.
Hence, I⊨E¬(∃x y) holds. Q.E.D.
5. Natural Dedution 自然演绎
5.1 Substitution 代换
For a variable x, a term t and a formula α, α[t/x] denotes the resulting formula by replacing each free occurence of x in α with t.
e.g. (∀xP(x)∧P(y))[u/x]⟺P(u)∧P(y)
5.2 Inference Rules
Name |
⊢-notation |
inference notation |
∀-elimination |
If Σ⊢ND(∀x α), then Σ⊢NDα[t/x] |
α[t/x](∀ α) |
∀-introduction |
If Σ⊢NDα[u/x] and u is not free in Σ,α, then Σ⊢ND∀α |
∀x αu fresh ⋮α[u/x] |
∃-elimination |
If Σ,α[u/x]⊢NDβ with u fresh, then Σ,(∃x α)⊢NDβ |
β(∃x α)α[u/x],u fresh ⋮ β |
∃-introdution |
If Σ⊢NDα[t/x], then Σ⊢ND(∃x α) |
(∃x α)α[t/x] |
e.g.
i.∃x(¬P(x))⊢¬(∀xP(x))
Proof :
1.∃x(¬P(x))Premise2.∀xP(x)Assumption3.¬P(u), u fresh4.P(u)∀e:25.⊥⊥i:3,46.⊥∃e:1,3−57.¬(∀xP(x))¬i:2−6
ii.¬(∀P(x))⊢∃x(¬P(x))
Proof :
1.¬(∀xP(x))Premise2.¬∃x(¬P(x)) Assumption3.u fresh4.¬P(u) Assumption5.∃¬P(x) ∃i:46.⊥⊥i:2,57.P(u) Reductio ad Absurbum: 4-68.∀xP(x) ∀i:3−79.⊥ ⊥i:1,810.∃x¬P(x) Reductio ad Absurbum: 2-9