I'm having trouble coming up with a proof.
I know that to how an equal cardinality I must show each of the sets has the same numbers of elements (in this case infinite integers). I have begun my proof as follows:
$\{a \in Z| a = 4r + 2\}$ for some $r \in Z$
Because $a$ is an integer than $a$ means that some integer is equal to $4r+2$.
Because an integer can be positive or negative, we must show that $a$ is either $2k$ or $2k+1$
Case 1: Show $a$ is even
$a = 4r+2$
$a = 4(2k)+2$
$a = 8k+2$
$a = 2(4k+1)$
$a = 2(n)$
Case 2: show that $a$ is odd
$a = 4r+2$
$a = 4(2k+1)+2$
$a = 8k+6$
$a = 2(4k+2)+1$
$a = 2(n)+1$
Because we have proven $a$ is an even or odd integer then some $a$ can be represented by some even or odd integer. Thus for whatever $a$, there is an integer $r$ that can represent it and thus they have the same cardinality.
Is my proof proof correct and if not could you explain the correct process I should be taking?
We say that $A$ and $B$ have the same cardinality if there exists a bijection between them, that is, a function $f : A \to B$ such that:
So in this case we'll take $B$ to be $\mathbb{Z}$ (the integers), and $A$ the set $\{a \in \mathbb{Z} : a=4r+2 \text{ for some } r \in \mathbb{Z} \}$.
Let's consider the function $f(x) = 4x+2$.
Firstly, if $r$ is in $\mathbb{Z}$, then $f(r) = 4r+2$ for an integer $r$, so $f(r) \in A$. This tells us that $f$ is indeed a function from $\mathbb{Z}$ to $A$. Now we want to show that it is a bijection.
And now we've shown that $f$ is a bijection between $\mathbb{Z}$ and $A$, therefore the two sets have the same cardinality.