I have:
Lemma 1$$ \vdash\psi\rightarrow(\lnot\psi\rightarrow\varphi) $$ We also have $$ \{\lnot\varphi\rightarrow\varphi,\lnot\varphi\}\vdash\varphi $$ and $$ \{\lnot\varphi\rightarrow\varphi,\lnot\varphi\}\vdash\lnot\varphi $$ Can anyone explain why this and the lemma gives $$ \{\lnot\varphi\rightarrow\varphi,\lnot\varphi\}\vdash\lnot(\varphi\rightarrow\varphi) $$
Logical axioms: $$ 1.\ \ \varphi\rightarrow(\psi\rightarrow\varphi) $$ $$ 2.\ \ (\varphi\rightarrow(\psi\rightarrow\chi))\rightarrow((\varphi\rightarrow\psi)\rightarrow(\varphi\rightarrow\chi)) $$
$$ 3.\ \ (\lnot\varphi\rightarrow\lnot\psi)\rightarrow(\psi\rightarrow\varphi) $$
Inference rule: $$ 4.\ \ MP $$
Proof lemma: By axiom 1 we have $$ \{\psi,\lnot\psi \} \vdash\lnot\varphi\rightarrow\lnot\psi $$ By axiom 3 we get
$$ \{\psi,\lnot\psi \} \vdash\psi\rightarrow\varphi $$
But then
$$ \{\psi,\lnot\psi \} \vdash\varphi $$
2 x the deduction theorem now gives the result.