This is an exercise from A.G. Hamilton's Logic for Mathematicians, section 2.1, p. 36. I have tried to do this for 10 long years, since 2010. Unsuccessful.
Exercise 3: Using the deduction theorem for $L$, show that the following wfs. are theorems of $L$, where $\mathcal{A}$ and $\mathcal{B}$ are any wfs of $L$.
(c) $((\mathcal{A} \to \mathcal{B}) \to \mathcal{A}) \to \mathcal{A}$
The axiom schemes of $L$ are:
- $\mathcal{A} \to (\mathcal{B} \to \mathcal{A})$.
- $\mathcal{A} \to (\mathcal{B} \to \mathcal{C}) \to ((\mathcal{A} \to \mathcal{B}) \to (\mathcal{A} \to \mathcal{C}))$.
- $((\sim \mathcal{A}) \to (\sim \mathcal{B})) \to (\mathcal{B} \to \mathcal{A})$.
The only rule of inference of $L$ is modus ponens (MP): from $\mathcal{A}$ and $\mathcal{A} \to \mathcal{B}$, deduce $\mathcal{B}$.
The deduction theorem for $L$ says: if $\Gamma \cup \{\mathcal{A}\} \vdash \mathcal{B}$, then $\Gamma \vdash (\mathcal{A} \to \mathcal{B})$.
Thanks for helping me.