I am being asked to deduce the following theorems:
For $x_i$ not occuring free in $A$:
- $\vdash(\exists x_i(A\rightarrow B)\rightarrow(A\rightarrow\exists x_i B)),$
- $\vdash ((A\rightarrow\exists x_i B)\rightarrow(\exists x_i(A\rightarrow B)).$
If the only variables occurring free in $\phi$ are $x_i$ and $x_j$ ($i\neq j$):
- $\vdash (\forall x_i\lnot\phi \rightarrow\lnot\forall x_i\phi),$
- $\vdash (\exists x_i\forall x_j\phi \rightarrow\forall x_j\exists x_i\phi).$
Here, the deductive system is $K$, a Hilbert-style system for the first-order language $\mathcal{L}$ with connectives $\lnot, \rightarrow$, with the seven axioms and rules for modus ponens, generalization, and thinning. How do I prove the above statements?
EDIT: Here are the axioms/rules.
- $(\alpha\rightarrow(\beta\rightarrow\alpha)))$
- $((\alpha\rightarrow(\beta\rightarrow\gamma))\rightarrow((\alpha\rightarrow\beta)\rightarrow(\alpha\rightarrow\gamma)))$
- $((\lnot\beta\rightarrow\lnot\alpha)\rightarrow(\alpha\rightarrow\beta))$
- $(\forall x_i\alpha\rightarrow\alpha[t/x_i])$ where $t$ is free for $x_i$ in $\alpha$
- $(\forall x_i(\alpha\rightarrow\beta)\rightarrow(\alpha\rightarrow\forall x_i\beta))$, provided that $x_i\notin\text{Free}(\alpha)$
- $\forall x_i \ x_i\dot{=}x_i$
- $(x_i\dot{=}x_j\rightarrow(\phi\rightarrow\phi'))$, where $\phi$ is atomic and $\phi'$ is obtained from $\phi$ by replacing some occurrences of $x_i$ in $\phi$ by $x_j$
- Modus Ponens: From $\alpha$ and $(\alpha\rightarrow\beta)$ infer $\beta$
- Generalisation: From $\alpha$ infer $\forall x_i\alpha$
- Thinning: If $\Gamma\vdash\phi$ and $\Gamma\subseteq\Gamma'$ then $\Gamma'\vdash\phi$
Here is a proof for the third theorem: $\forall x \neg \phi(x) \rightarrow \neg \forall x \phi(x)$:
$\forall x \neg \phi(x) \rightarrow \neg \phi(a)$ Axiom 4
$\forall x \phi(x) \rightarrow \phi(a)$ Axiom 4
$\neg \phi(a) \rightarrow \neg \forall x \phi(x)$ Contraposition 2
$\forall x \neg \phi(x) \rightarrow \neg \forall x \phi(x)$ Hypothetical Syllogism 1,3
I used Contraposition and Hypothetical Syllogism as propositional logic inference principles rather than theorems. I assume that is ok, and if not, you can always add them as theorems:
$(A \rightarrow B) \rightarrow (\neg B \rightarrow \neg A)$ Contraposition
$(A \rightarrow B) \rightarrow ((B \rightarrow C) \rightarrow (A \rightarrow C))$ Hypothetical Syllogism
So then the above proof would be:
$\forall x \neg \phi(x) \rightarrow \neg \phi(a)$ Axiom 4
$\forall x \phi(x) \rightarrow \phi(a)$ Axiom 4
$(\forall x \phi(x) \rightarrow \phi(a)) \rightarrow (\neg \phi(a) \rightarrow \neg \forall x \phi(x))$ Contraposition
$\neg \phi(a) \rightarrow \neg \forall x \phi(x)$ MP 2,3
$(\forall x \neg \phi(x) \rightarrow \neg \phi(a)) \rightarrow ((\neg \phi(a) \rightarrow \neg \forall x \phi(x)) \rightarrow (\forall x \neg \phi(x) \rightarrow \neg \forall x \phi(x)))$ Hypothetical Syllogism
$(\neg \phi(a) \rightarrow \neg \forall x \phi(x)) \rightarrow (\forall x \neg \phi(x) \rightarrow \neg \forall x \phi(x))$ MP 1,5
$\forall x \neg \phi(x) \rightarrow \neg \forall x \phi(x)$ MP 4,6
... but you see what a pain that is, so to keep your proofs manageable and readable I would assume that you already have established those propositional theorems as derived inference principles and stick to the initial proof.
Proofs by contradiction will be useful for some of the other proofs. I will assume that this is defined as follows:
If $\Gamma_1 \cup \{A\} \vdash B$ and $\Gamma_2 \cup \{A\} \vdash \neg B$ then $\Gamma_1 \cup \Gamma_2 \vdash \neg A$
OK, let's do the proof for $\exists x (A \rightarrow B(x)) \rightarrow (A \rightarrow \exists x B(x))$. I'll guide you through the thought process so that hopefully you can do the last two proofs yourself once you get the hang of this:
OK, so to prove $\exists x (A \rightarrow B(x)) \rightarrow (A \rightarrow \exists x B(x))$ we'll show that $\exists x (A \rightarrow B(x)) \vdash (A \rightarrow \exists x B(x))$ so that we can then get the desired theorem using the Deduction Theorem (which says that if $\Gamma \cup \phi \vdash \psi$ then $\Gamma \vdash \phi \rightarrow \psi$).
In fact, since our new goal is $A \rightarrow \exists x B(x)$, which is another conditional, we'll anticipate using the Deduction Theorem here as well, i.e. we're going to show $\{ \exists x (A \rightarrow B(x)), A\}\vdash \exists x B(x)$.
Realizing $\exists x \phi(x)$ is shorthand for $\neg \forall x \neg \phi(x)$, our goal becomes $\{ \neg \forall x \neg (A \rightarrow B(x)), A\}\vdash \neg \forall x \neg B(x)$.
Since our conclusion $\neg \forall x \neg B(x)$ is a negation, we'll set this up as a proof by contradiction, i.e. we want to show that we can get some statement and its negation by starting out with $\{ \neg \forall x \neg (A \rightarrow B(x)), A, \forall x \neg B(x)\}$. And, since we already one negation in this set of statements ($\neg \forall x \neg (A \rightarrow B(x))$), let's try and get the positive of that one, i.e. let's see if we can show: $\{ A, \forall x \neg B(x)\} \vdash \forall x \neg (A \rightarrow B(x))$.
OK, since that new goal is a universal, we'll anticipate the Generalization rule, so we have to show $\{ A, \forall x \neg B(x)\} \vdash \neg (A \rightarrow B(a))$.
Now we have a negation as our goal again, so let's anticipate Proof by Contradiction and show that $\{ A, \forall x \neg B(x), A \rightarrow B(a)\}$ leads to a contradiction.
.. and that is quite straightforward:
$\forall x \neg B(x)$ Premise
$A$ Premise
$A \rightarrow B(a)$ Premise
$B(a)$ MP 2,3
$\forall x \neg B(x) \rightarrow \neg B(a)$ Axiom 4
$\neg B(a)$ MP 1,5
OK, so let's go back in the reverse order in which we set our goals. First, we just showed that:
$\{A, A \rightarrow B(a)\} \vdash B(a)$
$\{ \forall x \neg B(x)\} \vdash \neg B(a)$
Hence:
So:
And since:
We get:
By definition of $\exists$ this is the same as:
So by the Deduction Theorem:
And applying the Deduction Theorem once more:
So, yes, there is a derivation of $\exists x (A \rightarrow B(x)) \rightarrow (A \rightarrow \exists x B(x))$, though notice I didn't write it out. Rather, I gave a proof that there is such a derivation; it is a kind of metaproof. But, I assume this will be perfectly acceptable since, as I already pointed out, the actual derivation itself can be massive.