I was given to show whether the following argument $$ \neg q,p\to q \vdash \neg q $$ is valid.
I believe it is invalid, as the correct implication is $\neg p$, according to Modus Tollens.
However, I cannot find an error in the following "justification" that seemingly establishes that the argument is valid: \begin{align} (\neg q \land (p \to q)) \to \neg q &\equiv (\neg q \land (\neg p \lor q )) \to \neg q \\ &\equiv ((\neg q \land \neg p) \lor (\neg q \land q)) \to \neg q \\ &\equiv ((\neg q \land \neg p) \lor F) \to \neg q \\ &\equiv (\neg q \land \neg p) \to \neg q \\ &\equiv \neg(\neg q \land \neg p) \lor \neg q \\ &\equiv (q \lor p) \lor \neg q \\ &\equiv q \lor \neg q \lor p \\ &\equiv T \lor p \\ &\equiv T. \end{align} Edit: Okay, so it is apparently valid, and there probably isn't an error in my justification.
Of course it is valid: the conclusion is exactly the same as one of the premises, and so it certainly follows from the premises!
And indeed your justification is perfectly correct ... though exploiting the fact that the conclusion is one of the premises it can be done a bit more quickly:
$$(\neg q \land (p \rightarrow q)) \rightarrow \neg q \equiv$$
$$\neg (\neg q \land (p \rightarrow q)) \lor \neg q \equiv$$
$$q \lor \neg (p \rightarrow q) \lor \neg q \equiv$$
$$q \lor \neg q \lor \neg (p \rightarrow q) \equiv$$
$$\top \lor \neg (p \rightarrow q) \equiv$$
$$\top$$