Exercise 1

先证$\forall x \, (0 + x \equiv x)$。
对 $x$ 归纳。令 $\varphi(x) := 0 + x \equiv x$。
有$0+0 \equiv 0$ 由公理 $\forall x \, x+0 \equiv x$ 得。
若 $0+x \equiv x$,则 $0+(x+1) \equiv (0+x)+1$ $\equiv x+1$。
故 $\forall x\,(0+x\equiv x)$。

再证$\forall x \, (x + 1 \equiv 1 + x)$。
对 $x$ 归纳。令 $\psi(x) := x+1 \equiv 1+x$。
有$0+1 \equiv 1$,$1+0 \equiv 1$,故 $0+1 \equiv 1+0$。
若 $x+1 \equiv 1+x$,则 $(x+1)+1 \equiv (1+x)+1$。
由公理 $1+(x+1) \equiv (1+x)+1$,得 $(x+1)+1 \equiv 1+(x+1)$。
故 $\forall x\,(x+1\equiv 1+x)$。

再证$\forall x \forall y \, ((y+1)+x \equiv (y+x)+1)$。

固定 $y$,对 $x$ 归纳。令 $\chi(x) := (y+1)+x \equiv (y+x)+1$。
$x=0$时,$(y+1)+0 \equiv y+1$,$(y+0)+1 \equiv y+1$。
若 $(y+1)+x \equiv (y+x)+1$,则
$(y+1)+(x+1) \equiv ((y+1)+x)+1$
$\equiv ((y+x)+1)+1$
$\equiv (y+(x+1))+1$
故 $(y+1)+(x+1) \equiv (y+(x+1))+1$,即 $\chi(x+1)$ 成立。
故 $\forall x\,((y+1)+x \equiv (y+x)+1)$

下证$\forall x \forall y \, (x + y \equiv y + x)$。

固定 $x$,对 $y$ 归纳。令 $\theta(y) := x+y \equiv y+x$。
有 $y=0$:$x+0 \equiv x$,$0+x \equiv x$,故 $x+0 \equiv 0+x$。
若 $x+y \equiv y+x$,则
$x+(y+1) \equiv (x+y)+1$
$\equiv (y+x)+1$
$\equiv (y+1)+x$
因此 $x+(y+1) \equiv (y+1)+x$。
故$\forall y\,(x+y \equiv y+x)$,由 $x$ 的任意性得结论。

故 $\Phi_{\text{PA}} \models \forall x \forall y \, x + y \equiv y + x$。

Exercise 2

(a)

如果 $\Gamma, \varphi\frac{y}{x} \models \psi$ 成立,且满足变量限制条件 $y \notin \text{free}(\Gamma \cup \{\exists x \varphi, \psi\})$,那么 $\Gamma, \exists x \varphi \models \psi$ 必成立

(b)

假设前提有效。任取结构 $\mathfrak{A}$ 和赋值 $s$ 使得 $\mathfrak{A} \models \Gamma[s]$ 且 $\mathfrak{A} \models \exists x\varphi[s]$。
则存在 $a \in |\mathfrak{A}|$ 满足 $\mathfrak{A} \models \varphi[s[x\mapsto a]]$。
定义新赋值 $s'$: $s'(y)=a$,且对所有 $z \neq y$,$s'(z)=s(z)$。
由 $y \notin \text{free}(\Gamma)$和coincidence lemma,$\mathfrak{A} \models \Gamma[s']$。
又 $y \notin \text{free}(\psi)$,故 $$\mathfrak{A} \models \psi[s'] \iff \mathfrak{A} \models \psi[s]$$
因为 $y$ 不在 $\varphi$ 的自由变量中,所以

$$\mathfrak{A} \models \varphi\left[ \frac{y}{x} \right][s'] \iff \mathfrak{A} \models \varphi[s'[x\mapsto s'(y)]] = \mathfrak{A} \models \varphi[s'[x\mapsto a]]$$

而 $s'[x\mapsto a]$ 与 $s[x\mapsto a]$ 在 $\varphi$ 的自由变量上取值相同,故 $$\mathfrak{A} \models \varphi[s'[x\mapsto a]] \iff \mathfrak{A} \models \varphi[s[x\mapsto a]]$$
因此 $\mathfrak{A} \models \varphi\left[ \frac{y}{x} \right][s']$。
由 $\mathfrak{A} \models \Gamma[s']$ 和 $\mathfrak{A} \models \varphi\left[ \frac{y}{x} \right][s']$ 得 $\mathfrak{A} \models \psi[s']$。
再由coincidence lemma得 $\mathfrak{A} \models \psi[s]$。

Exercise 3

不是的
定义$\varphi = x \equiv 2$,论域为自然数,故$\exists{x}\varphi$为真,而$\forall x \varphi$为假。
所以这个式子不是可推导的。

Exercise 4

(a)

$$ \begin{array}{lll} 1. & \Gamma & \varphi && \text{(premise)} \\ 2. & \neg\neg\neg\varphi & \neg\neg\varphi &\neg\neg\varphi &\text{(assumption)} \\ 3. & \neg\neg\neg\varphi & \neg\neg\varphi& \neg\neg\neg\varphi & \text{(assumption)} \\ 4. & \neg\neg\neg\varphi & \neg\varphi && \text{(contradiction by 2 and 3)} \\ 5. & \Gamma & \neg\neg\neg\varphi & \neg\varphi &\text{(antecedent by 4)} \\ 6. & \Gamma & \neg\neg\neg\varphi & \varphi & \text{(antecedent by 1)} \\ 7. & \Gamma & \neg\neg\varphi && \text{(contradiction by 5 and 6)} \end{array} $$

(b)

$$ \begin{array}{lll} 1. & \Gamma & \neg\neg\varphi && \text{(premise)} \\ 2. & \Gamma & \neg\varphi & \neg\neg\varphi & \text{(antecedent by 1)} \\ 3. & \Gamma & \neg\varphi & \neg\varphi & \text{(assumption)} \\ 4. & \Gamma & \varphi && \text{(contradiction by 2 and 3)} \end{array} $$

Exercise 5

由题,

$$ \Phi \vdash (\varphi\to \psi) \Leftrightarrow \exists\text{有限} \Gamma \subset \Phi, \Gamma(\neg \varphi \lor \psi) $$ $$ Φ ∪ {\varphi} \vdash ψ \Leftrightarrow \exists\text{有限} \Gamma \subset \Phi, \quad \Gamma \varphi\psi $$

$Φ \vdash (\varphi → ψ) \implies \varphi ∪ {ϕ} \vdash ψ$:

$$ \begin{array}{lll} \\ 1. && \Gamma & \neg\varphi \lor \psi && \text{(premise)} \\ 2. && \Gamma & \varphi & \neg\varphi \lor \psi & \text{(antecedent by 1)}\\ 3. && \Gamma & \varphi & \varphi & \text{(assumption)} \\ 4. & \Gamma & \varphi & \neg \psi & \neg\varphi \lor \psi & \text{(antecedent by 2)} \\ 5. & \Gamma & \varphi & \neg\psi & \varphi & \text{(antecedent by 3)} \end{array} $$

对$4$进行析取:
若 $\neg \varphi$,则有

$$ \begin{aligned} 4. &\quad \Gamma, \varphi, \neg\psi, \neg\varphi \\ 5. &\quad \Gamma, \varphi, \neg\psi, \varphi \\ 6. &\quad \Gamma, \varphi, \psi \qquad\text{(contradiction by 4 and 5)} \end{aligned} $$

若 $\psi$,则有

$$ \begin{aligned} 7. &\quad \Gamma, \varphi, \neg\psi, \psi \\ \end{aligned} $$

显然等价于

$$ \begin{aligned} 8.&\quad \Gamma , \varphi , \psi \end{aligned} $$

即证

$Φ ∪ {\varphi} \vdash ψ \implies \varphi \vdash (\varphi → ψ)$

$$ \begin{array}{lll}\\ 1. & \Gamma & \varphi & \psi & \text{(premise)} \\ 2. & \Gamma & \varphi & \neg\varphi \lor \psi & \text{($\lor$-introduction in succedent by 1)} \\ 3. & \Gamma & \neg \varphi & \neg \varphi & \text{(assumption)} \\ 4. & \Gamma & \neg \varphi & \neg \varphi \lor \psi & \text{($\lor$-introduction in succedent by 3)} \\ 5. && \Gamma & \neg \varphi \lor \psi & \text{(case analysis by 2 and 4)} \end{array} $$

即证