NAND is not Associative

Theorem
Let $\uparrow$ signify the NAND operation.

Then there exist propositions $p,q,r$ such that:
 * $p \uparrow \left({q \uparrow r}\right) \not \vdash \left({p \uparrow q}\right) \uparrow r$

That is, NAND is not associative.

Proof

 * align="right" | 5 ||
 * align="right" | 2
 * $\left({\neg q}\right) \lor \left({\neg r}\right)$
 * $\lor \mathcal I_2$
 * 4
 * align="right" | 6 ||
 * align="right" | 2
 * $\neg \left({q \land r}\right)$
 * $\mathrm {DM}$
 * 5
 * align="right" | 7 ||
 * align="right" | 2
 * $q \uparrow r$
 * By definition
 * 6
 * align="right" | 7 ||
 * align="right" | 2
 * $q \uparrow r$
 * By definition
 * 6


 * align="right" | 9 ||
 * align="right" | 2
 * $\neg \neg \left({p \land \left({q \uparrow r}\right)}\right)$
 * $\neg \neg \mathcal I$
 * 8
 * align="right" | 10 ||
 * align="right" | 2
 * $\neg \left({p \uparrow \left({q \uparrow r}\right) }\right)$
 * By definition
 * 9
 * align="right" | 11 ||
 * align="right" | 2
 * $\left({\neg \left({p \uparrow q}\right) }\right) \lor \left({\neg r}\right)$
 * $\lor \mathcal I_2$
 * 4
 * align="right" | 12 ||
 * align="right" | 2
 * $\neg \left({\left({p \uparrow q}\right) \land r}\right)$
 * $\mathrm {DM}$
 * 11
 * align="right" | 13 ||
 * align="right" | 2
 * $\left({p \uparrow q}\right) \uparrow r$
 * By definition
 * 12
 * align="right" | 14 ||
 * align="right" | 2
 * $\neg \neg \left({\left({p \uparrow q}\right) \uparrow r}\right)$
 * $\neg \neg \mathcal I$
 * 13
 * align="right" | 2
 * $\left({p \uparrow q}\right) \uparrow r$
 * By definition
 * 12
 * align="right" | 14 ||
 * align="right" | 2
 * $\neg \neg \left({\left({p \uparrow q}\right) \uparrow r}\right)$
 * $\neg \neg \mathcal I$
 * 13
 * $\neg \neg \mathcal I$
 * 13


 * align="right" | 16 ||
 * align="right" | 2
 * $\neg \left({\neg \left({\left({p \uparrow q}\right) \uparrow r}\right) \lor \left({p \uparrow \left({q \uparrow r}\right)}\right) }\right)$
 * $\mathrm {DM}$
 * 15
 * align="right" | 17 ||
 * align="right" | 2
 * $\neg \left({ \left({p \uparrow q}\right) \uparrow r \implies p \uparrow \left({q \uparrow r}\right) }\right)$
 * $\mathrm {TI}$
 * 16
 * Disjunction and Implication
 * align="right" | 18 ||
 * align="right" | 1,2
 * $\bot$
 * $\neg \mathcal E$
 * 1,17
 * align="right" | 1,2
 * $\bot$
 * $\neg \mathcal E$
 * 1,17

Taking $p = \top$, $r = \bot$, we find $\vdash p \land \neg r$, and conclude our initial assumption was false.

Proof by Truth Table
We apply the Method of Truth Tables:


 * $\begin{array}{|ccccc||ccccc|} \hline

p & \uparrow & (q & \uparrow & r) & (p & \uparrow & q) & \uparrow & r \\ \hline F & T & F & T & F & F & T & F & T & F \\ F & T & F & T & T & F & T & F & F & T \\ F & T & T & T & F & F & T & T & T & F \\ F & T & T & F & T & F & T & T & F & T \\ T & F & F & T & F & T & T & F & T & F \\ T & F & F & T & T & T & T & F & F & T \\ T & F & T & T & F & T & F & T & T & F \\ T & T & T & F & T & T & F & T & T & T \\ \hline \end{array}$

As can be seen by inspection, the truth values under the main connectives do not match for all models.