离散数学与结构(A)/第2次作业 数理逻辑
数理逻辑
1.
(10 分) Łukasiewicz 形式系统 L 中有无穷条公理,但是这些公理都是按照三条模式生成的. 具体来说,设 A , B, C 是任意三条 w.f.f.,那么以下三条都是公理:
- (L1) A →(B→A),
- (L2) (A →(B→C))→((A →B)→(A →C)),
- (L3) (¬A →¬B)→(B→A).
不使用完备性定理,证明:L 中的每一条公理 D 都是重言式,即 ⊨L D.
首先验证 (L1) 为重言式。
| A | → | (B | → | A) |
|---|---|---|---|---|
| T | T | T | T | T |
| T | T | F | T | T |
| F | T | T | F | F |
| F | T | F | T | F |
因为 (L1) 对任何真值指派为真,所以 (L1)是重言式。同理可验证 (L2)(L3) 也为重言式。
因为 D 是公理,知 D 是由 (L1)(L2)(L3) 中的一条生成的,不妨设是由 (L2) 生成的。
假设 D 分别将 A, B, C 替换成了某个 w.f.f. ,则对一个固定的解释 v,有 \(v(A), v(B), v(C)\) 固定。
又因为 v(D) 相当于对 \(v(A), v(B), v(C)\) 进行逻辑运算,由 (L2) 为重言式,知 \(v(D) = \top\)。
因而, D 对任何解释 v 都满足 \(v(D) = \top\),故 D 是重言式。
2.
(10 分) 在 Łukasiewicz 形式系统 L 中,设 \(\mathscr{A}, \mathscr{B}, \mathscr{C}\) 是 w.f.f.,不使用演绎定理和完备性定理(sound-ness theorem 和 adequacy theorem),证明:
\[\{\mathscr{A},\mathscr{B}→(\mathscr{A} →\mathscr{C})\}⊢_L \mathscr{B}→\mathscr{C} \]
- \(\mathscr{A}\)
- \(\mathscr{B}\to (\mathscr{A}\to \mathscr{C})\)
- 由 (L2) 知 \((\mathscr{B}\to (\mathscr{A}\to \mathscr{C}))\to ((\mathscr{B}\to \mathscr{A})\to(\mathscr{B}\to \mathscr{C}))\)
- 由 2. 和 3. ,由肯定前件知 \((\mathscr{B}\to \mathscr{A})\to (\mathscr{B}\to \mathscr{C})\)
- 由 (L1) 知 \(\mathscr{A}\to (\mathscr{B}\to \mathscr{A})\) 。
- 由 1. 和 5. ,由肯定前件知 \(\mathscr{B}\to \mathscr{A}\)。
- 由 6. 和 4. ,由MP知 \(\mathscr{B}\to \mathscr{C}\)。得证。
3.
(10 分) 证明 \(K_\mathscr{L}\) 中的演绎定理.
演绎定理: 对 \(K_\mathscr{L}\) 中的 w.f.f. \(\mathscr{A}, \mathscr{B}\) 和 w.f.f. 的集合 \(Γ\), 如果 \(Γ∪\{\mathscr{A}\} ⊢ \mathscr{B}\),且演绎过程中不包含涉及自由出现在 \(\mathscr{A}\) 中的变元的泛化,那么 \(Γ ⊢ (\mathscr{A} → \mathscr{B})\).
提示:参考 Łukasiewicz 形式系统上演绎定理的证明,对证明长度 \(n\) 归纳.
首先,证明 \(⊢\mathscr{A}\to \mathscr{A}\)。
引理1:若 \(\mathscr{A}\to \mathscr{B}\) 且 \(\mathscr{A}\to (\mathscr{B}\to \mathscr{C})\),则 \(\mathscr{A}\to \mathscr{C}\)。
证明:
- (条件) \(\mathscr{A}\to \mathscr{B}\)
- (条件) \(\mathscr{A}\to (\mathscr{B}\to \mathscr{C})\)
- (L2) \((\mathscr{A}\to (\mathscr{B}\to \mathscr{C}))\to (\mathscr{A}\to \mathscr{B})\to (\mathscr{A}\to \mathscr{C}))\)。
- (2., 3., MP) \((\mathscr{A}\to \mathscr{B})\to (\mathscr{A}\to \mathscr{C})\)
- (1., 4., MP) \(\mathscr{A}\to \mathscr{C}\)。
引理2:\(\mathscr{A}\to \mathscr{A}\)。
证明:
- (L1) \(⊢\mathscr{A}\to (\mathscr{A}\to \mathscr{A})\)
- (L1) \(⊢\mathscr{A} \to ((\mathscr{A}\to \mathscr{A})\to \mathscr{A})\)
- (1., 2., 引理1) \(⊢\mathscr{A}\to \mathscr{A}\)
数学归纳法:
-
若 \(Γ∪\{\mathscr{A}\} ⊢ \mathscr{B}\) 的证明只有 \(1\) 步,则 \(\mathscr{B} = \mathscr{A}\) 或 \(\mathscr{B} \in \Gamma\),或 \(\vdash \mathscr{B}\)。
- 若 \(\mathscr{B} = \mathscr{A}\) :因为 \(\mathscr{A}\to \mathscr{A}\) ,知 \(Γ ⊢ \mathscr{A}\to \mathscr{B}\)。
- 若 \(\mathscr{B} \in \Gamma\):因为 \(\mathscr{B}\to (\mathscr{A}\to \mathscr{B})\),由 MP 知 \(Γ ⊢ \mathscr{A}\to \mathscr{B}\)。
- 若 \(\vdash \mathscr{B}\) :仿上易知 \(Γ ⊢ \mathscr{A}\to \mathscr{B}\)。
得证。
-
假设该结论对 \(\le n\) 步的证明成立,下证该结论对 \(n+1\) 步的证明成立:
-
如果最后一步是对形如 \(\mathscr{C}\to \mathscr{B}\) 和 \(\mathscr{C}\) 的 w.f.f. 应用 MP:
-
考虑 \(Γ∪\{\mathscr{A}\} ⊢ (\mathscr{C}\to \mathscr{B})\) 和 \(Γ∪\{\mathscr{A}\} ⊢ \mathscr{C}\) 的证明,知它们的步数均 \(\le n\)。
因此,由归纳假设,有 \(\Gamma \vdash (\mathscr{A}\to (\mathscr{C}\to \mathscr{B}))\) 以及 \(\Gamma \vdash (\mathscr{A}\to \mathscr{C})\)。
由引理1,知 \(\Gamma \vdash \mathscr{A}\to \mathscr{B}\)。
-
-
如果最后一步是对 \(\mathscr{C}\) 进行泛化得到 \((\forall x_i) \mathscr{C}\):
- 由归纳假设,有 \(\Gamma \vdash \mathscr{A}\to \mathscr{C}\)。
- 将它进行泛化,知 \(\Gamma \vdash (\forall x_i)(\mathscr{A}\to \mathscr{C})\)。
- 由题设“演绎过程中不包含涉及自由出现在 \mathscr{A} 中的变元的泛化”,知 \(x_i\) 在 \(\mathscr{A}\) 中没有自由出现。故由 (K6),知 \(\vdash (∀x_i)(\mathscr{A} → \mathscr{C}) → (\mathscr{A} → (∀x_i)\mathscr{C})\)。
- 因此,由 MP 得 \(\mathscr{A} → (∀x_i)\mathscr{C}\),得证。
-
4.
(10 分) 证明以下命题(如果使用演绎定理,请在演绎过程中使用到泛化规则的步骤表明,并验证演绎定理的条件).
(1)
如果 \(x_i\) 不在 \(\mathscr{A}\) 中自由出现,那么 \(⊢_{K_L} (\mathscr{A} → (∀x_i)\mathscr{B}) → (∀x_i)(\mathscr{A} → \mathscr{B})\).
为利用 Adequacy theorem 证明该式,下面证明该式是语义有效的。
首先,观察到,因为 \(x_i\) 不在 \(\mathscr{A}\) 中自由出现,由公理 (K4) 有 \((\forall x_i) \mathscr{A}\to \mathscr{A}\) 。由 \(v(\mathscr{A}) = F\) ,知 \(v((\forall x_i)\mathscr{A}) = F\) 。因此,对任何与其 \(i\)-等值的解释 \(v_i\),都有 \(v_i(\mathscr{A}) = v(\mathscr{A}) = F\)。
当 \(v(\mathscr{A} → (∀x_i)\mathscr{B}) = F\) 时,由解释 \(v\) 的性质,知 \(v((\mathscr{A} → (∀x_i)\mathscr{B}) → (∀x_i)(\mathscr{A} → \mathscr{B})) = T\)。之后,只需考虑使得 \(v(\mathscr{A} → (∀x_i)\mathscr{B}) = T\) 的解释 \(v\)。
考虑使得 \(v(\mathscr{A} → (∀x_i)\mathscr{B}) = T\) 为真的解释 \(v\) 组成的集合 \(I\) ,以 \(v(\mathscr{A})\) 的值为标准,将之分为两个集合 \(I_{v(\mathscr{A})=T}\) 与 \(I_{v(\mathscr{A})=F}\),下面对此分别考虑。
-
考虑 \(I_{v(\mathscr{A})=F}\) 中的任一解释 \(v\)。由之前的观察,知对任何 \(v_i\) 都有 \(v_i(\mathscr{A}) = v(\mathscr{A}) = F\),故 \(v_i(\mathscr{A} → \mathscr{B}) = F\),因而 \(v((∀x_i)(\mathscr{A} → \mathscr{B})) = F\)。故 \(v((\mathscr{A} → (∀x_i)\mathscr{B}) → (∀x_i)(\mathscr{A} → \mathscr{B})) = T\) 。
-
考虑 \(I_{v(\mathscr{A}) = T}\) 中的任一解释 \(v\)。由 \(v(\mathscr{A} → (∀x_i)\mathscr{B}) = T\) 与 \(v(\mathscr{A}) = T\),知 \(v((\forall x_i)\mathscr{B}) = T\) 。因此,对任何 \(v_i\) 都有 \(v_i(\mathscr{B}) = T\)。由之前的观察,恒有 \(v_i(\mathscr{A}) = T\) 成立,因此 \(v_i(\mathscr{A}\to \mathscr{B})\) 恒真,故 \(v((∀x_i)(\mathscr{A} → \mathscr{B})) = T\)。故 \(v((\mathscr{A} → (∀x_i)\mathscr{B}) → (∀x_i)(\mathscr{A} → \mathscr{B})) = T\) 。
综上,式 \((\mathscr{A} → (∀x_i)\mathscr{B}) → (∀x_i)(\mathscr{A} → \mathscr{B})\) 语义有效,由 Adequacy theorem 即得 \(⊢_{K_L} (\mathscr{A} → (∀x_i)\mathscr{B}) → (∀x_i)(\mathscr{A} → \mathscr{B})\) 。
(2)
如果 \(x_i\) 在 \(\mathscr{A}(x_i)\) 中自由出现,且命题变元 \(x_j\) 和量词 \(∀x_j\) 都在 \(\mathscr{A}(x_i)\) 中不出现,那么 \(⊢_{K_L} ((∀x_i)\mathscr{A}(x_i) → (∀x_j)\mathscr{A} (x_j))\).
为利用 Adequacy theorem 证明该式,下面证明该式是语义有效的。考虑任一解释 \(v\) :
-
若 \(v((∀x_i)\mathscr{A}(x_i)) = F\),立刻得到 \(v((∀x_i)\mathscr{A}(x_i) → (∀x_j)\mathscr{A} (x_j)) = T\)。
-
若 \(v((∀x_i)\mathscr{A}(x_i)) = T\)。
因为 \(x_j\) 在 \(\mathscr{A}(x_i)\) 中不出现,所以(容易验证)对任何与 \(v\) \(j\)-等价的 \(v_j\) 有 \(v_j((∀x_i)\mathscr{A}(x_i)) = v((∀x_i)\mathscr{A}(x_i)) = T\)。
因为 \(\forall x_j\) 在 \(\mathscr{A}(x_i)\) 中不出现,所以 \(x_j\) 在 \(\mathscr{A}(x_i)\) 中对 \(x_i\) 是自由的。
因此,由公理 (K5) 有 \((\forall x_i)\mathscr{A}(x_i)\to \mathscr{A}(x_j)\)。
又由 Soundness Theorem ,有 \(v_j((\forall x_i)\mathscr{A}(x_i)\to \mathscr{A}(x_j)) = T\)。
又因为 \(v_j((∀x_i)\mathscr{A}(x_i)) = T\) ,知 \(v_j(\mathscr{A}(x_j)) = T\)。
由 \(v_j\) 的任意性,知 \(v((∀x_j)\mathscr{A} (x_j)) = T\)。
因此,\(v((∀x_i)\mathscr{A}(x_i) → (∀x_j)\mathscr{A} (x_j)) = T\)。
综上,对任一解释 \(v\) 都有 \(v((∀x_i)\mathscr{A}(x_i) → (∀x_j)\mathscr{A} (x_j)) = T\),由 Adequacy theorem 知 \(⊢_{K_L} ((∀x_i)\mathscr{A}(x_i) → (∀x_j)\mathscr{A} (x_j))\)。
5.
(10 分) 本题举例说明一阶形式语言如何用来描述数学对象. 设 \(L_G\) 是一个一阶形式语言,包含所有 \(K_L\) 的符号、w.f.f.、公理和推导规则. 此外,它还另外有如下公理(模式):
(E1) \(A^2_1(x_1, x_1)\) 是公理.
(E2) 对任意项 \(t_1,...,t_n\) 和任何函数符 \(f_i^n\),如下 w.f.f.是公理
\[A^2_1 (t_k,u) → A^2_1 (f_i^n (t_1,...,t_k,...,t_n), f_i^n (t_1,...,u,...,t_n)). \](E3) 对任意项 \(t_1,...,t_n\) 和任何谓词符 \(A^n_i\),如下 w.f.f. 是公理
\[A^2_1 (t_k,u) → (A^n_i (t_1,...,t_k,...,t_n) → A^n_i (t_1,...,u,...,t_n)). \](G1) \(A^2_1(f_1^2(f_1^2(x_1, x_2), x_3), f_1^2(x_1, f_1^2(x_2, x_3)))\) 是公理.
(G2) \(A^2_1(f_1^2(a_1, x_1), x_1)\) 是公理.
(G3) \(A^2_1(f_1^2(f_1(x_1), x_1), a_1)\) 是公理.
给定下面两个解释,只用考虑公理 (E1)—(G3),判断他们是否是 LG 的模型,并简要说明理由.
(1)
论域 \(D = \mathbb Z\);\(A^2_1\):整数上的等号 \(=\);\(f_1^2\):整数上的加法;\(f_1^1\):求整数的相反数,即 \(f_1^1(a) = −a\);\(a_1\):数 \(0\).
逐一验证 (E1)--(G3):
-
(E1) 相当于在说 \(A_1^2\) 有自反性, \(A^2_1(x_1, x_1)\) 对应的是 \(x_1 = x_1\),对所有 \(x_1 \in \mathbb Z\) 成立。
-
(E2) 相当于在说 \(A_1^2\) 是 \(f_i^n\) 上的等价/替代关系。分别对 \(f_1^2\)(\(+\)) 和 \(f_1^1\)(\(-\)) 进行验证:
-
\(f_1^2\):(E2) 相当于:
- \(t_1 = u \to t_1+t_2 = u + t_2\)
- \(t_2 = u \to t_1+t_2 = t_1 + u\)
均成立。
-
\(f^1_1\):(E2) 相当于 \(t_1 = u \to (-t_1) = (-u)\),成立。
-
-
(E3) 相当于在说 \(A_1^2\) 是 \(A_i^n\) 上的等价/替代关系。
只需对 \(A_1^2\) 进行验证: \(t_1 = u \to t_1 = u\) 显然成立。
-
(G1) 相当于 \((x_1 + x_2) + x_3 = x_1 + (x_2+x_3)\) ,由整数加法的结合律知其成立。
-
(G2) 相当于 \((0 + x_1) = x_1\),由整数加法单位元 \(0\) 的性质知其成立。
-
(G3) 相当于 \(((-x_1)+x_1) = 0\),由 \((-x_1)\) 是 \(x_1\) 的整数加法逆元知成立。
因此,(1) 是 \(L_G\) 的模型。由上面的验证过程知,若\(A_1^2\) 是相等关系、\((f_1^2, D)\) 构成群、 \(a_1\) 是单位元、 \(f_1^1(a)\) 是 \(a\) 的逆元、即满足(E1)--(G3),故而是 \(L_G\) 的模型。
(2)
论域 \(D\):\(n\) 阶可逆的矩阵集合;\(A^2_1\):n 阶方阵上的等号 \(=\);\(f_1^2\):\(n\) 阶方阵的乘法;\(f^1_1\):求 \(n\) 阶可逆矩阵的逆,即 \(f_1^1(M) = M^{−1}\);\(a_1\):\(n\) 阶单位方阵 \(I\).
容易验证,\(A_1^2\) 是相等关系,\((M_n,\times)\) 构成群,\(I\) 是单位元,\(f_1^1(M) = M^{-1}\) 是 \(M\) 的逆元。由前一题的过程知 (2) 是 \(L_G\) 的模型。

浙公网安备 33010602011771号