FOL semantics

可以由一阶逻辑结构(SS-structures)来决定真假的命题:
x(L(x,f(x)))x(M(x))x(P(x)E(x))G(c)\forall x(L(x, f(x)))\quad \forall x(M(x))\quad \exists x(P(x)\land E(x)) \quad G(c)

这些命题的真假和变量符号 xx 的具体取值无关,而是与 \forall 或者 \exists 描述的范围范围有关。但是有些一阶逻辑命题也是可以没有量词的,比如:
L(x,y)L(x,f(x))L(x, y) \quad L(x,f(x))

但是这些命题的真与假就取决于变量的赋值。

Definition 1 (Free occurrence and binded occurrence,约束出现和自由出现). Assume xx is a variable symbol. In xϕ\forall x \phi and xϕ\exists x \phi, all occurrences of xx are called binded occurrences. All other occurrences of xx are free occurrences.

例如上述 L(x,y)L(x, y) 中的 x,yx, y 都是自由出现;但如果是 xy(L(x,y))\forall x\exists y(L(x, y)),那么 x,yx, y 就都是约束出现。

Definition 2 (Open proposition and closed proposition,开命题和闭命题). A FOL proposition ϕ\phi is open if it contains at least one free occurrence of variables. Otherwise, ϕ\phi is called a closed proposition.

也就是说只要命题中至少有一个自由出现的变量符号,那这个一阶逻辑命题就是开命题。根据上节课的内容,对于闭命题而言,只要通过一阶逻辑的结构(SS-structure)就可以判断命题的真值。但如果是开命题,就还和变量值有关。

Example 3.
一些开闭命题的例子,没什么好说的。

Definition 4 (SS-interpretation,SS 解释).
Given a symbol set SS, a SS-interpretation J=(A,β)\mathcal{J} = (\mathcal{A}, \beta) is

  • a SS-structure A=(A,α)\mathcal{A} = (A, \alpha)
  • a SS-assignment β\beta: a mapping from variables to elements in the domain AA
    For J=(A,β)\mathcal{J} = (\mathcal{A}, \beta) and A=(A,α)\mathcal{A} = (A, \alpha), we usually use J(P)\mathcal{J}(P) and A(P)\mathcal{A}(P) to represent α(P)\alpha(P), use J(f)\mathcal{J}(f) and A(f)\mathcal{A}(f) to represent α(f)\alpha(f), use J(c)\mathcal{J}(c) and A(c)\mathcal{A}(c) to represent α(c)\alpha(c) and use J(x)\mathcal{J}(x) to represent β(x)\beta(x).

就是说 SS-interpretation 就是在 SS-structure 的基础上加了一个对变量符号的解释,即把每一个变量符号都映射到论域中的元素。通常用字母 J\mathcal{J} 来表示一个解释。

Defination 5 (Terms’ denotation). For SS-interpretation J\mathcal{J} and a SS-term tt,

  • [ ⁣[x] ⁣]J=J(x)[\![x]\!]_{\mathcal{J}} = \mathcal{J}(x)
  • [ ⁣[c] ⁣]J=J(c)[\![c]\!]_{\mathcal{J}} = \mathcal{J}(c)
  • [ ⁣[f(t1,t2,,tn)] ⁣]J=J(f)([ ⁣[t1] ⁣]J,[ ⁣[t2] ⁣]J,[ ⁣[tn] ⁣]J)[\![f(t_1, t_2, \ldots ,t_n)]\!]_{\mathcal{J}} = \mathcal{J}(f) ([\![t_1]\!]_{\mathcal{J}}, [\![t_2]\!]_{\mathcal{J}}, \ldots [\![t_n]\!]_{\mathcal{J}})

这里定义了 term 的语义,方便后面定义命题真值。

Definition 6 (Propositions’ truth).
For SS-interpretation J\mathcal{J} and a SS-proposition tt,

  • [ ⁣[P(t1,t2,,tn)] ⁣]J=J(P)([ ⁣[t1] ⁣]J,[ ⁣[t2] ⁣]J,,[ ⁣[tn] ⁣]J)[\![\mathrm{P}\left(t_{1}, t_{2}, \ldots, t_{n}\right)]\!]_{\mathcal{J}}=\mathcal{J}(P)\left([\![t_{1}]\!]_{\mathcal{J}},[\![t_{2}]\!]_{\mathcal{J}}, \ldots,[\![t_{n}]\!]_{\mathcal{J}}\right)
  • [ ⁣[ϕψ] ⁣]J=[ ⁣[] ⁣]([ ⁣[ϕ] ⁣]J,[ ⁣[ψ] ⁣]J)[\![\phi \wedge \psi]\!]_{\mathcal{J}}=[\![\wedge]\!]\left([\![\phi]\!]_{\mathcal{J}},[\![\psi]\!]_{\mathcal{J}}\right)
  • [ ⁣[¬ϕ] ⁣]J=[ ⁣[¬] ⁣]([ ⁣[ϕ] ⁣]J)[\![\neg \phi]\!]_{\mathcal{J}}=[\![\neg]\!]\left([\![\phi]\!]_{\mathcal{J}}\right)
  • [ ⁣[xϕ] ⁣]J=T[\![\forall x \phi]\!]_{\mathcal{J}}=\mathbf{T} if and only if for every aa in A\mathcal{A} 's domain, [ ⁣[ϕ] ⁣]J[xa]=T[\![\phi]\!]_{\mathcal{J}[x \mapsto a]}=\mathbf{T}
  • [ ⁣[xϕ] ⁣]J=T[\![\exists x \phi]\!]_{\mathcal{J}}=\mathbf{T} if and only if for at least one aa in A\mathcal{A} 's domain, [ ⁣[ϕ] ⁣]J[xa]=T[\![\phi]\!]_{\mathcal{J}[x \mapsto a]}=\mathbf{T}

where J[xa]\mathcal{J}[x \mapsto a] is a S-interpretation which keeps all other interpretations in J\mathcal{J} and interprets xx by aa.

Example 7

  • LL is a binary predicate symbol.
  • ff is a unary function symbol.
  • S={L,f}S = \{L, f\} is a set of symbols.
  • For any a,bRa, b \in \mathbb{R}, α(L)(a,b)=T\alpha(L)(a, b) = \text{T} if a<ba < b; otherwise α(L)(a,b)=F\alpha(L)(a, b) = \text{F}
  • For any aRa \in \mathbb{R}, α(f)(a)=2a\alpha(f)(a) = 2a
  • A=(R,α)\mathcal{A} = (\mathbb{R}, \alpha) is an S-structure.
  • J1=(A,β1)\mathcal{J}_1 = (\mathcal{A}, \beta_1) is an S-interpretation, s.t. β1(x)=0\beta_1(x) = 0.
  • J2=(A,β2)\mathcal{J}_2 = (\mathcal{A}, \beta_2) is an S-interpretation, s.t. β2(x)=1\beta_2(x) = 1.
  • J6=J1[x1]\mathcal{J}_6 = \mathcal{J}_1[x \mapsto 1]. Remark: it is not necessary that J2=J6\mathcal{J}_2 = \mathcal{J}_6.
  • [ ⁣[x] ⁣]J1=J1(x)=0[\![ x ]\!]_{\mathcal{J}_1} = \mathcal{J}_1(x) = 0.
  • [ ⁣[f(x)] ⁣]J1=J1(f)([ ⁣[x] ⁣]J1)=J1(f)(0)=0[\![ f(x) ]\!]_{\mathcal{J}_1} = \mathcal{J}_1(f)([\![ x ]\!]_{\mathcal{J}_1}) = \mathcal{J}_1(f)(0) = 0.
  • [ ⁣[L(x,f(x))] ⁣]J1=J1(L)([ ⁣[x] ⁣]J1,[ ⁣[f(x)] ⁣]J1)=J1(L)(0,0)=F[\![ L(x, f(x)) ]\!]_{\mathcal{J}_1} = \mathcal{J}_1(L)([\![ x ]\!]_{\mathcal{J}_1}, [\![ f(x) ]\!]_{\mathcal{J}_1}) = \mathcal{J}_1(L)(0, 0) = \text{F}.
  • [ ⁣[x] ⁣]J2=J2(x)=1[\![ x ]\!]_{\mathcal{J}_2} = \mathcal{J}_2(x) = 1.
  • [ ⁣[f(x)] ⁣]J2=J2(f)([ ⁣[x] ⁣]J2)=J2(f)(1)=2[\![ f(x) ]\!]_{\mathcal{J}_2} = \mathcal{J}_2(f)([\![ x ]\!]_{\mathcal{J}_2}) = \mathcal{J}_2(f)(1) = 2.
  • [ ⁣[L(x,f(x))] ⁣]J2=J2(L)([ ⁣[x] ⁣]J2,[ ⁣[f(x)] ⁣]J2)=J2(L)(1,2)=T[\![ L(x, f(x)) ]\!]_{\mathcal{J}_2} = \mathcal{J}_2(L)([\![ x ]\!]_{\mathcal{J}_2}, [\![ f(x) ]\!]_{\mathcal{J}_2}) = \mathcal{J}_2(L)(1, 2) = \text{T}.
  • [ ⁣[x] ⁣]J6=J6(x)=1[\![ x ]\!]_{\mathcal{J}_6} = \mathcal{J}_6(x) = 1.
  • [ ⁣[f(x)] ⁣]J6=J6(f)([ ⁣[x] ⁣]J6)=J6(f)(1)=J1(f)(1)=2[\![ f(x) ]\!]_{\mathcal{J}_6} = \mathcal{J}_6(f)([\![ x ]\!]_{\mathcal{J}_6}) = \mathcal{J}_6(f)(1) = \mathcal{J}_1(f)(1) = 2.
  • [ ⁣[L(x,f(x))] ⁣]J1[x1]=[ ⁣[L(x,f(x))] ⁣]J6=J6(L)([ ⁣[x] ⁣]J6,[ ⁣[f(x)] ⁣]J6)=J6(L)(1,2)=J1(L)(1,2)=T[\![ L(x, f(x)) ]\!]_{\mathcal{J}_1[x \mapsto 1]} = [\![ L(x, f(x)) ]\!]_{\mathcal{J}_6} = \mathcal{J}_6(L)([\![ x ]\!]_{\mathcal{J}_6}, [\![ f(x) ]\!]_{\mathcal{J}_6}) = \mathcal{J}_6(L)(1, 2) = \mathcal{J}_1(L)(1, 2) = \text{T}.
  • Thus, [ ⁣[x(L(x,f(x)))] ⁣]J1=T[\![ \exists x (L(x, f(x))) ]\!]_{\mathcal{J}_1} = \text{T}.

最后一条体现了如果 xx 是约束出现的,那么在计算真值的时候,xx 的解释(也就是 β\beta)不重要。也就是说虽然真值还是定义在解释 J1\mathcal{J}_{1} 上,但是这里面起作用的只有结构 A\mathcal{A}

Properties of first order propositions

Definition 9. Suppose Φ\Phi is a set of SS-propositions and ψ\psi is one single SS-proposition. We say that ψ\psi is a consequence (语义后承) of Φ\Phi, written as Φψ\Phi \models \psi, if for any SS-interpretation J\mathcal{J}, [ ⁣[ϕ] ⁣]J=T[\![\phi]\!]_{\mathcal{J}} = \mathbf{T} for any ϕΦ\phi \in \Phi implies [ ⁣[ψ] ⁣]J=T[\![\psi]\!]_{\mathcal{J}} = \mathbf{T}.

Example 10. G(c)x(G(x))G(c) \models \exists x(G(x)).
Proof.
Assume J\mathcal{J} is an interpretation, s.t. [ ⁣[G(c)] ⁣]J=T[\![G(c)]\!]_{\mathcal{J}} = \mathbf{T}. In other words, J(G)(J(c))=T\mathcal{J}(G)(\mathcal{J}(c)) = \mathbf{T}.
On the other hand [ ⁣[x(G(x))] ⁣]J=T[\![\exists x(G(x))]\!]_{\mathcal{J}} = \mathbf{T} iff. there exists at least an element aa in J\mathcal{J}'s domain, s.t. [ ⁣[G(x)] ⁣]J[xa]=T[\![G(x)]\!]_{\mathcal{J}[x \mapsto a]} = \mathbf{T}, i.e. J(G)(a)=T\mathcal{J}(G)(a) = \mathbf{T}.
This is obviously because we can pick a=J(c)a = \mathcal{J}(c).
Qed.

Example 11. x(M(x))M(c)\forall x(M(x)) \models M(c).
Proof.
Assume J\mathcal{J} is an interpretation, s.t. [ ⁣[x(M(x))] ⁣]J=T[\![\forall x(M(x))]\!]_{\mathcal{J}} = \mathbf{T}. That means, for every aa in J\mathcal{J}'s domain,
[ ⁣[M(x)] ⁣]J[xa]=T[\![M(x)]\!]_{\mathcal{J}[x \mapsto a]} = \mathbf{T},
i.e. J(M)(a)=T\mathcal{J}(M)(a) = \mathbf{T}.
Therefore, [ ⁣[M(c)] ⁣]J=J(M)(J(c))=T[\![M(c)]\!]_{\mathcal{J}} = \mathcal{J}(M)(\mathcal{J}(c)) = \mathbf{T}.
Qed.