Let S={-8,-4,-2,0,1,2,5,7} be a subset of Z(integers), and let ~ be a relation defined on S by x~y if $\displaystyle 7 | (6x+7)$.

Find all distinct equivalence classes.

Attempt:

Here's my problem: when I want to find one of the equivalence classes, for instance [0], I'm not sure how do it.

In $\displaystyle 7 | (6x+7)$ do I need to set $\displaystyle x=0$ or $\displaystyle y=0$???

I checked the solution and the correct answer for this particular problem is setting x to zero:

[0]={$\displaystyle x \in S : 7|6.0+y = y$}

I'm confused because in many other problems which are very similar we set y=0. I don't see how we can determine this...