I'm a first year CS student about to write his first term test and this question is part of our practice package. I have not been successful in writing a sequence of equivalences to justify this proof.
$P \Leftrightarrow P \vee (P \wedge Q)$
I've tried using the distributive property and simplifying conjunction and disjunction pairs on the right side but have only got to this step so far.
$$P \vee (P \wedge Q) \\ \Leftrightarrow (P \vee P) \wedge (P \wedge P) \\ \Leftrightarrow P \wedge P \wedge Q \\ \Leftrightarrow P \wedge Q$$
Is there a "trick" for these types of proofs? A special technique? Any form of help is appreciated!
We prove each direction of the double implication. $$A \equiv B \Leftrightarrow (A\Rightarrow B) \land (B \Rightarrow A)$$Note that
$$P \implies (P \lor (P\land Q))\equiv \lnot P \lor P \lor (P\land Q)\equiv T \lor (P\land Q) \equiv T\tag{$\Rightarrow$}$$
Note: In the preceding string of equivalencies, $T$ denotes "true", and infact, we see that the forward implication is a tautology. Now, for the $\Leftarrow$ direction:
$$P\lor (P \land Q) \equiv (P\lor P) \land (P \lor Q) \equiv P \land (P \lor Q) \implies P\tag{$\Leftarrow$}$$
Therefore $$P \iff (P \lor (P \land Q))$$