命题逻辑推理

命题逻辑推理

  • 推理
    • A1,A2,,An,BA_1,A_2,\dots,A_n,B 为命题公式,则 A1A2AnBA_1 \land A_2 \land \cdots \land A_n \to B{A1,A2,,An}B\{A_1,A_2,\dots,A_n\} \vdash B 是一个推理。
    • A1A2AnBA_1 \land A_2 \land \cdots \land A_n \to B 永真,则推理是有效的,记作 A1A2AnBA_1 \land A_2 \land \cdots \land A_n \Rightarrow B{A1,A2,,An}B\{A_1,A_2,\dots,A_n\} \models BBB 为有效结论。
  • 推理定律
    • 通过命题逻辑等值演算得到。
    • 附加律:AABA \Rightarrow A \lor B
    • 化简律:ABAA \land B \Rightarrow A
    • 假言推理:A(AB)BA \land (A \to B) \Rightarrow B
    • 拒取式:¬B(AB)¬A\neg B \land (A \to B) \Rightarrow \neg A
    • 析取三段论:(AB)¬BA(A \lor B) \land \neg B \Rightarrow A
    • 假言三段论:(AB)(BC)AC(A \to B) \land (B \to C) \Rightarrow A \to C
    • 等价三段论:(AB)(BC)AC(A \leftrightarrow B) \land (B \leftrightarrow C) \Rightarrow A \leftrightarrow C
    • 构造性二难:(AB)(CD)(AC)BD(A \to B) \land (C \to D) \land (A \lor C) \Rightarrow B \lor D(AB)(¬AB)B(A \to B) \land (\neg A \to B) \Rightarrow B
    • 破坏性二难:(AB)(CD)(¬B¬D)¬A¬C(A \to B) \land (C \to D) \land (\neg B \lor \neg D) \Rightarrow \neg A \lor \neg C
  • 自然推理系统
    • 定义
      • 自然推理系统组成:
        • 字母:命题变项、联结词、括号、逗号。
        • 合式公式
        • 推理规则
    • 证明
      • 设前提 A1,A2,,AkA_1,A_2,\dots,A_k,结论 BB,公式序列 C1,C2,,Cl=BC_1,C_2,\dots,C_l = B。若 CiC_i 是某个 AjA_j 或其前面的 CC 的结论,则序列是一个证明。
    • 证明方法
      • 直接法
        • 安装证明定义。
      • 附加前提法
        • 要证 A1A2AkBCA_1 \land A_2 \land \cdots \land A_k \Rightarrow B \to C,等价证明 A1A2AkBCA_1 \land A_2 \land \cdots \land A_k \land B \Rightarrow C
      • 反证法
        • 要证 A1A2AkBA_1 \land A_2 \land \cdots \land A_k \Rightarrow B,等价证明 A1A2Ak¬B0A_1 \land A_2 \land \cdots \land A_k \land \neg B \Rightarrow 0