Need help simplifying this Boolean expression

logicpropositional-calculus

From my textbook, by using distributive law, its able to simplify:

$[(p \land \lnot q) \lor (p \land q)] \land q$

To:

$[p \land (\lnot q \lor q)] \land q $

I don't know how to get to this step, and here is how I've tried by distributing the first expression :

$[(p \lor p) \land (p \lor q) \land (\lnot q \lor p) \land (\lnot q \lor q)] \land q$

If I try continue to expand this, it will become very complex. I think I'm doing this in the wrong way and I will appreciate it very much if anyone can explain how the textbook got the simplified answer.

Thanks

Best Answer

$$[(\color{blue}{p} \land \lnot q) \lor (\color{blue}{p} \land q)] \land q \equiv [\color{blue}{p} \land (\color{red}{{\lnot q \lor q}})] \land q\tag{distributivity}$$

$$ \equiv (\color{blue}{p} \land \color{red} \top) \land q$$

$$\equiv \color{blue}{p} \land q$$

That is, the distributive law declares that $$[p\land (\lnot q \lor q)] \equiv [(p \land \lnot q) \lor (p \land q)]$$ That means that it is the same law when we write it: $$[(p \land \lnot q) \lor (p \land q)] \equiv [p\land (\lnot q \lor q)]$$


Addendum

enter image description here

enter image description here

enter image description here

Related Question