^ means intersect which is equivalent to AND logical operator.
both conditions have to be true in order for the AND condition to be true.
~ means NOT
if p is true, then ~p is false.
if p is false, then ~p is true.
same goes for q and ~q
we do not need to show p and q because we are only interested in ~p and ~q because the AND statement only involves them.