How to prove $ ( p \land q ) \land \big( ( q \land \neg r ) \lor ( p \land r ) \big) $ is logically equivalent to $ \neg ( p \to \neg q ) $.\ Construct a chain of logical connectives to show that (p ∧ q) ∧ [(q ∧ ¬r) ∨ (p ∧ r)] is
logically equivalent to ¬(p → ¬q).
Do not use truth tables here and give a reason for each line.
I could not get to $ \neg ( p \to \neg q ) $.
 A: It's not clear from your question whether you have to give a formal derivation using some set of axioms and rules of inference, or merely a chain of logical equivalences like those I've given below.  Without knowing what system of axioms and rules of inference you're supposed to make use of, it's impossible for anyone to provide you with a formal derivation of the first kind.
Here's the chain of logical equivalences I'm referring to above:
\begin{align}
(p\wedge q)\wedge\big((q\wedge\neg r)\vee(p\wedge r)\big)&\equiv\big(((p\wedge q)\wedge (q\wedge\neg r))\vee((p\wedge q)\wedge(p\wedge r))\big)\\
&\hspace{2em}\text{(distributivity of conjunction}\\
&\hspace{2.5em}\text{over disjunction})\\
&\equiv\big((p\wedge q\wedge q\wedge\neg r)\vee(p\wedge q\wedge p\wedge r)\big)\\
&\hspace{2em}\text{(associativity of conjunction)}\\
&\equiv\big((p\wedge q\wedge\neg r)\vee(p\wedge q\wedge r)\big)\\
&\hspace{2em}\text{(idempotency of conjunction)}\\
&\equiv(p\wedge q)\wedge(r\vee\neg r)\\
&\hspace{2em}\text{(distributivity of conjunction}\\
&\hspace{2.5em}\text{over disjunction})\\
&\equiv p\wedge q\hspace{2.5em}\text{(law of excluded middle)}\\
&\equiv\neg\neg p\wedge\neg\neg q\hspace{2em}\text{(double negation)}\\
&\equiv \neg(\neg p\vee\neg q)\hspace{2em}\text{(De Morgan's law)}\\
&\equiv\neg(p\rightarrow\neg q)\hspace{2em}\text{(definition of implication)}
\end{align}
