# Boolean Algebra simplify problem

I am reading a section on Boolean algebra in a text book and trying to understand a solution to simplifying problem they have presented.the expression

$$(¬p ∧ ¬q ∨ p)$$

is simplified to $$(¬q ∧ p).$$

I have not been able to work out what law was used t o arive at this. Thanks in advance. PS I am very new to Boolean algebra in case you couldn't tell.

Are you sure that the result is what you wrote?

because I am getting this as $$p \lor \lnot q$$

The procedure is very simple:

We have this expression $$\left(\lnot p \land \lnot q\right) \lor p$$ By the distributive law : => You can find about it here: Laws of boolean algebra

We get : $$\left(p \lor \lnot p \right) \land \left(p \lor \lnot q \right)$$ In the same link above we can find that $$p \lor \lnot p = 1$$ then: $$1 \land \left(p \lor \lnot q \right)$$ Again from the link we get: $$p \lor \lnot q$$

Good luck!

By the second distributive law $$(x y +z )=(x+z)(y+z)$$ or, in $$∧ , ∨$$ notation, $$(x∧y∨z)=((x∨z)∧(y∨z))$$ is $$(¬p ∧ ¬q ∨ p)=(¬p ∨ p ) ∧ (¬q ∨ p)=\quad1∧ (¬q ∨ p )= (¬q ∨ p).$$