FOL semantics
可以由一阶逻辑结构(S-structures)来决定真假的命题:
∀x(L(x,f(x)))∀x(M(x))∃x(P(x)∧E(x))G(c)
这些命题的真假和变量符号 x 的具体取值无关,而是与 ∀ 或者 ∃ 描述的范围范围有关。但是有些一阶逻辑命题也是可以没有量词的,比如:
L(x,y)L(x,f(x))
但是这些命题的真与假就取决于变量的赋值。
Definition 1 (Free occurrence and binded occurrence,约束出现和自由出现). Assume x is a variable symbol. In ∀xϕ and ∃xϕ, all occurrences of x are called binded occurrences. All other occurrences of x are free occurrences.
例如上述 L(x,y) 中的 x,y 都是自由出现;但如果是 ∀x∃y(L(x,y)),那么 x,y 就都是约束出现。
Definition 2 (Open proposition and closed proposition,开命题和闭命题). A FOL proposition ϕ is open if it contains at least one free occurrence of variables. Otherwise, ϕ is called a closed proposition.
也就是说只要命题中至少有一个自由出现的变量符号,那这个一阶逻辑命题就是开命题。根据上节课的内容,对于闭命题而言,只要通过一阶逻辑的结构(S-structure)就可以判断命题的真值。但如果是开命题,就还和变量值有关。
Example 3.
一些开闭命题的例子,没什么好说的。
Definition 4 (S-interpretation,S 解释).
Given a symbol set S, a S-interpretation J=(A,β) is
- a S-structure A=(A,α)
- a S-assignment β: a mapping from variables to elements in the domain A
For J=(A,β) and A=(A,α), we usually use J(P) and A(P) to represent α(P), use J(f) and A(f) to represent α(f), use J(c) and A(c) to represent α(c) and use J(x) to represent β(x).
就是说 S-interpretation 就是在 S-structure 的基础上加了一个对变量符号的解释,即把每一个变量符号都映射到论域中的元素。通常用字母 J 来表示一个解释。
Defination 5 (Terms’ denotation). For S-interpretation J and a S-term t,
- [[x]]J=J(x)
- [[c]]J=J(c)
- [[f(t1,t2,…,tn)]]J=J(f)([[t1]]J,[[t2]]J,…[[tn]]J)
这里定义了 term 的语义,方便后面定义命题真值。
Definition 6 (Propositions’ truth).
For S-interpretation J and a S-proposition t,
- [[P(t1,t2,…,tn)]]J=J(P)([[t1]]J,[[t2]]J,…,[[tn]]J)
- [[ϕ∧ψ]]J=[[∧]]([[ϕ]]J,[[ψ]]J)
- [[¬ϕ]]J=[[¬]]([[ϕ]]J)
- [[∀xϕ]]J=T if and only if for every a in A 's domain, [[ϕ]]J[x↦a]=T
- [[∃xϕ]]J=T if and only if for at least one a in A 's domain, [[ϕ]]J[x↦a]=T
where J[x↦a] is a S-interpretation which keeps all other interpretations in J and interprets x by a.
Example 7
- L is a binary predicate symbol.
- f is a unary function symbol.
- S={L,f} is a set of symbols.
- For any a,b∈R, α(L)(a,b)=T if a<b; otherwise α(L)(a,b)=F
- For any a∈R, α(f)(a)=2a
- A=(R,α) is an S-structure.
- J1=(A,β1) is an S-interpretation, s.t. β1(x)=0.
- J2=(A,β2) is an S-interpretation, s.t. β2(x)=1.
- J6=J1[x↦1]. Remark: it is not necessary that J2=J6.
- [[x]]J1=J1(x)=0.
- [[f(x)]]J1=J1(f)([[x]]J1)=J1(f)(0)=0.
- [[L(x,f(x))]]J1=J1(L)([[x]]J1,[[f(x)]]J1)=J1(L)(0,0)=F.
- [[x]]J2=J2(x)=1.
- [[f(x)]]J2=J2(f)([[x]]J2)=J2(f)(1)=2.
- [[L(x,f(x))]]J2=J2(L)([[x]]J2,[[f(x)]]J2)=J2(L)(1,2)=T.
- [[x]]J6=J6(x)=1.
- [[f(x)]]J6=J6(f)([[x]]J6)=J6(f)(1)=J1(f)(1)=2.
- [[L(x,f(x))]]J1[x↦1]=[[L(x,f(x))]]J6=J6(L)([[x]]J6,[[f(x)]]J6)=J6(L)(1,2)=J1(L)(1,2)=T.
- Thus, [[∃x(L(x,f(x)))]]J1=T.
最后一条体现了如果 x 是约束出现的,那么在计算真值的时候,x 的解释(也就是 β)不重要。也就是说虽然真值还是定义在解释 J1 上,但是这里面起作用的只有结构 A。
Properties of first order propositions
Definition 9. Suppose Φ is a set of S-propositions and ψ is one single S-proposition. We say that ψ is a consequence (语义后承) of Φ, written as Φ⊨ψ, if for any S-interpretation J, [[ϕ]]J=T for any ϕ∈Φ implies [[ψ]]J=T.
Example 10. G(c)⊨∃x(G(x)).
Proof.
Assume J is an interpretation, s.t. [[G(c)]]J=T. In other words, J(G)(J(c))=T.
On the other hand [[∃x(G(x))]]J=T iff. there exists at least an element a in J's domain, s.t. [[G(x)]]J[x↦a]=T, i.e. J(G)(a)=T.
This is obviously because we can pick a=J(c).
Qed.
Example 11. ∀x(M(x))⊨M(c).
Proof.
Assume J is an interpretation, s.t. [[∀x(M(x))]]J=T. That means, for every a in J's domain,
[[M(x)]]J[x↦a]=T,
i.e. J(M)(a)=T.
Therefore, [[M(c)]]J=J(M)(J(c))=T.
Qed.