I'm approaching the study of pure Algebra, starting from equivalence relations, sets and quotient sets. I have a background in Algebra, but it's only a bit of linear algebra and I never worked with equivalence relations, so I am gonna ask you if the two examples I am writing are correct or not. They are taken from two exercises, but there is no solution.
First Be $X = \mathbb{Z}$ and define an equivalence relation between elements of $X$ such that: $x \sim y \iff x-y$ is even.
I proved that that is indeed an equivalence relation, and then I wrote the "class elements" (are they called that way?):
$$[A] = \{ 0; \pm 2; \pm 4; \ldots \}$$ $$[B] = \{ \pm 1; \pm 3; \pm 5; \ldots \}$$
There are no other "classes", hence I can say $X/\sim = \{ [A], [B] \}$. Is this the correct way to write? I thought that I could also write that $X/\sim = A \cup B$. Would this be correct?
Second This one is a bit strange to me (or maybe it's just obvious). $X$ as before, and $x \sim y \iff |x-y| = 2$.
For this, I started to write the class elements:
$$[A] = \{ 0; 2 \}$$ $$[B] = \{ 2; 4 \}$$ $$[C] = \{ 4; 6 \}$$
And so on, but also I have $[a] = \{ -2 ; 0 \}$, $[b] = \{-1; 1\}$ and so on...
Am I right so far or is this wrong?
I would (if correct) then write
$$X/\sim = A\cup B \cup C \cup \ldots \cup a \cup b ... $$
Tell me if I'm right please.
Also I ask you if you know some GREAT reference about those topics, quotient sets and so on.
Thank you so much!
EDIT
I feel dumb, but I realised, thank to the comments, that the second one is not an equivalence relation. It's not transitive nor reflexive...