Biconditional in terms of NAND

Theorem

 * $p \iff q \dashv \vdash \paren {\paren {p \uparrow q} \uparrow \paren {p \uparrow q} } \lor \paren {\paren {\paren {p \uparrow p} \uparrow \paren {q \uparrow q} } \uparrow \paren {\paren {p \uparrow p} \uparrow \paren {q \uparrow q} } }$

where $\iff$ denotes logical biconditional and $\uparrow$ denotes logical NAND.