# How to show that $p \oplus p$ is a contradiction?

One of my textbook solutions shows why $$p \oplus p$$ is a contradiction with something like these steps:

\begin{align*}p \oplus p &\quad& {}\\ (p \vee p) \wedge \lnot(p \wedge p) & & \text{by definition} \\ p \wedge \lnot p & & \text{ by the identity laws}\end{align*}

The above is clearly a contradiction.

I don’t understand how they get from the second line to the third. From what I understand, the identity law is that $$p \vee T$$ is equivalent to $$p,$$ but I don’t see how this gets us from line 2 to line 3.

It is from the idempotence identities, which are $$p\vee p\equiv p$$ and $$p\wedge p\equiv p$$.
So $$\quad(p\vee p)\wedge\neg(p\wedge p)\\ \equiv (p)\wedge\neg(p)$$
You may be encountering a confusion of terminology.   Truth ($$\top$$) is known as the conjunctive identity, and falsity ($$\bot$$) as the distributive identity .   However, the identity laws are a list of fourteen equivalences used for substitutions in propositional calculus (including these).
Also, these are not to be confused with the first order logic's Law of Identity: $$\forall x~(x=x)$$.
Formally, if you aren't able to say $$p \wedge p = p,$$ then maybe you know that $$\wedge$$ and $$\vee$$ distribute over each other? In that case, you could see $$p \wedge p \equiv (p \vee F) \wedge (p \vee F) \equiv p \vee (F \wedge F) \equiv p \vee F \equiv p$$