# proving standard logic equivalences

Trying to prove if this is logically equivalent

$p \leftrightarrow (q \rightarrow r)$ and $(p \leftrightarrow q) \rightarrow r$

I got that they wouldn't be equal just wanted to confirm if I was right. My final answer was $((p\lor r)\land (\neg q\lor r))\land (\neg r\lor (\neg p\lor q))$ after simplifying the right hand side.

• To prove that they are not equal in the clearest way, exhibit a triple of truth values for $(p,q,r)$ such that, for that triple, the two expressions don't have the same truth value. An 8-line truth table will show all such a triples, but you can stop after the first mismatch. – quasi Mar 22 '17 at 7:44
• So its pointless trying to use the laws to figure out a way to simplify ? – rprogramr Mar 22 '17 at 7:46
• Not pointless, but a single triple yielding a mismatch disproves equivalence. – quasi Mar 22 '17 at 7:47
• They are not equivalent; to show it, it ios enough to consider a truth assignment $v$ such that : $v(p)=$ F and $v(r)=$ t. – Mauro ALLEGRANZA Mar 22 '17 at 11:11
• But how can you tell they aren't equivalent did you simplify first ? – rprogramr Mar 22 '17 at 20:17

Examine $\def\getsto{{\;\leftrightarrow\;}}\def\false{\underset{\tiny\text{false}}\bot}\def\true{\underset{\tiny\text{true}}\top} p \getsto (q \to r)$ and $(p \getsto q) \to r$
\begin{align}p \getsto (q \to r) ~& \iff (\neg p\vee (q\to r)\wedge(p\vee\neg(q\to r)) \\ &\iff (\neg p\vee\neg q\vee r)\wedge(p\vee\neg(\neg q\vee r))) \\ &\iff (\neg p\vee\neg q\vee r)\wedge (p\vee(q\wedge\neg r)) \\[3ex](p \getsto q) \to r ~&\iff \neg(p\getsto q)\vee r \\ & \iff (p\oplus q)\vee r \\ & \iff ((\neg p\vee \neg q)\wedge(p\vee q))\vee r \\ & \iff (\neg p\vee \neg q\vee r)\wedge(p\vee q\vee r) \end{align}
Test when $r$ true but $p,q$ both false.
$\false\getsto(\false\to\true)$ is false but $(\false\getsto\false)\to\true$ is true.