I've been trying to give a formal proof for $$ \lnot \left(p \lor \lnot q\right) \rightarrow \left(\lnot p \land q \right) $$
in deductive system N (natural deduction system) and got stuck. I've started by assuming $$A1 \Rightarrow\lnot \left(p \lor \lnot q\right) $$
and tried to prove by contradiction with $$A2 \Rightarrow \left(p \lor \lnot q\right) $$ but got stuck. Am I looking at this problem from the wrong point of view? Any assistance will be appreciated.

1) $¬(p∨¬q)$ --- premise
2) $p$ --- assumed [a]
3) $p∨¬q$ --- by $\lor$-intro
4) $\bot$ --- contradiction from 1) and 3)
5) $\lnot p$ --- from 4), discharging [a]
6) $\lnot q$ --- assumed [b]
7) $p \lor \lnot q$ --- by $\lor$-intro
8) $\bot$ --- contradiction from 1) and 7)
9) $q$ --- from 6) and 8) by double Negation, discharging [b]