Logical equivalence refers to propositions, not numbers. Here a^{2}and b^{2}are said to be congruent modulo 7.

The last class should be {3, 4}. In fact, since the relation is on and not , equivalence classes should be infinite. Also, you have not shown that p is an equivalence relation.

X x X = {(p, p), (p, q), (q, p), (q, q)}.

A relation on X is a subset of X x X. A reflexive relation must contain (p, p) and (q, q), but it may or may not contain other pairs.