# Thread: Rewriting expressions with logic laws (4)

1. ## Rewriting expressions with logic laws (4)

Rewrite: $\displaystyle q \wedge ( \sim (((p \vee (p \wedge q)) \wedge (p \vee q)) \vee q))$ and determine if its tautology, contradiction or neither. Using truth table I got contradiction.

My working out:

$\displaystyle q \wedge ( \sim (((p \vee (p \wedge q)) \wedge (p \vee q)) \vee q))$
$\displaystyle \equiv$ $\displaystyle q \wedge ( \sim ((p \wedge (p \vee q)) \vee q))$
$\displaystyle \equiv$ $\displaystyle q \wedge ( \sim (p \vee q))$
$\displaystyle \equiv$ $\displaystyle q \wedge ( \sim p \wedge \sim q)$
$\displaystyle \equiv$ $\displaystyle q \wedge ( \sim q \wedge \sim p)$
$\displaystyle \equiv$ $\displaystyle (q \wedge \sim q) \wedge \sim p$
$\displaystyle \equiv$ $\displaystyle p \wedge \sim p$
$\displaystyle \equiv$ $\displaystyle F$

So I finished off with a contradiction. Is this correct? Any help would be much appreciated.

2. Can anyone confirm? thanks

3. Originally Posted by jvignacio
Rewrite: $\displaystyle q \wedge ( \sim (((p \vee (p \wedge q)) \wedge (p \vee q)) \vee q))$ and determine if its tautology, contradiction or neither. Using truth table I got contradiction.

My working out:

$\displaystyle q \wedge ( \sim (((p \vee (p \wedge q)) \wedge (p \vee q)) \vee q))$
$\displaystyle \equiv$ $\displaystyle q \wedge ( \sim ((p \wedge (p \vee q)) \vee q))$
$\displaystyle \equiv$ $\displaystyle q \wedge ( \sim (p \vee q))$
$\displaystyle \equiv$ $\displaystyle q \wedge ( \sim p \wedge \sim q)$
$\displaystyle \equiv$ $\displaystyle q \wedge ( \sim q \wedge \sim p)$
$\displaystyle \equiv$ $\displaystyle {\color{red}(q \wedge \sim q)} \wedge \sim p$
So far so good. But now things get slightly off the rails:
$\displaystyle \equiv$ $\displaystyle {\color{red}p} \wedge \sim p$
$\displaystyle \equiv$ $\displaystyle F$
This should, imho, be
$\displaystyle \equiv {\color{blue}F}\wedge \sim p$

$\displaystyle \equiv F$
So I finished off with a contradiction. Is this correct?
The result is correct, in my opinion, but see the above glitch in the derivation.

4. Originally Posted by Failure
This should, imho, be
$\displaystyle \equiv {\color{blue}F}\wedge \sim p$
Quick question is $\displaystyle {\color{blue}F}\wedge \sim p$ the same as $\displaystyle \sim p \wedge {\color{blue}F}$ ? and they both = $\displaystyle {\color{blue}F}$. According to the Commutative law they should be right?

5. Originally Posted by jvignacio
Quick question is $\displaystyle {\color{blue}F}\wedge \sim p$ the same as $\displaystyle \sim p \wedge {\color{blue}F}$ ? and they both = $\displaystyle {\color{blue}F}$. According to the Commutative law they should be right?
Right, but to be honest, I personally use a much more general rule: whenever there is a "false" anywhere in no matter how large a conjunction ($\displaystyle \wedge$), the whole conjunction collapses to the value "false".

It's akin to having a 0 in a product of numbers: the whole product collapses to the value 0.