# Can one use DeMorgan's Laws to expand a long trail of ANDs and ORs?

For instance,

Is $\neg (((p \land q) \lor r) \land s)$ equivalent to $((\neg p \lor \neg q) \land \neg r) \lor \neg s$?

-
I think you can factorize it in the brackets first, and use the easy DeMorgan's Law a few times. – rhenskyyy Apr 28 '12 at 3:32
$p\land q\lor r\land s$ is ambiguous. Does it mean $(p\land q)\lor(r\land s)$, or does it mean $((p\land q)\lor r)\land s$, or some other combination? (Note the two are not equivalent; $(p\land q)\lor (r\land s)$ is true if $p$ and $q$ are true and $r$ and $s$ are false, but $((p\land q)\lor r)\land s$ is false if $s$ is false). Express it clearly first, and figure out which connective is at the "top level". – Arturo Magidin Apr 28 '12 at 3:33
In short: what precedence rules are you using? – J. M. Apr 28 '12 at 3:37
@JohnHoffman: With the parenthesization that I think you had in mind, your calculation is correct. However, the reader should not be put into the position of having to guess where the missing parentheses are intended to be, unless there are long-established conventions. – André Nicolas Apr 28 '12 at 3:37
The short answer: Yes, you can use DeMorgan's law to expand a long sequence; this is easy to verify if they are all $\land$s or all $\lor$s. For other combinations, you have to be a bit careful on how you associate on either side (making sure the associations are compatible). – Arturo Magidin Apr 28 '12 at 3:59