- $\left(p\rightarrow\left(q\rightarrow r\right)\right)$---premise
- q---assumption
- p---assumption
- $q\wedge p$---by $\wedge$-Intro from 2 and 3
- q---by $\wedge$-elim from 4
- p---by $\wedge$-elim from 4
- $q\rightarrow r$---by $\rightarrow$-elim from 1 and 6
- r------by $\rightarrow$-elim from 5 and 7
- $p\rightarrow r$---by $\rightarrow$-Intro from 3 and 8
- $q\rightarrow\left(p\rightarrow r\right)$---by $\rightarrow$-Intro from 2 and 9
- $\left(p\rightarrow\left(q\rightarrow r\right)\right)\rightarrow\left(q\rightarrow\left(p\rightarrow r\right)\right)$---by $\rightarrow$-Intro from 1 and 10
Also is there any other way to do this proof by natural deduction?
eliminating 4,5 and 6 which were unnecessary, the correct proof is: