Proving from Hilbert axioms in propositional logic

logicpropositional-calculus

I am using axioms similar to the Hilbert system of logical axioms:

\begin{align}
&P\rightarrow (Q\rightarrow P) \tag{A1}\\[5pt]
&(P\rightarrow (Q\rightarrow R))\rightarrow ((P\rightarrow Q)\rightarrow (P \rightarrow R)) \tag{A2}\\[5pt]
&(\neg Q \rightarrow \neg P)\rightarrow (P\rightarrow Q) \tag{A3}
\end{align}

I may also use Modus Ponens and the deduction theorem. I am trying to prove two things:

$(a)\;\;\; \vdash \neg P \rightarrow (\neg Q\rightarrow (P\rightarrow R))$

$(b)\;\;\; \vdash (P \rightarrow ¬P) → (\neg\neg P \rightarrow \neg P)$

I know what I am supposed to do but I just can't quite get there with either one. I tried use deduction theorem in both so I am trying to prove in $(a)$ that $\neg P \vdash (\neg Q\rightarrow (P\rightarrow R))$ and similarly in $(b)$. Here is my effort for $(a)$:

\begin{align}
&1. \neg P &&\text{premise}\\[5pt]
&2. \neg P \rightarrow (\neg Q \rightarrow \neg P) &&(A1)\\[5pt]
&3. (\neg Q \rightarrow \neg P) &&MP:1+2\\[5pt]
&4. (\neg Q \rightarrow \neg P) \rightarrow (P \rightarrow Q) &&(A3)\\[5pt]
&5. P \rightarrow Q &&MP:3+4
\end{align}

I don't know how to proceed. Feels like I have all the needed pieces but I can't put them together. I have quite a similar situation with $(b)$. Help would be appreciated!

Best Answer

A)Use deduction theorem twice. So then you have to show that $\neg P,\neg Q\vdash_{ax}P\rightarrow R$. You are almost done, you only need to show that $\vdash_{ax}P\rightarrow(Q \rightarrow R)$ and apply MP.

B) Use deduction theorem once and notice that by axiom $A2$ $(\neg\neg P\rightarrow(P \rightarrow \neg P)) \rightarrow ((\neg\neg P \rightarrow P) \rightarrow (\neg\neg P \rightarrow \neg P))$. Then by axiom $A1$ $(P \rightarrow \neg P) \rightarrow (\neg\neg P\rightarrow (P \rightarrow \neg P))$. I think you are able to finish from here.