Q: 命题演算形式系统 L L L中的形式语言 L 0 \mathscr L_0 L0由哪两部分构成? A: 一个(可能无穷)的符号集 ∼ , → , ( , ) , p 1 , p 2 , ⋯ \sim,\to,(,),p_1,p_2,\cdots ∼,→,(,),p1,p2,⋯,以及一个合式公式(well-formed formulas)集。 注:回忆 { ∼ , → } \{\sim,\to\} {
∼,→}是完备集。 合式公式集是递归定义的。即 p i p_i pi是公式,且对于公式 A , B \mathscr A,\mathscr B A,B,有 ( ∼ A ) (\sim \mathscr A) (∼A)和 ( A → B ) (\mathscr A\to\mathscr B) (A→B)是公式。 注:当然也可以采用前缀表达式,从而不需要引入括号。 注:形式系统 L L L中的字符 → \to →和 ∼ \sim ∼是抽象的记号,我们并不天然地认为它们代表了用真值表或布尔函数定义的“具体”的连接符 → , ∼ \to,\sim →,∼. 但是 L L L的公理模式和推理规则实际上从某种程度上阐述了 → , ∼ \to,\sim →,∼的意义。
Q: 说“ L L L的公理只有三条”有何不准确之处? A: L L L应当说有三个公理模式。每个公理模式中的 A , B \mathscr A,\mathscr B A,B等都可以代表任意公式(命题形式),从而有无数条公理。 当然,也可以引入替换规则,从而共有四条公理(而非公理模式)。
Q: L L L中的公理模式和演绎规则有什么密切的联系? A: 可以发现所有的公理模式都是 A → B \mathscr A\to\mathscr B A→B形式。因此如果另已知 A \mathscr A A,就可以通过分离规则得到直接后承 B \mathscr B B. 这体现了两者的密切关系。
Q: 依据形式证明的定义,能否在 L L L中证明 L L L的公理? A: 按照定义, L L L中的公理自然也是 L L L中的定理。证明是只含有自身的序列。 注:公理是没有经过证明,但被当作不证自明的命题。这和“在 L L L中证明公理”是两个方面的东西。
Q: 从什么集合的演绎就是证明? A: 空集(或:包含若干条公理的集合) 注:从集合 Γ \Gamma Γ的演绎和从 Γ ∪ Γ ′ \Gamma\cup \Gamma' Γ∪Γ′的演绎(其中 Γ ′ \Gamma' Γ′中所有公式都是公理)依据定义是相同的。 注:因此 A \mathscr A A是 L L L中定理可以简记为 ∅ ⊢ L A , ⊢ L A , ⊢ A \emptyset\vdash_L\mathscr A,\vdash_L\mathscr A,\vdash\mathscr A ∅⊢LA,⊢LA,⊢A.
Q: 使用前缀表达式(前置式),在 L L L中构造 A , → B → A C ⊢ → B C \mathscr A, \to \mathscr B\to\mathscr A\mathscr C\vdash\to \mathscr B\mathscr C A,→B→AC⊢→BC的演绎。 A: (1) A \mathscr A A(假设) (2) → B → A C \to \mathscr B\to\mathscr A\mathscr C →B→AC(假设) (3) → A → B A \to \mathscr A \to \mathscr B \mathscr A →A→BA(L1) (4) → B A \to \mathscr B \mathscr A →BA((1)(3)MP) (5) → → B → A C → → B A → B C \to\to \mathscr B\to \mathscr A \mathscr C \to\to \mathscr B \mathscr A\to \mathscr B \mathscr C →→B→AC→→BA→BC(L2) (6) → → B A → B C \to\to \mathscr B \mathscr A\to \mathscr B \mathscr C →→BA→BC((2)(5)MP) (7) → B C \to \mathscr B\mathscr C →BC((4)(6)MP)
Q: 在证明元定理 ⊢ → A A \vdash\to \mathscr A\mathscr A ⊢→AA和 ⊢ → ∼ B → B A \vdash\to\sim\mathscr B\to\mathscr B\mathscr A ⊢→∼B→BA时,所使用的隐含分配(L2)分别具体是什么? A: 可能的答案: → → A → → A A A → → A → A A → A A \to \to\mathscr A \to\to \mathscr A\mathscr A\mathscr A \to\to\mathscr A\to \mathscr A\mathscr A\to\mathscr A\mathscr A →→A→→AAA→→A→AA→AA. → → ∼ B → → ∼ A ∼ B → B A → → ∼ B → ∼ A ∼ B → ∼ B → B A \to\to\sim \mathscr B\to\to\sim \mathscr A\sim\mathscr B\to\mathscr B\mathscr A \to\to\sim \mathscr B\to\sim \mathscr A\sim\mathscr B\to\sim\mathscr B\to\mathscr B\mathscr A →→∼B→→∼A∼B→BA→→∼B→∼A∼B→∼B→BA.
演绎定理
Q: 叙述演绎定理(的正向),并针对 Γ ∪ { A } \Gamma\cup\{\mathscr A\} Γ∪{
A}到 B \mathscr B B的演绎序列中只有一个公式的情况做出分类证明。 A: 若 Γ ∪ { A } ⊢ L B \Gamma \cup\{\mathscr A\}\vdash_L\mathscr B Γ∪{
A}⊢LB,则 Γ ⊢ L ( A → B ) \Gamma\vdash_L(\mathscr A\to\mathscr B) Γ⊢L(A→B). 若演绎序列只有一个公式,则 B \mathscr B B是公理或 Γ \Gamma Γ中元素时用一次L1即可。而 B \mathscr B B就是 A \mathscr A A时回忆上一节10.
Q: 接上,如果 B \mathscr B B不是以上三种情况,那么它一定是()而得的。那么根据归纳,一定有 Γ ⊢ L \Gamma\vdash_L Γ⊢L()和 Γ ⊢ L \Gamma\vdash_L Γ⊢L()。于是在()和()的演绎序列后加上几步(要使用L2)即得待求的()的演绎序列。 A: 由 Γ ∪ { A } \Gamma \cup \{\mathscr A\} Γ∪{
A}(通过更少步演绎得到的)两条公式根据MP, A → C \mathscr A\to\mathscr C A→C, A → ( C → B ) \mathscr A\to(\mathscr C \to\mathscr B) A→(C→B), A → C \mathscr A\to\mathscr C A→C, A → ( C → B ) \mathscr A\to(\mathscr C \to\mathscr B) A→(C→B), A → B \mathscr A\to\mathscr B A→B
Q: 通过演绎定理可以证明HS(假言三段论)也能起到推理规则的作用。而通过HS和()(填公理模式)可以得到 ⊢ ∼ A → ( A → B ) \vdash\sim\mathscr A \to(\mathscr A\to\mathscr B) ⊢∼A→(A→B),再用演绎定理得到()。说出该事实的实际含义。 A: L1和L3, ∼ A , A ⊢ B \sim\mathscr A,\mathscr A\vdash\mathscr B ∼A,A⊢B. 自相矛盾的题设可以推出一切结论。 注:可以发现 ∼ A , A \sim \mathscr A,\mathscr A ∼A,A都写到 ⊢ \vdash ⊢左边后,顺序可以调换。从而马上得到 ⊢ A → ( ∼ A → B ) \vdash\mathscr A\to(\sim\mathscr A\to\mathscr B) ⊢A→(∼A→B)
Q: 为了证明 ⊢ ( ∼ A → A ) → A \vdash(\sim \mathscr A\to\mathscr A)\to\mathscr A ⊢(∼A→A)→A,我们考虑对2.中的 ∼ A ⊢ A → B \sim \mathscr A\vdash \mathscr A\to\mathscr B ∼A⊢A→B应用()(填公理模式),得到:在已知条件 ( ∼ A → A ) (\sim \mathscr A\to\mathscr A) (∼A→A)时,对于一切公式 B \mathscr B B都有 ( ∼ A → B ) (\sim\mathscr A\to \mathscr B) (∼A→B)可以()。把 B \mathscr B B替换为 ∼ ( ∼ A → A ) \sim(\sim\mathscr A\to\mathscr A) ∼(∼A→A),就得到了 ∼ A → A ⊢ ∼ A → ∼ ( ∼ A → A ) \sim\mathscr A\to\mathscr A\vdash \sim \mathscr A \to \sim(\sim\mathscr A\to\mathscr A) ∼A→A⊢∼A→∼(∼A→A). 接下来()就证明了结论。 A: L2,被演绎得到,用L3及演绎定理再划去左侧集合中重复的元素 ∼ A → A \sim\mathscr A\to\mathscr A ∼A→A.
Q: 在形式证明的简略形式中,可以省略指明替换、MP和演绎定理。即:实际书写时行右边的括号标注不再只能是(m)(n)(MP)或(Ln)的形式。而有可能是()(说出在简略形式中可能出现但在非简略形式中被认为不规范的一些括号标注)。省略演绎定理在实际书写中能带来什么便利? A: (m)(Ln)形式,(m)(Ln)(HS)形式,等等。 注意:省略了MP。 注意:不用单起一行写(Ln)(即:省略了替换)。 例: (1) ∼ ∼ A ⊢ ∼ A → ∼ ∼ ∼ A \sim\sim\mathscr A\vdash\sim \mathscr A\to\sim\sim\sim \mathscr A ∼∼A⊢∼A→∼∼∼A (2) ∼ ∼ A ⊢ ∼ ∼ A → A \sim\sim\mathscr A\vdash\sim\sim \mathscr A\to \mathscr A ∼∼A⊢∼∼A→A(1)(L3)(HS) 省略演绎定理可以减少括号和 ⋅ \cdot ⋅的使用,把 ⊢ \vdash ⊢当成区分优先级的工具。
Q: 用简略形式证明 A → B ⊢ ∼ B → ∼ A \mathscr A \to\mathscr B \vdash \sim \mathscr B \to \sim \mathscr A A→B⊢∼B→∼A. 尝试解释为什么不把前式作为公理模式。 A: (1) ∼ ∼ A ⊢ ∼ ∼ ∼ ∼ A → ∼ ∼ A \sim\sim\mathscr A\vdash \sim\sim\sim\sim\mathscr A\to\sim\sim \mathscr A ∼∼A⊢∼∼∼∼A→∼∼A(L1) (2) ∼ ∼ A ⊢ ∼ A → ∼ ∼ ∼ A \sim\sim\mathscr A\vdash \sim\mathscr A\to\sim\sim \sim\mathscr A ∼∼A⊢∼A→∼∼∼A(1)(L3)(HS) (3) ∼ ∼ A ⊢ ∼ ∼ A → A \sim\sim\mathscr A\vdash \sim\sim\mathscr A\to\mathscr A ∼∼A⊢∼∼A→A(2)(L3)(HS) (4) ∼ ∼ A ⊢ A \sim\sim\mathscr A\vdash \mathscr A ∼∼A⊢A(演绎定理,此行其实可以省略) (5) ∼ ∼ ∼ A ⊢ ∼ A \sim\sim\sim\mathscr A\vdash\sim\mathscr A ∼∼∼A⊢∼A(替换,当然替换可以不写) (6) A ⊢ ∼ ∼ A \mathscr A\vdash\sim\sim\mathscr A A⊢∼∼A(5)(L3)(MP,当然MP可以不写) (7) A → B , ∼ ∼ A ⊢ A → B \mathscr A\to\mathscr B,\sim\sim\mathscr A\vdash\mathscr A\to\mathscr B A→B,∼∼A⊢A→B(假设) (8) A → B , ∼ ∼ A ⊢ B \mathscr A\to\mathscr B,\sim\sim\mathscr A\vdash\mathscr B A→B,∼∼A⊢B(4)(7)(MP,当然MP可以不写) (9) A → B , ∼ ∼ A ⊢ ∼ ∼ B \mathscr A\to\mathscr B,\sim\sim\mathscr A\vdash\sim\sim\mathscr B A→B,∼∼A⊢∼∼B(8)(6) 注:从不同角度讲(采用不同的公式集 Γ \Gamma Γ),(9)可以看成(MP)也可以看成(HS). 通过演绎定理转换即可得到“不同角度”。 (10) A → B ⊢ ∼ B → ∼ A \mathscr A\to\mathscr B\vdash \sim\mathscr B\to\sim\mathscr A A→B⊢∼B→∼A(9)(L3)(HS) 不选取(10)作为公理模式,一个可能的原因是公理模式(L3)可以去除 ∼ \sim ∼,而(10)反过来添加 ∼ \sim ∼,不能合理应用。
Q: 回忆2.中我们得到过 A , ∼ A ⊢ B \mathscr A,\sim\mathscr A\vdash\mathscr B A,∼A⊢B. 为了把它写成 ⊢ ∼ A ∧ A → B \vdash \sim\mathscr A\wedge \mathscr A\to\mathscr B ⊢∼A∧A→B形式,我们定义合取 A ∧ B \mathscr A\wedge\mathscr B A∧B表示 ∼ ( A → ∼ B ) \sim(\mathscr A\to\sim\mathscr B) ∼(A→∼B). 因此,我们希望由 A , B ⊢ C \mathscr A,\mathscr B\vdash\mathscr C A,B⊢C推出 ⊢ ∼ ( A → ∼ B ) → C \vdash\sim(\mathscr A\to\sim\mathscr B)\to\mathscr C ⊢∼(A→∼B)→C. 如何作此推理?你可以直接使用5.中的(6)(10). A: (1) A ⊢ B → C \mathscr A\vdash \mathscr B\to \mathscr C A⊢B→C(演绎定理) (2) A ⊢ ∼ C → ∼ B \mathscr A\vdash \sim\mathscr C\to\sim \mathscr B A⊢∼C→∼B(1)(5.中的(10))(HS) (3) A , ∼ C ⊢ ∼ B \mathscr A,\mathscr \sim \mathscr C\vdash \sim \mathscr B A,∼C⊢∼B(演绎定理) (4) ∼ C ⊢ A → ∼ B \sim \mathscr C\vdash \mathscr A\to\sim \mathscr B ∼C⊢A→∼B(演绎定理) (5) ∼ C ⊢ ∼ ∼ ( A → ∼ B ) \sim \mathscr C\vdash\sim\sim( \mathscr A\to\sim \mathscr B) ∼C⊢∼∼(A→∼B)(4)(5.中的(6))(HS) (6) ∼ ( A → ∼ B ) ⊢ C \sim(\mathscr A\to\sim \mathscr B)\vdash \mathscr C ∼(A→∼B)⊢C(5)(L3) (最后一行用演绎定理推出 ⊢ ∼ ( A → ∼ B ) → C \vdash\sim(\mathscr A\to\sim\mathscr B)\to\mathscr C ⊢∼(A→∼B)→C可以省略)
形式系统的性质
Q: L L L中公式集不一致为什么等价于公式集能 ⊢ \vdash ⊢一切公式? A: 回忆上一节2. 并且注意:公式集不一致的定义是能同时 ⊢ A \vdash \mathscr A ⊢A和 ⊢ ∼ A \vdash \sim\mathscr A ⊢∼A,所以能推出一切公式的公式集当然是不一致的。
Q: 平凡性和一致性有什么联系和区别? A: 一致性可以作为公式集的性质。如果一切不一致的公式集都能推出一切公式,那么说明形式系统具有平凡性。特别地, L L L具有平凡性。 注:当然,我们也考察形式系统是否具有一致性。之后我们会证明 L L L是一致的,这其实就相当于所有公理作为公式集具有一致性。
Q: L 0 \mathscr L_0 L0中公式集的极大一致和一致有什么关系?举一个数学中的对象进行类比说明。 A: 极大一致的公式集是一致的,但加入任何一条新的公式就不再一致了。类比线性空间的一组基是线性无关的,但加入任何一个新的向量就不再线性无关了。
Q: 为了证明 L 0 \mathscr L_0 L0中极大一致的公式集 Γ \Gamma Γ一定对于任意公式 A \mathscr A A有 A ∈ Γ \mathscr A\in \Gamma A∈Γ或 ∼ A ∈ Γ \sim\mathscr A\in\Gamma ∼A∈Γ,可以说明一旦 Γ ∪ { ∼ A } \Gamma\cup\{\sim\mathscr A\} Γ∪{
∼A}不一致,那么() ∈ Γ \in\Gamma ∈Γ. 如何做此推理? A: (1) Γ , ∼ A ⊢ B \Gamma,\sim\mathscr A\vdash\mathscr B Γ,∼A⊢B(假设) (2) Γ , ∼ A ⊢ ∼ B \Gamma,\sim\mathscr A\vdash\sim\mathscr B Γ,∼A⊢∼B(假设) (3) Γ , B ⊢ A \Gamma,\mathscr B\vdash \mathscr A Γ,B⊢A(2)(L3) (4) Γ ⊢ ∼ A → A \Gamma\vdash\sim\mathscr A\to\mathscr A Γ⊢∼A→A(1)(3)(HS) (5) Γ ⊢ ∼ A → ( ∼ B → ∼ A ) \Gamma\vdash\sim\mathscr A\to(\sim \mathscr B\to\sim \mathscr A) Γ⊢∼A→(∼B→∼A)(L1) (6) Γ ⊢ ∼ A → ( A → B ) \Gamma\vdash\sim \mathscr A\to(\mathscr A\to \mathscr B) Γ⊢∼A→(A→B)(5)(L3)(HS) (7) Γ , ∼ A → A ⊢ ∼ A → B \Gamma,\sim\mathscr A\to \mathscr A\vdash\sim \mathscr A\to \mathscr B Γ,∼A→A⊢∼A→B(6)(L2) (8) Γ ⊢ ∼ A → B \Gamma\vdash \sim\mathscr A \to \mathscr B Γ⊢∼A→B(4)(7) (9) Γ ⊢ ∼ A → ∼ ( ∼ A → A ) \Gamma\vdash\sim \mathscr A\to\sim(\sim \mathscr A\to \mathscr A) Γ⊢∼A→∼(∼A→A)(8) (10) Γ , ∼ A → A ⊢ A \Gamma,\sim \mathscr A \to \mathscr A\vdash \mathscr A Γ,∼A→A⊢A(9)(L3) (11) Γ ⊢ A \Gamma\vdash \mathscr A Γ⊢A(4)(10) 最后,由于 Γ \Gamma Γ极大一致,且 Γ ⊢ A \Gamma\vdash \mathscr A Γ⊢A,故 A ∈ Γ \mathscr A\in \Gamma A∈Γ.(否则, Γ ∪ { A } \Gamma \cup \{\mathscr A\} Γ∪{
A}是 Γ \Gamma Γ的真超集,且是一致的,矛盾)
Q: 极大一致子集唯一吗?为什么? A: 不一定。设 Γ \Gamma Γ是一致但不完备的公式集(即 Γ \Gamma Γ不能推出 A \mathscr A A也不能推出 ∼ A \sim\mathscr A ∼A),则 Γ ∪ { A , ∼ A } \Gamma\cup \{\mathscr A,\sim\mathscr A\} Γ∪{
A,∼A}的极大一致子集就不唯一。空集是一个平凡的 Γ \Gamma Γ的例子。 具体地, Γ ∪ { A } \Gamma\cup\{\mathscr A\} Γ∪{
A}是 Γ ∪ { A , ∼ A } \Gamma\cup \{\mathscr A,\sim\mathscr A\} Γ∪{
A,∼A}的一致子集,否则参考5.,有 ∼ A ∈ Γ \sim \mathscr A\in \Gamma ∼A∈Γ,矛盾。 且 Γ ∪ { A , ∼ A } \Gamma\cup \{\mathscr A,\sim\mathscr A\} Γ∪{
A,∼A}本身不一致显然。因此 Γ ∪ { A } \Gamma\cup\{\mathscr A\} Γ∪{
A}是 Γ ∪ { A , ∼ A } \Gamma\cup \{\mathscr A,\sim\mathscr A\} Γ∪{
A,∼A}的极大一致子集。同理 Γ ∪ { ∼ A } \Gamma\cup\{\sim\mathscr A\} Γ∪{
∼A}也是。
Q: 由于6.,我们有两种定义“极大一致推理”的方式,即: Γ ⊢ M C S A \Gamma\vdash_{MCS}\mathscr A Γ⊢MCSA当且仅当一切 Γ \Gamma Γ的极大一致子集都 ⊢ L A \vdash_L\mathscr A ⊢LA. 或 Γ ⊢ M C S A \Gamma\vdash_{MCS}\mathscr A Γ⊢MCSA当且仅当存在一个 Γ \Gamma Γ的极大一致子集能 ⊢ L A \vdash_L \mathscr A ⊢LA. 对于这两种定义,极大一致推理 ⊢ M C S \vdash_{MCS} ⊢MCS分别是否具有平凡性和单调性? A: 无论哪种定义方式,不一致的 Γ \Gamma Γ都不一定能推出一切公式。比如6.中 Γ ′ : = Γ ∪ { A , ∼ A } \Gamma':=\Gamma\cup \{\mathscr A,\sim\mathscr A\} Γ′:=Γ∪{
A,∼A}不一致,其所有极大一致子集是 Γ 1 : = Γ ∪ { A } \Gamma_1:=\Gamma\cup\{\mathscr A\} Γ1:=Γ∪{
A}和 Γ 2 : = Γ ∪ { ∼ A } \Gamma_2:=\Gamma\cup\{\sim\mathscr A\} Γ2:=Γ∪{
∼A}显然。 注:原因是 Γ ′ \Gamma' Γ′本身不是一致子集,且 Γ \Gamma Γ的任意真子集一定是前述两极大一致子集 Γ 1 , Γ 2 \Gamma_1,\Gamma_2 Γ1,Γ2之一的子集。 则 Γ ′ \Gamma' Γ′无论在哪种极大一致推理的定义下,都不能推出一切公式(只要 Γ \Gamma Γ非空,例如是单元素集 { p } \{p\} {
p}. 论证单元素集 { p } \{p\} {
p}的一致性可以参考下一期中证明公理的独立性以及证明一致性定理)。 对于第一种定义方式,没有单调性。比如考虑前述 Γ 1 ⊂ Γ ′ \Gamma_1\subset\Gamma' Γ1⊂Γ′.,则 Γ ′ \Gamma' Γ′的一个极大一致子集 Γ 2 \Gamma_2 Γ2就不能推出 A \mathscr A A. 对于第二种定义方式,有单调性。因为如果 Γ ∗ \Gamma^* Γ∗是 Γ \Gamma Γ的极大一致子集,那么 Γ ∗ \Gamma^* Γ∗是 Γ ∪ { A } \Gamma\cup\{\mathscr A\} Γ∪{
A}的一致子集,从而 Γ ∗ \Gamma^* Γ∗或者 Γ ∗ ∪ { A } \Gamma^*\cup\{\mathscr A\} Γ∗∪{
A}之一一定是 Γ ∪ { A } \Gamma\cup\{\mathscr A\} Γ∪{
A}的极大一致子集。从而单调性容易说明。