Define $X:=\lbrace \frac{1}{n} | n \in \mathbb{N} \rbrace$ and $Y:=\lbrace \frac{1}{n} | n \in \mathbb{N} \rbrace \cup \mathbb{N}$
So writing this in interval notation I have some function $f$ that maps $(0,1]$ to $(0,1] \cup \mathbb{N}$ I am not sure how to come up with such a function and a inverse to show these 2 have the same cardinality. Is there any way to do these types of problems?
$\endgroup$ 11 Answer
$\begingroup$It appears you mean $Y=X \cup \Bbb N$ and want to prove they have the same cardinality, that $|X|=|Y|$ You have a natural bijection $X \leftrightarrow \Bbb N$, can you define it? Now you can use the trick you saw that shows a bijection between the even naturals and all the naturals. Take the $X$ part of $Y$ to the odd naturals and the $\Bbb N$ part of $Y$ to the even naturals, and you have a bijection between $X$ and $Y$.
Note that it is incorrect to view $X$ as the interval $(0,1]$. You do have $X \subset (0,1]$, but the interval contains (uncountably) many more points than $X$.
$\endgroup$ 5