[Math] Prove that $p \leftrightarrow \sim q \equiv (\sim p \wedge q)\vee (p\wedge\sim q)$

logic

I've been trying to solve this for about an hour now, but I keep getting stuck after a few steps. Here's what I have so far:

$(p \rightarrow \sim q)\wedge(\sim q \rightarrow p)$……………………(Definition of $\leftrightarrow$)
$(\sim p \vee \sim q) \wedge (\sim\sim q \vee p)$………………..(Definition of $\rightarrow$)
$(\sim p \vee \sim q) \wedge (q \vee p)$……………………….(Double Negation)
$\sim(p \wedge q) \wedge (q \vee p)$…………………………..(Demorgan's Law)

It's about here that I get stuck, how do I get from $\sim(p \wedge q) \wedge (q \vee p)$ to $(\sim p \wedge q)\vee (p\wedge\sim q)$?

Best Answer

You were so close. Things get a bit messy, but everything falls out fairly nice if you have the stamina and patience to do some tedious bookkeeping: \begin{align} \neg(p\land q)\land (q\lor p) &\equiv [\neg(p\land q)\land q]\lor [\neg(p\land q)\land p]\qquad\text{(distributivity)}\\[0.5em] &\equiv [(\neg p\lor \neg q)\land q]\lor [(\neg p\lor \neg q)\land p]\qquad\text{(DeMorgan)}\\[0.5em] &\equiv [(\neg p\land q)\lor (\neg q\land q)]\lor [(\neg p\land p)\lor (\neg q\land p)]\qquad\text{(distributivity)}\\[0.5em] &\equiv (\neg p\land q)\lor (p\land \neg q)\qquad\text{(elimination)} \end{align}

Related Question