This is my set of axiom
- $A \rightarrow (B\rightarrow A)$
- $(A\rightarrow(B\rightarrow C))\rightarrow ((A\rightarrow B) \rightarrow (A \rightarrow C))$
- $(\neg A \rightarrow B)\rightarrow ((\neg A \rightarrow \neg B)\rightarrow A)$
When applying it to prove $$p \rightarrow q,\neg q \vdash \neg p$$ I get inside an exponential expansion which makes me feel it is not provable. So far I have been trying a several combinations in which start from A3 by substituting $A=\neg p$, $B=q$ and even with $B=\neg q$.
Is there any substitution that I am not seeing?
This is a possible thought process. I don't have time to go through the details, but this seems to work.
Almost likely the formal proof of this theorem ends with an application of axiom 3 and modus ponens.
Axiom 3. with $A=\neg p$ and $B=q$ yields $$(\neg \neg p\to q)\to ((\neg \neg p\to \neg q)\to \neg p).$$
So it's enough to be able to deduce $\neg \neg p\to q$ and $\neg \neg p\to \neg q$.
Axiom 1 yields $\neg q\to(\neg \neg p\to \neg q)$, so $\neg \neg p\to \neg q$ is taken care of.
It remains to get $\neg \neg p\to q$. Since it is a conditional statement, it is likely a consequence of the second axiom.
The second axiom with $A=\neg \neg p, B=p$ and $C=q$ yields $$(\neg \neg p\to (p\to q))\to ((\neg \neg p\to p)\to (\neg \neg p\to q)).$$
So now you want to use modus ponens on the above formula. Therefore it suffices to find proofs of $\neg \neg p\to (p\to q)$ and $\neg \neg p\to p$. The first of these is easy. The other one is harder.
Proof of $\neg \neg p\to p$:
\begin{alignat*}{3} 1. \,&((\neg p\to \neg \neg p)\to p)\to (\neg \neg p\to ((\neg p \to \neg \neg p)\to p)) &&(\text A1)\\ 2. \,&(\neg p \to \neg p)\to ((\neg p\to \neg \neg p)\to p) &&(\text A3)\\ 3. \,&\neg p \to ((\neg p \to \neg p)\to \neg p) &&(\text{A} 1)\\ 4. \,&(\neg p\to ((\neg p \to \neg p)\to \neg p))\to ((\neg p \to (\neg p \to \neg p))\to (\neg p \to \neg p)) &&(\text{A} 2)\\ 5. \,&(\neg p \to (\neg p \to \neg p))\to (\neg p \to \neg p) &&(\text{MP }3,4)\\ 6. \,&\neg p \to (\neg p\to \neg p) &&(\text{A}1)\\ 7. \,&\neg p \to \neg p &&(\text{MP }5,6)\\ 8. \,&(\neg p \to \neg \neg p)\to p &&(\text{MP }7,2)\\ 9. \,&\neg \neg p\to ((\neg p \to \neg \neg p)\to p) &&(\text{MP }8,1)\\ 10. \,&(\neg \neg p\to ((\neg p \to \neg \neg p)\to p))\to ((\neg \neg p\to (\neg p \to \neg \neg p))\to (\neg \neg p \to p)) &&(\text{A}2)\\ 11. \,&(\neg \neg p\to (\neg p \to \neg \neg p))\to (\neg \neg p \to p) &&(\text{MP 9,10})\\ 12. \,&\neg \neg p \to (\neg p \to \neg \neg p) &&(\text{A}1)\\ 13. \,&\neg \neg p \to p &&(\text{MP }12, 11)\\ \end{alignat*}