1

To construct a bijection between, say, $A = (0,1) \subset \mathbb{R}$ and $B = [0,1] \subset \mathbb{R}$, the following function is often used:

$$ f(a) = \begin{cases} 0, & \text{if $a = \frac{1}{2}$} \\ 1, & \text{if $a= \frac{1}{3}$} \\ \frac{1}{n-2}, & \text{if $a = \frac{1}{n}$, for $n \ge 4$} \end{cases}$$

where $a \in A$, and $b \in B$.

But, what about all of the irrationals in $A$ and $B$? Clearly, $f$ only accounts for rational numbers, does it not? Perhaps it's trivial, as one could simply add the case that $f(a) = a$ if $a \in \mathbb{R} \setminus \mathbb{Q}$ (although, I'm not sure if that's actually even well-defined); but since this bijection is often presented without any qualification, I assume I'm missing something obvious here...

  • 3
    That is exactly what is going on, that it maps irrationals to themselves and also maps all rationals not of the form $\frac{1}{n}$ to themselves. Wherever you copied it from just forgot to mention how $f$ acts on numbers not of the form $\frac{1}{n}$ for any $n$ – JMoravitz Aug 18 '17 at 22:47
  • 1
    Related: [how to define a bijection between $(0,1)$ and $(0,1]$](https://math.stackexchange.com/questions/160738/how-to-define-a-bijection-between-0-1-and-0-1?rq=1). – JMoravitz Aug 18 '17 at 22:48

1 Answers1

2

As you suggest, making $f$ the identity on the irrationals will do just fine. You also have to define $f$ on the rationals whose numerator is greater than $1$. Easy question: what do you suggest there?

This is perfectly well defined. It's even continuous at most points.

Ethan Bolker
  • 103,433
  • Oh, right. Yes, similarly the identity map would work for all real numbers of the form $\frac{p}{q}$ where $p > 1$ and $q > 0$ are relatively prime integers (i.e., the rational numbers reduced to their lowest terms). – thisisourconcerndude Aug 18 '17 at 23:01