# Thread: Rewriting expressions with logic laws (2)

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

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

My working out:

- $(p \wedge (q \to (p \vee (p \wedge q)))) \wedge q$
- $(p \wedge (q \to p)) \wedge q$
- $(p \wedge (\sim q \vee p)) \wedge q$
- $(p \wedge (p \vee \sim q)) \wedge q$
- $((p \wedge p) \vee \sim q) \wedge q$
- $(p \vee \sim q) \wedge q$

Now im a little stuck. After the truth table, im assuming I have to finish off with just a "p". Any help would be much appreciated.

2. Hi

Since your formula has the form $A\wedge q,$ finding only $p$ will be hard.

In your other post, you used $p\wedge(p \vee\neg q)\equiv p.$ Applying this to your third or fourth line will allow you to conclude.

(What you did for line 4 $\rightarrow$ line 5 is wrong)

3. Originally Posted by clic-clac
Hi

Since your formula has the form $A\wedge q,$ finding only $p$ will be hard.

In your other post, you used $p\wedge(p \vee\neg q)\equiv p.$ Applying this to your third or fourth line will allow you to conclude.

(What you did for line 4 $\rightarrow$ line 5 is wrong)
Thanks for your help, but I will only end up with $p \wedge q$ and not $p$. Is that still fine?

4. Yes, I suggest you redo your table.
Note that even if $p$ is true, as soon as $q$ is false, the formula is false; thus the formula cannot be equivalent to $p$!

5. Originally Posted by clic-clac
Yes, I suggest you redo your table.
Note that even if $p$ is true, as soon as $q$ is false, the formula is false; thus the formula cannot be equivalent to $p$!
Are you referring to the truth table? To re-do it?