Prove that an interval of rationals has the same cardinality as the rationals

39 Views Asked by At

I am trying to find an answer to this problem "Show that the sets $\mathbb Q$ of rational numbers and $A = \{x \in\mathbb Q | 0 \le x \le 1\}$ have the same cardinality"

So, I know we would have to find a bijection from $\mathbb Q$ to $A$. I was thinking of this one :

$f(x) = \begin{cases} \frac{x}{x+1}, & \text{if $x$ > - 1} \\[2ex] 1, & \text{if $x$ = -1} \\[2ex] ?, & \text{if $x$ < -1} \\ \end{cases} $

which I guess it would be well defined (since $x < x+1, \frac{x}{x+1} < 1$) and injective ( $$\frac{x}{x+1} = \frac{x'}{x'+1} => xx' + x = x'x + x' => x =x'$$). But now I can't find how to define the rationals under -1 to make f surjective !

I tried also to find a bijection from $\mathbb N\times\mathbb N$ to $A$ (we already saw in class that $|\mathbb N\times \mathbb N| = |\mathbb N| = |\mathbb Q|$)

So far, the closest answer on Internet I could find to my question was on this topic : https://www.physicsforums.com/threads/cardinality-of-an-interval-of-rationals.432232/ , but I can't make sense of it, so I am doing a new topic !

Thank you very much for your help