# Rewrite equivalent boolean function for p ⇔ q

Using only the operators ⇒ (conditional) and ∼ (negation)

Rewrite p ⇔ q

Thanks

-

Note that $a\vee b$ can be written as $(\neg a)\Rightarrow b$ and that $a\wedge b$ can be written as $\neg((\neg a)\vee(\neg b))$ and thus as $\neg(a\Rightarrow (\neg b))$. $a\Leftrightarrow b$ can be written as $(a \Rightarrow b)\wedge(b\Rightarrow a)$ and hence also as $$\neg((a\Rightarrow b)\Rightarrow \neg(b\Rightarrow a)).$$
$p\iff q \equiv (p\implies q) \land (q\implies p)$.
We can use $\implies$ but we somehow need to rewrite $\land$ in terms of $\implies$ and $\neg$. Note that $A\implies B \equiv \neg A\lor B$. So, $\neg (A\implies B)\equiv A\land \neg B$. To take care of $\neg B$, replace $B$ by its negation, so that $\neg(A\implies \neg B)\equiv A\land B$.
Substituting for $A$ and $B$, $(p\implies q)$ and $(q\implies p)$ respectively gives $$\neg((p\implies q)\implies \neg (q\implies p)).$$