As you can see below, $\psi$ pops out of nowhere due to RAA(reductio ad absurdum). This is probably wrong. Is there really a proper natural deduction proof for $\vdash(\neg(\phi\to\psi)\to\phi)$?
Update 1 : I added another example.
As you can see below, $\psi$ pops out of nowhere due to RAA(reductio ad absurdum). This is probably wrong. Is there really a proper natural deduction proof for $\vdash(\neg(\phi\to\psi)\to\phi)$?
Update 1 : I added another example.
Copyright © 2021 JogjaFile Inc.


The proof is correct. From $\bot$ you can infer anything, which is why the $\psi$ is allowed to "pop out of nowhere" in the first use of RAA in the proof. Note that this use of RAA does not discharge any hypotheses (there is no number next to the line that infers $\psi$ from $\bot$).
In the second use of RAA in the proof, from $\bot$ we discharge hypothesis 2 ($\neg \phi$) in order to infer $\phi$. Perhaps this is a more normal-looking use of RAA that you are used to (if $\neg \phi$ yields a contradiction, then infer $\phi$).