# Distributive law in logic

How come

$$(\neg p \land q) \lor ( \neg p \land \neg q) \Leftrightarrow \neg p \land (q \lor \neg q)$$

by distributive law? I simply don't understand how they made them equivalent by the ditributive law. Could smb explain in details? Thanks!

• Do you know what the distributive law is? Sep 17, 2015 at 6:27
• @David, I know but how does it even have any similarities with simple algebra? Could you please explain?
– John
Sep 17, 2015 at 6:29
• Please post the distributive law for logic in your question. Sep 17, 2015 at 6:33
• @David, I've posted it in the question
– John
Sep 17, 2015 at 6:36
• OK, that's correct. Now you can substitute any expressions you like for $p,q,r$. Can you see what substitutions to make so that the LHS of your distributive law is identical with the RHS of your question? And then what will you have on the RHS of your distributive law? Sep 17, 2015 at 6:41

EDIT: There are two Distributive laws: $$(p \lor (q \land r) \equiv (p \lor q) \land (p \lor r)$$ and $$(p \land (q \lor r) \equiv (p \land q) \lor (p \land r).$$

So we'll have $$(\neg p \land q) \lor ( \neg p \land \neg q)$$

$$\Leftrightarrow (\neg p \lor \neg p) \land ( q \lor \neg q)\text{ (By Distributivite Law)}$$

$$\Leftrightarrow \neg p \land (q \lor \neg q) \text{ (By Idempotent Law)}$$

• Do I always have to multiply first coefficients with each other, second coefs with each other, and etc, when there is v, @OGC?
– John
Sep 17, 2015 at 6:30
• @John I've made an edit, and they are propositions, not coefficients.
– OGC
Sep 17, 2015 at 6:57

Here is distributive law:- $A\wedge (B \vee C) \equiv (A \wedge B) \vee (A \wedge C)$

Start with right hand side you can understand it..
$\neg{p} \wedge (q \vee \neg{q}) \equiv (\neg{p}\wedge q)\vee(\neg{p}\wedge q)$
In This equation predicate $\neg p$ is distributed to predicate $q$ and predicate $\neg q$ which are "OR($\vee$)" operated with each other and $\neg p$ is "AND($\wedge$)" operated over all