第二章 一阶谓词逻辑(数理逻辑)

第二章 一阶谓词逻辑 Predicate Logic

引入:命题逻辑是数理逻辑的基础,但原子命题不可再分,便无法研究命题内部的逻辑特征(例:共同性,差异性)。

2.1 量词和谓词

  • 谓词 Quantifier:将基本命题分成客体(个体)谓词

    • 客体:描述的对象

    • 谓词:描述的个体性质(特征)或关系

    • 谓词元数:谓词联系的个体数目

    • 个体域(论域) D D D:客体构成的非空集合

    • n n n元谓词( n n n 元命题函数):客体变元 x 1 , x 2 , . . . , x n x_1,x_2,...,x_n x1,x2,...,xn定义在 D n D^n Dn(非空个体域)上取值为 { 0 , 1 } \{0,1\} {0,1} n n n元函数。其中,客体变元定义域 D D D,谓词值域 { 0 , 1 } \{0,1\} {0,1}

      注意

      1. 谓词中客体变元有一定次序,不能随意变更。
      2. 当客体为变元 x x x 时,不能判断谓词真假,此时谓词称为谓词填式;只有为具体客体时,才能判断谓词真假。
    • 谓词与命题的关系 0 0 0元谓词    ⟺    \iff 命题。

      • 命题是谓词的特殊情况:将 n n n元谓词中的客体都用具体客体取代后,就成为命题( 0 0 0元谓词)。例: P ( 3 , 4 , 5 ) : 3 + 4 = 5  is true P(3,4,5):3+4=5 \text{ is true} P(3,4,5):3+4=5 is true
      • 谓词是命题的扩充
  • 量词 Predicate x x x为作用变量

    1. 全称量词 Universal Quantifier ( ∀ x ) (\forall x) (x)

    2. 存在量词 Existential Quantifier ( ∃ x ) (\exist x) (x)

    3. 唯一性量词 Uniqueness Quantifier ∃ ! x P ( x ) \exist!x P(x) !xP(x)

      注意:对于个体域需要特殊注明(用括号),不同个体域会影响谓词结果。

  • 全总个体域 E:将各种个体域综合在一起作为论述范围的域

    • 特性谓词刻划每一个句子中客体变量的变化范围

    • 特性谓词在命题函数中的原则

      1. ( ∀ x ) ( P ( x ) ⟶ Q ) (\forall x)(P(x)\longrightarrow Q) (x)(P(x)Q):刻划全称量词的对应个体域的特性谓词作为 蕴涵 ( ⟶ \longrightarrow )的前件 加入
      2. ( ∃ x ) ( P ( x ) ∧ Q ) (\exist x)(P(x)\land Q) (x)(P(x)Q):刻划存在量词的对应个体域的特性谓词作为 合取式的合取项( ∧ \land ) 加入
    • 例题 \color{White}\colorbox{Fuchsia}{例题} :符号化语句

      1. 每个实数都存在比它大的另外的实数

        解: R ( x ) : x R(x):x R(x):x是实数; L ( x , y ) : x L(x,y):x L(x,y):x小于 y y y.

        ( ∀ x ) ( R ( x ) ⟶ ( ∃ y ) ( R ( y ) ∧ L ( x , y ) ) ) {\color{red}(\forall x)}\left(R(x){\color{red}\longrightarrow}{\color{blue}(\exist y)}\left(R(y){\color{blue}\land} L(x,y)\right)\right) (x)(R(x)(y)(R(y)L(x,y)))

      2. 尽管有人很聪明,但未必一切人都聪明

        解: M ( x ) : x M(x):x M(x):x是人; C ( x ) : x C(x):x C(x):x很聪明.

        ( ∃ x ) ( M ( x ) ∧ C ( x ) ) ∧ ¬ ( ∀ x ) ( M ( x ) → C ( x ) ) {\color{blue}(\exist x)}\left(M(x){\color{blue}\land}C(x)\right)\land \neg{\color{red}(\forall x)}\left(M(x){\color{red}\rightarrow} C(x)\right) (x)(M(x)C(x))¬(x)(M(x)C(x))

      3. 对于任意给定的 ξ > 0 \xi>0 ξ>0,必存在着 δ > 0 \delta>0 δ>0,使得对任意的 x x x,只要 ∣ x − a ∣ < δ |x-a|<\delta xa<δ,就有 ∣ f ( x ) − f ( a ) ∣ < ξ |f(x)-f(a)|<\xi f(x)f(a)<ξ 成立

        解:
        ( ∀ ξ ) ( ( ξ > 0 ) ⟶ ( ∃ δ ) ( ( δ > 0 ) ∧ ( ( ∣ x − a ∣ < δ ) ⟶ ( ∣ f ( x ) − f ( a ) ∣ < ξ ) ) ) ) {\color{red}(\forall \xi)}((\xi>0){\color{red}\longrightarrow} {\color{blue}(\exist \delta)}((\delta>0){\color{blue}\land}((|x-a|<\delta)\longrightarrow (|f(x)-f(a)|<\xi)))) (ξ)((ξ>0)(δ)((δ>0)((xa<δ)(f(x)f(a)<ξ))))

  • 自由变元与约束变元 Free Variables & Binding Variables

    在带量词的谓词表达式中, x x x指导(作用)变元 A ( x ) A(x) A(x)为对应量词的辖域(作用域)

    • 定义:辖域中 x x x 的出现称为在公式 A A A中的约束出现,此时变元 x x x 称为约束变元 A A A 中不是约束出现的变元为自由变元。

      例: 约 束 变 元 V S 自 由 变 元 {\color{red}约束变元}VS{\color{blue}自由变元} VS
      ∀ x ∀ y ( P ( x , y ) ∧ Q ( y , z ) ) ∧ ∃ x P ( x , y ) \forall x\forall y(P({\color{red}x},{\color{red}y})\land Q({\color{red}y},{\color{blue}z}))\land \exist xP({\color{red}x},{\color{blue}y}) xy(P(x,y)Q(y,z))xP(x,y)

    • 规则:为避免概念混乱(同一个变元既是约束又是自由)

      1. 约束变元的换名:将辖域内量词限定的约束变元改为有别其他所有的变量名。
      2. 自由变元的代入:将整个公式中每一处该自由变元代为新的个体变元。
    • 说明

      • 多个量词出现,按照从左到右的顺序理解
      • 量词次序不同,公式含义不同

      例题 \color{White}\colorbox{Fuchsia}{例题} I ( x ) I(x) I(x) 表示 x x x 是整数, Q ( x , y ) Q(x,y) Q(x,y) 表示 x + y = 0 x+y=0 x+y=0,则
      ( ∀ x ) ( I ( x ) ⟶ ( ∃ y ) ( I ( y ) ∧ Q ( x , y ) ) )  “对任意的整数x,都存在着整数y,使得x+y=0" is true. ( ∃ x ) ( ∀ y ) ( I ( x ) ∧ ( I ( y ) ⟶ Q ( x , y ) ) )  “存在着整数x,使得对任意的整数y,都有x+y=0" is false. (\forall x)(I(x)\longrightarrow (\exist y)(I(y)\land Q(x,y))) \text{ “对任意的整数x,都存在着整数y,使得x+y=0" is true.}\\ (\exist x)(\forall y)(I(x)\land(I(y)\longrightarrow Q(x,y))) \text{ “存在着整数x,使得对任意的整数y,都有x+y=0" is false.} (x)(I(x)(y)(I(y)Q(x,y))) “对任意的整数x,都存在着整数y,使得x+y=0" is true.(x)(y)(I(x)(I(y)Q(x,y))) “存在着整数x,使得对任意的整数y,都有x+y=0" is false.

2.2 谓词公式与解释

  • 零、四类符号

    1. 常量 a , b , c a,b,c a,b,c

    2. 变量 x , y , z x,y,z x,y,z

    3. 函数 f ( x 1 , x 2 , . . . , x n ) , g ( x 1 , x 2 , . . . , x n ) , h ( x 1 , x 2 , . . . , x n ) f(x_1,x_2,...,x_n),g(x_1,x_2,...,x_n),h(x_1,x_2,...,x_n) f(x1,x2,...,xn),g(x1,x2,...,xn),h(x1,x2,...,xn)

      不含变元的函数 f f f常数.

    4. 谓词 P ( x 1 , x 2 , . . . , x n ) , Q ( x 1 , x 2 , . . . , x n ) , R ( x 1 , x 2 , . . . , x n ) P(x_1,x_2,...,x_n),Q(x_1,x_2,...,x_n),R(x_1,x_2,...,x_n) P(x1,x2,...,xn),Q(x1,x2,...,xn),R(x1,x2,...,xn)

      不含客体变元的谓词 P P P命题.

  • 一、谓词的合适公式:

    • :常量,变量或函数递归产生的符号串。例: x 1 ✓ , f ( x 1 , x 2 , . . . , x n ) ✓ , f ( g ( f ( a ) , g ( a , x ) ) ) ✓ x_1 \checkmark,f(x_1,x_2,...,x_n) \checkmark,f(g(f(a),g(a,x)))\checkmark x1,f(x1,x2,...,xn),f(g(f(a),g(a,x)))

    • 原子谓词公式 x i x_i xi 是项的n元谓词 P ( x 1 , x 2 , . . . , x n ) P(x_1,x_2,...,x_n) P(x1,x2,...,xn),简称原子公式

    • 合适公式无语法错误的公式。主要包含三种,

      1. 原子公式
      2. 合适公式的逻辑表达 ¬ P , P ⋁ Q , P ⋀ Q , P → Q , P ↔ Q \neg P,P\bigvee Q,P\bigwedge Q,P\rightarrow Q,P\leftrightarrow Q ¬P,PQ,PQ,PQ,PQ
      3. 带量词的合适公式 ( ∀ x ) P , ( ∃ x ) P (\forall x)P,(\exist x)P (x)P,(x)P

      常见语法错误:括号不匹配,量词无辖域

  • 二、公式的解释

    • 公式的解释(指派) I I I:对于常量标识符赋予一个元素;对于函数标识符指定一个具体的函数(不同的变量值对应特定的函数值);对于谓词标识符指定一个具体命题函数( 1    o r    0 1\;or\;0 1or0)。

    • 含有量词的公式解释:需根据量词的逻辑意义决定公式的值,设论域 D = { a 1 , a 2 , . . . , a n } D=\{a_1,a_2,...,a_n \} D={a1,a2,...,an}

      1. ( ∀ x ) P ( x )    ⟺    P ( a 1 ) ⋀ P ( a 2 ) ⋀ . . . ⋀ P ( a n ) (\forall x)P(x)\iff P(a_1)\bigwedge P(a_2)\bigwedge...\bigwedge P(a_n) (x)P(x)P(a1)P(a2)...P(an)
      2. ( ∃ x ) P ( x )    ⟺    P ( a 1 ) ⋁ P ( a 2 ) ⋁ . . . ⋁ P ( a n ) (\exist x)P(x)\iff P(a_1)\bigvee P(a_2)\bigvee...\bigvee P(a_n) (x)P(x)P(a1)P(a2)...P(an)
    • 例题 \color{White}\colorbox{Fuchsia}{例题} :判断公式 ( ∃ x ) ( ∀ y ) ( P ( x , y ) → Q ( x , y ) ) (\exist x)(\forall y)(P(x,y)\rightarrow Q(x,y)) (x)(y)(P(x,y)Q(x,y))在解释 { 个 体 域 为 N ( 非 负 整 数 ) P ( x , y ) 指 定 为 : x + y = 0 Q ( x , y ) 指 定 为 : x > y \begin{cases}个体域为 N(非负整数)\\P(x,y)指定为:x+y=0\\Q(x,y)指定为:x>y \end{cases} N()P(x,y)x+y=0Q(x,y)x>y 下的真值(answer is true

      解:
      ∵ ∀ x ∈ N , ∀ y ∈ N , “ x + y = 0 ”  is false. ∴ 无 论 后 件 如 何 , “ P ( x , y ) ⟶ Q ( x , y ) ”  is true. \because \forall x\in N,\forall y\in N,“x+y=0”\text{ is false.}\\ \therefore 无论后件如何, “P(x,y)\longrightarrow Q(x,y)”\text{ is true.}\\ xN,yN,x+y=0 is false.,P(x,y)Q(x,y) is true.

      此解释下命题:存在非负整数 x x x,使得对于任意非负整数 y y y,若 x + y = 0 x+y=0 x+y=0,则 x > y x>y x>y .

    • 特殊公式

      1. 永真式(重言式):公式 A A A 在论域 D D D 下的任一解释都为
      2. 永假式(矛盾式,不可满足式):公式 A A A 在论域 D D D 下的任一解释都为
      3. 可满足式:公式 A A A 在论域 D D D 下的某一解释为。(故包含永真式)

2.3谓词公式的等价与范式表示

  • 一、谓词公式等价

    • 定义:论域为 D D D的谓词公式 A , B A,B A,B 在任一情况下值相同(同真同假),记为 A    ⟺    B A\iff B AB
    • 定理 A    ⟺    B A\iff B AB 等价于 A ⟷ B A\longleftrightarrow B AB D D D上的永真式。
  • 二、演算的基本等价式

    1. Star \color{white}\colorbox{red}{Star} Star 量词否定(量词转换)

      ¬ ( ∀ x ) P ( x )    ⟺    ( ∃ x ) ( ¬ P ( X ) ) \neg(\forall x)P(x)\iff (\exist x)(\neg P(X)) ¬(x)P(x)(x)(¬P(X))并非所有 = 有些不是
      ¬ ( ∃ x ) P ( x )    ⟺    ( ∀ x ) ( ¬ P ( X ) ) \neg(\exist x)P(x)\iff (\forall x)(\neg P(X)) ¬(x)P(x)(x)(¬P(X))不存在 = 所有都不

      推广——多个量词: ¬ ( ∃ x ) ( ∀ y ) ( ∀ z ) P ( x , y , z )    ⟺    ( ∀ x ) ( ∃ y ) ( ∃ z ) ¬ P ( x , y , z ) \neg(\exist x)(\forall y)(\forall z)P(x,y,z)\iff (\forall x)(\exist y)(\exist z)\neg P(x,y,z) ¬(x)(y)(z)P(x,y,z)(x)(y)(z)¬P(x,y,z)

    2. Star \color{white}\colorbox{red}{Star} Star 量词辖域的收缩与扩充:设谓词公式 Q Q Q不含指导变元

      ( ∀ x ) [ P ( x ) ∧ Q ]    ⟺    ( ∀ x ) P ( x ) ∧ Q (\forall x)[P(x)\land Q]\iff (\forall x)P(x)\land Q (x)[P(x)Q](x)P(x)Q ( ∀ x ) [ P ( x ) ∨ Q ]    ⟺    ( ∀ x ) P ( x ) ∨ Q (\forall x)[P(x)\lor Q]\iff (\forall x)P(x)\lor Q (x)[P(x)Q](x)P(x)Q
      ( ∃ x ) [ P ( x ) ∧ Q ]    ⟺    ( ∃ x ) P ( x ) ∧ Q (\exist x)[P(x)\land Q]\iff (\exist x)P(x)\land Q (x)[P(x)Q](x)P(x)Q ( ∃ x ) [ P ( x ) ∨ Q ]    ⟺    ( ∃ x ) P ( x ) ∨ Q (\exist x)[P(x)\lor Q]\iff (\exist x)P(x)\lor Q (x)[P(x)Q](x)P(x)Q
      ( ∀ x ) [ P ( x ) ⟶ Q ]    ⟺    ( ∃ x ) P ( x ) ⟶ Q \color{red}(\forall x)[P(x)\longrightarrow Q]\iff (\exist x)P(x)\longrightarrow Q (x)[P(x)Q](x)P(x)Q ( ∃ x ) [ P ( x ) ⟶ Q ]    ⟺    ( ∀ x ) P ( x ) ⟶ Q \color{red}(\exist x)[P(x)\longrightarrow Q]\iff (\forall x)P(x)\longrightarrow Q (x)[P(x)Q](x)P(x)Q
      ( ∀ x ) [ Q ⟶ P ( x ) ]    ⟺    Q ⟶ ( ∀ x ) P ( x ) (\forall x)[Q\longrightarrow P(x)]\iff Q\longrightarrow (\forall x)P(x) (x)[QP(x)]Q(x)P(x) ( ∃ x ) [ Q ⟶ P ( x ) ]    ⟺    Q ⟶ ( ∃ x ) P ( x ) (\exist x)[Q\longrightarrow P(x)]\iff Q\longrightarrow (\exist x)P(x) (x)[QP(x)]Q(x)P(x)

      证明
      ( ∀ x ) [ P ( x ) ⟶ Q ]    ⟺    ( ∀ x ) [ ¬ P ( x ) ∨ Q ]    ⟺    ( ∀ x ) [ ¬ P ( x ) ] ∨ Q    ⟺    ¬ ( ∃ x ) P ( x ) ∨ Q    ⟺    ( ∃ x ) P ( x ) ⟶ Q \begin{aligned}(\forall x)[P(x)\longrightarrow Q]&\iff (\forall x)[\neg P(x)\lor Q]\\ &\iff (\forall x)[\neg P(x)]\lor Q\\ &\iff \neg(\exist x)P(x)\lor Q \\ &\iff (\exist x)P(x)\longrightarrow Q \end{aligned} (x)[P(x)Q](x)[¬P(x)Q](x)[¬P(x)]Q¬(x)P(x)Q(x)P(x)Q

    3. 特定辖域问题

      ( ∀ x ) [ P ( x ) ∧ Q ( x ) ]    ⟺    ( ∀ x ) P ( X ) ∧ ( ∀ x ) Q ( x ) (\forall x)[P(x)\land Q(x)]\iff (\forall x)P(X)\land (\forall x)Q(x) (x)[P(x)Q(x)](x)P(X)(x)Q(x) ( ∃ x ) [ P ( x ) ∨ Q ( x ) ]    ⟺    ( ∃ x ) P ( X ) ∨ ( ∃ x ) Q ( x ) (\exist x)[P(x)\lor Q(x)]\iff (\exist x)P(X)\lor (\exist x)Q(x) (x)[P(x)Q(x)](x)P(X)(x)Q(x)
      ( ∀ x ) ( ∀ y ) [ P ( x ) ∨ Q ( y ) ]    ⟺    ( ∀ x ) P ( x ) ∨ ( ∀ x ) Q ( x ) \color{red}(\forall x)(\forall y)[P(x)\lor Q(y)]\iff (\forall x)P(x)\lor (\forall x)Q(x) (x)(y)[P(x)Q(y)](x)P(x)(x)Q(x) ( ∃ x ) ( ∃ y ) [ P ( x ) ∧ Q ( y ) ]    ⟺    ( ∃ x ) P ( x ) ∧ ( ∃ x ) Q ( x ) \color{red}(\exist x)(\exist y)[P(x)\land Q(y)]\iff (\exist x)P(x)\land (\exist x)Q(x) (x)(y)[P(x)Q(y)](x)P(x)(x)Q(x)
      ( ∃ x ) [ P ( x ) ⟶ Q ( x ) ]    ⟺    ( ∀ x ) P ( x ) ⟶ ( ∃ x ) Q ( x ) (\exist x)[P(x)\longrightarrow Q(x)]\iff (\forall x)P(x)\longrightarrow (\exist x)Q(x) (x)[P(x)Q(x)](x)P(x)(x)Q(x)/

      解释说明

      • ( ∀ x ) ( ∀ y ) [ P ( x ) ∨ Q ( y ) ]    ⟺    ( ∀ x ) P ( x ) ∨ ( ∀ x ) Q ( x ) (\forall x)(\forall y)[P(x)\lor Q(y)]\iff (\forall x)P(x)\lor (\forall x)Q(x) (x)(y)[P(x)Q(y)](x)P(x)(x)Q(x)

        教室中每个人在听课或者看书 = 教室中每个听课的在听课,每个看书的人在看书

      • ( ∃ x ) ( ∃ y ) [ P ( x ) ∧ Q ( y ) ]    ⟺    ( ∃ x ) P ( x ) ∧ ( ∃ x ) Q ( x ) (\exist x)(\exist y)[P(x)\land Q(y)]\iff (\exist x)P(x)\land (\exist x)Q(x) (x)(y)[P(x)Q(y)](x)P(x)(x)Q(x)

        教室中有些人在听课,有些人在看书 = 教室中有些听课的人在听课,有些看书的人在看书

    4. 双量词公式的等价性:同性质的量词可交换顺序

      ( ∀ x ) ( ∀ y ) A ( x , y )    ⟺    ( ∀ y ) ( ∀ x ) A ( x , y ) (\forall x)(\forall y)A(x,y)\iff (\forall y)(\forall x)A(x,y) (x)(y)A(x,y)(y)(x)A(x,y) ( ∃ x ) ( ∃ y ) A ( x , y )    ⟺    ( ∃ y ) ( ∃ x ) A ( x , y ) (\exist x)(\exist y)A(x,y)\iff (\exist y)(\exist x)A(x,y) (x)(y)A(x,y)(y)(x)A(x,y)
  • 三、前束范式

    • 形式 A = ( Q 1 x 1 ) ( Q 2 x 2 ) . . . ( Q n x n ) G A=(Q_1x_1)(Q_2x_2)...(Q_nx_n)G A=(Q1x1)(Q2x2)...(Qnxn)G,其中 Q i x i Q_ix_i Qixi 为量词, G G G 为不含量词的公式,则称 A A A为前束范式, G G G为母式。

    • 前束合取(析取)范式:母式 G G G是合取(析取)范式

    • 定理2.6:每一个含量词的谓词公式都可==等价转换==为前束范式。

    • 任意谓词公式 转换为 前束范式 的 过程

      • ⨀ \color{red}\bigodot 1.改 → , ⟷ \rightarrow,\longleftrightarrow , ¬ , ∧ , ∨ \neg,\land,\lor ¬,,
      • ⨀ \color{red}\bigodot 2.利用量词否定等价或德摩根定律,改 ¬ \neg ¬ 到公式前
      • ⨀ \color{red}\bigodot 3.利用约束变元的改名和自由变元的代入,改重名
      • ⨀ \color{red}\bigodot 4.利用量词收缩与扩充等价,改量词到全式前
    • 例题 \color{White}\colorbox{Fuchsia}{例题} :修改公式 ( ( ∀ x ) P ( x ) ∨ ( ∃ y ) R ( y ) ) ⟶ ( ∀ x ) F ( x ) ((\forall x)P(x)\lor(\exist y)R(y))\longrightarrow (\forall x)F(x) ((x)P(x)(y)R(y))(x)F(x)
      ( ( ∀ x ) P ( x ) ∨ ( ∃ y ) R ( y ) ) ⟶ ( ∀ x ) F ( x )    ⟺    ¬ ( ( ∀ x ) P ( x ) ∨ ( ∃ y ) R ( y ) ) ∨ ( ∀ x ) F ( x )    ⟺    ( ( ∃ x ) ¬ P ( x ) ∧ ( ∀ y ) ¬ R ( y ) ) ∨ ( ∀ x ) F ( x )    ⟺    ( ( ∃ x ) ¬ P ( x ) ∧ ( ∀ y ) ¬ R ( y ) ) ∨ ( ∀ z ) F ( z )    ⟺    ( ∃ x ) ( ∀ y ) ( ∀ z ) ( ¬ P ( x ) ∧ ¬ R ( y ) ) ∨ F ( z )    ⟺    ( ∃ x ) ( ∀ y ) ( ∀ z ) ( ¬ P ( x ) ∨ F ( z ) ) ∧ ( ¬ R ( y ) ∨ F ( z ) ) \begin{aligned}((\forall x)P(x)\lor(\exist y)R(y))\longrightarrow (\forall x)F(x)&\iff {\color{red}\neg}((\forall x)P(x)\lor(\exist y)R(y)){\color{red}\lor}(\forall x)F(x) \\ &\iff ((\exist x){\color{red}\neg}P(x){\color{red}\land}(\forall y){\color{red}\neg}R(y))\lor(\forall x)F(x) \\ &\iff ((\exist x)\neg P(x)\land(\forall y)\neg R(y))\lor(\forall {\color{red}z})F({\color{red}z}) \\ &\iff {\color{red}(\exist x)(\forall y)(\forall z)}(\neg P(x)\land\neg R(y))\lor F(z) \\ &\iff (\exist x)(\forall y)(\forall z)(\neg P(x)\lor F(z))\land(\neg R(y)\lor F(z)) \end{aligned} ((x)P(x)(y)R(y))(x)F(x)¬((x)P(x)(y)R(y))(x)F(x)((x)¬P(x)(y)¬R(y))(x)F(x)((x)¬P(x)(y)¬R(y))(z)F(z)(x)(y)(z)(¬P(x)¬R(y))F(z)(x)(y)(z)(¬P(x)F(z))(¬R(y)F(z))

  • 四、斯柯林(Skolem)范式

    • 定义:不含存在量词的前束合取范式

    • 前束范式 转换为 斯柯林范式 的 过程:(不是等价变化)

      不断重复从左到右查找存在量词( Q i x i Q_ix_i Qixi)

      • ⨀ \color{red}\bigodot 1.若第一个量词 Q 1 x 1 Q_1x_1 Q1x1 为存在量词 ∃ x 1 \exist x_1 x1,用一个新的常量标识符代替所有出现的 x 1 x_1 x1,再删除 Q 1 x 1 Q_1x_1 Q1x1.
      • ⨀ \color{red}\bigodot 2.否则用一个新的函数标识符 g ( x 1 , x 2 , . . . , x i − 1 ) g(x_1,x_2,...,x_{i-1}) g(x1,x2,...,xi1)代替所有出现的 x i x_i xi,再删除 Q i x i Q_ix_i Qixi.
    • 例题 \color{White}\colorbox{Fuchsia}{例题} :求公式 ∃ x ∀ y ∀ z ∃ u ∀ v ∃ w P ( x , y , z , u , v , w ) \exist x\forall y\forall z\exist u\forall v\exist w P(x,y,z,u,v,w) xyzuvwP(x,y,z,u,v,w)Skolem范式
      ∃ x    ∀ y    ∀ z    ∃ u    ∀ v    ∃ w    P ( x , y , z , u , v , w ) ∀ y    ∀ z    ∃ u    ∀ v    ∃ w    P ( a , y , z , u , v , w ) ∀ y    ∀ z    ∀ v    ∃ w    P ( a , y , z , f ( y , z ) , v , w ) ∀ y    ∀ z    ∀ v    P ( a , y , z , f ( y , z ) , v , g ( y , z , v ) ) \begin{aligned}\exist x\;\forall y\;\forall z\;\exist u\;\forall v\;\exist w\; &P(x,y,z,u,v,w)\\ \forall y\;\forall z\;\exist u\;\forall v\;\exist w \;&P({\color{red}a},y,z,u,v,w)\\ \forall y\;\forall z\;\forall v\;\exist w\; &P(a,y,z,{\color{red}f(y,z)},v,w)\\ \forall y\;\forall z\;\forall v \;&P(a,y,z,f(y,z),v,{\color{red}g(y,z,v)})\end{aligned} xyzuvwyzuvwyzvwyzvP(x,y,z,u,v,w)P(a,y,z,u,v,w)P(a,y,z,f(y,z),v,w)P(a,y,z,f(y,z),v,g(y,z,v))

    • 定理:若公式 A A ASkolem范式为 S S S,则 A A A为矛盾式    ⟺    S \iff S S为矛盾式。(注意: A A A S S S 并不等价)

2.4 谓词公式的蕴涵

  • 一、谓词公式的蕴涵

    • 定义2.16 A A A 为真时, B B B也为真,则称 A A A蕴涵 B B B,记作 A ⟹ B A\Longrightarrow B AB.
    • 定理2.8 ( A ⟹ B )    ⟺    ( A ⟶ B (A\Longrightarrow B) \iff (A\longrightarrow B (AB)(AB是永真式)。
  • 二、蕴含定律

    I11 ( ∀ x ) P ( x ) ∨ ( ∀ x ) Q ( x ) ⟹ ( ∀ x ) ( P ( x ) ∨ Q ( x ) ) (\forall x)P(x)\lor(\forall x)Q(x)\Longrightarrow (\forall x)(P(x)\lor Q(x)) (x)P(x)(x)Q(x)(x)(P(x)Q(x))I12 ( ∃ x ) ( P ( x ) ∧ Q ( x ) ) ⟹ ( ∃ x ) P ( x ) ∧ ( ∃ x ) Q ( x ) (\exist x)(P(x)\land Q(x))\Longrightarrow (\exist x)P(x)\land(\exist x)Q(x) (x)(P(x)Q(x))(x)P(x)(x)Q(x)
    I13 ( ∀ x ) ( P ( x ) ⟶ Q ( x ) ) ⟹ ( ∀ x ) P ( x ) ⟶ ( ∀ x ) Q ( x ) (\forall x)(P(x)\longrightarrow Q(x))\Longrightarrow (\forall x)P(x)\longrightarrow(\forall x)Q(x) (x)(P(x)Q(x))(x)P(x)(x)Q(x)I14 ( ∃ x ) P ( x ) ⟶ ( ∀ x ) Q ( x ) ⟹ ( ∀ x ) ( P ( x ) ⟶ Q ( x ) ) (\exist x)P(x)\longrightarrow({\color{red}\forall x})Q(x)\Longrightarrow (\forall x)(P(x)\longrightarrow Q(x)) (x)P(x)(x)Q(x)(x)(P(x)Q(x))
    I15 ( ∀ x ) ( P ( x ) ⟷ Q ( x ) ) ⟹ ( ∀ x ) P ( x ) ⟷ ( ∀ x ) Q ( x ) (\forall x)(P(x)\longleftrightarrow Q(x))\Longrightarrow (\forall x)P(x)\longleftrightarrow(\forall x)Q(x) (x)(P(x)Q(x))(x)P(x)(x)Q(x)

    区分 I12 ( ∃ x ) P ( x ) ∧ ( ∃ x ) Q ( x )    ⟺    ( ∃ x ) ( ∃ y ) [ P ( x ) ∧ Q ( y ) ] \color{red}(\exist x)P(x)\land (\exist x)Q(x)\iff (\exist x)(\exist y)[P(x)\land Q(y)] (x)P(x)(x)Q(x)(x)(y)[P(x)Q(y)],不同的 x , y x,y x,y.

    证明 I14
    ( ∃ x ) P ( x ) ⟶ ( ∀ x ) Q ( x )    ⟺    ¬ ( ∃ x ) P ( x ) ∨ ( ∀ x ) Q ( x )    ⟺    ( ∀ x ) ¬ P ( x ) ∨ ( ∀ x ) Q ( x ) ⟹ ( ∀ x ) ( ¬ P ( x ) ∨ Q ( x ) )    ⟺    ( ∀ x ) ( P ( x ) ⟶ Q ( x ) ) \begin{aligned}(\exist x)P(x)\longrightarrow(\forall x)Q(x) \iff& \neg (\exist x)P(x)\lor(\forall x)Q(x)\\ \iff& (\forall x)\neg P(x)\lor(\forall x)Q(x)\\ {\color{red}\Longrightarrow}& (\forall x)(\neg P(x)\lor Q(x))\\ \iff&(\forall x)(P(x)\longrightarrow Q(x))\end{aligned} (x)P(x)(x)Q(x)¬(x)P(x)(x)Q(x)(x)¬P(x)(x)Q(x)(x)(¬P(x)Q(x))(x)(P(x)Q(x))

  • 三、两个量词的蕴涵式

    I16,17: ∀ x ∀ y P ( x , y ) ⟹ ∃ y ∀ x P ( x , y ) \forall x\forall yP(x,y)\Longrightarrow \exist y\forall xP(x,y) xyP(x,y)yxP(x,y)I18,19: ∃ x ∀ y P ( x , y ) ⟹ ∀ y ∃ x P ( x , y ) \exist x\forall yP(x,y)\Longrightarrow \forall y\exist xP(x,y) xyP(x,y)yxP(x,y)
    I20,21 ∀ x ∃ y P ( x , y ) ⟹ ∃ y ∃ x P ( x , y ) \forall x\exist yP(x,y)\Longrightarrow \exist y\exist xP(x,y) xyP(x,y)yxP(x,y)I22,23 ∀ x ∀ y P ( x , y ) ⟹ ∃ x ∃ y P ( x , y ) \forall x\forall yP(x,y)\Longrightarrow \exist x\exist yP(x,y) xyP(x,y)xyP(x,y)

在这里插入图片描述

2.5 谓词逻辑的推理

  • 零、推理演算过程

    1. 消去量词
    2. 无量词时,当作命题逻辑推理
    3. 引入量词
  • 一、量词的推理规则

    1. US规则(全称指定规则/全称量词消去规则):每一个均成立,则其中任一个也必成立。显式变隐式
      ( ∀ x ) G ( x ) ⟹ G ( y ) . ( ∀ x ) G ( x ) ⟹ G ( c ) . \color{red}(\forall x)G(x)\Longrightarrow G(y). \\ \color{red}(\forall x)G(x)\Longrightarrow G(c). (x)G(x)G(y).(x)G(x)G(c).
      注意

      1. y y y 是任意的不受 G ( x ) G(x) G(x) 约束的个体变项
      2. c c c 为任意个体变项
    2. UG规则(全称推广规则/全称量词附加规则):隐式变显式
      G ( y ) ⟹ ( ∀ x ) G ( x ) . \color{red}G(y)\Longrightarrow (\forall x)G(x). G(y)(x)G(x).
      注意

      1. y y y G ( x ) G(x) G(x) 中自由出现,并且 y y y 取任意 y ∈ D y\in D yD 时, G ( y ) G(y) G(y) 均为真
      2. 取代 y y y x x x 不能在 G ( y ) G(y) G(y) 中出现
      3. US规则不是UG规则的逆命题:US规则中 y y y 是“某一个”,而UG规则中的 y y y 是“每一个”。
    3. ES规则(存在指定规则/存在量词消去规则)
      ( ∃ x ) G ( x ) ⟹ G ( a ) . \color{red}(\exist x)G(x)\Longrightarrow G(a). (x)G(x)G(a).
      注意

      1. a a a 是使 G ( x ) G(x) G(x) 为真的特定的个体常项
      2. a a a 不曾在 G ( x ) G(x) G(x) 中出现过
      3. G ( x ) G(x) G(x) 中除 x x x 外,还有其他自由变项时,不可用此规则
    4. EG规则(存在推广规则/存在量词附加规则)
      G ( c ) ⟹ ( ∃ x ) G ( x ) . \color{red}G(c)\Longrightarrow (\exist x)G(x). G(c)(x)G(x).

      注意

      1. c c c某个个体常项
      2. 取代 c c c x x x 不能在 G ( x ) G(x) G(x) 中出现过
  • 二、推理方法:直接证明法, C P CP CP规则证明法,反证法

    • 例题1 \color{White}\colorbox{Fuchsia}{例题1} 1:证明苏格拉底三段论:人都是要死的,苏格拉底是人,所以苏格拉底是要死的

      证:

      设谓词Man(x) x x x 是人;Mortal(x) x x x 是要死的;客体 s s s:苏格拉底。

      则论断符号化为: ( ∀ x ) [ M a n ( x ) ⟶ M o r t a l ( x ) ] ∧ M a n ( s ) ⟹ M o r t a l ( s ) (\forall x)[Man(x) \longrightarrow Mortal(x)]\land Man(s)\Longrightarrow Mortal(s) (x)[Man(x)Mortal(x)]Man(s)Mortal(s)

      直接证明法
      ( 1 ) ( ∀ x ) [ M a n ( x ) ⟶ M o r t a l ( x ) ] P ( 2 ) M a n ( s ) ⟶ M o r t a l ( s ) U S ( 1 ) ( 3 ) M a n ( s ) P ( 4 ) M o r t a l ( s ) T ( 2 ) , ( 3 ) \begin{aligned}&(1)&&(\forall x)[Man(x) \longrightarrow Mortal(x)] &&P\\ &(2)&&Man(s) \longrightarrow Mortal(s)&& US(1)\\ &(3)&&Man(s)&&P\\ &(4)&&Mortal(s)&&T(2),(3) \end{aligned} (1)(2)(3)(4)(x)[Man(x)Mortal(x)]Man(s)Mortal(s)Man(s)Mortal(s)PUS(1)PT(2),(3)

    • 例题2 \color{White}\colorbox{Fuchsia}{例题2} 2:证明 ( ∀ x ) ( C ( x ) → W ( x ) ∧ R ( x ) ) ∧ ( ∃ x ) ( C ( x ) ∧ Q ( x ) ) ⟹ ( ∃ x ) ( Q ( x ) ∧ R ( x ) ) (\forall x)(C(x)\rightarrow W(x)\land R(x))\land (\exist x)(C(x)\land Q(x))\Longrightarrow (\exist x)(Q(x)\land R(x)) (x)(C(x)W(x)R(x))(x)(C(x)Q(x))(x)(Q(x)R(x))

      证:

      注意:使用前提时,尽量先用存在前提。因为存在特定个体成立便对任意前提的个体均成立,反之不然。

      ( 1 ) ( ∃ x ) ( C ( x ) ∧ Q ( x ) ) P ( 2 ) C ( a ) ∧ Q ( a ) E S ( 1 ) ( 3 ) ( ∀ x ) ( C ( x ) → W ( x ) ∧ R ( x ) ) P ( 4 ) C ( a ) → W ( a ) ∧ R ( a ) U S ( 3 ) ( 5 ) C ( a ) T , ( 2 ) , I 2 ( 6 ) W ( a ) ∧ R ( a ) T , ( 4 ) , ( 5 ) , I 3 ( 7 ) R ( a ) T , ( 6 ) , I 2 ( 8 ) Q ( a ) T , ( 2 ) , I 2 ( 9 ) Q ( a ) ∧ R ( a ) T , ( 7 ) , ( 8 ) , I 1 ( 10 ) ( ∃ x ) ( Q ( x ) ∧ R ( x ) ) E G , ( 9 ) \begin{aligned} &(1)&& (\exist x)(C(x)\land Q(x)) &&P\\ &(2)&& C(a)\land Q(a) && ES(1)\\ &(3)&& (\forall x)(C(x)\rightarrow W(x)\land R(x)) && P\\ &(4)&& C(a)\rightarrow W(a)\land R(a) && US(3)\\ &(5)&& C(a) && T,(2),I_2\\ &(6)&& W(a)\land R(a) && T,(4),(5),I_3\\ &(7)&& R(a) && T,(6),I_2\\ &(8)&& Q(a) && T,(2),I_2\\ &(9)&& Q(a)\land R(a) && T,(7),(8),I_1\\ &(10)&& (\exist x)(Q(x)\land R(x)) && EG,(9)\\ \end{aligned} (1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(x)(C(x)Q(x))C(a)Q(a)(x)(C(x)W(x)R(x))C(a)W(a)R(a)C(a)W(a)R(a)R(a)Q(a)Q(a)R(a)(x)(Q(x)R(x))PES(1)PUS(3)T,(2),I2T,(4),(5),I3T,(6),I2T,(2),I2T,(7),(8),I1EG,(9)

    • 例题3 \color{White}\colorbox{Fuchsia}{例题3} 3:有些病人相信所有的医生,而病人均不相信江湖骗子。试证明医生不是骗子。

      证:设 P ( x ) : x P(x):x P(x):x 是病人; D ( x ) : x D(x):x D(x):x是医生; S ( x ) : x S(x):x S(x):x是江湖骗子; L ( x , y ) : x L(x,y):x L(x,y):x 相信 y y y

      则论断符号化为: ( ∃ x ) [ P ( x ) ∧ ( ∀ y ) ( D ( y ) → L ( x , y ) ) ] ∧ ( ∀ x ) [ P ( x ) → ( ∀ y ) ( S ( y ) → ¬ L ( x , y ) ) ] ⟹ ( ∀ x ) ( D ( x ) → ¬ S ( x ) ) (\exist x)[P(x)\land (\forall y)(D(y) \rightarrow L(x,y))]\land (\forall x)[P(x)\rightarrow (\forall y)(S(y)\rightarrow \neg L(x,y))]\Longrightarrow (\forall x)(D(x)\rightarrow \neg S(x)) (x)[P(x)(y)(D(y)L(x,y))](x)[P(x)(y)(S(y)¬L(x,y))](x)(D(x)¬S(x))
      ( 1 ) ( ∃ x ) [ P ( x ) ∧ ( ∀ y ) ( D ( y ) → L ( x , y ) ) ] P ( 2 ) P ( a ) ∧ ( ∀ y ) ( D ( y ) → L ( a , y ) ) E S , ( 1 ) ( 3 ) ( ∀ y ) ( D ( y ) → L ( a , y ) ) T , ( 2 ) , I 2 ( 4 ) D ( t ) → L ( a , t ) U S , ( 3 ) ( 5 ) ( ∀ x ) [ P ( x ) → ( ∀ y ) ( S ( y ) → ¬ L ( x , y ) ) ] P ( 6 ) P ( a ) → ( ∀ y ) ( S ( y ) → ¬ L ( a , y ) ) U S , ( 5 ) ( 7 ) P ( a ) T , ( 2 ) , I 2 ( 8 ) ( ∀ y ) ( S ( y ) → ¬ L ( a , y ) ) T , ( 6 ) , ( 7 ) , I 3 ( 9 ) S ( t ) → ¬ L ( a , t ) U S , ( 8 ) ( 10 ) L ( a , t ) → ¬ S ( t ) T , ( 9 ) , E 22 ( 11 ) D ( t ) → ¬ S ( t ) T , ( 4 ) , ( 10 ) , I 6 ( 12 ) ( ∀ x ) ( D ( x ) → ¬ S ( x ) ) U G , ( 11 ) \begin{aligned} &(1)&& (\exist x)[P(x)\land (\forall y)(D(y) \rightarrow L(x,y))] &&P\\ &(2)&& P(a)\land (\forall y)(D(y) \rightarrow L(a,y)) &&ES,(1)\\ &(3)&& (\forall y)(D(y) \rightarrow L(a,y)) &&T,(2),I_2\\ &(4)&& D(t) \rightarrow L(a,t) && US,(3)\\ &(5)&& (\forall x)[P(x)\rightarrow (\forall y)(S(y)\rightarrow \neg L(x,y))] && P\\ &(6)&& P(a)\rightarrow (\forall y)(S(y)\rightarrow \neg L(a,y)) && US,(5)\\ &(7)&& P(a) && T,(2),I_2\\ &(8)&& (\forall y)(S(y)\rightarrow \neg L(a,y)) && T,(6),(7),I_3\\ &(9)&& S(t)\rightarrow \neg L(a,t) && US,(8)\\ &(10)&& L(a,t)\rightarrow \neg S(t) && T,(9),E_{22}\\ &(11)&& D(t)\rightarrow \neg S(t) && T,(4),(10),I_6\\ &(12)&&(\forall x)(D(x)\rightarrow \neg S(x)) && UG,(11) \end{aligned} (1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11)(12)(x)[P(x)(y)(D(y)L(x,y))]P(a)(y)(D(y)L(a,y))(y)(D(y)L(a,y))D(t)L(a,t)(x)[P(x)(y)(S(y)¬L(x,y))]P(a)(y)(S(y)¬L(a,y))P(a)(y)(S(y)¬L(a,y))S(t)¬L(a,t)L(a,t)¬S(t)D(t)¬S(t)(x)(D(x)¬S(x))PES,(1)T,(2),I2US,(3)PUS,(5)T,(2),I2T,(6),(7),I3US,(8)T,(9),E22T,(4),(10),I6UG,(11)

  • 三、消解(归结)法

    • 证明 G 1 , G 2 , . . . , G n ⟹ H G_1,G_2,...,G_n\Longrightarrow H G1,G2,...,GnH 过程:

      • ⨀ \color{red}\bigodot 1.根据反证法,要证明 { G 1 , G 2 , . . . , G n , ¬ H } \{G_1,G_2,...,G_n,\neg H\} {G1,G2,...,Gn,¬H} 矛盾

      • ⨀ \color{red}\bigodot 2.建立子句集:将 G G G 化成前束范式,再化成 Skolem 范式 G ∗ G^* G(可保持不可满足性不变)。将 G ∗ G^* G 全称量词省略,将合取母式的 ∧ \land 代替为 “ , ” “,” , 得到子句集 S S S

      • ⨀ \color{red}\bigodot 3.对句集 S S S 重复做归结直到出现空子句。

        归结原理:设 L 1 , L 2 L_1,L_2 L1,L2 分别是两个无共同变元的子句 C 1 , C 2 C_1,C_2 C1,C2 中的句节。若 L 1 , ¬ L 2 L_1,\neg L_2 L1,¬L2 一致,则 ( C 1 − { L 1 } ) ⋃ ( C 2 − { L 2 } ) ) (C_1-\{L_1\})\bigcup(C_2-\{L_2\})) (C1{L1})(C2{L2})) C 1 , C 2 C_1,C_2 C1,C2 的归结式。(合一置换 { a / x } \{a/x\} {a/x}

        例: C 1 = P ( x ) ∨ Q ( x ) , C 2 = ¬ P ( a ) ∨ R ( y ) C_1=P(x)\lor Q(x),C_2=\neg P(a)\lor R(y) C1=P(x)Q(x),C2=¬P(a)R(y),有归结式 R ( C 1 , C 2 ) = Q ( a ) ∨ R ( y ) R(C_1,C_2)=Q(a)\lor R(y) R(C1,C2)=Q(a)R(y)

    • 例题4 \color{White}\colorbox{Fuchsia}{例题4} 4:利用消解法证明,前提有 ( ∀ x ) [ P ( x ) → ( ∀ y ) ( Q ( y ) → ¬ R ( x , y ) ) ] , ( ∃ x ) [ P ( x ) ∧ ( ∀ y ) ( S ( y ) → R ( x , y ) ) ] (\forall x)[P(x)\rightarrow (\forall y)(Q(y)\rightarrow \neg R(x,y))],(\exist x)[P(x)\land (\forall y)(S(y)\rightarrow R(x,y))] (x)[P(x)(y)(Q(y)¬R(x,y))],(x)[P(x)(y)(S(y)R(x,y))],结论为 ( ∀ x ) ( S ( x ) → ¬ Q ( x ) ) (\forall x)(S(x)\rightarrow \neg Q(x)) (x)(S(x)¬Q(x))

      证:

      首先写为 Skolem 范式
      ( ∀ x ) [ P ( x ) → ( ∀ y ) ( Q ( y ) → ¬ R ( x , y ) ) ] ∧ ( ∃ x ) [ P ( x ) ∧ ( ∀ y ) ( S ( y ) → R ( x , y ) ) ] ∧ ¬ ( ∀ x ) ( S ( x ) → ¬ Q ( x ) )    ⟺    ( ∀ x ) ( ∀ y ) [ ¬ P ( x ) ∨ ¬ Q ( y ) ∨ ¬ R ( x , y ) ] ∧ ( ∃ u ) [ P ( u ) ∧ ( ∀ z ) ( ¬ S ( z ) ∨ R ( u , z ) ) ] ∧ ( ∃ v ) [ S ( v ) ∧ Q ( v ) ]    ⟺    ( ∃ u ) ( ∃ v ) ( ∀ x ) ( ∀ y ) ( ∀ z ) [ ¬ P ( x ) ∨ ¬ Q ( y ) ∨ ¬ R ( x , y ) ] ∧ P ( u ) ∧ [ ¬ S ( z ) ∨ R ( u , z ) ] ∧ S ( v ) ∧ Q ( v )    ⟺    ( ∀ x ) ( ∀ y ) ( ∀ z ) [ ¬ P ( x ) ∨ ¬ Q ( y ) ∨ ¬ R ( x , y ) ] ∧ P ( a ) ∧ [ ¬ S ( z ) ∨ R ( a , z ) ] ∧ S ( b ) ∧ Q ( b ) \begin{aligned} &(\forall x)[P(x)\rightarrow (\forall y)(Q(y)\rightarrow \neg R(x,y))]{\color{red}\land} (\exist x)[P(x)\land (\forall y)(S(y)\rightarrow R(x,y))]{\color{red}\land} \neg (\forall x)(S(x)\rightarrow \neg Q(x))\\ \iff& (\forall x)(\forall y)[\neg P(x)\lor \neg Q(y)\lor \neg R(x,y)]{\color{red}\land} (\exist u)[P(u)\land (\forall z)(\neg S(z)\lor R(u,z))]{\color{red}\land} (\exist v)[S(v)\land Q(v)]\\ \iff& {\color{red}(\exist u)(\exist v)}(\forall x)(\forall y)(\forall z)[\neg P(x)\lor \neg Q(y)\lor \neg R(x,y)]\land P(u)\land [\neg S(z)\lor R(u,z)]\land S(v)\land Q(v)\\ \iff& (\forall x)(\forall y)(\forall z)[\neg P(x)\lor \neg Q(y)\lor \neg R(x,y)]\land P({\color{red}a})\land [\neg S(z)\lor R({\color{red}a},z)]\land S({\color{red}b})\land Q({\color{red}b}) \end{aligned} (x)[P(x)(y)(Q(y)¬R(x,y))](x)[P(x)(y)(S(y)R(x,y))]¬(x)(S(x)¬Q(x))(x)(y)[¬P(x)¬Q(y)¬R(x,y)](u)[P(u)(z)(¬S(z)R(u,z))](v)[S(v)Q(v)](u)(v)(x)(y)(z)[¬P(x)¬Q(y)¬R(x,y)]P(u)[¬S(z)R(u,z)]S(v)Q(v)(x)(y)(z)[¬P(x)¬Q(y)¬R(x,y)]P(a)[¬S(z)R(a,z)]S(b)Q(b)
      得到子句集: { ¬ P ( x ) ∨ ¬ Q ( y ) ∨ ¬ R ( x , y ) , P ( a ) , ¬ S ( z ) ∨ R ( a , z ) , S ( b ) , Q ( b ) } \{\neg P(x)\lor \neg Q(y)\lor \neg R(x,y),P(a),\neg S(z)\lor R(a,z), S(b),Q(b)\} {¬P(x)¬Q(y)¬R(x,y),P(a),¬S(z)R(a,z),S(b),Q(b)}

      消解过程:
      ( 1 ) ¬ P ( x ) ∨ ¬ Q ( y ) ∨ ¬ R ( x , y ) P ( 2 ) P ( a ) P ( 3 ) ¬ Q ( y ) ∨ ¬ R ( a , y ) ( 1 ) , ( 2 ) , 代 换 { a / x } ( 4 ) Q ( b ) P ( 5 ) ¬ R ( a , b ) ( 3 ) , ( 4 ) , 代 换 { b / y } ( 6 ) ¬ S ( z ) ∨ R ( a , z ) P ( 7 ) ¬ S ( b ) ( 5 ) , ( 6 ) , 代 换 { b / z } ( 8 ) S ( b ) P ( 7 ) ( 8 ) 矛 盾 , 证 毕 \begin{aligned} &(1)&& \neg P(x)\lor \neg Q(y)\lor \neg R(x,y) &&P\\ &(2)&& P(a) &&P\\ &(3)&& \neg Q(y)\lor \neg R(a,y) &&(1),(2),代换\{a/x\} \\ &(4)&& Q(b) &&P\\ &(5)&& \neg R(a,b) &&(3),(4),代换\{b/y\} \\ &(6)&& \neg S(z)\lor R(a,z) &&P\\ &(7)&& \neg S(b) &&(5),(6),代换\{b/z\}\\ &(8)&& S(b) &&P \end{aligned}\\ (7)(8)矛盾,证毕 (1)(2)(3)(4)(5)(6)(7)(8)¬P(x)¬Q(y)¬R(x,y)P(a)¬Q(y)¬R(a,y)Q(b)¬R(a,b)¬S(z)R(a,z)¬S(b)S(b)PP(1),(2),{a/x}P(3),(4),{b/y}P(5),(6),{b/z}P(7)(8),

  • 四、注意

    1. 需要消去量词时,先用 E S ES ES 规则,再用 U S US US 规则
    2. E S ES ES 规则消去的量词在添加时,只能用 E G EG EG 规则;而用 U S US US 规则消去的量词在添加时,可以用 U G UG UG 规则或 E G EG EG 规则。
    3. 消去多个存在量词时,不能用相同的常量符号取代。
    4. 消去量词时,量词需在公式最前端,且辖域需为整个公式
      量词时,量词需在公式最前端,且辖域需为整个公式
  • 3
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值