# Can't understand the solution given on logical equivalence

I'm working on this question: Use Theorem 2.1.1 to verify the logical equivalence $$∼(∼p ∧ q) ∧ (p ∨ q) ≡ p.$$

I'm guessing that I either have a flawed understanding either about the distributive law or absorption law or both.

These were my steps and was stuck:

$$∼(∼p ∧ q) ∧ (p ∨ q) ≡ (∼(∼p) ∨ ∼q) ∧ (p ∨ q)$$ <--By De Morgan’s laws

$$≡ (p ∨ ∼q) ∧ (p ∨ q)$$ <--by the double negative law

$$≡{ ( (p ∨ ∼q) ∧ p ) ∨ ( (p ∨ ∼q) ∧ q ) }$$ <--By distributive law

$$≡{ p ∨ ( (p ∨ ∼q) ∧ q }$$ <--By absorption law

$$≡{ p ∨ ( (q ∧ p) ∨ (q ∧ ∼q) ) }$$ <--By distributive law

$$≡{ p ∨ ( (q ∧ p) ∨ 0 ) }$$ <--By negation law

$$≡{ p ∨ (q ∧ p) }$$ <--By identity law

$$=p$$<--By adsorption law (Edited after a comment, thus I have edited the question)

The answer was: $$∼(∼p ∧ q) ∧ (p ∨ q) ≡ (∼(∼p) ∨ ∼q) ∧ (p ∨ q)$$ by De Morgan’s laws

$$≡ (p ∨ ∼q) ∧ (p ∨ q)$$ by the double negative law

$$≡ p ∨ (∼q ∧ q)$$ by the distributive law

$$≡ p ∨ (q ∧ ∼q)$$ by the commutative law for ∧

$$≡ p ∨ c$$ by the negation law

$$≡ p$$ by the identity law

So my question how did the solution jump from $$(p ∨ ∼q) ∧ (p ∨ q)$$ to $$p ∨ (∼q ∧ q)$$ just using distributive law?

• $p \vee (p \wedge q)$ is equivalent to $p$. – fish May 17 '20 at 4:26
• Nice work! The latex symbol $\neg$ for negation is \neg. – Olivier Roche May 17 '20 at 6:21
• I'll use it next time! Thank you – Leon May 18 '20 at 0:53

Distributive laws states that $${\displaystyle p\vee (q\wedge r)\equiv (p\vee q)\wedge (p\vee r)}\tag{1}$$ $${\displaystyle p\wedge (q\vee r)\equiv (p\wedge q)\vee (p\wedge r)}\tag{2}$$ Here we are applying $$(1)$$ that $$(\color{red}p\vee \color{blue}q)\wedge (\color{red}p\vee \color{green}r)$$ implies $$\color{red}p\vee (\color{blue}q\wedge \color{green}r)$$.

That $$(\color{red}p∨\color{blue}{∼q})∧(\color{red}p∨\color{green}q)$$ implies $$\color{red}p∨(\color{blue}{∼q}∧\color{green}q)$$ which is distributing $$p$$ out.