0

How is:

$P \lor ¬Q \lor P \land ¬Q$

Factorise​d to get:

$P \lor ¬Q \land (1 \lor P)$

I've been staring at it all weekend. I understand what factorisation is and can do it in math.

I tried expanding it to get:

P v ¬Q ^ v P v ¬Q ^ P

It makes no sense.

niobium
  • 1,177
  • Hi! Do you know how to simplify $1\lor P$ ? Do you know about distributivity of over (and distributivity of over ) ? – niobium Nov 18 '23 at 09:57
  • I know that 1∨ = 1, but not distributivity of ∨ over ∧ (and distributivity of ∧ over ∨) – user252704 Nov 18 '23 at 10:15
  • Distributivity of "logic and" over "logic or" (and distributivity of "logic or" over "logic and") has the same meaning as distributivity of multiplication over addition. The same way $c\times (a+b) = ac+bc$ you have: $A\land (B\lor C) = (A\land B) \lor (A\land C)$ and on the other hand you have: $A\lor (B\land C) = (A\lor B) \land (A\lor C)$. – niobium Nov 18 '23 at 10:25
  • But by that logic I get (P v ¬Q ^ 1) v (P v ¬Q ^ P) - which goes to (P v ¬Q) v (P v ¬Q ^ P) - I don't understand where that last '^ P' comes from after you remove the brackets – user252704 Nov 18 '23 at 10:34
  • To answer your comment, you have (on the right of your last expression): $(P\lor \lnot Q) \land P$ $\iff P\land (P\lor \lnot Q)$ $\iff P\lor \lnot Q$. I strongly recommend you to use Latex next time, you'll be more likely to get answers. – niobium Nov 18 '23 at 11:08

2 Answers2

1

First expression $(1)$ can be expanded using distributivity :

$$P\lor \lnot Q \lor (P\land \lnot Q) \tag{1}$$

$$\iff (P\lor \lnot Q \lor P)\land (P\lor \lnot Q \lor \lnot Q) \tag{1}$$

Since $P\lor P = P$ and $\lnot Q \lor \lnot Q = \lnot Q$, we have the first expression equivalent to:

$$ (P\lor \lnot Q) \land (P\lor \lnot Q) \tag{1}$$ Which is the same as:

$$ (P\lor \lnot Q) \tag{1}$$

As for the second expression $(2)$, you have: $$ P\lor \lnot Q \land (1\lor P) \tag{2}$$

$$\iff P\lor \lnot Q \land 1 \tag{2}$$

$$\iff (P\lor \lnot Q) \land 1 \tag{2}$$

$$\iff P\lor \lnot Q \tag{2}$$

EDIT:

Since OP wants actually to get from his first expression to his second expression, here is a way to do it:

We previously saw that first expression is equivalent to:

$$(P\lor \lnot Q)$$

Next we can "artificially" add $1$ on the right:

$$\iff (P\lor \lnot Q)\land 1$$

Then, since $1 = 1\lor P$ (as OP correctly pointed out in one of his comments):

$$\iff (P\lor \lnot Q)\land (1 \lor P)$$

And that's it.

niobium
  • 1,177
  • Thank you, I understand and appreciate everything you are saying and that the expressions are equivalent. I just don't understand how you get from the first to the second in terms of it being factored out - usually you look for a common factor. – user252704 Nov 18 '23 at 11:39
  • I just don't understand how you do it backwards if that makes sense – user252704 Nov 18 '23 at 11:46
  • I've just edited my answer (to do it from your first expression to your second expression). But please note, that the first part of my answer is also correct: if you want to prove $A=B$, you can always prove $A=C$ and then $B=C$ and by transitivity of the relation = you have $A= B$. – niobium Nov 18 '23 at 12:04
  • I understand everything you say now and it makes logical sense. The example I’m working from goes directly from the 1st expression to the second in one step though factorisation. I’m just not sure exactly why or how it did that. – user252704 Nov 18 '23 at 18:06
  • And how can you artificially add a one? – user252704 Nov 18 '23 at 18:13
  • Well I am not very acquainted with the notion, but it is because you are working in a Boolean algebra ; you can see the identity axiom in the article. Another argument, more simple, would be that $A$ and $A\land 1 $ have the same truth table – niobium Nov 18 '23 at 19:40
1

I would recommend to use $+$ in place of $\vee$, a product with no symbol instead of $\wedge$ and $\overline{Q}$ instead of $\neg Q$. Now, using commutativity, associativity, the rule $1 + x = 1$ and the distributivity law $a(b + c) = ab + ac$, your two expressions become \begin{align} P + \overline{Q} + P\overline{Q} &= P + P\overline{Q} + \overline{Q} = P(1 + \overline{Q}) + \overline{Q} = P + \overline{Q}\\ P + \overline{Q}(1 + P) &= P + \overline{Q} \end{align}

J.-E. Pin
  • 40,163