How can I simplify this expression:
$\lnot[(p \rightarrow r) \land (q \rightarrow r)] \land (\lnot p\lor r)$
I tried to solve it and I got the result 0 or F, but the correct answer is:
$\lnot p\land q \land \lnot r$
I would appreciate if someone could help me. I'm on the 10th grade and can't solve this.
$$\lnot[(p \rightarrow r) \land (q \rightarrow r)] \land (\lnot p\lor r)$$
$$\begin{align} &= [\lnot (p\rightarrow r) \lor \lnot (q\rightarrow r)] \land (\lnot p \lor r)\tag{DeMorgan's}\\ \\ & = [ \lnot (\lnot p \lor r) \lor \lnot(\lnot q \lor r] \land (\lnot p \lor r)\tag{$a\rightarrow b \equiv \lnot a \lor b$}\\ \\ &\equiv [(p\land \lnot r) \lor (q \land \lnot r)] \land (\lnot p \lor r)\tag{DeMorgan's applied twice}\\ \\ &\equiv [(p \lor q)\land \lnot r] \land (\lnot p \lor r)\tag{distributive property}\\ \\ &\equiv (*)\quad(p\lor q) \land (\lnot r) \land (\lnot p \lor r)\tag{associative property}\\ \\ &\equiv (p \vee q) \wedge \neg r \wedge \neg p\tag{Reduction principle}\\ \\ &\equiv q\land \lnot r \land \lnot p\tag{Reduction principle}\\ \\ &\equiv \lnot p \land q \land \lnot r\tag{commutativity of $\land$} \end{align}$$
Now, refer back to $(*)$ in case you're unfamiliar with the Reduction principle. We can instead, reason our way to the conclusion. Now, notice that because we have three propositions with $\land$'s connecting them, in order for the statement to be true, all three propositions must be must evaluate to true.
That determines $\lnot r$. And if $\lnot r$, we determine $\lnot p$ from $\lnot p \lor r$. And since we have $\lnot p$, we must have $q$.
That gives us the conclusion: $\lnot p \land q \land \lnot r$.